B
Brett Romero
I know inheriting from two different classes isn't allowed but here is
my situation. I'm creating a custom datagrid class that inherits from
DataGrid. I have another class (dgExt) with useful methods that will
be used in the customDataGrid() class. I can create a new dgExt
object in customDataGrid() and reference methods in dgExt. I'd
basically wrap any method I needed in dgExt and make the wrapper public
in customDataGrid. There's a scaling problem though.
If dgExt needs to change any of its method signatures, my code in
customDataGrid breaks. Inheritance probably doesn't help very much
here. However, by using wrappers, I'm having to completely copy the
parameters in the signatures of dgExt. Not exactly code reuse.
Is there a better way to do this?
Thanks,
Brett
my situation. I'm creating a custom datagrid class that inherits from
DataGrid. I have another class (dgExt) with useful methods that will
be used in the customDataGrid() class. I can create a new dgExt
object in customDataGrid() and reference methods in dgExt. I'd
basically wrap any method I needed in dgExt and make the wrapper public
in customDataGrid. There's a scaling problem though.
If dgExt needs to change any of its method signatures, my code in
customDataGrid breaks. Inheritance probably doesn't help very much
here. However, by using wrappers, I'm having to completely copy the
parameters in the signatures of dgExt. Not exactly code reuse.
Is there a better way to do this?
Thanks,
Brett