R
Rob Panosh
Hello,
The sample Sub below in Class database accepts a parameter typed as
AdvancedSoftwareDesigns.Table. The problem I am having is if I derive from
AdvancedSoftwareDesigns.Table, i.e. - CLASS myTable INHERITS
AdvancedSoftwareDesigns.Table, so I can add functionality to the class.
When I try to add my derived class using oDatabase.AddTable( oMyClass ) I
get compile error becuase I have Strict ON. If I CTYPE it to
AdvancedSoftwareDesigns.Table I no longer get compile error. The question
I have is if I add any Instance Variable to my derived class will they be
lost when I CTYPE? Also can I cast the object back to be myTable? Or
should I be using a different approach?
Sample Code:
--------------
Public Class Database
Inherits System.Object
Public Sub addTable( byRef Table as AdvancedSoftwareDesigns.Table )
me.tablecollection.Add( Table )
End Sub
End Class
Public Class myTable
Inherits AdvancedSoftwareDesigns.Table
Public someVar as String
Private anotherVar as String
....
End Class
Thanks,
Rob Panosh
The sample Sub below in Class database accepts a parameter typed as
AdvancedSoftwareDesigns.Table. The problem I am having is if I derive from
AdvancedSoftwareDesigns.Table, i.e. - CLASS myTable INHERITS
AdvancedSoftwareDesigns.Table, so I can add functionality to the class.
When I try to add my derived class using oDatabase.AddTable( oMyClass ) I
get compile error becuase I have Strict ON. If I CTYPE it to
AdvancedSoftwareDesigns.Table I no longer get compile error. The question
I have is if I add any Instance Variable to my derived class will they be
lost when I CTYPE? Also can I cast the object back to be myTable? Or
should I be using a different approach?
Sample Code:
--------------
Public Class Database
Inherits System.Object
Public Sub addTable( byRef Table as AdvancedSoftwareDesigns.Table )
me.tablecollection.Add( Table )
End Sub
End Class
Public Class myTable
Inherits AdvancedSoftwareDesigns.Table
Public someVar as String
Private anotherVar as String
....
End Class
Thanks,
Rob Panosh