: hey all,
: I am writing a program that uses an abstract class by using the implements keyword from vb. I have two classes inheriting from a master class. In the master class, i have a public variable declared as a class.
: Public x As Class5
: When i implement the master class (Class1) into the inheritable classes (Class2 and Class3) i am allowed to (in a way) overload the variable x by saying:
: private property Set Class1_x(byval RHS as Class5)
: so, outside of my class, in a commandbutton click event or something, i want to say the following:
: Dim blah as Class1
: Set blah = different_class
: anyway, you get the picture... the problem is coming from the private property, i know what i'm passing in, in this case, it's different_class being passed in as RHS, but i need to set something equal to RHS.... in c++ i could simply say this = RHS, in java, i think i could say something like super = RHS, is there some way to tell what object is being passed in????
Well, a couple of things. In VB6 you're not dealing with inheritance. The Implements keyword is a polymorphic feature, like Java's Interfaces. So inside a VB class there's no such thing as "super". There is a "Me" object that lets you refer to a class's properties and methods from within that class, which is similar to Java/C++ "this".
Ok, so your class has a property and you pass some instance of something to it and the code sees it as something named "RHS". You can do anything you want to with RHS except set it to the instance of the class that received it.
$ select * from users where clue > 0
no rows returned