• 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: Bindings doesn't update model object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings doesn't update model object.


  • Subject: Re: Bindings doesn't update model object.
  • From: Ron Ballesteros <email@hidden>
  • Date: Sat, 22 May 2004 15:51:37 -0700

Do I need to create an instance of the my model object in IB to which I connect the 'content' of my NSObjectController under the Connections? Or do I even need an instance of my object and just specify the object class name in the Attributes section.

I guess that is the problem that I'm having in that I have an instance of my model object in IB and NSObjectController 'content' under the Connections is updating this while I create an instance of the same class in the MyDocument.m. and therefore when I save, I'm not saving the correct object model.

I have a feeling I'm having things mixed up in here.

Thanks.

ron
On May 18, 2004, at 10:20 PM, Scott Anguish wrote:

On May 19, 2004, at 12:23 AM, Ron Ballesteros wrote:

I have a document based application where I have an NSObjectController
that controls the data that is shown in the document window. My
bindings are working fine in regards of loading the default values from
the model. The problem that I'm having is that when a user enters data
in the text fields, non of the model object is getting updated.

As far as I can understand based on Apple's documentation, the model
gets updated through KVC. In IB under the Bindings->Value of the
NSTextField, I enabled 'Continously Updates Value' in order to update
the model. My model is KVC compliant as far as I know in that my models
implement the <key> and set<Key>: pair. such as empID: and setEmpID: .


you're definitely using an object controller to bind to, rather than directly to the model?

what type of control is it.. if you can send me (off list - or put it someplace I can download it) the cleaned code, I'll have a look

Is there something else that I'm missing here to get my views update my
model object?


no, this should work.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Bindings doesn't update model object.
      • From: Scott Anguish <email@hidden>
References: 
 >Bindings doesn't update model object. (From: Ron Ballesteros <email@hidden>)
 >Re: Bindings doesn't update model object. (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: XCode style toolbar buttons
  • Next by Date: Re: Add, Remove, & Action Button Styles
  • Previous by thread: Re: Bindings doesn't update model object.
  • Next by thread: Re: Bindings doesn't update model object.
  • Index(es):
    • Date
    • Thread