Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional Best Practice
Message
From
26/07/2001 12:06:10
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
26/07/2001 11:17:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00535738
Message ID:
00535821
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
>Mark,
>
>That is a most excellent question. The answer is in the nuance of the app itself. The data for the combos is not available until the page is activated (trust me, I know; many hours looking at the Event Tracking to find a better way). The class is based from someone else's and the best thing I could think to do was check for the property and then don't run the data populating portion if this was the first time through. After the first time, the property is created and then the data portion can be run. You will note that I named it mInitSQL as it originally was in the Init where you would normally expect it.
>
>Renoir
>
>>I guess that you have created the combos from a combo class, subclassed from the combo control in order to create the version with the cSourceAlias property, so why not just put a mandatory call to mInitSQL in the init or refresh (whichever is appropriate) method of the combo class that you have based these controls on.


Hi,

Interesting, this might save you a little typing.

You could subclass the combo control that you have been given, and in the mInitSQL method, put the following:
** Only run the mInitSQL if cSourceAlias proprty exists
IF PemStatus(This.cbo_Code,'cSourceAlias',5)
     DODEFAULT()
ENDIF
Then you could use this combo on your form and would be able to call this.mInitSQL from wherever, without worrying about whether the cSourceAlias proprty exists yet.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform