• 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: NSPropertyDescription userInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPropertyDescription userInfo


  • Subject: Re: NSPropertyDescription userInfo
  • From: "Steve@DotMac" <email@hidden>
  • Date: Sat, 5 Nov 2005 09:48:38 -0600

Jim;

Hmm.

I'm not sure what you mean by 'localization dictionary' (string files? responses from NSLocale? other?).
No such term is found in the Apple Documentation...
Also what do you mean '... attached directly.."?
Where can I find out more about what you mean here?


On the second response, you hit the nail on the head!
BUT
HOW do I get the 'NSPropertyDescription' in the message [NSPropertyDescription userInfo]?


What exactly creates an NSPropertyDescription as its response?
I thought, and have tried, to get something along the lines of
[[[...entity] propertyDescriptionFor:@"attributeName"] userInfo]...

I just can't get the syntax right....

Thanks for your help!
Steve

On Nov 5, 2005, at 7:39 AM, Jim Correia wrote:

On Nov 5, 2005, at 4:10 AM, Steve@DotMac wrote:

I'm trying to use the 'userInfo' on CoreData Entity Attributes to accomplish 2 things:
1) a friendly name to show the end user

Use the localization dictionary for that purpose. (The documentation says it is attached directly if it has the correct name. In my testing this isn't the case. Writing a bug about this is on my to do list.)


2) a flag for dis/inclusion on some tableViews.

How in the heck do you access this userInfo?
I've tried many permutations around:
NSEntityDescription * x = [[[[managedObjectContext persistentStoreCoordinator] managedObjectModel] entitiesByName] objectForKey:@"X"];
NSLog(@"X=%@",x);
NSLog(@"X PropByName :%@",[x propertiesByName]);
NSLog(@"X PropByName :%@",[x attributesByName])


but I never see the userInfo dictionary.

Logging a value doesn't necessarily do a comprehensive dump of the object - it just dumps whatever the description method returns.


-[NSPropertyDescription userInfo] is what you want.

http://developer.apple.com/documentation/Cocoa/Reference/ CoreData_ObjC/Classes/NSPropertyDescription.html#//apple_ref/doc/ uid/TP30001178-BAJJJEEI

Jim

_______________________________________________ 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
  • Follow-Ups:
    • Re: NSPropertyDescription userInfo
      • From: mmalcolm crawford <email@hidden>
    • Re: NSPropertyDescription userInfo
      • From: Jim Correia <email@hidden>
References: 
 >NSPropertyDescription userInfo (From: "Steve@DotMac" <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Making menu bar application's window key
  • Next by Date: Re: NSPropertyDescription userInfo
  • Previous by thread: Re: NSPropertyDescription userInfo
  • Next by thread: Re: NSPropertyDescription userInfo
  • Index(es):
    • Date
    • Thread