Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create member in code before other members instantiate
Message
De
01/09/2009 01:47:45
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01421954
Message ID:
01422087
Vues:
76
>Hi Dragan,
>
>I guess that ControlSources that link to aliases are your problem. The proper way in VFP would be to set BindControls to .F. in the form, open the tables in the BizObject when you need them in code and change BindControls to .T. when the form and all objects are fully instantiated.

Sure they are, and I can't instantiate all the bizobjects in advance, because there are many of them which are hosted on the same form. BindControls can be set to .t. only once, so this is a no go. I was thinking of that, though, and it was off the list of possibilities very early on.

>If your issue is really the Init event (some how I doubt this, though), then the solution would be to set the NoInit flag for all contained control and call Init from the Init event of the business objects. The NoInit flag is available from the Class > Edit Properties and Method when you select the contained control.

Does this include the "don't set controlsource yet" as well? IOW, does the noinit stop the evaluation and setting of properties?

Anyway, I've solved this - Fabio's old message reminded me of the solution - but it would be nice to see if there was a more elegant solution. I've learned that "elegant" usually means "more robust" :).

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform