On Sunday 30 October 2005 14:16, James Allwyn wrote: > One thought I had, was creating an interface IStandard, with > attributes like "meetsstandard" and "nameofstandard", and then > subclass this, e.g. to IAccreditationScheme and INationalCode (where > "Accreditation Scheme" and "National Code" are the names of two of the > standards). But I get a little stuck conceptually at the point where I > try to handle, for example, the fact that for some ISharedHouse > objects, IAccreditationScheme would be suitable, whilst for others it > wouldn't, because of their location. In fact it's likely that in the > future we will need to recognise two or more standards for a > particular accommodation type (so IAccreditationScheme and IHouseCheck > chould both apply to ISharedHouse objects, in differect areas).
This is not such a complex case as you think. If you register an adapter from ISharedHouse to IAccreditationScheme then it will be only available for this interface and not for IAccommodation in general. I would even write a specific IAccreditationScheme for every scheme you support; thus you do not even need named adapters. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list [email protected] http://mail.zope.org/mailman/listinfo/zope3-users
