[MacRuby-devel] I tried converting a working script rubycocoa script to macruby and it failed on this line...

Tim Rand timrandg at gmail.com
Thu Dec 11 21:55:04 PST 2008


NSDistributedNotificationCenter.defaultCenter.addObserver_selector_name_object(self,
:next_number, "next number", "com.imasender") #Working RubyCocoa line

    NSDistributedNotificationCenter.defaultCenter.addObserver self,
selector: :next_number, name: "next number", object: "com.imasender" #But
gives the error below when converted to MacRuby grammer and run with
macruby.

2008-12-11 21:45:43.448 macruby[66187:10b] *** -[Receiver next_number]:
unrecognized selector sent to instance 0x1319720
receiver.rb:29:in `run': NSInvalidArgumentException: *** -[Receiver
next_number]: unrecognized selector sent to instance 0x1319720
(RuntimeError)
    from receiver.rb:29:in `<main>'

It's driving me crazy. If the statement is a correct translation from
RubyCocoa to MacRuby syntax why am I getting a "unrecognized selector sent
to..." error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20081211/c96e3235/attachment.html>


More information about the MacRuby-devel mailing list