Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically adding controls at runtime problem
Message
 
To
10/11/1998 10:29:39
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00154801
Message ID:
00156834
Views:
39
Rex,

>Now I can't get the container to release if it contains another BizObj, probably a dangling reference. Just for my information, why do we need to reset the UIEnabler.lActivated properties on an Add?>

I put a few brain cells into this question tonight and rembered that the UIEnabler.lActivated property *does* need to be reset when a new record is created, since other logic in the Framework is depending on this to occur. For example, the "MustKey" logic needs to know if a user has activated a particular page since the last time a new record was created.

At any rate, this means that we can't use UIEnabler.lActivated to determine whether controls should be added to the page. I recommend checking if the TYPE of the control container == 'O' to decide whether the controls need to be added. For example:

IF TYPE('This.cntControls') == 'O' AND NOT ISNULL(This.cntControls)
*--- ADD the container
ENDIF

I will make a change to the Developer's Guide recommending this new method.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform