Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create member in code before other members instantiate
Message
 
To
01/09/2009 09:41:19
Dragan Nedeljkovich
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:
01422284
Views:
98
I am going to have to investigate this because I use my sub-classed pageframe controls with pages based on my sub-class all the time with code in the Init of the page class.

Simon


>>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.
Simon White
dCipher Computing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform