Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this possible?
Message
From
29/03/2004 12:16:24
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
29/03/2004 10:47:13
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00890402
Message ID:
00890495
Views:
29
My only concern is performace using execscript() in a grid.

>Hi James,
>
>Thanks for the reply.
>
>I dug around a little further and found the EXECSCRIPT(). After playing with it, I think that I can make it do what I need. What I did so far was create a custom property for the textbox class named ValidateCode. I put a string of VFP commands in it based on the specific column I'm in and in the textbox class Valid() method, I have:
>
>
>IF !EMPTY(this.ValidateCode)
>   EXECSCRIPT(this.ValidateCode)
>ENDIF
>
>
>So far, it seems to do the trick.
>
>Mike
>
>
>>Hi Mike
>>
>>As far as I know, you can't add code at runtime. What I do is add two properties in my column class that I use to addobject() my text box at runtime. Then you can subclass a textbox with the code you wish to run.
>>
>>
>>>I have a column member class that I use in my grids. The column member class adds a textbox class in the Init() event using Addobject().
>>>
>>>The textbox class has no code in its Valid() event. What I'd like to have happen is to somehow add code (at runtime) to the textbox's Valid() event so that a different validation is run for each column.
>>>
>>>I thought that the textbox's WriteExpression() method looked like a promising solution, however, it is only for design time :(
>>>
>>>Is there any way to do what I described?
>>>
>>>TIA
>>>
>>>VFP8SP1, Win200Pro
>>>
>>>Regards,
>>>
>>>Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform