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 12:37 PM, Douglas Davidson wrote:

The methods you list above are those that the controls themselves (such as NSTableView) implement to receive delegate messages from the field editor; in these methods they then call out to their own delegates using methods like control:textShouldBeginEditing:. If you were implementing a table view subclass, you could override the NSText delegate methods, but that would have to be done with great care.

That was actually what prompted the question - more detail in a separate followup shortly (since it feels like a separate topic.)


If I did subclass NSTableView, then the interface says I am only guaranteed to get an NSText in the overridden method, but per your statements below, this will be an NSTextView in all normal situations.

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?

The other thing is that in the AppKit as it stands, NSText is an abstract class; the concrete subclass used is NSTextView. The distinction between NSText and NSTextView is a historical artifact, and you may assume that field editors will be NSTextViews.

Thanks for the clarification.

Jim

_______________________________________________
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>)



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.