[MacRuby-devel] [MacRuby] #641: Using CLLocationCoordinate2D structs raises TypeError

MacRuby ruby-noreply at macosforge.org
Tue Mar 30 05:54:34 PDT 2010


#641: Using CLLocationCoordinate2D structs raises TypeError
------------------------------+---------------------------------------------
 Reporter:  thomas@…          |       Owner:  lsansonetti@…                  
     Type:  defect            |      Status:  new                            
 Priority:  major             |   Milestone:  MacRuby 0.6                    
Component:  MacRuby           |    Keywords:  struct, typeerror, corelocation
------------------------------+---------------------------------------------
 When using the CoreLocation framework coordinates are expressed in a
 C-struct  CLLocationCoordinate2D as defined in CLLocation.h of the
 CoreLocation framework.

 Using these coordinates in macruby (tested with 0.5 release and 0.6 trunk)
 results in a TypeError:

 {{{
 unrecognized runtime type `{?=dd}' (TypeError)
 }}}

 The following is a minimal program to demonstrate the bug:

 {{{
 #!/usr/bin/env macruby
 framework 'CoreLocation'

 def locationManager(lm, didUpdateToLocation: to, fromLocation: from)
   p to.coordinate
 end

 manager = CLLocationManager.alloc.init
 manager.delegate = self
 manager.startUpdatingLocation

 NSRunLoop.currentRunLoop.runUntilDate(NSDate.distantFuture)
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/641>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list