[Adium-devl] A thorny design problem
Evan Schoenberg
evan.s at dreskin.net
Mon Nov 10 20:35:04 UTC 2008
On Nov 10, 2008, at 3:24 PM, David Smith wrote:
>
> The two are equivalent; in fact, my test implementation has -
> visibleInContainer: simply call the container's -
> visibilityForObject: method. The difficulty with using super to get
> the shared logic is that the return value is a boolean, so you can't
> tell (for example) whether the contact is invisible because it's
> offline (which the offline group does want to ignore) or because it
> doesn't match the current search (which it doesn't want to ignore).
> I suppose we could change the return value to be a bitfield of which
> conditions it matches... I'm not sure if I like that or not.
Oh, I see. Maybe this is going to too much effort to avoid the
Repeating Yourself problem? I suggest just having a solid base class
implementation and having subclasses either call it (if they want to
work with some general concept of visibility but add onto it) or
override it (if they are doing something funky the base class wouldn't
know or care about).
-Evan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20081110/f0f49c63/attachment.sig>
More information about the devel
mailing list