NSApp sendAction: to: from question
NSApp sendAction: to: from question
- Subject: NSApp sendAction: to: from question
- From: Bruce Truax <email@hidden>
- Date: Tue, 28 Dec 2004 21:05:32 -0500
I use NSApp sendAction: to: from: in a windowDidBecomeKey method to cause
the contents of and editor window to be updated whenever it is brought to
the front. The method is:
- (void)windowDidBecomeKey:(NSNotification *)aNotification
{
//now send the commands to update the table
[NSApp sendAction:@selector(setLensDataBeingRecievedYES) to:nil
from:nil];
[NSApp sendAction:@selector(processCommand:) to:nil
from:@"\nEOS\nLENO\nRTG ALL\nVBA\n"];
NSLog(@"Did Become Key");
}
I have to send two messages to the application controller to get my window
to update. The two messages work perfectly when I switch between windows
within the application. When I switch to another application and then click
on the window directly from another application the windowDidBecomeKey
method is executed as expected, but the two messages do no reach the
application controller. If I then click on the main document window in the
application and then back to the editor window the messages are received as
expected. Is there some other command I need to issue to tell the
application that it should listen to messages again?
--
____________________________________________________________
Bruce E. Truax email: email@hidden
Optical Engineering Consultant
Diffraction Limited Design LLC
388 Wedgewood Road voice: 860-276-0450
Southington, CT 06489 fax: 860-620-9026
http://www.dld-llc.com
_____________________________________________________________
_______________________________________________
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