small medium large xlarge

Back to: All Forums  Core Data
13 Apr 2010, 05:19
Lachlan Scott (16 posts)

Having followed Marcus’ example in Chapter 2 (and other similar tutorials) I built my own application, and have encountered a strange behaviour I cannot understand.

I’ve effectively built my own app like Marcus’, and have a selection list in a table displaying my entities’ basic values, and then other display fields showing the other attributes of the selected entity. However, the other fields do not update from the selected entity in the list. I checked many times between example code and my own, and could find absolutely no difference between the settings in IB for the bindings etc. I then tried adding a new field and binding that to the NSArrayController and the selection as usual … and it worked.

So I’ve laboriously taken out the old non-working text fields and replaced them with new working text fields, and my problem is solved. What I don’t understand is why they weren’t working? I can see no difference between the bindings for the new ones against the old ones. It’s almost as though the old ones were corrupted in some way or … the Curse of Redmond was upon them, or something ;-)

Can anyone think of an omission I may have made here that caused this? Thank you.

Lachlan Scott

18 Apr 2010, 16:59
Marcus S. Zarra (284 posts)

Are you getting any warnings at all? When you do a clean build of your project look for warnings, specifically around IB. Secondarily, when you run the app look for warnings there as well. This issue could be something as simple as a typo which is real hard to spot when you have been staring at it for a while.

20 Apr 2010, 02:53
Lachlan Scott (16 posts)

Thank you, Marcus. I believe I have isolated the problem, and can repeat it. If any binding is incorrect for the whole context, the whole display can be frozen, or show no value. I also do not see any kind of warning at all. In my case, it was as simple as having changed the name of an entity attribute in the model and typing the old name in the binding. If others experience this frozen display or empty fields, I recommend checking that your bindings are using the actual names from the model, and not the names you THINK are in the model!

You must be logged in to comment