• 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: "No Selection", NSObjectController & CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "No Selection", NSObjectController & CoreData


  • Subject: Re: "No Selection", NSObjectController & CoreData
  • From: email@hidden
  • Date: Mon, 3 Oct 2005 20:01:18 -0700

Glad it worked. I guess even having "Automatically Prepares Content"
doesn't exactly "prepare" it...

Yea, also, if you don't want it deleted later you can bind enabled to canRemove (of the object controller)
and use an NSNegateBoolean transformer so it becomes disabled once its
added...


Good luck.

On 平成 17/10/03, at 19:55, Thom Meijer wrote:

YES! Thank you, thank you so much! All nice people here, thank you as well!
This is exactly what I was looking for. I can not help myself but it feels quite strange to me that also NSObjectController needs the one and only object to be added. In case of NSArrayController I pretty get it but with *object* controller....anyway!
So just for archive purpose, I put a button to my interface in IB, control-dragged from it to NSObjectController, in action pane connected add:.
And, in Bindings pane, for every text field's value > no selection placeholder: I just filled in something like "Hit the init button".
Once again, thank you very much!


On 10/4/05, email@hidden <email@hidden > wrote:
You can add it in code or add a button to the window and connect it
to the object controller and connect it to the add:  method.
Click the add: button and the controller will make and object for the
selection.
I think thats what your looking for?

Hope it helps.

Thom Meijer wrote:

> On 10/3/05, mmalcolm crawford <email@hidden> wrote:
>
>>
>>
>> On Oct 3, 2005, at 12:55 PM, Thom Meijer wrote:
>>
>>
>>> Then I dragged NSObjectController from IB palettes to instances
>>> pane, named
>>> it myController and I bound its managedObjectContext to
>>> myAppDelegate (from
>>> data modeler) with model key path: managedObjectContext and in
>>> attributes
>>> pane i checked mode: entity, entity name: myEntity, automatically
>>> prepares
>>> content: yes, editable: yes.
>>> Then I bound every text field's value to myController with
>>> controller key:
>>> selection and with model key path: name of myEntity's attribute.
>>> Now, the problem is, it doesn't work. I always get "no selection"
>>> in all
>>> fields.
>>> Please, what am I missing? What am I doing wrong?
>>>
>>
>> Did you create an instance of the entity?
>>
>
>
> I thought yes but now I am very slowly realizing that maybe I
> didn't. Thanks
> for the link.
>
> See <http://developer.apple.com/documentation/Cocoa/Conceptual/
>
>> NSPersistentDocumentTutorial/04_Department/
>> chapter_5_section_1.html#//
>> apple_ref/doc/uid/TP40001799-CH223>.
>>
>> mmalc
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
40gmail.com
>>
>> This email sent to email@hidden
>>
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list ( email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >"No Selection", NSObjectController & CoreData (From: Thom Meijer <email@hidden>)
 >Re: "No Selection", NSObjectController & CoreData (From: mmalcolm crawford <email@hidden>)
 >Re: "No Selection", NSObjectController & CoreData (From: Thom Meijer <email@hidden>)
 >Re: "No Selection", NSObjectController & CoreData (From: email@hidden)
 >Re: "No Selection", NSObjectController & CoreData (From: Thom Meijer <email@hidden>)

  • Prev by Date: Re: Very very simple bindings problem??
  • Next by Date: Re: "No Selection", NSObjectController & CoreData
  • Previous by thread: Re: "No Selection", NSObjectController & CoreData
  • Next by thread: Re: "No Selection", NSObjectController & CoreData
  • Index(es):
    • Date
    • Thread