Re: different launch methods
Re: different launch methods
- Subject: Re: different launch methods
- From: Damien Pacaud <email@hidden>
- Date: Wed, 8 Oct 2003 12:17:23 +0200
Alastair pretty much already said what's my opinion about such specs.
Try to avoid such nonstandard behavior, or your users will be
surprised or hurt. And before I again get my foot stuck in my mouth,
let's offer some possible solutions.
I know this is not the "Mac" way to do it...but I have two options on
opening of my application, if it is a file from a certain type, the app
shall open the file and display it, if it is another type, I have to
open it and display it and also display a wizzard.
This should however happen only when an icon is dropped on the
application, not when the user selects the open menu.
I can think of one approach, and one "hack" that uses that approach
to fake the behavior you want:
Split your applications into two parts. One is the Droplet that opens
the Wizard when a file is dropped on it, and the other is the regular
application that contains all the Beef. You can simply make the
Droplet send a special Apple Event (I'm sure there's a more Cocoa-ish
way to do this, use that instead of Apple Events if you like) to the
Beef app, causing it to show the Wizard.
You could then embed the actual Beef app in the Droplet's bundle (aka
package). Make the Beef application register for your document types,
so the Finder will pick it for opening (haven't tried that, but it
might work), and when the user drops a file on the Droplet, it will
obviously open with the Wizard.
But I think, just extracting the droplet from the actual app would be
the smarter approach. You get the "droplet" behavior, but the actual
app still behaves consistently, just like any other app on the Mac.
Thanks a lot for your help on this matter,
what I actualy did (not very clean I admit..) is that I implemented a
delegate for the app and checeked the document count in the
applicationDidFinishLaunching method.
That way, if there is more than 0 document , one or more file(s) have
been dragged I check the types and do what i want for these types and
else, the app opens regularly.
Thanks a lot for helping
regards
Damien Pacaud
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.