[MacRuby] #550: TypeError: unrecognized runtime type when using NSThread.alloc.initWithTarget
#550: TypeError: unrecognized runtime type when using NSThread.alloc.initWithTarget -------------------------------------+-------------------------------------- Reporter: mattaimonetti@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- {{{
framework 'Foundation' => true thread = NSThread.alloc.initWithTarget(self, selector:'sleep:', object:'5') TypeError: unrecognized runtime type `' }}}
Doing: {{{ framework 'Foundation' class ExpensiveCalculation def start(to_process) puts "processing on a separate thread" exit end end calculation = ExpensiveCalculation.new thread = NSThread.alloc.initWithTarget(calculation, selector:'start:', object:'dummy_obj') thread.start }}} Works fine tho. -- Ticket URL: <http://www.macruby.org/trac/ticket/550> MacRuby <http://macruby.org/>
#550: TypeError: unrecognized runtime type when using NSThread.alloc.initWithTarget -------------------------------------+-------------------------------------- Reporter: mattaimonetti@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------+-------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: MacRuby 0.5 => MacRuby 0.6 Comment: The problem was when re-typing the method. The problem should be fixed in r3955. {{{ $ cat t2.rb framework 'Foundation' class Foo def test(obj) p "inside test..." sleep 2 end end o = Foo.new t = NSThread.alloc.initWithTarget(o, selector: :"test:", object: nil) t.start p "wait..." while !t.isFinished; end p "finished" $ ./miniruby t2.rb "wait...""inside test..." "finished" $ }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/550#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby