Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView text editing notifications/delegation vs. attributed string cells?




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTableView text editing notifications/delegation vs. attributed string cells? (From: Jim Correia <email@hidden>)
 >Re: NSTableView text editing notifications/delegation vs. attributed string cells? (From: Douglas Davidson <email@hidden>)
 >Re: NSTableView text editing notifications/delegation vs. attributed string cells? (From: Jim Correia <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.