[MacRuby] #515: ScriptingBridge: problem with classForScriptingClass
#515: ScriptingBridge: problem with classForScriptingClass ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- {{{ $ cat ot.rb framework 'Cocoa' framework 'ScriptingBridge' ted = SBApplication.applicationWithBundleIdentifier "com.apple.TextEdit" docs = ted.documents doc = ted.classForScriptingClass("document").alloc.init docs.addObject doc #doc = docs.first # uncommenting this line heals the doc reference doc.text = "knock out" }}} gives {{{ $ macruby ot.rb ot.rb:in `<main>': unrecognized runtime type `x' (TypeError) }}} and sometimes {{{ $ macruby ot.rb Segmentation fault }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/515> MacRuby <http://macruby.org/>
#515: ScriptingBridge: problem with classForScriptingClass ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- Comment(by lsansonetti@…): The problem here is that the document object's class is based on NSProxy, which does not respond to method_missing. The object does not respond to text=: and we try to trigger method_missing which does not work as well. -- Ticket URL: <http://www.macruby.org/trac/ticket/515#comment:2> MacRuby <http://macruby.org/>
#515: ScriptingBridge: problem with classForScriptingClass ----------------------------+----------------------------------------------- Reporter: jazzbox@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------+----------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Should be fixed by r3157. MacRuby should not crash anymore. -- Ticket URL: <http://www.macruby.org/trac/ticket/515#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby