On Sun, Apr 26, 2009 at 8:04 PM, Graham Cox <graham....@bigpond.com> wrote:

> This is true, but your example of non-scalability does reflect a poor
> approach that you wouldn't be likely to follow in practice.
>
> A tag is 32 bits, so can represent 2^32 different states, if used wisely.
> Dividing this into bitfields would allow you to partition it into several
> properties, for example four different colour properties, each with 256
> possible colours each.

Even when used as a bitfield, I'd still argue it is not good design. (It might
be an expedient hack to get something done, and if you are happy with that
as a solution, great.)

It overloads the tag to imply control behavior/appearance, while at the same
time preventing users of your class from using the tag for its original purpose.
(Yes, I realize that the the user of the custom table view is the same person
as the provider of the custom table view.)

- Jim
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to