Page 1 of 1

Error I can't get rid off

Posted: Thu Mar 06, 2014 6:55 pm
by Janskiproducer
Hi guys,
I'm having a bit of trouble... I'm trying to write an app where it finds the nearest store, based on latitude and longitude. I've checked out a few examples on how to use the built-in iphone gps, and here's the code I have on the card script:

on OpenCard
iphoneStartTrackingLocation
put iphoneCurrentLocation() into tLocation
end OpenCard

This creates an error stating: execution error at line 2 (Handler: can't find handler) near "iphoneStartTrackingLocation", char 1

...I'm at a loss here - what is wrong??

I have tried the same code in LCC 6.5.2, 6.6 (dp 1) and 6.6 (rc 1).

Any help would be greatly appreciated.
Jan

Re: Error I can't get rid off

Posted: Thu Mar 06, 2014 11:04 pm
by Simon
Hi Jan,
You cannot run mobile commands in the IDE :)
You have to skip out of them while developing and use the sim or a real device for testing.
on openCard
if the environment is "development" then exit openCard
iphoneStartTrackingLocation
etc.

I'd also work with the mobile... commands (unless there isn't one?)
mobileStartTrackingSensor

Simon