Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Builder property
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00697835
Message ID:
00698609
Views:
29
Armin,

>Yes, I know. But I was wondering about the content of the 'Builder' (not 'BuilderX') property. Doesn't seem to make sense for me. But if I clear the property, the builders are crashing.

As you've already seen, the Builder property contains the name of the class. Although this may seem redundant, it allows the builder classes to determine the Framework class from which your custom controls are derived. For example, if you create two layers of subclasses:

CTextBox -> ATextBox -> MyTextbox

how does the builder class know when your right-click on MyTextBox which builder controls to use? It looks at the Builder property and, knows the class derives from the Framework's CTextBox class. From this, it determines which builder classes use. Check out the GetControlClass() method of the MMBuilder class (found in MMBuilder.vcx). You'll see that the value stored in the Builder property is used as a lookup key into the Framework's MMSecCtl table. This table contains the name of the user interface class (e.g CTextBox) and the name of the associated builder controls class to instantiate...it's actually an abstract factory!

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
Next
Reply
Map
View

Click here to load this message in the networking platform