• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: conditional NSTextView activation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >conditional NSTextView activation? (From: m <email@hidden>)

  • Prev by Date: Re: How to change default browser in Mac OS X 10.2?
  • Next by Date: Re: Design question
  • Previous by thread: conditional NSTextView activation?
  • Next by thread: UndoManager doesn't work with saved documents
  • Index(es):
    • Date
    • Thread