Projects

Ticket #641 (closed defect: duplicate)

Opened 23 months ago

Last modified 23 months ago

Using CLLocationCoordinate2D structs raises TypeError

Reported by: thomas@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.6
Component: MacRuby Keywords: struct, typeerror, corelocation
Cc: thomas@…

Description

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)

Change History

Changed 23 months ago by thomas@…

  • cc thomas@… added

Cc Me!

Changed 23 months ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to duplicate

Hi, thanks for reporting!

This is a duplicate of #533. The problem is that CoreLocation is not yet covered by BridgeSupport, and thus, MacRuby is not aware of the specific CL types.

Note: See TracTickets for help on using tickets.