Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 Objects with the same name
Message
From
19/04/1999 17:06:40
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00209904
Message ID:
00209917
Views:
13
I'll be damned. You can do this. Frankly, I didn't believe it. IAC, since you want to move the button, move it. IOW, delete the one on the form and leave the one on your form class. If they're in the same place, then you may need to move the button to an obvious spot in your form class so you can tell the difference.

Don't leave both, but to answer your question, it will probably reference the base class's button, since it would be first to instantiate. But don't leave both.

You didn't ask, but instead of adding the button to your base form class, it would probably be *better* design to subclass the form and put the button on that. But then, of course, you need to change the parent class of your .SCX.


>I have a form with a button named cmdOk.
>
>I want to move the button to the parent
>class, so I opened the parent class, added
>a button and named it cmdOk.
>
>When I reopened the child class, there now
>are 2 buttons with the same name.
>
>So how does VFP know which button to reference
>if I called cmdOk.Click()?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform