Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BuilderB vs. BuilderD
Message
From
08/04/1999 12:37:48
 
 
To
07/04/1999 20:59:29
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00206307
Message ID:
00206501
Views:
16
Hi Bob.

>all that seemed to be was a fancy Property sheet.

At first glance, BuilderD appears to be just a fancy way to point out which specific properties are important for a given class. However, because you can instantiate things other than just controls bound to properties of the object, you can do a lot more with BuilderD than just that. The Grid and PageFrame buttons in my article described a couple of simple things (adding a specific class to each column in a grid and adding some code to a method of each page in the pageframe). You could easily expand this and do a lot more.

What can you do in the builder? Just about anything. Don't forget that although the builder may have been invoked for a single object, the builder has access to the entire object hierarchy (the object's container, form, DataEnvironment, etc.). So, you could create builders like:

- a form builder with an "audit" button that ensures every object on the form follows corporate naming conventions and has certain properties set a certain way

- a button that goes on the builder for any visual class (BuilderD allows you to reuse components in any builder by simply linking the CLASS record to that component record) to place the object on its form according to Windows UI standards (Steve Black has built a great builder that does this)

- a builder for the Resize object I described in an earlier column: it could display a mover object with the names of objects on the form and indicate how each should be registered with the Resize object.

Now, where do you put the code? That would typically go into the Init of an object if you want automatic behavior (for example, you could create a BuilderD builder that does something and doesn't display a form at all if all the controls that get instantiated return .F. from Init). Or, as in the Grid and PageFrame buttons, in the Click of a button. In that case, you'll need a "loader" object (as I described in the article) to add those buttons to the BuilderD form, but the loader is easily defined in a single record in the BuilderD table. So, the only real work you have to do is create a button class and put some code in its Click method.

So, as you can see, BuilderD can do a lot more than just manage properties.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform