• 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
conditional NSTextView activation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: conditional NSTextView activation?
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >Re: Associating files with application and changing files icons (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Associating files with application and changing files icons
  • Next by Date: Re: [OT] iTunes 4 blows
  • Previous by thread: Re: Associating files with application and changing files icons
  • Next by thread: Re: conditional NSTextView activation?
  • Index(es):
    • Date
    • Thread