开发者

cocoa core data not saving both fields

Iam trying to save a date field + a text field into a core-data stoagemodel. I have used the "Core Data Entity" assists in interface builder but i can't get it to save both fiels when i press save.

It only saves the text field (but if i change the date 开发者_运维百科it also saves that) - it feels like it is only "sends" or "take" the fiels i actually edit..

Why is that?

Ive uploaded a SS of the app, maybe it gives you a better understanding: http://img801.imageshack.us/content_round.php?page=done&l=img801/6577/skrmbillede20110118kl12.png&via=mupload

Thanks alot


Have you tried sending resignFirstResponder to your fields before you call save?


Im not sure I completely understand your question but if its not saving a certain field you can manually save it by doing something like this: [myArrayController setValue:valueOfTheFieldHere forKeyPath:@"selection.keyName"];


Thanks for your answers. I found a book and followed a rather good example where i added my own function in my classes to add stuff to the store. This is more of my thinking.. (doing the code instead of letting xcode do all of it :-))

Even though it is pretty neat what you can do with the store and bindings!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜