I've worked my way through lesson 4 and all appeared to be ok.
I have a question and a problem.
The Question:
In the video Eleanor mentions that that you don't have to define a variable, but it is an option you can switch on, where do you do this and would it help with a problem I had earlier where in the card script I had put coma instead of comma which didn't return an error when I saved the card, which I would have expected..?
The problem:
I've got Locate Me working on the desktop, so it shows the run rev office as a location in google maps, but when I run it in the IOS simulator nothing is returned. In the video it says you will have a random location returned because there is obviously no sensor on the simulator, but on the video the simulator shows the same run rev office location. I guess my question is should I expect to see a location returned in the IOS simulator?
Thanks
Mark
Lesson 4 - Question and Problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Lesson 4 - Question and Problem
Hi Mark,
To your first question in the menu Edit>Preferences>Script Editor select "Strict Compilation Mode"
I don't like it myself, but yeah, I think it would have caught coma.
Not sure on the second part. In the card script, the "function currentLocationURL" do you have:
That will fill-in data for the sim making it appear to have real sensors (well if you were in Scotland)
Simon
To your first question in the menu Edit>Preferences>Script Editor select "Strict Compilation Mode"
I don't like it myself, but yeah, I think it would have caught coma.
Not sure on the second part. In the card script, the "function currentLocationURL" do you have:
Code: Select all
if tLatitude is empty then
put "55.953969" into tLatitude
end if
if tLongitude is empty then
put "-3.198784" into tLongitude
end if
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Lesson 4 - Question and Problem
Hi Simon
thanks for the reply, I'll give "Strict Compilation Mode" a try.
I think I have everything I need in the Scotland finding "curentLocationURL" function it's below:
Thanks again
Regards
Mark
thanks for the reply, I'll give "Strict Compilation Mode" a try.
I think I have everything I need in the Scotland finding "curentLocationURL" function it's below:
Code: Select all
function currentLocationURL
local tLatitude, tLongitude, tURL
put item 1 of getCurrentLocation() into tLatitude
put item 2 of getCurrentLocation() into tLongitude
if tLatitude is empty then
put "55.953969" into tLatitude
end if
if tLongitude is empty then
put "-3.198784" into tLongitude
end if
put "http://maps.google.com/maps?q=" & tLatitude & comma & tLongitude into tURL
return tURL
end currentLocationURL
Regards
Mark