Private methods in CAB make extending difficult

Topics: CAB & Smart Client Software Factory
Nov 21, 2006 at 8:35 AM
originally posted by: jeff303

Trying to extend EventTopic to do something interesting, but CallSubscriptionHandlers is private. If it was protected, I could do what I want in about 2 lines. As it stands now, I don't even think I can (without reimplementing the entire class).
Dec 14, 2006 at 3:08 PM
originally posted by: eugeniop

Hi Jeff -

If you find something useful inside CAB classes, feel free to copy it!
Dec 14, 2006 at 3:38 PM
originally posted by: matiaswoloski

What are you trying to achieve?
Dec 23, 2006 at 11:33 AM
originally posted by: mcstarVWT

I too have run into this problem on more than on occasion when trying to extend CAB. The issue with private methods means you end up completly re-writing or copying large sections of code often just to make a minor change. If you choose to do this in the CAB source code, then you have divergent code that doesn't work with other developer's apps, and you run the risk that a future upgrade will break your code. The optimum solution would be for all CAB members to be marked protected, then you could just extend the parts you want in a custom class and not affect the CAB base classes.