Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Write expression vs. simple assign
Message
 
 
To
07/12/2001 16:56:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00591462
Message ID:
00591500
Views:
23
Hi Steve,

I was reading Hacker's Guide at this moment too. I've just tested it, and it is not re-evaluated by form.refresh(). So, I don't see a point of using these constructions in the form. They make code more complicated, but don't serve any purpose...

>Nadya,
>
>Well, when it is assigned in this fashion at runtime, it doesn't seem to respond dynamically like I thought it would. According to Hacker's guide, it would be most useful in builders (at design time), or to assign expressions to new properties created with addproperty() at run-time.
>
>
>>Hi everybody,
>>
>>In my colleague's code I see the following:
>>ThisForm.Cpageframe1.Page1.Wgpageframe1.Page1.writeexpression('Caption',[=("Current Record"+" of "+ALLTRIM(STR(Thisform.pnaddresses))+" total addresses")])
>>ThisForm.Cpageframe1.Page1.writeexpression('Caption',[=("Property Addr - ("+ALLTRIM(STR(Thisform.pnaddresses))+")")])
>>ThisForm.Cpageframe1.Page1.Wgpageframe1.Page1.cmdpreviousaddress.refresh()
>>ThisForm.Cpageframe1.Page1.Wgpageframe1.Page1.cmdnextaddress.refresh()
>>
>>Do you know, why he is using WriteExpression and not just Page1.Caption = ...
>>What is benefit/disadvantage of one way to another?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform