Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting code into method at runtime
Message
De
12/12/2008 13:02:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/12/2008 15:21:27
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01366206
Message ID:
01366987
Vues:
12
>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform