• 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: How do I get the NSApplication of other running applications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the NSApplication of other running applications?


  • Subject: Re: How do I get the NSApplication of other running applications?
  • From: Eric Schlegel <email@hidden>
  • Date: Fri, 8 Sep 2006 15:44:39 -0700


On Sep 8, 2006, at 3:32 PM, Alan Smith wrote:

Can Apple Events return objects/variables? For example: if I told an
app to give me it's NSApplication could I get it (hypothetically)?

An AppleEvent is basically just a storage container for arbitrary data. You can put any kind of data you want into it, including pointers, so yes, you could define an AppleEvent that, when an application received it, would request that the application store its NSApplication* into the reply AppleEvent.


However, there are these problems:

- as already mentioned, the NSApplication* from any other process is meaningless inside your process. It's a pointer that does not point to anything inside your process, and you can't send messages to it or use it for anything at all
- since no existing application would handle this hypothetical AppleEvent, you'd never get a response anyways
- Carbon apps don't have NSApplication instances


I think you need to describe exactly what functionality you need from NSApplication, and then maybe we can recommend other ways of getting that information.

-eric

_______________________________________________
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


References: 
 >How do I get the NSApplication of other running applications? (From: "Alan Smith" <email@hidden>)
 >Re: How do I get the NSApplication of other running applications? (From: "Shawn Erickson" <email@hidden>)
 >Re: How do I get the NSApplication of other running applications? (From: "Alan Smith" <email@hidden>)
 >Re: Re: How do I get the NSApplication of other running applications? (From: "Corey O'Connor" <email@hidden>)
 >Re: Re: How do I get the NSApplication of other running applications? (From: "Alan Smith" <email@hidden>)
 >Re: How do I get the NSApplication of other running applications? (From: Andrew Farmer <email@hidden>)
 >Re: How do I get the NSApplication of other running applications? (From: John Stiles <email@hidden>)
 >Re: How do I get the NSApplication of other running applications? (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Re: How do I get the NSApplication of other running applications?
  • Next by Date: Re: How do I get the NSApplication of other running applications?
  • Previous by thread: Re: How do I get the NSApplication of other running applications?
  • Next by thread: Re: How do I get the NSApplication of other running applications?
  • Index(es):
    • Date
    • Thread