Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is TXTBUTTONS bad??????
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00088466
Message ID:
00088517
Vues:
25
>>I have used the TXTBUTTONS class from the VFP5 wizads collection in several in-house programs.  I don't really know much about how it works, but I seem to be able to get by with it. I have looked at the source code, and it seems VERY complex. It works fine on a one-table form, with a few textboxes... but on a form with a pageframe where each page has a few it's own parent textboxes, and a corresponding child grid, it can get tricky telling the TXTBUTTONS control which table to control.  I usually just mess around with it untill I get it
>>working.
>>
>>Should I be ashamed to use a wizard control in my apps?
>>
>>Is there a better/easier to use control?
>>
>>And most importantly, are there any documents explaining the loginc of the TXTBUTTONS control, and the proper way to use it?
>
>Well, nothing to be ashamed of, but that is typical situation that after some work with Wizards code you may find yourself limited. Probably that's the time to move to one of the commercial frameworks.
>
>Just my 2 cents :)
>Nick

People here recommend looking at different frameworks. A simple, decent one that doesn't require a major purchase is the TASTRADE sample app.

If you dig into txtbtns enough, you can understand it well enough to modify it into something more useful. The time it takes to do this is worthwhile mainly for the sake of modifying your already existing wizard-built apps. It can be a valuable learning experience, but, if you can, you might be better off starting over with a new framework.

The basic rule of txtbtns is that it was designed to be used with the form wizard, not just plopped on a form. txtbtns assumes that only certain controls are being used. Look in the .setallprop to see which ones, and also to see how they get enabled and disabled. They don't include pageframes. The .setallprop method is relatively easy to modify to account for combos, spinners, and so forth. The recursive call used when it finds a container needs to be modified to do the same for pageframes, replacing .controls() and .controlcount with .pages() and .pagecount. Also, txtbtns assumes that certain grid properties, such as .Tag, have been set in certain ways by the form wizard. Another thing that makes txtbtns complicated is that it has code which searches the form to see if it has things like a grid or a dataenvironment or a view. You could make a faster version with properties that you set in design mode to tell it these things.

I have spent enough time on my modified txtbtns that I now have something I can use to retrofit a form made with the form wizard. It is not an intrinsically good framework.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform