Re: determine which NSTextView is sending to delegate?
Re: determine which NSTextView is sending to delegate?
- Subject: Re: determine which NSTextView is sending to delegate?
- From: Rainer Brockerhoff <email@hidden>
- Date: Fri, 5 Nov 2004 12:46:19 -0200
At 5:40 AM -0800 11/5/04, email@hidden wrote:
>From: Jonathon Mah <email@hidden>
>Date: Sat, 6 Nov 2004 00:09:19 +1030
>
>On 5 Nov 2004, at 22:27, John James wrote:
>
>>s there a way to use IB to mark a NSTextView in some way so that the info can be retrieved by the delegate to determine which view is sending the message. (in my case "textDidEndEditing"). I could subclass but it seems this should be a common task and settable in IB.
>
>If your object is in IB, make outlets and connect them to the text views. Then when you receive the notification, you can just check if the notification object is any of the text views.
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...
--
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