• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem using NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


  • Follow-Ups:
    • Re: Problem using NSDocument
      • From: Ondra Cada <email@hidden>
References: 
 >Problem using NSDocument (From: "Laurent Daudelin" <email@hidden>)

  • Prev by Date: Re: looking for advice with control implementation
  • Next by Date: Re: What happens to the AppKit Framework when an user logout ?
  • Previous by thread: Problem using NSDocument
  • Next by thread: Re: Problem using NSDocument
  • Index(es):
    • Date
    • Thread