Re: NSTableView text editing notifications/delegation vs. attributed string cells?
Re: NSTableView text editing notifications/delegation vs. attributed string cells?
- Subject: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
- From: Douglas Davidson <email@hidden>
- Date: Tue, 28 Feb 2006 10:29:39 -0800
On Feb 28, 2006, at 10:20 AM, Jim Correia wrote:
Can you elaborate on the "done with great care" part? Besides
making sure super gets the message as well when appropriate, what
other things are there to watch out for?
If you implement the delegate method, you will receive it at a point
at which the control expects outside intervention to happen. I don't
know specifically what NSTableView (or any other control) does now,
or will do in the future, in these methods, but if you override, you
will need to make sure that whatever you do doesn't interfere with
what the control does; that may mean acting before or after the super
call, depending on what you're doing. You'll also need to coordinate
your return value (for the methods that have a return value) with
NSTableView's, and potentially with NSTableView's delegate's return
value. These aren't exactly novel concerns in overriding, but this
is a place where there are convenient delegate methods, so using
those generally should be preferred as safer than overriding.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden