Error I can't get rid off

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Janskiproducer
Posts: 1
Joined: Tue Feb 25, 2014 9:25 am

Error I can't get rid off

Post by Janskiproducer » Thu Mar 06, 2014 6:55 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Error I can't get rid off

Post by Simon » Thu Mar 06, 2014 11:04 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply