• 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: Identifying NSTextViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying NSTextViews


  • Subject: Re: Identifying NSTextViews
  • From: Rippit the Ogg Frog <email@hidden>
  • Date: Tue, 28 Jul 2009 21:54:37 -0700

Graham Cox wrote:

On 29/07/2009, at 1:56 PM, Rippit the Ogg Frog wrote:

- (void) textDidChange: (NSNotification*) notification
{
NSString *text = [[notification object] string];
// But which view was it?


    return;
}


[notification object] is it.

Thanks, but that doesn't solve my problem. Maybe I should be more clear:

My problem isn't getting a pointer to one of the NSTextViews. My problem is figuring out which of those NSTextViews a given pointer refers to.

I have the views arranged in three rows and two columns, for a total of six.

When my delegate's method gets called, what I need to know is which row and column the text view is located in, that called the delegate.

If I could use tags, as with NSTextField, then I would set the tags to be integers ranging from 1 to 6. I could then check the tag and copy the text into the appropriate member variable in my window's controller.

But I can't use tags because they're views and not fields.

Just having the pointer doesn't help unless I can use that to find out which of the six views it points to.

Thanks!

--
Rippit the Ogg Frog
email@hidden
http://www.oggfrog.com/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Identifying NSTextViews
      • From: Graham Cox <email@hidden>
References: 
 >Identifying NSTextViews (From: Rippit the Ogg Frog <email@hidden>)
 >Re: Identifying NSTextViews (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSRulerView Centimeters [Solved]
  • Next by Date: Re: NSOpenPanel Exception/Bug
  • Previous by thread: Re: Identifying NSTextViews
  • Next by thread: Re: Identifying NSTextViews
  • Index(es):
    • Date
    • Thread