Hi,
Is Erb included in 0.4 MacRuby ... and if so is it fully functional ?
Thanks,
-Mic
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
My question boils down to a simpler case:
Ruby:
class Dog
def bark(num = 1)
num.times { puts "woof!" }
end
end
Objective-C:
id dog = [[MacRuby sharedRuntime] evaluateString:@"Dog.new"];
[dog bark:3];
Passing Objective-C int to a Ruby method crashes it.
Assumin
ERB is part of Ruby's core library, and as such, is included with
MacRuby. I just poked around in macirb 0.4 and it seems to be working
as expected.
Best,
Jeremy
On Thu, May 21, 2009 at 2:57 AM, Mic Pringle wrote:
> Hi,
>
> Is Erb included in 0.4 MacRuby ... and if so is it fully functional ?
>
Hi Łukasz,
Since the bark method is defined in Ruby, it means its return value
and arguments are objects (id). So, if you want to call the method
from Objective-C, you must pass an Objective-C object. In this case,
an NSNumber object should do it.
If the bark method was actually an Objective-C me
You're welcome. I've looked into adding global hot keys before, but
never too seriously, so I definitely learned a few things as well.
As for the problem with aixmlserialize, I wouldn't assume that it is a
32/64-bit issue. In this case, it was obvious what was going on from
the documentation. Ge