• 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: Creating temporary NSManagedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating temporary NSManagedObjects


  • Subject: Re: Creating temporary NSManagedObjects
  • From: Joanna Carter <email@hidden>
  • Date: Mon, 26 Apr 2010 14:56:05 +0100

Hi Vincent

> It would! :) No kidding, I really do not understand what is your dictionary for. You don't have to tell me in French, I hope my English is sufficient, but could you briefly explain me (in five lines or so) what your category is supposed to do?

La catégorie rajoute une méthode, à la classe NSManagedObject, qui renvoie toutes les propriétés et leurs valeurs dans un NSDictionary.

Pourquoi ? Parce que  un NSDictionary répondrai à la programmation KVC, telle que valueForKey ou setValue:forKey, juste comme il était  n'importe quel objet qui est connecté aux composants visuels en utilisant les liaisons (bindings) Cocoa.

Ça veut dire qu'on peut remplacer un NSManagedObject avec un NSDictionary, comme contenu d'un NSObjectController et tous marchera comme d'habitude.

Après l'édition des valeurs qui se trouvent dans le dictionnaire, on peut affecter les valeurs du dictionnaire vers un vrai object avec la méthode setValuesForKeysWithDictionary:

> Sorry for seeming obtuse (after all, that may be *really* how I am :)).

C'est assez difficile d'apprendre la programmation mais, s'il faut le faire dans une langue étrangère, ça c'est beaucoup plus difficile :-)

Si je m'étais trompé en traduction, n'hésites pas de m'avertir.

Joanna

--
Joanna Carter
Carter Consulting
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Creating temporary NSManagedObjects (From: vincent habchi <email@hidden>)
 >Re: Creating temporary NSManagedObjects (From: Joanna Carter <email@hidden>)
 >Re: Creating temporary NSManagedObjects (From: vincent habchi <email@hidden>)
 >Re: Creating temporary NSManagedObjects (From: Joanna Carter <email@hidden>)

  • Prev by Date: Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't
  • Next by Date: Re: NSApplicationMain question
  • Previous by thread: Re: Creating temporary NSManagedObjects
  • Next by thread: Re: Creating temporary NSManagedObjects
  • Index(es):
    • Date
    • Thread