Re: drawRect using a Category
Re: drawRect using a Category
- Subject: Re: drawRect using a Category
- From: "Stephen J. Butler" <email@hidden>
- Date: Fri, 30 Mar 2012 22:46:00 -0500
On Fri, Mar 30, 2012 at 10:31 PM, Peter Teeson <email@hidden> wrote:
> Rather than using a sub-class, which seems overkill to me,
> I decided to try a Category instead. So here's what I did (and it seems to work.)
The problem with this approach is that you've replaced the drawRect:
for every NSMatrix instance, everywhere, in your app. If some Cocoa
control is using NSMatrix, suddenly it's using your drawRect:. If you
decide to use NSMatrix somewhere else, it too is using this drawRect:.
I wouldn't trust this to be very stable. And I don't see how
subclassing is much more work than this.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden