Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should Assign Method Fire?
Message
From
29/11/2001 11:55:49
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00587499
Message ID:
00587522
Views:
14
>Why does the assign method fire when a property with an assign method is used in a math expression on the right side of an assignment statement? This happens in VFP 6 and 7.
>
>DEFINE CLASS MyCLASS as Custom
>	PROCEDURE height_assign
>		LPARAMETERS vNewVal
>		*To do: Modify this routine for the Assign method
>		THIS.Height = m.vNewVal
>		WAIT WINDOW "Assignment fired - value "+ STR(vnewval)+".  Press any key to continue.."
>	ENDPROC
>ENDDEFINE
>
>* Test program to show anomally
>PROCEDURE test
>
>* create class
>o = CREATEOBJECT("myclass")
>* Wait window should appear in assign method
>o.height = 1
>* wait window should not appear in assign method
>y= o.height+2
>
>Return
>
Just been playing, happens for width, top & left too
Len Speed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform