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?
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel