Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any problems with nested _Assign calls?
Message
From
28/08/2009 14:55:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Any problems with nested _Assign calls?
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01421570
Message ID:
01421570
Views:
266
I've just been chasing a problem where I have 2 properties on a class that have _Assign methods on them, and the firing order is that when you assign a value to Property1, it will create an object and pass it to Property2 (which also has an _Assign method so he can do other work when he is assigned a new value).

The problem is when I pass the object into property 2, it is being received as .null., but I can tell from the debugger that the value I am passing is indeed an object, and not .null.

Is there any reason this should not work?
Property1_Assign
 Lparameters toObject

 this.Property1 = toObject
 this.MethodThatCreatesObjectForProperty2()
MethodThatCreatesObjectForProperty2()
 local loObject
 loObject = CreateObject('someclass')

 this.Property2 = loObject
Property2_Assign
 Lparameters toObject    < - - - - Coming in as .null., but it is not!

 this.Property2 = toObject
Next
Reply
Map
View

Click here to load this message in the networking platform