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 09:41:19
Dragan Nedeljkovich (En ligne)
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:
01422141
Vues:
52
>Hi Dragan
>
>I am not sure why the technique you describe does not work since I use it all the time in my framework. What I do is build all my GUIs in a containers which are then added to a form (with private data sessions) at runtime. The first element in the container is bizObj loader. Its init fires before anything else in the container creating the bizObj and adding it to the container. Since the bizObj loader's init returns false it is never created leaving just the bizObj in the container. The bizObj opens all the tables and then the rest of the controls are created. So I am wondering why this does not work for you. I have been using this technique for a number of years and still do it this way in VFP9.

This worked, and still works, unless you have a member derived from a class with a nondefault MemberClass, and possibly if that member class has any code in its .init() - not sure if it happens when there's no code there. That pageframe, or grid, or whichever thing with .memberClass it may be, will then instantiate before your loader. I didn't believe my eyes when I saw it, but there it was, consistently reproducing.

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