On Feb 23, 2006, at 10:27 AM, Joseph J. Strout wrote:

At this point, I feel I missed something. If you're always going to use your classes, rather than the AddressBook ones, then what is the problem? All your code will be declared with your new types, as if the AddressBook classes don't even exist.

I am using both.

But perhaps you want to be able to swap in the real AddressBook classes at any time (even at run-time).

Yes. For the Macintosh OS X version, the AddressBook classes will be the default behavior... with a runtime preference option to use the custom ContactBook classes I am developing.

In this case, I think you need to make another set of classes, which adhere to your interface (or even derive from your own base class), but which wrap the AddressBook classes and pass all calls through to them. Then you can make your own code talk exclusively through this interface (or base class), and the actual work will be done by either your own code, or by the wrapped AddressBook objects.

Hmmm... I guess wrapping would work, but I need to think about this some more.

_______________________________________________
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>

Reply via email to