Curious behavior for Location data type
Posted: 31 Jan 2014 05:38
Try running the following script and looking at the variables in a Debug Dialog:
loc = newLocation(40, -75);
loc2 = '"' + loc + '"';
You should see this:
loc is 40,-75
loc2 is "Location[mProvider=Script,mTime=0,mLatitude=40.0,mLongitude=-75.0,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=false,mAccuracy=0.0,mExtras=null]"
Three questions:
1. Why does it do that instead of assigning "40,-75" (with the quotes) to loc2?
2. Is there another way to get the long form? (I found this by accident.)
3. Where can I find documentation on all the possible values for the long form, especially the "mExtras" parameter, which has its own sub-structure labeled "Bundle" when it has a value?
Thanks!
loc = newLocation(40, -75);
loc2 = '"' + loc + '"';
You should see this:
loc is 40,-75
loc2 is "Location[mProvider=Script,mTime=0,mLatitude=40.0,mLongitude=-75.0,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=false,mAccuracy=0.0,mExtras=null]"
Three questions:
1. Why does it do that instead of assigning "40,-75" (with the quotes) to loc2?
2. Is there another way to get the long form? (I found this by accident.)
3. Where can I find documentation on all the possible values for the long form, especially the "mExtras" parameter, which has its own sub-structure labeled "Bundle" when it has a value?
Thanks!