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

MacRuby ruby-noreply at macosforge.org
Mon Jan 11 18:48:03 PST 2010


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



More information about the MacRuby-devel mailing list