Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Builder property
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00697835
Message ID:
00984482
Vues:
44
Hi Armin,

I was trying to create a custom builder for my own container based class. If I base my builder on BuilderForm class from builderB.vcx, it works. But if I try to base it on MMBuilder class from mmBuilders class library, it automatically loads controls for Container class and I get a mess. I'm wondering if there is a way to not load these controls for Container class using MMBuilder? Is there a property in the builder which would tell me to not load these controls. I tried leaving empty Builder property, but got errors from the Builder.

Thanks a lot in advance.

>Kevin,
>
>now I understand ...
>
>I'll have a look at the places you pointed me to in a few days. I've just read Doug Hennig's "Builder Builder" article in FoxTalk and that made me want more < g >. So I had the idea of integrating some kind of a "Builder Builder" into my project, but since I'm still very busy, I'll have to wait for the fun with Builder Builders a while ...
>
>Thanks,
>Armin
>
>>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!
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