Re: Object from TableView cell
Re: Object from TableView cell
- Subject: Re: Object from TableView cell
- From: Phillip Morelock <email@hidden>
- Date: Thu, 13 Jun 2002 03:18:22 -0700
>
Yes it is, but there is not only one object that I want to track, an entire
>
column of the table contains NSPopUpButtons.
Then just register for the notification with nil and you'll get all of them.
When the notification comes in, your
- (void) DoCreateMenu: (NSNotification *) note
{
//
}
method will get called and the NSNotification * that is passed to it looks
like this:
- name
- object
- userInfo
Get the - object to find out which one sent the notification, then act
appropriately. Isn't this what you're trying to do?
Read up on NSNotification, and the specific notification stuff in
NSPopUpButtonCell. For example, NSPopUpButtonCellNotification has no
userInfo dictionary (see the documentation).
fillup
On 6/13/02 3:57 AM, "Cristian Savu" <email@hidden> wrote:
>
Yes it is, but there is not only one object that I want to track, an entire
>
column of the table contains NSPopUpButtons.
>
>
I was asking if I can put something more general, something like
>
object:[[myTableView tableColumnWithIdentifier:@"CONTEXT_COLUMN"]
>
dataCell]].
>
>
I've tried this but isn't working!
>
>
>
On 6/13/02 11:06 AM, "Phillip Morelock" <email@hidden>
>
wrote:
>
>
> Isn't it just the a pointer to the button you want to track?
>
>
>
> fillup
>
>
>
> NSPopUpButtonCellWillPopUpNotification
>
>
>
> This notification contains a notification object but no userInfo dictionary.
>
> The notification object can be either a popup button or its enclosed
>
> popup-button cell. The notification is posted just before the popup menu is
>
> attached to its window frame. You can use this notification to lazily
>
> construct your part's menus, thus preventing unnecessary calculations until
>
> they are needed.
>
>
>
Hello list,
Look, I have a tableView filled with popUpButtons and I need to populate
the corresponding menus after the user clicks the button. For this I'm using
NSPopUpButtonCellWillPopUpNotification.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(DoCreateMenu:)
name:NSPopUpButtonCellWillPopUpNotification object:<<I DON'T KNOW>>];
The problem I run into is that I have no Ideea what to put as object
parameter when I want to register the observer. If I leave nil, all the
popUpButtons are populated throught the same selector and don't need that.
if somebody has any ideea or just a hint ...
Regards, Cristian
_______________________________________________
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.