Announcement

Collapse
No announcement yet.

Returning class / interface from collection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Returning class / interface from collection

    Hi,

    I didn't know how the phrase the subject line.

    The point is that I have a class called cField with interface iField. This is
    the base class. Then i have a derived class that inherits cField and iField which is called e.g. cTreeView, iTreeView.

    ON a form i have the method AddField. This method takes an iField as parameter.

    Here is my first question, is it ok to use the base class interface for all inherited
    classes if I would need to add an inherited interface to a collection ?

    It seems not to work correctly. Especially when getting an instance back from a collection I get GPF's.

    So, there should be a way to have a generic approach to store and retrieve
    base classes and their inheritance into/from colelctions.

    I have been fiddling around with Dispatch but then the Dispatch doesn't know anything about the methods and properties of the class.

    I hope you understand what I'm trying to achieve here.

    Cheers

    Steven
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)
Working...
X