SET UDFPARMS does not cover the case of a parameter being an
object. I can not think of where else to check. (@ does not do it
<G>.)
I need to pass an object to another object. In the processing
that the second object does, the first object's state will normally
change. The object pointed to by the parameter will not. I realised
that I am not sure how to do this.
(The first object is a data collector. I can not instantiate the
first object in the second object as the first object's lifetime may
have to be more than one second object lifetime.)
Illustrative snippets:
firstobjectref=createobject("firstobject" ... )
secondobjectref=createobject("secondobject",firstobjectref)
secondobjectref.somesecondmethod(...)
define class secondobject as ...
...
procedure init
lparameters ... firstobj
...
this.firstobj=firstobj
...
endproc
procedure somesecondmethod
this.firstobj.somefirstmethod(...)
but not
this.firstobj=...
Is the createobject() correct, or should it be
... @firstobjectref ...
?
How does the answer change if the object pointed to by the
parameter could change (and it is to be passed back to the caller)?
Any other gotchas to watch for?
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.