To simply test if the document really get's closed implement the close method 
in your NSDocument subclass. If it get's called, your document will be closed.

- (void)close {
  [super close];
}

This should get called, if you do not have anything else interfering 
implemented (eg. canCloseDocumentWithDelegate). Stack trace for this call is in 
my case

-[MPDocument close] at **/MPDocument.m:200
-[NSWindowController _windowDidClose] ()
-[NSWindow _close] ()
-[NSDocument _something:didSomething:soContinue:] ()
__75-[NSDocument 
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:]_block_invoke_2 ()
__75-[NSDocument 
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:]_block_invoke ()
-[NSDocument 
performActivityWithSynchronousWaiting:usingBlock:cancellationHandler:] ()
-[NSDocument canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:] ()
-[NSWindow __close] ()
-[NSWindow _close:] ()
-[NSApplication sendAction:to:from:] ()
-[NSControl sendAction:to:] ()
-[NSCell _sendActionFrom:] ()
-[NSCell trackMouse:inRect:ofView:untilMouseUp:] ()
-[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
-[NSControl mouseDown:] ()
-[_NSThemeWidget mouseDown:] ()
-[NSWindow sendEvent:] ()
-[NSApplication sendEvent:] ()
-[NSApplication run] ()
NSApplicationMain ()


On 23 Jan 2014, at 12:09, Graham Cox <[email protected]> wrote:

> 
> On 23 Jan 2014, at 9:44 pm, SevenBits <[email protected]> wrote:
> 
>> Pressing the Close button closes the window
> 
> 
> Yes, but does it close the document? i.e. remove it from the list of open 
> documents and releases the document object? The document is not the window.
> 
> --Graham
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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/michael.starke%40hicknhack-software.com
> 
> This email sent to [email protected]


___m i c h a e l   s t a r k e____ 
       geschäftsführer
       HicknHack Software GmbH
       www.hicknhack-software.com
       
___k o n t a k t____
       +49 (170) 3686136
       [email protected]
       
___H i c k n H a c k   S o f t w a r e   G m b H____
       geschäftsführer - maik lathan | andreas reischuck | michael starke
       bayreuther straße 32
       01187 dresden
       amtsgericht dresden HRB 30351
       sitz - dresden


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to