On Tue, Jan 11, 2011 at 10:21 PM, Rick Mann <rm...@latencyzero.com> wrote:
> I have a document-based app. I want to modify the behavior when it launches: 
> instead of opening a new, untitled document, I want it to first check some 
> stuff, then generally re-open the last-opened document.
>
> After reading through the various cocoa app architecture docs, I'm not 
> actually sure where the right place to do that is.

NSApp's delegate seems like the best choice to me.

Return NO from the delegate's -applicationShouldOpenUntitledFile: to
avoid opening an untitled document, then do the rest of your checks
and re-open the last-opened document in
-applicationDidFinishLaunching:.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to