• 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
Re: sendAction:to:from: fails when application is in background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sendAction:to:from: fails when application is in background


  • Subject: Re: sendAction:to:from: fails when application is in background
  • From: Erik Buck <email@hidden>
  • Date: Fri, 3 Nov 2006 19:03:04 -0500

NSApplication sendAction:to:from: is using the responder chain to determine the receiver of the action. When there is no key or main window, the responder chain is very short and does not contain any objects that are in windows.

NSApp is a synonym for [NSApplication sharedApplication] and it never changes within your program. There is no mysterious interprocess communication going on.

Using the responder chain to send messages "while processing a large file" sounds like a very strange thing to do to me. What are you really trying to do ?

Why don't you just get a pointer to the object to which you want to send messages and send the messages directly ?

You could even use NSApplication's - (id)targetForAction:(SEL) aSelector to initially find the object to which you will send messages, but that method is presumably already being used by - sendAction:to:from: and won't work well with a short responder chain either.


_______________________________________________ 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
  • Follow-Ups:
    • Re: sendAction:to:from: fails when application is in background
      • From: Bruce Truax <email@hidden>
  • Prev by Date: Re: Odd textView behavior
  • Next by Date: double forwarding problem
  • Previous by thread: sendAction:to:from: fails when application is in background
  • Next by thread: Re: sendAction:to:from: fails when application is in background
  • Index(es):
    • Date
    • Thread