Dear all,
As far as I can see the implements statement in VB allows you to specify a prototype/interface for a class and nothing more unless you deal with the call in the class that inherits the code and then call the code in the inherited class.
What I need to do is this: I want to be able to create a class called Table with methods such as "Add", "Delete", "Update" etc. I then want to be able to build objects such as "Addresses" that "fill-in" the blank details in the middle of the Add, Update and Delete methods with the correct fields and SQL. Should I just pass by value into a generic "table class" or use the interface/inheritance provided in VB6 and write the methods out in each specific class.
The only real benefit I can see with the VB6 inherits statement is that you can use polymorphism accross classes so that users of the objects or object friends understand the way in which they interface/interact with the object being provided without needing to understand the specific type or "table" that it is dealing with. This means that at design time I can manipulate the objects with their methods as they all conform to a "template"/interface, where as I would not be able to if I used the type "Object" that can accept any Object types.
Basically: How do I achieve what I am trying to achieve!!?? Very muddled.
Many TIA,
Jason.
As far as I can see the implements statement in VB allows you to specify a prototype/interface for a class and nothing more unless you deal with the call in the class that inherits the code and then call the code in the inherited class.
What I need to do is this: I want to be able to create a class called Table with methods such as "Add", "Delete", "Update" etc. I then want to be able to build objects such as "Addresses" that "fill-in" the blank details in the middle of the Add, Update and Delete methods with the correct fields and SQL. Should I just pass by value into a generic "table class" or use the interface/inheritance provided in VB6 and write the methods out in each specific class.
The only real benefit I can see with the VB6 inherits statement is that you can use polymorphism accross classes so that users of the objects or object friends understand the way in which they interface/interact with the object being provided without needing to understand the specific type or "table" that it is dealing with. This means that at design time I can manipulate the objects with their methods as they all conform to a "template"/interface, where as I would not be able to if I used the type "Object" that can accept any Object types.
Basically: How do I achieve what I am trying to achieve!!?? Very muddled.
Many TIA,
Jason.