Re: Customized document creation
Re: Customized document creation
- Subject: Re: Customized document creation
- From: Brian Webster <email@hidden>
- Date: Sat, 07 Jul 2001 15:56:30 -0500
on 7/7/01 2:47 PM, email@hidden at
email@hidden wrote:
>
I have a small problem with my custom document creation. It seems that
>
my document object no longer gets released properly. Rather than
>
subclass NSDocumentController, I made a category and created my own
>
document-creation method -newDocumentWithData. The code follows Brian's
>
example below.
>
>
If I use the standard -newDocument method, the document object gets
>
released as expected (my window controller calls -setShouldCloseDocument
>
to release the document when the window closes). Could
>
-newDocumentWithData be missing a step?
My sample code didn't release the document after adding it to the list of
documents in the document controller. Does yours? It should.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster/