Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limit of sub classing
Message
From
18/12/1997 13:29:19
Jay Shepherd
Construction DataFax, Inc.
Montevallo, Alabama, United States
 
 
To
18/12/1997 11:04:36
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00066939
Message ID:
00066980
Views:
32
>When doing some class design in Visual Basic, I faced a serious situation. If anyone has some feedbacks on it, it will be appreciated.
>
>Using the Class Builder, I create an object. I then added some properties and methods to that object. Then, it was time to sub class that object in 2 levels and have those 2 levels be sub classed as well. Each of those levels have additional properties and methods. So far, so good, each of those levels see the parents properties and methods.
>
>Now, we need to refine the higher level. So, I added a property. I went back to each level and found that the newly created property at the higher level is not shown. I also have to add a method to the higher level.
>
>Is this a bug in Visual Basic? I can't afford to cut and paste each newly properties and methods from the higher level to each of those 4 levels each time something changes in the higher level.

VB's objects are based on the Component Object Model (or COM). There is no parent/child relationship between objects. Visual Basic is also not a true Object Oriented language.

There is really no such thing as subclassing an object in VB. What you do is implement interfaces on an object. This is called Interface Polymorphism. Once you create the objects interfaces, you then supply the code to implement whatever the task is.

That's a quick snapshot of some differences.

To answer your question, no, it's not a bug. You are trying to do something with VB that it doesn't do.
Jay Shepherd
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform