FROM : Andrew Madsen
DATE : Fri Jun 30 21:05:50 2006
George,
Thanks for the reply. I didn't realize that I would have to
manually create the Address entity for a particular Person. Anyway,
I created the class files for Person and added code that creates an
Address object and inserts it into the Managed Object Context then
sets it's own Address relationship to point to the newly created
object. I bound the city text field to Person Arrray Controller with
a key of selection and a path of "myAddress.city" and it all works.
Thanks!
-Andrew
On Jun 30, 2006, at 11:12 AM, George Orthwein wrote:
> Everything you described sounds ok to me. What I'm *guessing* may
> be the problem is that you are creating a Person object, but that
> you haven't yet created the "Address" object or assigned it to the
> myAddress relationship. You may want to create the class files for
> Person and create and assign a default address in "awakeFromInsert".
>
> I'm a big fan of option-dragging the entities to IB to create a
> default GUI. This will create appropriate controllers and let you
> examine all the attributes easily. That may also help pinpoint what
> is going on.
>
> Also, you should be able to bind the "City" text field directly to
> the Person Array Controller -> selection -> myAddress.city. No need
> for the Object Controller in that case.
>
> Hope that helps,
> George
>
DATE : Fri Jun 30 21:05:50 2006
George,
Thanks for the reply. I didn't realize that I would have to
manually create the Address entity for a particular Person. Anyway,
I created the class files for Person and added code that creates an
Address object and inserts it into the Managed Object Context then
sets it's own Address relationship to point to the newly created
object. I bound the city text field to Person Arrray Controller with
a key of selection and a path of "myAddress.city" and it all works.
Thanks!
-Andrew
On Jun 30, 2006, at 11:12 AM, George Orthwein wrote:
> Everything you described sounds ok to me. What I'm *guessing* may
> be the problem is that you are creating a Person object, but that
> you haven't yet created the "Address" object or assigned it to the
> myAddress relationship. You may want to create the class files for
> Person and create and assign a default address in "awakeFromInsert".
>
> I'm a big fan of option-dragging the entities to IB to create a
> default GUI. This will create appropriate controllers and let you
> examine all the attributes easily. That may also help pinpoint what
> is going on.
>
> Also, you should be able to bind the "City" text field directly to
> the Person Array Controller -> selection -> myAddress.city. No need
> for the Object Controller in that case.
>
> Hope that helps,
> George
>
| Related mails | Author | Date |
|---|---|---|
| Andrew Madsen | Jun 30, 17:52 | |
| George Orthwein | Jun 30, 19:12 | |
| Andrew Madsen | Jun 30, 21:05 | |
| mmalc crawford | Jun 30, 23:15 |






Cocoa mail archive

