Re: NSPropertyDescription userInfo
Re: NSPropertyDescription userInfo
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