Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create member in code before other members instantiate
Message
 
 
To
31/08/2009 16:56:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01421954
Message ID:
01421998
Views:
48
>>>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.

Check message #1407940 (link from it). I forgot right now how Craig determined design time vs. run-time, but it should give you a clue.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform