Re: Identifying NSTextViews
Re: Identifying NSTextViews
- Subject: Re: Identifying NSTextViews
- From: Kyle Sluder <email@hidden>
- Date: Tue, 28 Jul 2009 22:47:53 -0700
On Jul 28, 2009, at 10:38 PM, Rippit the Ogg Frog <email@hidden>
wrote:
This worked perfectly, however the window delegate method I needed
in my particular case was windowDidResignKey, because I'm not
actually closing the window when the user dismisses it, but calling
orderOut:.
-windowDidResignKey will be called more oftn than just on -orderOut:.
Ensure that this is indeed the behavior you want. Perhaps you would be
better served by NSEditorRegistration.
Also NSTextView's string method returns a pointer to its internal
buffer, so one should copy it and use the copy.
You're probably better served by using NSTextView's -textStorage
method anyway. NSText is a legacy API from the days of NeXT; you're
almost always dealing with NSTextView instances anyway.
--Kyle Sluder
_______________________________________________
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