Re: Document not opened at launch?
Re: Document not opened at launch?
- Subject: Re: Document not opened at launch?
- From: Mark Dawson <email@hidden>
- Date: Wed, 26 Jul 2006 10:53:56 -0700
>On Jul 25, 2006, at 9:32 PM, Mark Dawson wrote:
>> I seem to have lost the ability to open a document at launch--I
>> have to click on the app a 2nd time for my main document to come
>> up. I added the "applicationShouldOpenUntitledFile:" method to my
>> app controller, and it only gets call once I double click a 2nd
>> time on my app. I had been switching around my window controller
>> nib, so I broke something. However, I'm not sure where to look.
>> It just doesn't appear that an initial "open doc" command is being
>> sent. Everything works for the "reopen" case?
>>
>Let's review what we know:
>
>1. Most document-based apps get applicationShouldOpenUntitledFile
>called at launch.
>2. You don't.
Correct
>My instinct would be to examine a working case and guess how yours
>differs. This is the stack crawl from a perfectly functional
>document-based app. Do you see anything that you might be
>inadvertently overriding in, say, an NSApplication subclass?
>
>#0 -[FlextimeDelegate applicationShouldOpenUntitledFile:]
>#1 0x936f4174 in -[NSApplication _doOpenUntitled] ()
>#2 0x936f09a4 in -[NSApplication(NSAppleEventHandling)
>_handleAEOpen:] ()
>#3 0x936f0574 in -[NSApplication(NSAppleEventHandling)
>_handleCoreEvent:withReplyEvent:] ()
>#4 0x92944ae4 in -[NSAppleEventManager
>dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
>#5 0x92944944 in _NSAppleEventManagerGenericHandler ()
>
>I might resort to setting breakpoints on things like "-[NSApplication
>_doOpenUntitled]" or _handleAEOpen: to see if they get reached. If
>they do then it's fairly easy to debug objective-C code from gdb even
>without symbols, and you'll be able to figure out why it's deciding
>not to call you.
I set a breakpoint in AEProcessAppleEvent, and nothing is hit until the reopen. So it doesn't appear that any AppleEvents are being generated yet?
mark
_______________________________________________
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