Re: conditional NSTextView activation?
Re: conditional NSTextView activation?
- Subject: Re: conditional NSTextView activation?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Tue, 13 May 2003 15:45:26 +0200
At 12:56 Uhr +0100 13.05.2003, m wrote:
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 there a reason why you didn't subclass NSTextView instead? NSView
has a mouseDown event handler method, and though I haven't tried it
yet, I'd suppose just subclassing that instead would be a cleaner
approach. Then you could even give each view in your NSTextView
subclass a BOOL instance variable that it checks to see whether it
can accept clicks or whether you want it un-editable.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.