I have two questions based on the following setup: I have 1 superclass A which is subclassed by classes C1 anc C2.
***Question 1 I would like to use A as a Factory to create the correct C1 or C2 subclass. dim x as new A(par1, par2) //where par1 and par2 are some parameters How can I do this in the constructor of A? ***Question 2 After creating a new A instance shown above, I would like to put that instance into an array or other As. Easy enough Dim AArray(-1) as A AArray.Append(x) However I would then like to call a method like AArray(0).Foo(para1) where Foo is defined in C1 and C2. The right C1 Foo or C2 Foo would be called based on which class was instantiated from the proper process in Question 1. However when I try to type: AArray(0). I do not get the option of the Foo method with the smart method fill in. Just to clarify Foo is defined in C1 and C2 and Foo is not defined in A. Any help is greatly appreciated. -bob- _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
