Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create member in code before other members instantiate
Message
 
 
À
31/08/2009 16:56:58
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:
01421991
Vues:
49
>>>The trouble is that this attempts to create the damn bizobject at design time too. As the bizobject's instantiation may rely on pieces of the framework which aren't there at design time, I only need a way to prevent this. So, my question is what is the trick to have an expression in the property which will return an object at runtime, and yet do nothing when I Modify Class mycontainer?
>>
>>Instead of direct newobject do something like
>>
>>=myFunc()
>>
>>or try
>>
>>=IIF(_VFP.StartMode = 0,null, newobject())
>
>The first works; the second would make testing near impossible without building an exe and running it outside VFP.

Right, there should be a different way of figuring out design time vs. run-time - I forgot the exact way.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform