Re: Problem using NSDocument
Re: Problem using NSDocument
- Subject: Re: Problem using NSDocument
- From: Markus Hitter <email@hidden>
- Date: Thu, 18 Oct 2001 12:06:26 +0200
Am Mittwoch, 17. Oktober 2001 um 18:39 schrieb Laurent Daudelin:
When 'loadDataRepresentation:ofType:' is called, my 'imageView'
outlet is
nil!
*grin*
The method is named "loadDataRepresentation" and not
"loadDataRepresentationAndPutItIntoTheWindow" ;-)
Seriously, you should load your data in this method only and put
it later, in windowControllerDidLoadNib: into your view. It's
perfectly fine to use a temporary Storage for the time between
both methods and release the data in the second one.
For a code snippet, see the HTMLEditor tutorial part 1 or 2 on
<
http://www.stepwise.com/>.
Have fun,
Markus
P.S.: I have no idea what's the advantage of this apporach. For
me it would be more intuitive to load the nib first, then the
data.
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/