On Aug 22, 2013, at 8:00 AM, Jens Alfke <j...@mooseyard.com> wrote: > > On Aug 22, 2013, at 1:34 AM, Uli Kusterer <witness.of.teacht...@gmx.net> > wrote: > >> The notion of one of these being ‘more correct’ than the other is >> ridiculous. The second case is simply a performance optimization from the >> classic MacOS days that was carried over to OS X. > > Nope. (And not to pull rank, but I was on the AppleEvents/AppleScript team at > the time we figured this stuff out [1991] and added the seemingly-useless > ‘oapp’ event in response to developer complaints.) > > Many apps have a different behavior when launched with no docs/URLs (e.g. the > app itself is double-clicked). For example, Apple’s iWork apps open a > new-document assistant. The only reliable way an app can tell whether it was > launched without a doc/URL is if it gets the ‘oapp’ event instead, and the > way that event gets sent is when LaunchServices is told to launch the app but > not given any other AppleEvent to launch it with. Thus there is a valuable > semantic difference between the two cases.
In your example, the difference doesn't matter. If the app is sitting at the new doc assistant, or has a default blank document open, it should close that assistant or document and open the one requested via URL. Apps have been doing this for decades. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com