Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine the VCX of a class?
Message
From
03/07/2003 09:40:53
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
 
 
To
02/07/2003 21:47:20
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00805299
Message ID:
00806519
Views:
28
Peter,
First I looked at what is on the MSDN site. It took a little while to figure out what the various documents were saying, but in the end it's extremely easy to do.

1. Build a form with controls related to the properties you want to change on a control.
2. Build a project with a prg set to main that accepts 3 parameters. At this point I don't even use them, but I'm still learning.
3. In that prg, there are several variables created by builder.app, the calling program that give object references to the selected control, container and form. You also might want to put in an ASELOBJ() call for multiselect if needed.
4. With those object references, you can access the control properties.
5. Compile an app and put it in the vfp\wizards dir.
6. USE vfp\wizards\builder.dbf and add an entry using the others as a guide. All you have to add is the control baseclass type, a description and the app name,e.g., MyTextboxBuilder.app WITHOUT a CR/LF. Just type in the name, no {ENTER}. When you rightclick on a form and select builder, you get a list of the builders aimed at the control base class, if more than one exists.

Thats pretty much it. Properties are simple, I'm still working on easy method editing, but I think that will come together today. I looked at BuilderB and BuilderD and decided just to write the things myself. I created builder textbox,combobox and checkbox controls that have a property for the control property and getvalue()/setvalue() methods. Now I just drag these onto a form that has an object reference to the selected control and they just get and set the values as needed.

That's pretty much it. Good luck.

Gary


>Gary,
>
>Just like you, I have never written a builder before even I have been programming using dbase/foxbase since 1980's. I plan to start writing a builder in the near future. Do you have any good information/resource in writing a builder?
>
>
>Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform