Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Philosophical question
Message
 
 
To
29/04/1998 17:00:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00095802
Message ID:
00095825
Views:
25
Sylvia,

One way of doing this if you've got a group of controls that need to function together is to put them in a container. They can talk to each other using this.parent.AnotherControl. The container becomes the place to put common methods so the controls can just call a this.parent.Method() to get stuff done. So this whole thing becomes a functional component that can just be dropped onto something else a form, page or other container.

Also the user of this component shouldn't know anything about what's inside the container, they only deal with the public interface of the container, and the container is responsible for talking to the controls inside it.

>I found some command buttons I thought were useful and saved them in one of my class libraries. Now I find some of the custom properties make assumptions about where these and other buttons are on the form (e.g. refer to Thisform.cmdenterquery) which is, of course, not where I've put the command buttons in this situation (I have them on a page). My philosophical question is: should I just go ahead and put in my own code to replace the default code (which seems to defeat the purpose of less coding, or do I say "Hmmm, I should make another class of buttons for situations where I have the buttons in the page rather than on the form itself."
>
>This seems to be like an issue of standards (e.g. keep button on form) vs. adaptability (I need them on the page this time). How do you decide "Yep, this is a class", or "Nope, this should be a custom or modification of existing method."?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform