[MacRuby-devel] [MacRuby] #550: TypeError: unrecognized runtime type when using NSThread.alloc.initWithTarget

MacRuby ruby-noreply at macosforge.org
Wed Apr 21 21:25:09 PDT 2010


#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/>



More information about the MacRuby-devel mailing list