Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Putting code into method at runtime
Message
From
12/12/2008 13:02:25
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
10/12/2008 15:21:27
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01366206
Message ID:
01366987
Views:
13
>>>>Where did you put the code?
>>>
>>>In the CustomClass.INIT
>>
>>Mmm, I thought that putting the code in the init of the custom would not work, but it seems to work (in my test) anyways, although I believe is not a good place to put it for you can not be sure the grid is properly initialized at that point, what happens if you move the bindevent to the init of the form instead?
>
>That's one of the issues. This is a custom class that is just meant to reside at the same level as a grid. Not form-dependent at design time.

Then move it to their common parent's .init() - so both the source and the handler (your grid and your custom) have their inits finished by the time the bindevent() is issued. You can't bind events from or to objects which don't completely exist yet - and the definition of "exist" is "init returned .t.".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform