Copy link to clipboard
Copied
Dear friends, I may be blind again - there was ample sunshine today...
In this snippet
if (oTR.beg.obj.ObjectValid()) {
$.writeln(oTR.beg.obj.constructor.name);
oFound.object = oTR.beg.obj;
At line 3 I get the error "undefined is not an object".
Line 2 outputs Pfg - so imho "oTR.beg.obj" is an object.
oFound is declared to be an object, as well as oTR is.
Where is my knot in t he brain?
Try this:
oFound.myObject = oTR.beg.obj;
It might be that the 'object' property conflicts with a reserved keyword in the scripting environment or language. So the error refers to the property you are trying to set, not the value you try to assign to it.
Copy link to clipboard
Copied
Try this:
oFound.myObject = oTR.beg.obj;
It might be that the 'object' property conflicts with a reserved keyword in the scripting environment or language. So the error refers to the property you are trying to set, not the value you try to assign to it.
Copy link to clipboard
Copied
Jang, you hit the nail! I should not have used here a propertyat all, because oFound is already used as the found object (Pgf etc.). And somewhere I have noted to avoid private property names resebling existing ones...