Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call the parent class in VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00024551
Message ID:
00025008
Views:
51
>>>Bret: Why not make two form methods on your form-class, one called PreAdd and one called PostAdd. They would be empty on your form-class, filled in differently in each form. The code in your AddButton.click would be
>>>
>>>Thisform.PreAdd() && Does your validation check
>>>CmdAdd::click() && Code from the CmdAdd.click base class
>>>Thiform.PostAdd() && Here's your form-linked setfocus()
>>>
>>>Each form would have unique code in the PreAdd and PostAdd sections, which you would fill in as you developed the form.
>>>
>>>HTH
>>>Barbara
>>I might try that sometime. I did something similar with the SETALLPROP method of my buttonbar, which is derived from the same method in TXTBTNS of WIZSTYLE. I discovered that it didn't set the properties (enabled and readonly) of objects in pageframes, because pages and pageframes are not regular containers and don't have a controlcount property. My version of SETALLPROP calls USERSETPROP if it finds a pageframe or page.
>>
>>However...
>>
>>I forgot to mention that my cmdAdd.click also has to fill in some default values (determined in processing, not at the Value property). I'm not sure if I can make the code resemble your PreAdd, CmdAdd::click(), PostAdd form. If my added lines insist on being mixed in, I would end up with something like PreAdd1, CmdAdd::click1, Add2, CmdAdd::click2, Add3, well, you get the idea. That could happen because the click procedure does so many things at once. I might get around it by giving my button bar container object some properties which hold anything used in both the PreAdd and PostAdd. All of this is the result of combining Microsoft's idea of the ideal nav button bar with my idea of the same thing.
>>
>>I'm out of breath. Sorry if I bent your ear too long.
>
>Bret, think about modifying your CmdAdd::Click() to take care of the default values automatically. If it's a unique ID, for instance, pass the field and value as parameters.
>
>Barbara
I may do that, but I'll have to decide on a maximum number of required fields (probably 6 to 10) and add that many parameters. Is there a way to select the object which has a specific tab order (which may not be 1) without checking the taborder property of every object on the form? I may be able to get around this, but it would be nice to have a way. Thanks for the suggestions.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform