• 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: How do I get indirect binding to work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get indirect binding to work?


  • Subject: Re: How do I get indirect binding to work?
  • From: Bob Ueland <email@hidden>
  • Date: Fri, 5 Oct 2007 16:57:25 -0500 (CDT)

Keary Suska wrote
Generally, you wouldn't want to instantiate your model object in your nib.
It would be best if the document object "owns" the book object.


I took away the book instance in the nib and the outlet from MyDocument pointing to the book instance. Instead I made an instance variable in MyDocument.h like this

        Book *book;

I then changed the code so that the document owns the book object by adding this line to the init of MyDocument-m



         book=[[Book alloc] init];

Now everything works and no more crashes, but still not wiser why.

Bob




      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

_______________________________________________

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

  • Prev by Date: Re: How do I get indirect binding to work?
  • Next by Date: Re: ObjC vs C++ (was: Is ZLib available in Cocoa?)
  • Previous by thread: Re: How do I get indirect binding to work?
  • Next by thread: Window OnVisible
  • Index(es):
    • Date
    • Thread