• 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
NSApp sendAction: to: from question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: prioritizing threads
  • Next by Date: Detecting when a panel closes
  • Previous by thread: Re: TableView insanity... please help!!
  • Next by thread: Detecting when a panel closes
  • Index(es):
    • Date
    • Thread