Re: [MacRuby-devel] Calling Foundation functions

2011-11-16 Thread Colin McPhail
Thank you! I promise to do a better search before I ask any more questions. On 16 Nov 2011, at 19:25, Mateus Armando wrote: > It’s a macro and I solved this problem like this: > > module Kernel > private > > def NSLocalizedString(key, value) > NSBundle.mainBundle.localizedStringForKey(

Re: [MacRuby-devel] Calling Foundation functions

2011-11-16 Thread Mateus Armando
It’s a macro and I solved this problem like this: module Kernel private def NSLocalizedString(key, value) NSBundle.mainBundle.localizedStringForKey(key, value:value, table:nil) end end this question has already been here: http://lists.macosforge.org/pipermail/macruby-devel/2011-Febr

Re: [MacRuby-devel] Calling Foundation functions

2011-11-16 Thread Colin McPhail
Hi Igor, You are right, NSLocalizedString is a macro. I never thought of that! Thank you. -- Colin On 16 Nov 2011, at 18:14, Игорь Владимирович Евсюков wrote: > Hi Colin, > > You have issues because NSLocalizedString isn't a C function, I'm not sure, > but I believe that it is preprocessor m

Re: [MacRuby-devel] Calling Foundation functions

2011-11-16 Thread Игорь Владимирович Евсюков
Hi Colin, You have issues because NSLocalizedString isn't a C function, I'm not sure, but I believe that it is preprocessor macros because it Xcode it highlight's as a macros: http://cl.ly/Bqw9 On Wed, Nov 16, 2011 at 7:39 PM, Colin McPhail wrote: > Hi, > > I'm having trouble calling the Foundat

[MacRuby-devel] Calling Foundation functions

2011-11-16 Thread Colin McPhail
Hi, 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", "No") end end The error message I get