Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASSIGN bug : was fixed in VFP8 ?
Message
From
24/09/2003 06:39:44
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
 
To
24/09/2003 06:19:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00831739
Message ID:
00831769
Views:
28
The bug exists and can lead to redunant code execution.
There is no reason for Width_ASSIGN method to fire when SomeVariable = thisform.Width.
If you use some_variable = thisform.width - (thisform.width - object.width) + thisform.width/3 in some line of code, the ASSIGN method is executed 3 times.
And if the width_assign method scan all controls and resize/redimension, you can imagine what this mean. A single line of code can take 100 times more to execute than normal.


>HI Dorin,
>
>it is not a general rule.
>Every property of baseclass has one particular access/assign operation.
>
>
>CLEAR
>zz = 'pippo'
>
>xx=CREATEOBJECT('txt')
>xx.xvalue = 'cambio'
>xx.tag = 'nuovo tag'
>=xx.value
>ww = 'xx.value'
>? '*** next have problems'
>xx.value = 7
>STORE 7 TO xx.value
>STORE 7 TO (m.ww)
>? '*** but internal assign no'
>xx.controlsource = 'm.zz'
>
>DEFINE CLASS txt AS TextBox
>	xValue = 'prova'
>	
>	PROCEDURE xvalue_ACCESS
>	  ? 'ACCESS xvalue',this.xvalue
>	  RETURN this.xvalue
>	
>	PROCEDURE xvalue_assign(wValue)
>	  ? 'ASSIGN xvalue',wValue
>	  this.xvalue = m.wValue
>	
>	PROCEDURE value_ACCESS
>	  ? 'ACCESS value',this.value
>	  RETURN this.value
>	
>	PROCEDURE value_assign(wValue)
>	  ? 'ASSIGN value',wValue
>	  this.value = m.wValue
>
>	PROCEDURE tag_ACCESS
>	  ? 'ACCESS tag',this.tag
>	  RETURN this.tag
>	
>	PROCEDURE tag_assign(wValue)
>	  ? 'ASSIGN tag',wValue
>	  this.tag = m.wValue
>
>	PROCEDURE controlsource_ACCESS
>	  ? 'ACCESS controlsource',this.controlsource
>	  RETURN this.controlsource
>	
>	PROCEDURE controlsource_assign(wValue)
>	  ? 'ASSIGN controlsource',wValue
>	  this.controlsource = m.wValue
>	
>ENDDEFINE
>
>
>Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform