[MacRuby-devel] Calling Foundation functions
seanlilmateus at googlemail.com
Wed Nov 16 11:25:30 PST 2011
It’s a macro and I solved this problem like this:
def NSLocalizedString(key, value)
NSBundle.mainBundle.localizedStringForKey(key, value:value, table:nil)
this question has already been
I hope I could help you!
On Wednesday, November 16, 2011 6:39:03 PM UTC+1, CMcP wrote:
> I'm having trouble calling the Foundation function NSLocalizedString from
> within a method I have added to class NSRunningApplication:
> class NSRunningApplication
> def activeString
> active? ? NSLocalizedString("Yes", "Yes") : NSLocalizedString("No",
> The error message I get is:
> undefined method `NSLocalizedString' for
> #<NSKVONotifying_NSRunningApplication:0x40127e680> (NoMethodError)
> I can however successfully call NSLog, which is another Foundation
> function, from the same place.
> Is there a way I can call NSLocalizedString (and why is NSLog a special
> Thanks for any info.
> -- Colin
> MacRuby-devel mailing list
> MacRub... at lists.macosforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MacRuby-devel