• 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: determine which NSTextView is sending to delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determine which NSTextView is sending to delegate?


  • Subject: Re: determine which NSTextView is sending to delegate?
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Sat, 6 Nov 2004 12:42:49 -0200

At 9:30 AM -0500 11/6/04, John James wrote:
>This is what I was looking for.  But -setTag does not seem to be available on a NSTextView or rather NSView.  According to the documentation you must subclass to set the tag.
>NSView: tag
>- (int)tag
>Returns the receiver's tag, an integer that you can use to identify view objects in your application. NSView's implementation returns -1. Subclasses can override this method to provide individual tags, possibly adding storage and a setTag: method (which NSView doesn't define).
>
>I see no mention of tag in NSTextView.
>
>Maybe there is something I missed?
>
>Now I have switched to a set of NSTableView's which allows setting the tag value in IB allowing me to use the switch as you suggested.  (My app could really use the table instead of requiring me to parse the text to get the values I want.)

Oops; my fault. I somehow thought you were saying NSTextField - which, being a NSControl, has tags implemented.

I often find tags so useful that I implement them in my subclasses if they're not already available...

--
Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"It's extremely unlucky to be superstitious, for no other reason
 than it is always unlucky to be colossally stupid." (Stephen Fry)
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: determine which NSTextView is sending to delegate? (From: Rainer Brockerhoff <email@hidden>)
 >Re: determine which NSTextView is sending to delegate? (From: John James <email@hidden>)

  • Prev by Date: Re: determine which NSTextView is sending to delegate?
  • Next by Date: Re: Making a valid NSURL that contains Kanji characters
  • Previous by thread: Re: determine which NSTextView is sending to delegate?
  • Next by thread: Getting a carbon's info string
  • Index(es):
    • Date
    • Thread