class ChildItem
constructor : ->
@activate()
activate : ->
if parent.ready #this line will fail
console.log 'activate!'
class ParentItem
constructor : ->
@ready = true;
@child = new ChildItem()
item = new ParentItem()
How can I access item.ready from item.child.activate ? There has got to be a syntax for this!
No, there isn’t a special syntax for this. If you need a relationship between a
ChildItemand aParentItemthen you have to hook it up yourself; for example: