02-05-2007, 12:53 PM
It makes sense that a DAT block in one object isn't known about by another linked via an OBJ statement.
Is the "usual" way for them to have access to the same data for obj1 to pass a pointer to obj2 as parameters in obj2's start method? Or is there a better way?
02-05-2007, 09:19 PM
With the little experiences I have with Propeller and the read of a lot of example code, I can say that, yes it's the usual way to share data between some object.
Except if Mike Green know a better way, You need to transmit the argument as reference to the object (with '@' operator). And You can then if necessary modify the variable with the 'BYTE, WORD or LONG' declaration.
Here are an example:
' now DS18B20Found is equal to 1
' The method 'change' can be in another object
DS18B20Found byte 0
in medio virtus