Re: How do I get indirect binding to work?
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