Can you obtain the NSRuleEditor localized display?
Can you obtain the NSRuleEditor localized display?
- Subject: Can you obtain the NSRuleEditor localized display?
- From: "John C. Daub" <email@hidden>
- Date: Wed, 10 Mar 2010 13:30:12 -0600
- Thread-topic: Can you obtain the NSRuleEditor localized display?
Can you obtain the localized display of an NSRuleEditor?
I have an NSRuleEditor displaying my rule setup. The app has functionality
where it provides a text summary of the search rules that generated the
results. When I call -[NSRuleEditor displayValuesForRow:], that returns the
actual display value objects, which is expected. Of course, NSRuleEditor has
magical voodoo where if you set a -formattingDictionary those displayValues
will be magically translated according to the -formattingDictionary when the
values are displayed in the GUI. I have set a formatting dictionary on my
NSRuleEditor, and in the GUI presentation of things everything looks right
as as I'd expect.
What I'm wanting is to obtain the magically formatted values the GUI is
actually displaying, so when the app is running in English my summary string
is "name contains foo", and when the app is running in Japanese I get "お名前
は「foo」が入っている" ("name foo contains").
I can't see any way to extract the actual displayed GUI (post-formatting),
other than obtaining the criteria or displayValues myself, obtaining the
formattingDictionary myself, and doing all the heavy lifting.
Hoping I may be overlooking something or maybe there's a nice trick I could
use. I need to run on 10.5, but if there's a 10.6-and-later-only solution
that could be acceptable.
Thank you.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/hsoi/blog/>
"We live thinking we will never die. We die thinking we had never lived.
Cut it out." -- Jason Becker
_______________________________________________
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