• 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: John James <email@hidden>
  • Date: Sat, 6 Nov 2004 09:30:04 -0500

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.)

So all is well.
Thanks

On Nov 5, 2004, at 9:46 AM, Rainer Brockerhoff wrote:

I find that setting each view to a different tag value is easier, and you can check them in a switch statement instead of a long list of if/then/else lines...


--

_______________________________________________ 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
  • Follow-Ups:
    • Re: determine which NSTextView is sending to delegate?
      • From: Rainer Brockerhoff <email@hidden>
References: 
 >Re: determine which NSTextView is sending to delegate? (From: Rainer Brockerhoff <email@hidden>)

  • Prev by Date: Re: Book about creating Cocoa widgets
  • Next by Date: Re: determine which NSTextView is sending to delegate?
  • Previous by thread: Re: determine which NSTextView is sending to delegate?
  • Next by thread: Re: determine which NSTextView is sending to delegate?
  • Index(es):
    • Date
    • Thread