At 10:13 AM -0800 2/23/06, Phil M wrote:

I am making a second set of classes which exactly mirror the AddressBook classes. I am doing this so that the software can be used cross-platform and for people that prefer not to use OS X Address Book.

OK, I'm with you up to this point.

Right now I have to use MyFunction(obj As Object) and work with the object through IsA and casting -- it would be a lot easier to design the project with Interfaces.

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.

But perhaps you want to be able to swap in the real AddressBook classes at any time (even at run-time). 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.

HTH,
- Joe

--

Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
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