conditional NSTextView activation?
conditional NSTextView activation?
- Subject: conditional NSTextView activation?
- From: m <email@hidden>
- Date: Tue, 13 May 2003 12:56:36 +0100
I have a view with an arbitrary number of NSTextView subviews. I'd like
to control programatically whether those NSTextViews become editable
when they are clicked. For example, under some conditions (to be
determined when the user clicks on the text view), I want to be able to
click-and-drag the NSTextView to a new location.
The way I have this working at the moment is that I have created an
NSWindow subclass and overridden its sendEvent: method. In my override
I do some preprocessing to determine whether I want the NSTextView to
activate for editing, and depending on the outcome of the
preprocessing, either swallow the mouseDown or pass it on (by calling
[super sendEvent:theEvent]).
I am using NSTextView in order to get all the goodies "for free" (text
font panel support etc.)
Is this way "the right way"? Is there a better technique?
Regards,
_murat
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.