Re: NSDocument "save as" bug
Re: NSDocument "save as" bug
- Subject: Re: NSDocument "save as" bug
- From: Alexey Zakhlestin <email@hidden>
- Date: Mon, 1 Feb 2010 10:54:34 +0300
On 01.02.2010, at 10:13, Half Activist wrote:
> Hello,
> In a NSDocument based application, my document class handles 3 different kinds of documents, 1 as a viewer and 2 as an editor.
> Actually, I wished it could handle the 2 types as an editor but here is what happens:
> When I only have 1 type everything is ok as you might already have understood, but when I add the second type and I go into "Save As..." the app crashes under Snow Leopard.
> It all boils down to the point that this little popup that's added to the panel to select the file type seems to be screwing everything up.
>
> What's happening: my document class "awakeFromNib" gets called when the save panel is loaded, I pasted the callstrack below:
>
> #0 -[MyProjectDocument awakeFromNib] (self=0x100436c60, _cmd=0x7fff830614e0) at /Users/devel/Work/Project/MyProjectDocument.m:371
this line clearly shows, that the bug is in your awakeFromNib method at line 371.
you should apply fix there
> #1 0x00007fff82927959 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] ()
> #2 0x00007fff82925b49 in loadNib ()
> #3 0x00007fff8292525c in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] ()
> #4 0x00007fff82c93797 in -[NSDocument _savePanelAccessoryViewForWritableTypes:defaultType:] ()
> #5 0x00007fff82c91192 in -[NSDocument _preparedSavePanelForOperation:] ()
> #6 0x00007fff82c9022b in -[NSDocument _runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:] ()
> #7 0x00007fff82c8dcda in -[NSDocument runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:] ()
> #8 0x00007fff82ab909a in -[NSApplication sendAction:to:from:] ()
> #9 0x00007fff82add602 in -[NSMenuItem _corePerformAction] ()
> #10 0x00007fff82add36c in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] ()
> #11 0x00007fff82d600b8 in -[NSMenu _internalPerformActionForItemAtIndex:] ()
> #12 0x00007fff82c129d5 in -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] ()
> #13 0x00007fff82abfb60 in NSSLMMenuEventHandler ()
> #14 0x00007fff83e48bd7 in DispatchEventToHandlers ()
> #15 0x00007fff83e48126 in SendEventToEventTargetInternal ()
> #16 0x00007fff83e65d49 in SendEventToEventTarget ()
> #17 0x00007fff83e94d45 in SendHICommandEvent ()
> #18 0x00007fff83ec1a1a in SendMenuCommandWithContextAndModifiers ()
> #19 0x00007fff83ec19d4 in SendMenuItemSelectedEvent ()
> #20 0x00007fff83ec18dc in FinishMenuSelection ()
> #21 0x00007fff83ea2cf9 in MenuSelectCore ()
> #22 0x00007fff83ea2461 in _HandleMenuSelection2 ()
> #23 0x00007fff82990b79 in _NSHandleCarbonMenuEvent ()
> #24 0x00007fff829646a2 in _DPSNextEvent ()
> #25 0x00007fff82963b41 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
> #26 0x00007fff82929747 in -[NSApplication run] ()
> #27 0x00007fff82922468 in NSApplicationMain ()
> #28 0x000000010000172d in main (argc=1, argv=0x7fff5fbff7c0) at /Users/devel/Work/Project/main.m:15
>
> Maybe should I report this bug to Apple?
> Regards._______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden