Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Superclass
Message
From
22/05/1997 13:15:01
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00033281
Message ID:
00033291
Views:
38
>Can I have a class that can modify a textbox class and a spinner class
>at the same time ?
>I want to use a new property or the same method in both classes.
>
>For example:
>
>I want the lostfocus event execute the same thing for both classes, without
>using an external function, and I want to declare a new property that can
>be used in both too.

VFP doesn't directly support multiple parent classes like some other OO languages do (I forget the term for this).

What you can do is have a form method that is called by both objects or some other global object with common methods. Have each LostFocus method call this common method. I know this isn't exactly what you want but it works well.

This would mean that you would also need to add properties to both class trees.

-Doug-
Previous
Reply
Map
View

Click here to load this message in the networking platform