Re: Notification to NSApp Strangeness SOLVED
Re: Notification to NSApp Strangeness SOLVED
- Subject: Re: Notification to NSApp Strangeness SOLVED
- From: Bruce Truax <email@hidden>
- Date: Sun, 19 Sep 2004 10:35:20 -0400
It turns out that my sub panel was a window rather than a panel. Once I
changed it to a panel the messaging worked. I assume this is because the
responder chain sends the message to the front most window and since my
panel was a window it sent the message to itself and then ignored the
message.
Bruce
On 9/18/04 5:02 PM, "Bruce Truax" <email@hidden> eloquently wrote:
> I am getting some weird behavior when I try to send notifications to NSApp.
> My document based class has a panel which opens to enter some parameters. I
> use KVO to watch for changes in the parameters in the panel. When a change
> occurs I create an NSString call theCommand and then send it to the main
> document controller using:
>
> [NSApp sendAction:@selector(processCommand:) to:nil
> from:theCommand];
>
> This works fine. My panel has a sub panel with more editable information.
> When I open the sub panel and make a change I get the notification from the
> KVO subsytem and I create my command string but now when I send the command
> using the same exact line of code the notification never arrives at the
> document controller.
>
> I should also mention that it is the exact same observeValueForKeyPath
> method used for both the panel and subpanel.
>
> Bruce
>
> _______________________________________________
> 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
_______________________________________________
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