? on two objects calling each other
codemonkey
Posts: 38
Being new to the Propeller, I'd like to be able to call back and forth between objects in separate·cogs. When i try to define as i think i should i get a "circular reference". Some brief abstracted code:
'Master·object
OBJ Bottom : "servant"
PUB Main()
· Bottom.Start()
PUB SomethingHappened()
··/etc.
'Servant·object
OBJ Top : "master"
PUB Start()
· /etc.
PUB Main()
· Top.SomethingHappened()
I didn't see way to pass references to objects. Any suggestions??
'Master·object
OBJ Bottom : "servant"
PUB Main()
· Bottom.Start()
PUB SomethingHappened()
··/etc.
'Servant·object
OBJ Top : "master"
PUB Start()
· /etc.
PUB Main()
· Top.SomethingHappened()
I didn't see way to pass references to objects. Any suggestions??
Comments
2) DAT is really intended for assembly language and tables of constants, but there's nothing to prevent you from changing
one of the "initialized variables" to some other value.
3) Every "instance" of the object has a private copy of the VAR section(s), but there is only one copy of the code and any DAT section(s).