From: Motohiro T. <mo...@gm...> - 2007-07-15 06:32:45
|
Hi, While writing QuartzComposer CustomPatch with RubyCocoa, I'm in trouble with passing arguments from Objective-C code to Ruby. How can I pass more than one arguments to Ruby code from Objective-C code ? Objective-C code: - (BOOL)execute:(id)fp8 time:(double)fp12 arguments:(id)fp20 { Class helperClass = NSClassFromString(@"CustomRubyPatch"); rubyobj_ = [[helperClass alloc] initWithQCPatch:self]; [rubyobj_ execute:fp8 time:fp12 arguments:fp20]; return YES; } and Ruby code: def execute(fp8, time, arguments) @otport.setStringValue @inport.stringValue.gsub(/Objective-C/, "Ruby") true; end when [rubyobj_ execute:...] is invoked at runtime, an exception is raised ("selector not recognized"). thanks, -- Motohiro Takayama http://blog.deadbeaf.org/ |