Getting started with geographical coordinates

2020-04-03 Thread Graham Samuel via use-livecode
Hi

I am reviving my LiveCode skills in these troubled times, and I want to do 
something that involves the location of a device using GPS. A very rapid 
(obviously too rapid) search of the documentation finds commands like 
iphoneStartTrackingLocation, but no link to a description of how one reads the 
actual geographical coordinates or what form they take. There is a reference to 
CoreLocation, but that hasn’t got a dictionary entry.

Can anyone point me in the right direction. Sorry if it’s obvious.

Thanks in advance

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-03 Thread Graham Samuel via use-livecode
Wow, Devin, that is luck! I shall look at it instantly. I have got a little 
further on my own but am rather disturbed that there seem to be iOS functions 
with no Android equivalent, e.g. mergCLDistanceBetween - but I am still totally 
ignorant really.

Thanks 

Graham

> On 3 Apr 2020, at 17:42, Devin Asay via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
> As fate would have it I just created a video tutorial for my students on 
> reading mobile device sensors.
> 
> http://livecode.byu.edu/mobile/devicesensors-index.php
> 
> Hope you find these useful.
> 
> Devin
> 
> 
> On Apr 3, 2020, at 9:18 AM, Graham Samuel via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Hi
> 
> I am reviving my LiveCode skills in these troubled times, and I want to do 
> something that involves the location of a device using GPS. A very rapid 
> (obviously too rapid) search of the documentation finds commands like 
> iphoneStartTrackingLocation, but no link to a description of how one reads 
> the actual geographical coordinates or what form they take. There is a 
> reference to CoreLocation, but that hasn’t got a dictionary entry.
> 
> Can anyone point me in the right direction. Sorry if it’s obvious.
> 
> Thanks in advance
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-03 Thread Graham Samuel via use-livecode
Thanks Ralph, that really helps, along with Devin’s tutorial as well I should 
be able to make progress.

Graham

> On 3 Apr 2020, at 18:14, Ralph DiMola via use-livecode 
>  wrote:
> 
> 
> mobileLocationAuthorizationStatus() will tell you if the OS app setting will 
> allow location tracking
> mobileSensorAvailable("location") will tell you if there is a location sensor
> mobileStartTrackingSensor "Location", [true|false] will start the tracking.
> 
> mobileSensorReading("location", [true|false]) will return an array of the 
> current location. If the latitude or longitude is zero then the GPS is not 
> yet locked
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Graham Samuel via use-livecode
> Sent: Friday, April 03, 2020 11:18 AM
> To: How to use LiveCode
> Cc: Graham Samuel
> Subject: Getting started with geographical coordinates
> 
> Hi
> 
> I am reviving my LiveCode skills in these troubled times, and I want to do 
> something that involves the location of a device using GPS. A very rapid 
> (obviously too rapid) search of the documentation finds commands like 
> iphoneStartTrackingLocation, but no link to a description of how one reads 
> the actual geographical coordinates or what form they take. There is a 
> reference to CoreLocation, but that hasn’t got a dictionary entry.
> 
> Can anyone point me in the right direction. Sorry if it’s obvious.
> 
> Thanks in advance
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-03 Thread Graham Samuel via use-livecode
This is cheeky but I can’t run up my mobile simulation today - can someone tell 
me the format of the geographical coordinates produced by mobileSensorReading 
et al. I mean, is say latitude just one integer showing seconds, or is it deg, 
min, sec - and are fractional seconds returned (so, floating point)? I shall 
find out for myself eventually but it would help a little to know now. AFAIKS 
there’s nothing in the LC documentation about it.

Graham

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re:

2020-04-03 Thread Graham Samuel via use-livecode
Ralph, thanks very much. It’s late here, but this will get my full attention 
shortly! 
 
Graham

> On 3 Apr 2020, at 23:27, Ralph DiMola via use-livecode 
>  wrote:
> 
> Graham,
> 
> This my distance calculation for what it's worth.
> 
> Function distance lat1, lon1, lat2, lon2, unit
>   -- Calculate Distance between to points
>   --
>   --lat1, lon1, lat2, lon2 are in deg.fractionalDegrees
>   -- Unit
>   -- if empty then miles
>   -- K = kilometers
>   -- N = nautical miles
>   local theta
>   local dist
> 
>   Put lon1 - lon2 into theta
>   put Sin(deg2rad(lat1)) * Sin(deg2rad(lat2)) + Cos(deg2rad(lat1)) * 
> Cos(deg2rad(lat2)) * Cos(deg2rad(theta)) into dist
> 
>   put Acos(dist) into dist
>   put rad2deg(dist) into dist
>   put dist * 60 * 1.1515 into dist
> 
>   switch unit
>  case "K"
> put dist * 1.609344 into dist
>  case "N"
> put dist * 0.8684 into dist
>   end switch
> 
>   Return dist
> 
> End distance
> 
> 
> Function rad2deg rad
>   Return rad / PI * 180.0
> end rad2deg
> 
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Graham Samuel via use-livecode
> Sent: Friday, April 03, 2020 3:49 PM
> To: How to use LiveCode
> Cc: Graham Samuel
> Subject: Re: Getting started with geographical coordinates
> 
> This is cheeky but I can’t run up my mobile simulation today - can someone 
> tell me the format of the geographical coordinates produced by 
> mobileSensorReading et al. I mean, is say latitude just one integer showing 
> seconds, or is it deg, min, sec - and are fractional seconds returned (so, 
> floating point)? I shall find out for myself eventually but it would help a 
> little to know now. AFAIKS there’s nothing in the LC documentation about it.
> 
> Graham
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-03 Thread Graham Samuel via use-livecode
A long way from me at 43°16′43″N 2°09′36″E 
<https://tools.wmflabs.org/geohack/geohack.php?pagename=Raissac-sur-Lampy¶ms=43.2786_N_2.16_E_type:city(456)_region:FR-OCC>
 - and much higher (I’m about 130m). Sorry not to be quite so accurate!

Thanks

Graham 
> On 3 Apr 2020, at 22:28, Devin Asay via use-livecode 
>  wrote:
> 
> Graham,
> 
> You get back lat and long in degrees and fractions of degrees, as a decimal 
> numeral. For instance, I get latitude: 40.248676 and longitude: -111.651062, 
> and for good measure altitude in meters at 1398.380493. Wow, now you all know 
> exactly where I am!
> 
> Devin
> 
> 
> 
>> On Apr 3, 2020, at 1:49 PM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> This is cheeky but I can’t run up my mobile simulation today - can someone 
>> tell me the format of the geographical coordinates produced by 
>> mobileSensorReading et al. I mean, is say latitude just one integer showing 
>> seconds, or is it deg, min, sec - and are fractional seconds returned (so, 
>> floating point)? I shall find out for myself eventually but it would help a 
>> little to know now. AFAIKS there’s nothing in the LC documentation about it.
>> 
>> Graham
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Old Fossil seeks fast track assistance

2020-04-04 Thread Graham Samuel via use-livecode
Hi All - sorry this is a bit long, but I need help.

I’m a long term LC developer who more or less retired from development a couple 
of years ago, but I’ve kept on lurking in this list and trying rather 
hopelessly to remain up to date. My experience has been mostly on desktop apps, 
with a little iOS work. I haven’t ever done much on Android. I have just about 
retained my credentials as an Apple developer.

Now I find I really want to develop a mobile app at speed, and deploy it.

I don’t anticipate all that much difficulty in creating my app in the sense of 
designing and coding it - this can call on my own quite extensive experience of 
the past, the LC documentation and this invaluable list. I can reasonable hope 
to create a prototype in a few days. However there is a massive gap: testing 
and deployment.

I don’t have access to my most recent development machine (it’s in another 
country and I’m self-isolating), so I am working with an iMac that can only run 
MacOS High Sierra (and Windows 10 via Parallels, but I was hoping not to go 
there for this project). Now, I clearly need to organise the right version of 
XCode and the right SDK for my iOS development, and I need to do the equivalent 
thing for Android - and I don’t know how to do it. 

For iOS, I THINK I need XCode 10.2, which I’m trying to download to replace the 
copy of 9.2 already on my machine. I obviously need to work with a compatible 
SDK. For Android, I don’t know where to start, so for now I am putting this on 
the back burner, but I will have to return to it eventually. Even when I’ve 
lined all this up (if indeed it’s feasible), I then need to remind myself how 
to test via simulators (I used to be good at this, so maybe that is not so 
scary, but I am not at all up to date) and then I need to get the app onto real 
hardware - starting with iPhones, as I’ve got a few of these. I really don’t 
know how to do this for testing, and more so I don’t know how to distribute a 
test version to a small population of testers, although I know this is 
feasible. The whole project may crash and burn at this beta testing stage, so 
actually getting it into the App Store can wait a bit.

Obviously I am not expecting people on this list to hold my hand at every step. 
My main concern is to be guided through the body of LC notes etc to get 
absolutely practical advice and recipes as to what to do at each stage. If I 
study the LC stuff long enough, I will get there, but I would dearly love help 
to fast-track it all.

Thanks

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-05 Thread Graham Samuel via use-livecode
I’ve been trying these formulae out, and I’ve been using the info on 
https://www.movable-type.co.uk/scripts/latlong.html - for my purposes 
(distances from say 100 metres to up to a few kilometers) I think this works as 
well as haversine, but maybe not for every kind of measurement. The function 
gives a result in kilometres starting from coordinates in degrees. Seems to 
work, but I need to do a bit more work on the (real) ground to convince myself.

 function distanceslc lat1,lon1,lat2,lon2

constant k1 = 0.017453 -- that's pi/180

-- This implements the spherical law of cosines, from movable-type.co.uk. 
Confirmed with his javascript version

return acos(sin(lat1*k1) * sin(lat2*k1) + 
cos(lat1*k1)*cos(lat2*k1)*cos(lon2*k1-lon1*k1))*6371

end distanceslc


Graham

> On 4 Apr 2020, at 16:47, Ralph DiMola via use-livecode 
>  wrote:
> 
> A friend of mine turned me on to this 10 years ago. This is the Haversine
> formula. It assumes that the earth is sphere and is not very accurate for
> very small distances. I have not tried to use the Vincenty's formula that
> does better. For general purposes the HF should be sufficient.
> 
> Just give me the credit for LC implementation of a friends of mines routine.
> Although I understand how it works the real credit goes to Don Josef de
> Mendoza y Rios in 1796.
> 
> The girls and boys doing math in that period really set the stage. This
> brought me back to my CGI days when I was patting myself on the back when I
> self learned(with a friends help after reading the Kreyszig) how to move
> points in space and calculate lighting.  I then self reflected and realized
> that I was just putting together the pieces of math that these folks created
> out of thin air. I still felt like I accomplished something but very much
> smaller the scheme of things.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
> Of Bob Sneidar via use-livecode
> Sent: Friday, April 03, 2020 5:31 PM
> To: How to use LiveCode
> Cc: Bob Sneidar
> Subject: Re: 
> 
> Ralph, this is brilliant. I remember trying to do something similar years
> ago, and giving up because I didn't know how to do the math. I suck at math,
> or rather I am too lazy and impatient to work the problem. 
> 
> Bob S
> 
>> On Apr 3, 2020, at 14:27 , Ralph DiMola via use-livecode
>  wrote:
>> 
>> Graham,
>> 
>> This my distance calculation for what it's worth.
>> 
>> Function distance lat1, lon1, lat2, lon2, unit
>>  -- Calculate Distance between to points
>>  --
>>  --lat1, lon1, lat2, lon2 are in deg.fractionalDegrees
>>  -- Unit
>>  -- if empty then miles
>>  -- K = kilometers
>>  -- N = nautical miles
>>  local theta
>>  local dist
>> 
>>  Put lon1 - lon2 into theta
>>  put Sin(deg2rad(lat1)) * Sin(deg2rad(lat2)) + Cos(deg2rad(lat1)) *
> Cos(deg2rad(lat2)) * Cos(deg2rad(theta)) into dist
>> 
>>  put Acos(dist) into dist
>>  put rad2deg(dist) into dist
>>  put dist * 60 * 1.1515 into dist
>> 
>>  switch unit
>> case "K"
>>put dist * 1.609344 into dist
>> case "N"
>>put dist * 0.8684 into dist
>>  end switch
>> 
>>  Return dist
>> 
>> End distance
>> 
>> 
>> Function rad2deg rad
>>  Return rad / PI * 180.0
>> end rad2deg
>> 
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-07 Thread Graham Samuel via use-livecode
Thanks for everyone who has helped with this so far. I have now looked at and 
tested LC scripts for three different functions for finding the distance - I 
left one well-known one out (Vincenty) as it’s very complex (it even includes 
iteration) and I think not justified by what I’m trying to do. As I’m concerned 
with relatively small distances (up to a few kilometres), I can include a 
Pythagoras calculation (officially called "Equirectangular approximation”), 
which doesn’t take account of the curvature of the Earth. My tests have 
involved real coordinates of places I’ve visited, so can be verified using 
local maps etc.

What I have found is that the different methods are all good for my purposes, 
but for me the very simple Pythagoras calculation which involves only two maths 
functions, gives results which are consistently less than one percent different 
from the far more complex Haversine and even Vincenty calculations. 
Incidentally I get differences in Haversine between my implementation (based on 
Ralph’s, thanks) and Chris Veness’s (movable-type)  Javascript version - I’m 
pretty sure this is due to differences in precision in the underlying maths 
functions, but I don’t plan to look any further into that!

Just FYI, here’s the Pythagoras method. The inputs are assumed to be numerical 
GPS-style coordinates, which is what one gets from interrogating a GPS-aware 
device in LC. The result is in kilometres.

constant R=6371 -- the radius of the earth in kilometres
constant k1 = 0.01745329 -- that's pi/180

function distancePythag lat1,lon1,lat2,lon2
-- Calculate Distance between to points using Equirectangular approximation
-- Assuming a (local) flat surface, using Pythagoras. Won't work when Earth's 
curvature is significant
   local x,y
   put k1*lat1 into lat1
   put k1*lat2 into lat2
   put k1*lon1 into lon1
   put k1*lon2 into lon2
   put (lon2-lon1) * cos((lat1+lat2)/2) into x
   put (lat2 - lat1) into y
   return sqrt(x*x+y*y)*R
end distancePythag

Graham


> On 5 Apr 2020, at 22:03, Graham Samuel via use-livecode 
>  wrote:
> 
> I’ve been trying these formulae out, and I’ve been using the info on 
> https://www.movable-type.co.uk/scripts/latlong.html - for my purposes 
> (distances from say 100 metres to up to a few kilometers) I think this works 
> as well as haversine, but maybe not for every kind of measurement. The 
> function gives a result in kilometres starting from coordinates in degrees. 
> Seems to work, but I need to do a bit more work on the (real) ground to 
> convince myself.
> 
> function distanceslc lat1,lon1,lat2,lon2
> 
> constant k1 = 0.017453 -- that's pi/180
> 
> -- This implements the spherical law of cosines, from movable-type.co.uk. 
> Confirmed with his javascript version
> 
> return acos(sin(lat1*k1) * sin(lat2*k1) + 
> cos(lat1*k1)*cos(lat2*k1)*cos(lon2*k1-lon1*k1))*6371
> 
> end distanceslc
> 
> 
> Graham
> 
>> On 4 Apr 2020, at 16:47, Ralph DiMola via use-livecode 
>>  wrote:
>> 
>> A friend of mine turned me on to this 10 years ago. This is the Haversine
>> formula. It assumes that the earth is sphere and is not very accurate for
>> very small distances. I have not tried to use the Vincenty's formula that
>> does better. For general purposes the HF should be sufficient.
>> 
>> Just give me the credit for LC implementation of a friends of mines routine.
>> Although I understand how it works the real credit goes to Don Josef de
>> Mendoza y Rios in 1796.
>> 
>> The girls and boys doing math in that period really set the stage. This
>> brought me back to my CGI days when I was patting myself on the back when I
>> self learned(with a friends help after reading the Kreyszig) how to move
>> points in space and calculate lighting.  I then self reflected and realized
>> that I was just putting together the pieces of math that these folks created
>> out of thin air. I still felt like I accomplished something but very much
>> smaller the scheme of things.
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
>> 
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
>> Of Bob Sneidar via use-livecode
>> Sent: Friday, April 03, 2020 5:31 PM
>> To: How to use LiveCode
>> Cc: Bob Sneidar
>> Subject: Re: 
>> 
>> Ralph, this is brilliant. I remember trying to do something similar years
>> ago, and giving up because I didn't know how to do the math. I suck at math,
>> or rather I am too lazy and impatient to work the problem. 
>> 
>> Bob S
>> 
>>> On Apr 3, 2020, at 14:27 , Ralph DiMola via use-livecode
>>  wrote:
>

Re: Old Fossil seeks fast track assistance

2020-04-07 Thread Graham Samuel via use-livecode
Devin I am overdue to thank you for this. Up to now, apart from the numerous 
tasks involved in just keeping going, I have been looking at the functionality 
of my proposed app - I have already used some of your material on location 
tracking! However for the deployment side, your links are gold dust to me. 
Thanks so much.

Graham

> On 6 Apr 2020, at 16:55, Devin Asay via use-livecode 
>  wrote:
> 
> Graham,
> 
> I’ve just been through this gauntlet with my students. I provided some links 
> and lessons for them at http://livecode.byu.edu/mobile/test-deploy-links.php. 
> I found the process for setting up Android a little fraught with pitfalls, so 
> I created an expanded instruction sheet for Android setup, linked to that 
> page.
> 
> I’m staying with the latest Stable version of LiveCode for my class, 9.5.1. 
> I’m running on Mac OS 10.14 Mojave. With this setup I have to use Xcode 10.1.
> 
> As a refresher, on developer.apple.com<http://developer.apple.com>, you need 
> to create your iOS developer certificate, register all of the UDIDs for your 
> iOS devices, then create a wildcard provisioning profile for testing your 
> apps. The provisioning profile must include all devices you want to test on.
> 
> A collection of links of instructions for distributing mobile apps: 
> http://livecode.byu.edu/mobile/mobileAppDistribution.php.
> 
> I hope this will all help jog your memory. I find mine needs to be jogged 
> every time I come back to this mobile stuff after a long time away.
> 
> Cheers,
> 
> Devin
> 
> 
> 
> On Apr 4, 2020, at 2:38 AM, Graham Samuel via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Hi All - sorry this is a bit long, but I need help.
> 
> I’m a long term LC developer who more or less retired from development a 
> couple of years ago, but I’ve kept on lurking in this list and trying rather 
> hopelessly to remain up to date. My experience has been mostly on desktop 
> apps, with a little iOS work. I haven’t ever done much on Android. I have 
> just about retained my credentials as an Apple developer.
> 
> Now I find I really want to develop a mobile app at speed, and deploy it.
> 
> I don’t anticipate all that much difficulty in creating my app in the sense 
> of designing and coding it - this can call on my own quite extensive 
> experience of the past, the LC documentation and this invaluable list. I can 
> reasonable hope to create a prototype in a few days. However there is a 
> massive gap: testing and deployment.
> 
> I don’t have access to my most recent development machine (it’s in another 
> country and I’m self-isolating), so I am working with an iMac that can only 
> run MacOS High Sierra (and Windows 10 via Parallels, but I was hoping not to 
> go there for this project). Now, I clearly need to organise the right version 
> of XCode and the right SDK for my iOS development, and I need to do the 
> equivalent thing for Android - and I don’t know how to do it.
> 
> For iOS, I THINK I need XCode 10.2, which I’m trying to download to replace 
> the copy of 9.2 already on my machine. I obviously need to work with a 
> compatible SDK. For Android, I don’t know where to start, so for now I am 
> putting this on the back burner, but I will have to return to it eventually. 
> Even when I’ve lined all this up (if indeed it’s feasible), I then need to 
> remind myself how to test via simulators (I used to be good at this, so maybe 
> that is not so scary, but I am not at all up to date) and then I need to get 
> the app onto real hardware - starting with iPhones, as I’ve got a few of 
> these. I really don’t know how to do this for testing, and more so I don’t 
> know how to distribute a test version to a small population of testers, 
> although I know this is feasible. The whole project may crash and burn at 
> this beta testing stage, so actually getting it into the App Store can wait a 
> bit.
> 
> Obviously I am not expecting people on this list to hold my hand at every 
> step. My main concern is to be guided through the body of LC notes etc to get 
> absolutely practical advice and recipes as to what to do at each stage. If I 
> study the LC stuff long enough, I will get there, but I would dearly love 
> help to fast-track it all.
> 
> Thanks
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
>

Re: Old Fossil seeks fast track assistance

2020-04-09 Thread Graham Samuel via use-livecode
Devin. I was too optimistic in thinking things would now go smoothly! I would 
very much appreciated your advice on the following:

Following your advice to your students, I have downloaded and installed the 
latest XCode I can use on my Mac, which is 10.1. I have set the mobile 
preferences of my LiveCode 9.5.1 Indy to point to the developer section in the 
XCode app as you instruct (to be certain, I deleted the default and input the 
info afresh). I can open a simulator for any of my target iPhones -  but when I 
try to set the Standalone settings for my current project, I am unable to 
select iOS as an option, and indeed I don’t see a detailed set of parameters 
but just a simpler window. (I think it’s called the General Settings) In fact I 
find that I can’t add or subtract any platform, although I notice that Mac, 
Windows and Linux all have a green checkmark, which I don’t want! There is 
supposed to be a Mode Selector accessed by the top left button on this screen, 
but I am not seeing it.

I suppose there must be something wrong with my project, which is at an early 
stage, but features an iPhone shaped card with some buttons on it, at least!

I suppose the answer is very very simple, but I have not been able to find it. 
I just can’t see what I’m doing wrong, and if there’s anything in the LC 
documentation about this, it is not obvious, nor do the LC preferences settings 
help.

Sorry for the interruption - I hope you (or someone else on the list) can help 
as I am now completely stuck as far as proper testing goes.

Graham


> On 6 Apr 2020, at 16:55, Devin Asay via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Graham,
> 
> I’ve just been through this gauntlet with my students. I provided some links 
> and lessons for them at http://livecode.byu.edu/mobile/test-deploy-links.php 
> . I found the process 
> for setting up Android a little fraught with pitfalls, so I created an 
> expanded instruction sheet for Android setup, linked to that page.
> 
> I’m staying with the latest Stable version of LiveCode for my class, 9.5.1. 
> I’m running on Mac OS 10.14 Mojave. With this setup I have to use Xcode 10.1.
> 
> As a refresher, on developer.apple.com 
>  >, you need to create your iOS developer 
> certificate, register all of the UDIDs for your iOS devices, then create a 
> wildcard provisioning profile for testing your apps. The provisioning profile 
> must include all devices you want to test on.
> 
> A collection of links of instructions for distributing mobile apps: 
> http://livecode.byu.edu/mobile/mobileAppDistribution.php 
> .
> 
> I hope this will all help jog your memory. I find mine needs to be jogged 
> every time I come back to this mobile stuff after a long time away.
> 
> Cheers,
> 
> Devin

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Mobile screen sizes - another naive question

2020-04-09 Thread Graham Samuel via use-livecode
Folks, yet again I don’t know where to look for an answer in the LC 
documentation.

The issue is the enormous variety of screen sizes on smart phones. For example 
the iPhone XS Max has 1242 pixels width, the iPhone 5 has 640. And there are 
many many more before we even get to tablets…

The question is, how do most of you tackle this, and does LC help? Obviously an 
object taking up a fixed number of pixels on one phone will look absurdly large 
or small on another one, or of course may not fit on the screen at all. Not all 
objects can be vector drawings, and the ones that are still have to be resized 
according to device

Is there anything better than the obvious trick of resizing everything in sight 
when the app is being initialised, including substituting the more sensitive 
graphics from a library of appropriate sizes? Seems tedious.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Old Fossil seeks fast track assistance

2020-04-09 Thread Graham Samuel via use-livecode
Curry that’s a wonderful idea. However you need to get well. Perhaps I can find 
someone to help me in the way you say. I am getting very used to Zoom and other 
similar tools as I’m isolation myself and I’m doing a lot of visual 
communication.

Keep safe

Best wishes

Graham

> On 9 Apr 2020, at 21:25, Curry Kenworthy via use-livecode 
>  wrote:
> 
> 
> Howdy Graham,
> 
> This particular problem is ideally suited to a screen-sharing video 
> conference tutoring session, talking you through the process and solving 
> obstacles while you are hands-on. That could get you running in minutes to a 
> couple of hours, rather than days to weeks.
> 
> I would normally very humbly recommend myself (I'm the best) :) but my 
> breathing is still affected and I'm temporarily not up to holding a 
> conversation since being sick.
> 
> So if you don't solve it extremely soon by yourself, I suggest you find 
> someone (who is not hors de combat) to help you in a "live" session with 
> this, it won't take long, then you can move forward with your project!
> 
> Best wishes,
> 
> Curry Kenworthy
> 
> Custom Software Development
> "Better Methods, Better Results"
> LiveCode Training and Consulting
> http://livecodeconsulting.com/
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile screen sizes - another naive question

2020-04-10 Thread Graham Samuel via use-livecode
Thanks Richard, for that typically useful reply! I have indeed written many a 
resize handler, but getting back into this stuff I was struck by how messy it 
can get. Right now I don’t even know if say a field with 12 point type in it 
has to be changed to a smaller or larger rectangle with smaller or larger type 
in it, but obviously as soon as I can start doing simulations (I have a totally 
different problem there!) I can experiment. I do like the idea of sending 
resizeControl to groups - I have used similar techniques for other purposes in 
the past. Powerful and encapsulated.

As to graphics, I can presumably start with the highest possible resolution and 
resize at startup according to the actual screen size, or do what I said 
before, have a little library of different versions tweaked for different 
screen sizes. Or possibly use SVG, but I have not yet made that work - I know 
almost nothing about SVG, although I have seen some sexy examples that look 
almost like photos etc. Wouldn’t work for say a Google Maps image though - 
again I need to see what happens if the grid of pixels available to display a 
map varies by a factor of say three.

Well, I am trying to learn, and I am grateful for all that you’ve said.

Graham

> On 9 Apr 2020, at 18:47, Richard Gaskin via use-livecode 
>  wrote:
> 
> Graham Samuel wrote:
> 
> > Folks, yet again I don’t know where to look for an answer in the LC
> > documentation.
> >
> > The issue is the enormous variety of screen sizes on smart phones. For
> > example the iPhone XS Max has 1242 pixels width, the iPhone 5 has 640.
> > And there are many many more before we even get to tablets…
> >
> > The question is, how do most of you tackle this, and does LC help?
> > Obviously an object taking up a fixed number of pixels on one phone
> > will look absurdly large or small on another one, or of course may not
> > fit on the screen at all. Not all objects can be vector drawings, and
> > the ones that are still have to be resized according to device
> >
> > Is there anything better than the obvious trick of resizing everything
> > in sight when the app is being initialised, including substituting the
> > more sensitive graphics from a library of appropriate sizes? Seems
> > tedious.
> 
> Is it all that tedious?
> 
> Computers have had resizable windows since Mac 1.0, and even HyperCard stacks 
> could be resize after its first version.
> 
> True, in the very olden days we all enjoyed the simplicity of knowing we 
> never had to accommodate any screen size other than 512x342.  Ah, those were 
> the days! :)
> 
> But 640x480 came along not long after, and it caused much concern among 
> developers. Suddenly we had to become aware of screen metrics, and rearrange 
> our layouts to make good use of the available space.
> 
> Then 1024x768 came along, and then we had THREE(!) screen sizes to contend 
> with. Oh the humanity! :)
> 
> Then by the early 90s we got over it.  Anticipating multiple screen sizes 
> became the norm, new tools like SuperCard, OMO, and MetaCard came along 
> offering true resizable windows, and we learned to respond to notification 
> that the window had resized so we can adjust our interior contents nicely.
> 
> Flash forward to 2010: iPhone comes out, with the presumption that one size 
> will satisfy all tastes.  That didn't last long.  History doesn't always 
> repeat itself, but it often rhymes. :)
> 
> 
> 
> As with desktop software, I find it instructive to observe how the best apps 
> on mobile behave, and then - because those establish user expectations - do 
> what they do.
> 
> And what we see is not all that different from how designers handle resizable 
> windows on the desktop: some objects stay where they are, those that make 
> sense to enlarge enlarge, those that make sense to remain adjacent to 
> something next to them remain adjacent to something next to them, etc.
> 
> If you've written resizeStack handlers at any point in the last 28 years 
> since MC premiered, you've already learned most of what you need to know to 
> handle a resizeStack message on a mobile device.
> 
> The specifics of how this plays out in your layout will of course depend 
> entirely on your layout.  But I have found a few things that have greatly 
> simplified my UI work, chiefly:
> 
> - Use Groups Smartly
> 
> Relatively recently (a few years ago) the engine now sends a resizeControl 
> message to groups whenever they're resized by any means, either user 
> interaction with the pointer tool (as had always been the case) or via script 
> (the new addition).
> 
> This allows us to work with our UIs very cleanly, recognizing that an app is 
> ultimately a set of rows, and that some rows are divided into blocks.  When 
> we group controls by their location/purpose logically, we get to take 
> advantage of a wonderfully simplifying cascading effect with regard to 
> resizing, which allows us to keep control adjustments local to their 
> containing group.
> 

Re: Mobile screen sizes - another naive question

2020-04-10 Thread Graham Samuel via use-livecode
Thanks Jacque - sounds very practical. fullScreenMode, here I come!

Cheers

Graham

> On 9 Apr 2020, at 20:09, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 4/9/20 11:47 AM, Richard Gaskin via use-livecode wrote:
>> Graham Samuel wrote:
>> > Folks, yet again I don’t know where to look for an answer in the LC
>> > documentation.
>> >
>> > The issue is the enormous variety of screen sizes on smart phones. For
>> > example the iPhone XS Max has 1242 pixels width, the iPhone 5 has 640.
>> > And there are many many more before we even get to tablets…
>> >
>> > The question is, how do most of you tackle this, and does LC help?
>> > Obviously an object taking up a fixed number of pixels on one phone
>> > will look absurdly large or small on another one, or of course may not
>> > fit on the screen at all. Not all objects can be vector drawings, and
>> > the ones that are still have to be resized according to device
>> >
>> > Is there anything better than the obvious trick of resizing everything
>> > in sight when the app is being initialised, including substituting the
>> > more sensitive graphics from a library of appropriate sizes? Seems
>> > tedious.
>> Is it all that tedious?
> 
> Yes, unless you have a simple stack with only a few controls. If you have 
> hundreds of objects, dealing with each of them individually, even if it's 
> only one line that calls a handler, is a tedious time sink.
> 
> Graham, experiment with fullscreenMode, which automates most of the process. 
> It isn't perfect and you'll need to make a few adjustments for different 
> screen sizes, but it's much easier than trying to adjust for every possible 
> screen ratio. LC implemented this specifically to take away the pain as much 
> as possible.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Old Fossil seeks fast track assistance

2020-04-10 Thread Graham Samuel via use-livecode
Thanks for the quick reply. I have the green square! I remember when it turned 
from red to green. But sadly my standalone settings window remains stubbornly 
inactive - not frozen: something happens when I click on General, Stacks, Copy 
files etc, but the next five icons to the right which let you decide what 
platform(s) you want to build for simply don’t react to mouse clicks. The last 
two (HTML5 and Bugs) do react. It’s as if I was not allowed to choose the 
platform. Is it something to do with my licence? I suppose I could ask the 
mother ship, though it’s Lockdown and Easter which might cause a bit of delay!

Thanks again

Graham


> On 9 Apr 2020, at 20:53, Devin Asay via use-livecode 
>  wrote:
> 
> Graham,
> 
> Not really visualizing what you’re seeing. When you choose Xcode from your 
> LiveCode mobile support preference pane, all you should have to do is 
> navigate to Xcode using the Add Entry button, choose Xcode, and the square 
> next to the iOS section should turn green. If you see the green square you 
> should be good to go to do Test deploys to the iOS Simulator. 
> 
> It’s all about the Green Square!
> 
> Devin
> 
>> On Apr 9, 2020, at 9:23 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Devin. I was too optimistic in thinking things would now go smoothly! I 
>> would very much appreciated your advice on the following:
>> 
>> Following your advice to your students, I have downloaded and installed the 
>> latest XCode I can use on my Mac, which is 10.1. I have set the mobile 
>> preferences of my LiveCode 9.5.1 Indy to point to the developer section in 
>> the XCode app as you instruct (to be certain, I deleted the default and 
>> input the info afresh). I can open a simulator for any of my target iPhones 
>> -  but when I try to set the Standalone settings for my current project, I 
>> am unable to select iOS as an option, and indeed I don’t see a detailed set 
>> of parameters but just a simpler window. (I think it’s called the General 
>> Settings) In fact I find that I can’t add or subtract any platform, although 
>> I notice that Mac, Windows and Linux all have a green checkmark, which I 
>> don’t want! There is supposed to be a Mode Selector accessed by the top left 
>> button on this screen, but I am not seeing it.
>> 
>> I suppose there must be something wrong with my project, which is at an 
>> early stage, but features an iPhone shaped card with some buttons on it, at 
>> least!
>> 
>> I suppose the answer is very very simple, but I have not been able to find 
>> it. I just can’t see what I’m doing wrong, and if there’s anything in the LC 
>> documentation about this, it is not obvious, nor do the LC preferences 
>> settings help.
>> 
>> Sorry for the interruption - I hope you (or someone else on the list) can 
>> help as I am now completely stuck as far as proper testing goes.
>> 
>> Graham
>> 
>> 
>>> On 6 Apr 2020, at 16:55, Devin Asay via use-livecode 
>>> mailto:use-livecode@lists.runrev.com>> 
>>> wrote:
>>> 
>>> Graham,
>>> 
>>> I’ve just been through this gauntlet with my students. I provided some 
>>> links and lessons for them at 
>>> http://livecode.byu.edu/mobile/test-deploy-links.php 
>>> <http://livecode.byu.edu/mobile/test-deploy-links.php>. I found the process 
>>> for setting up Android a little fraught with pitfalls, so I created an 
>>> expanded instruction sheet for Android setup, linked to that page.
>>> 
>>> I’m staying with the latest Stable version of LiveCode for my class, 9.5.1. 
>>> I’m running on Mac OS 10.14 Mojave. With this setup I have to use Xcode 
>>> 10.1.
>>> 
>>> As a refresher, on developer.apple.com 
>>> <http://developer.apple.com/><http://developer.apple.com 
>>> <http://developer.apple.com/>>, you need to create your iOS developer 
>>> certificate, register all of the UDIDs for your iOS devices, then create a 
>>> wildcard provisioning profile for testing your apps. The provisioning 
>>> profile must include all devices you want to test on.
>>> 
>>> A collection of links of instructions for distributing mobile apps: 
>>> http://livecode.byu.edu/mobile/mobileAppDistribution.php 
>>> <http://livecode.byu.edu/mobile/mobileAppDistribution.php>.
>>> 
>>> I hope this will all help jog your memory. I find mine needs to be jogged 
>>> every time I come back to this mobile stuff after a long time away.
>>> 
>>> Cheers,
>>> 
>>> Devin
>> 
>> 

Re: Old Fossil seeks fast track assistance

2020-04-10 Thread Graham Samuel via use-livecode
Thanks Jacque, but that’s the trouble - I can’t turn them off. I thought of 
trashing the LC Preferences to see if that does anything, but I couldn’t find 
them: I think they are in the plist, which is in the Preferences in the system 
library. I tried temporarily switching this off (by renaming the file and 
starting LC) - it stopped LC fully loading (not surprising really). I restored 
the plist and LC had forgotten some stuff like recent stacks. I checked that 
the mobile preference pane still has its green square and can see XCode, but 
the Standalone Settings still does not respond to mouse clicks to remove the 
non-mobile platforms or to choose mobile. 

I really have absolutely no idea what is going on.

Graham

> On 10 Apr 2020, at 18:18, J. Landman Gay via use-livecode 
>  wrote:
> 
> The three desktop platforms are on by default. You should be able to turn 
> those off. They are incompatible with mobile so they all need to be off 
> before you can select either of the mobile ones.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On April 10, 2020 8:49:44 AM Graham Samuel via use-livecode 
>  wrote:
> 
>> Thanks for the quick reply. I have the green square! I remember when it 
>> turned from red to green. But sadly my standalone settings window remains 
>> stubbornly inactive - not frozen: something happens when I click on General, 
>> Stacks, Copy files etc, but the next five icons to the right which let you 
>> decide what platform(s) you want to build for simply don’t react to mouse 
>> clicks. The last two (HTML5 and Bugs) do react. It’s as if I was not allowed 
>> to choose the platform. Is it something to do with my licence? I suppose I 
>> could ask the mother ship, though it’s Lockdown and Easter which might cause 
>> a bit of delay!
>> 
>> Thanks again
>> 
>> Graham
>> 
>> 
>>> On 9 Apr 2020, at 20:53, Devin Asay via use-livecode 
>>>  wrote:
>>> 
>>> Graham,
>>> 
>>> Not really visualizing what you’re seeing. When you choose Xcode from your 
>>> LiveCode mobile support preference pane, all you should have to do is 
>>> navigate to Xcode using the Add Entry button, choose Xcode, and the square 
>>> next to the iOS section should turn green. If you see the green square you 
>>> should be good to go to do Test deploys to the iOS Simulator.
>>> 
>>> It’s all about the Green Square!
>>> 
>>> Devin
>>> 
>>>> On Apr 9, 2020, at 9:23 AM, Graham Samuel via use-livecode 
>>>>  wrote:
>>>> 
>>>> Devin. I was too optimistic in thinking things would now go smoothly! I 
>>>> would very much appreciated your advice on the following:
>>>> 
>>>> Following your advice to your students, I have downloaded and installed 
>>>> the latest XCode I can use on my Mac, which is 10.1. I have set the mobile 
>>>> preferences of my LiveCode 9.5.1 Indy to point to the developer section in 
>>>> the XCode app as you instruct (to be certain, I deleted the default and 
>>>> input the info afresh). I can open a simulator for any of my target 
>>>> iPhones -  but when I try to set the Standalone settings for my current 
>>>> project, I am unable to select iOS as an option, and indeed I don’t see a 
>>>> detailed set of parameters but just a simpler window. (I think it’s called 
>>>> the General Settings) In fact I find that I can’t add or subtract any 
>>>> platform, although I notice that Mac, Windows and Linux all have a green 
>>>> checkmark, which I don’t want! There is supposed to be a Mode Selector 
>>>> accessed by the top left button on this screen, but I am not seeing it.
>>>> 
>>>> I suppose there must be something wrong with my project, which is at an 
>>>> early stage, but features an iPhone shaped card with some buttons on it, 
>>>> at least!
>>>> 
>>>> I suppose the answer is very very simple, but I have not been able to find 
>>>> it. I just can’t see what I’m doing wrong, and if there’s anything in the 
>>>> LC documentation about this, it is not obvious, nor do the LC preferences 
>>>> settings help.
>>>> 
>>>> Sorry for the interruption - I hope you (or someone else on the list) can 
>>>> help as I am now completely stuck as far as proper testing goes.
>>>> 
>>>> Graham
>>>> 
>>>> 
>>>>> On 6 Apr 2020, at 16:55, Devin Asay via use-livecode 
>>>>> mai

Re: Mobile screen sizes - another naive question

2020-04-10 Thread Graham Samuel via use-livecode
Brian this is terrific! Looking at it now.

thanks so much

Graham

> On 10 Apr 2020, at 15:18, Brian Milby via use-livecode 
>  wrote:
> 
> Take a look at my mobileDemo repo:
> https://github.com/bwmilby/mobileDemo
> 
> It lets you play around with showing how a stack developed at different
> sizes looks when presented on a device using the different
> FullScreenModes.  I have not updated it for the new iPhoneX aspect ratios,
> but probably should do that (it has an option for "device max" resolution,
> so it should work fine on the new devices).  I can't see anyone developing
> for that ratio though, it would look terrible on other devices (margins on
> left/right).  There is also some code in there where I resize a graphic to
> the actual screen size when using a fullScreenMode that could be used to
> size a background image or to place something outside of the stack bounds
> but still be visible (I don't think any of the area outside of the stack
> rect will receive events, but I have not specifically tested that).
> 
> I also built a stack last year to show how much space is not used when
> using different modes.  I'll see if I can locate that and make it available.
> 
> Thanks,
> Brian
> 
> On Fri, Apr 10, 2020 at 6:32 AM Graham Samuel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thanks Jacque - sounds very practical. fullScreenMode, here I come!
>> 
>> Cheers
>> 
>> Graham
>> 
>>> On 9 Apr 2020, at 20:09, J. Landman Gay via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> On 4/9/20 11:47 AM, Richard Gaskin via use-livecode wrote:
>>>> Graham Samuel wrote:
>>>>> Folks, yet again I don’t know where to look for an answer in the LC
>>>>> documentation.
>>>>> 
>>>>> The issue is the enormous variety of screen sizes on smart phones. For
>>>>> example the iPhone XS Max has 1242 pixels width, the iPhone 5 has 640.
>>>>> And there are many many more before we even get to tablets…
>>>>> 
>>>>> The question is, how do most of you tackle this, and does LC help?
>>>>> Obviously an object taking up a fixed number of pixels on one phone
>>>>> will look absurdly large or small on another one, or of course may not
>>>>> fit on the screen at all. Not all objects can be vector drawings, and
>>>>> the ones that are still have to be resized according to device
>>>>> 
>>>>> Is there anything better than the obvious trick of resizing everything
>>>>> in sight when the app is being initialised, including substituting the
>>>>> more sensitive graphics from a library of appropriate sizes? Seems
>>>>> tedious.
>>>> Is it all that tedious?
>>> 
>>> Yes, unless you have a simple stack with only a few controls. If you
>> have hundreds of objects, dealing with each of them individually, even if
>> it's only one line that calls a handler, is a tedious time sink.
>>> 
>>> Graham, experiment with fullscreenMode, which automates most of the
>> process. It isn't perfect and you'll need to make a few adjustments for
>> different screen sizes, but it's much easier than trying to adjust for
>> every possible screen ratio. LC implemented this specifically to take away
>> the pain as much as possible.
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software   | http://www.hyperactivesw.com
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Can't change or see Standalone Settings [was: Re: Old Fossil seeks fast track assistance]

2020-04-10 Thread Graham Samuel via use-livecode
Just to add to the mystery, I just imported a stack from Brian Milby, who has 
been very helpful with other problems of mine. I had a look at the Standalone 
Settings for his stack, and I can't alter the mobile ones (the desktop ones are 
 not checked in his case), and in particular I can’t open the window with the 
detail of the settings by clicking on the iOS icon. I then tried to look at the 
settings on some old desktop app stacks of mine. Same thing, can’t look at the 
detailed settings, even for say a Mac build. So my copy of LC 9.5.1 appears to 
be playing up. I suppose I could try to re-install it (I only installed it a 
few days ago), but why would that work?

Any ideas gratefully received.

Graham

> On 10 Apr 2020, at 15:47, Graham Samuel  wrote:
> 
> Thanks for the quick reply. I have the green square! I remember when it 
> turned from red to green. But sadly my standalone settings window remains 
> stubbornly inactive - not frozen: something happens when I click on General, 
> Stacks, Copy files etc, but the next five icons to the right which let you 
> decide what platform(s) you want to build for simply don’t react to mouse 
> clicks. The last two (HTML5 and Bugs) do react. It’s as if I was not allowed 
> to choose the platform. Is it something to do with my licence? I suppose I 
> could ask the mother ship, though it’s Lockdown and Easter which might cause 
> a bit of delay!
> 
> Thanks again
> 
> Graham
> 
> 
>> On 9 Apr 2020, at 20:53, Devin Asay via use-livecode 
>>  wrote:
>> 
>> Graham,
>> 
>> Not really visualizing what you’re seeing. When you choose Xcode from your 
>> LiveCode mobile support preference pane, all you should have to do is 
>> navigate to Xcode using the Add Entry button, choose Xcode, and the square 
>> next to the iOS section should turn green. If you see the green square you 
>> should be good to go to do Test deploys to the iOS Simulator. 
>> 
>> It’s all about the Green Square!
>> 
>> Devin
>> 
>>> On Apr 9, 2020, at 9:23 AM, Graham Samuel via use-livecode 
>>>  wrote:
>>> 
>>> Devin. I was too optimistic in thinking things would now go smoothly! I 
>>> would very much appreciated your advice on the following:
>>> 
>>> Following your advice to your students, I have downloaded and installed the 
>>> latest XCode I can use on my Mac, which is 10.1. I have set the mobile 
>>> preferences of my LiveCode 9.5.1 Indy to point to the developer section in 
>>> the XCode app as you instruct (to be certain, I deleted the default and 
>>> input the info afresh). I can open a simulator for any of my target iPhones 
>>> -  but when I try to set the Standalone settings for my current project, I 
>>> am unable to select iOS as an option, and indeed I don’t see a detailed set 
>>> of parameters but just a simpler window. (I think it’s called the General 
>>> Settings) In fact I find that I can’t add or subtract any platform, 
>>> although I notice that Mac, Windows and Linux all have a green checkmark, 
>>> which I don’t want! There is supposed to be a Mode Selector accessed by the 
>>> top left button on this screen, but I am not seeing it.
>>> 
>>> I suppose there must be something wrong with my project, which is at an 
>>> early stage, but features an iPhone shaped card with some buttons on it, at 
>>> least!
>>> 
>>> I suppose the answer is very very simple, but I have not been able to find 
>>> it. I just can’t see what I’m doing wrong, and if there’s anything in the 
>>> LC documentation about this, it is not obvious, nor do the LC preferences 
>>> settings help.
>>> 
>>> Sorry for the interruption - I hope you (or someone else on the list) can 
>>> help as I am now completely stuck as far as proper testing goes.
>>> 
>>> Graham
>>> 
>>> 
>>>> On 6 Apr 2020, at 16:55, Devin Asay via use-livecode 
>>>> mailto:use-livecode@lists.runrev.com>> 
>>>> wrote:
>>>> 
>>>> Graham,
>>>> 
>>>> I’ve just been through this gauntlet with my students. I provided some 
>>>> links and lessons for them at 
>>>> http://livecode.byu.edu/mobile/test-deploy-links.php 
>>>> <http://livecode.byu.edu/mobile/test-deploy-links.php>. I found the 
>>>> process for setting up Android a little fraught with pitfalls, so I 
>>>> created an expanded instruction sheet for Android setup, linked to that 
>>>> page.
>>>> 
>>>> I’m staying with the latest Stable version 

Re: Old Fossil seeks fast track assistance

2020-04-11 Thread Graham Samuel via use-livecode
Jaque thanks - this has not solved it yet, but i’m sure you’re on to something. 
When I delete the revStandaloneSettings, save the stack and re-open it, LC 
itself simply restores the set to what it was before. If I look closely at the 
actual properties in the set, I find quite a bit about Windows, Mac and Linux, 
but nothing at all about mobile platforms. I am wondering now if this is to do 
with licensing. According to my entry on the LC web site, my copy of 9.5.1 has 
a licence for six platforms, i.e.

Mac valid for all versions
Windows valid for all versions
Linux valid for all versions
iOS valid for all versions
Android valid for all versions
Server valid for all versions

BUT for some quirky reason, the LC web site shows I’ve got another copy of 
9.5.1 where I have only HTML5 validity, and suggests I pay for the other 
platforms! As far as I know I really only have one licence, so that should now 
count for seven platforms. But maybe my prefs are based on the HTML-only 
licence - certainly the HTML button works in the Standalone Settings General 
window.

I’m not sure I can do anything about this without the mother ship, and they are 
presumably at home trying to enjoy their Easter holidays at home (It’s a four 
day weekend in the UK and there’s total lockdown), but I’ll try.

Thanks for the excellent suggestion - it’s a new path, anyway.

Stay safe

Graham

> On 10 Apr 2020, at 22:51, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 4/10/20 12:42 PM, Graham Samuel via use-livecode wrote:
>> Thanks Jacque, but that’s the trouble - I can’t turn them off. I thought of 
>> trashing the LC Preferences to see if that does anything, but I couldn’t 
>> find them: I think they are in the plist, which is in the Preferences in the 
>> system library. I tried temporarily switching this off (by renaming the file 
>> and starting LC) - it stopped LC fully loading (not surprising really). I 
>> restored the plist and LC had forgotten some stuff like recent stacks. I 
>> checked that the mobile preference pane still has its green square and can 
>> see XCode, but the Standalone Settings still does not respond to mouse 
>> clicks to remove the non-mobile platforms or to choose mobile.
> 
> Your LC prefs are in your user library at /Users/ name>/Library/Preferences/RunRev/livecode7.rev. I'm not sure prefs are 
> related here though.
> 
> I'd first try removing the stored standalone settings, which are stored in 
> the stack itself. Use the property inspector to check the custom properties 
> of the stack. There should be a property set named "revStandaloneSettings". 
> Try deleting that set and starting over.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Old Fossil seeks fast track assistance

2020-04-11 Thread Graham Samuel via use-livecode
Woo hoo! It worked! I have never had to re-license LC before, but I did it. You 
generate an offline file, tell LC that you want to re-licence - it than quits. 
You turn off the internet (I assumed this would avoid confusion), relaunch LC 
and choose manual activation. Bingo!

Thanks to Brian and Jacque for all their help.

Now I can go back to the usual business of making mistakes in my coding and 
design…

Graham

> On 11 Apr 2020, at 16:08, Brian Milby via use-livecode 
>  wrote:
> 
> Should be able to relicense the IDE.  If it keeps using the wrong one, 
> generate a key for the correct one on the web site and use that to license 
> the product.
> 
> Thanks,
> Brian
> On Apr 11, 2020, 8:29 AM -0400, Graham Samuel via use-livecode 
> , wrote:
>> Jaque thanks - this has not solved it yet, but i’m sure you’re on to 
>> something. When I delete the revStandaloneSettings, save the stack and 
>> re-open it, LC itself simply restores the set to what it was before. If I 
>> look closely at the actual properties in the set, I find quite a bit about 
>> Windows, Mac and Linux, but nothing at all about mobile platforms. I am 
>> wondering now if this is to do with licensing. According to my entry on the 
>> LC web site, my copy of 9.5.1 has a licence for six platforms, i.e.
>> 
>> Mac valid for all versions
>> Windows valid for all versions
>> Linux valid for all versions
>> iOS valid for all versions
>> Android valid for all versions
>> Server valid for all versions
>> 
>> BUT for some quirky reason, the LC web site shows I’ve got another copy of 
>> 9.5.1 where I have only HTML5 validity, and suggests I pay for the other 
>> platforms! As far as I know I really only have one licence, so that should 
>> now count for seven platforms. But maybe my prefs are based on the HTML-only 
>> licence - certainly the HTML button works in the Standalone Settings General 
>> window.
>> 
>> I’m not sure I can do anything about this without the mother ship, and they 
>> are presumably at home trying to enjoy their Easter holidays at home (It’s a 
>> four day weekend in the UK and there’s total lockdown), but I’ll try.
>> 
>> Thanks for the excellent suggestion - it’s a new path, anyway.
>> 
>> Stay safe
>> 
>> Graham
>> 
>>> On 10 Apr 2020, at 22:51, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> On 4/10/20 12:42 PM, Graham Samuel via use-livecode wrote:
>>>> Thanks Jacque, but that’s the trouble - I can’t turn them off. I thought 
>>>> of trashing the LC Preferences to see if that does anything, but I 
>>>> couldn’t find them: I think they are in the plist, which is in the 
>>>> Preferences in the system library. I tried temporarily switching this off 
>>>> (by renaming the file and starting LC) - it stopped LC fully loading (not 
>>>> surprising really). I restored the plist and LC had forgotten some stuff 
>>>> like recent stacks. I checked that the mobile preference pane still has 
>>>> its green square and can see XCode, but the Standalone Settings still does 
>>>> not respond to mouse clicks to remove the non-mobile platforms or to 
>>>> choose mobile.
>>> 
>>> Your LC prefs are in your user library at /Users/>> name>/Library/Preferences/RunRev/livecode7.rev. I'm not sure prefs are 
>>> related here though.
>>> 
>>> I'd first try removing the stored standalone settings, which are stored in 
>>> the stack itself. Use the property inspector to check the custom properties 
>>> of the stack. There should be a property set named "revStandaloneSettings". 
>>> Try deleting that set and starting over.
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


MP3s

2020-04-12 Thread Graham Samuel via use-livecode
Pardon my ignorance, but Is there really no way to put an mp3 sound into a 
stack as an audioclip and play it? Seems unlikely, but that’s what the 
dictionary says. WAV, forsooth!

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: MP3s

2020-04-12 Thread Graham Samuel via use-livecode
Lossy? Yes, like JPEG. And like JPEG, the format does very well indeed for a 
huge variety of applications. I listen to MP3 music a lot, mostly classical, 
and I don’t feel the lossy aspect is really taking away from the quality of 
what I hear to any extent. Of course if the whole chain of production from the 
Stradivarius to my ears was of the very best quality, I would be cursing that 
pesky lossiness. But not in ordinary life, and certainly not for a looped 
warning sound lasting a few seconds.

Incidentally, my statistics are a trifle worse than Richmond’s:

mySound.mp3 - 81 Kb
mySound.wav - 890 Kb
mySound.AIFF - 890 Kb

Still, subject closed - I presume the mother ship has long ago decided not to 
enhance LC in this respect any time soon.

Graham


> On 12 Apr 2020, at 20:32, Mark Wieder via use-livecode 
>  wrote:
> 
> On 4/12/20 11:07 AM, Richmond via use-livecode wrote:
> 
>> "Just for fun" I exported a sound file as WAV, AIFF and MP3 using Audacity"
>> WAV 36.9 MB
>> AIFF  36.9 MB
>> MP3  4.4 MB
>> which means that WAV and AIFF stink about 9 times more than MP3
> 
> For the record, mp3 is a lossy format while WAV and AIFF are lossless. And 
> your file size will depend on the bitness of the compaction.
> 
>> NWO: as Audacity is Open Source: https://www.audacityteam.org/
>> and can import, read and export sound files in MP3 format . . .
> 
> The mp3 format used to be "protected" by patent licensing but was set free a 
> few years ago, so is now available for general use.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: MP3s

2020-04-13 Thread Graham Samuel via use-livecode
Well, Richard, as usual you say something informative and useful!

I didn’t know that LC could play a sound file in MP3 format. I am in the odd 
position of being a veteran of LC (and to some extent even Hypercard and 
Supercard) and I have developed published apps; but despite my regular reading 
of this list, my skills have got rusty and now I am trying to apply, at 
double-quick time, the oil can of advice from this list and elsewhere so as to 
develop a mobile app…

So I didn’t look in all corners for the answer. Instinctively I thought that an 
audioclip was the way to go, because I saw it as a small chunk of data best 
embedded in my app. In my mind, the format of an external file trades 
flexibility (the user or the app can switch content easily) against a massive 
overhead of storage and software mechanics and potential delays due to loading 
etc, whereas the audioclip is small, clean, and can be started and stopped with 
no overheads. This is doubtless old-fashioned - I don’t carry the moniker of 
Living Fossil for nothing - and I need to revise this thinking, which you are 
helping me to do. Still, I can’t quite let go of the idea of the embedded 
squawk.

Graham

> On 13 Apr 2020, at 01:01, Richard Gaskin via use-livecode 
>  wrote:
> 
> Graham Samuel wrote:
> 
>> Still, subject closed - I presume the mother ship has long ago decided
>> not to enhance LC in this respect any time soon.
> 
> Not at all.  I noticed this thread got off on the tangent of codec specifics, 
> but never addressed your core question:
> 
> LiveCode can play all of those and more.
> 
> Just not specifically using the old audioClip method.  That method was an 
> early attempt to emulate HC's resource-fork-based SND clips, and never got 
> past using the .au format which was popular way back in the day on the 
> platform MetaCard was born on, Unix.
> 
> Since then audio and video support assumes richer formats of greater length 
> than are practical with embedded media clips.
> 
> Play them as files and you should be fine.
> 
> (That is, unless you need to deploy to Linux, where the Player object started 
> breaking a few years after the turn of the century and has gotten steadily 
> worse since.)
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: MP3s

2020-04-13 Thread Graham Samuel via use-livecode
Richmond, can’t resist saying that I can remember quad… I was never convinced. 
It was certainly a fashion. Comes into one of my favourite films, ‘Local Hero’, 
where the scallywag fisherman from Murmansk connects with the 
wet-behind-the-ears young oil man from Houston.  it was just a little moment in 
history when such a bit of dialogue might have existed… but I digress.

I have tinnitus, and hearing aids, but I can still enjoy a live, non-amplified 
performance, and there is no equipment I could afford that could make a 
recording in any format sound as good.

OT, I know.

Graham

> On 13 Apr 2020, at 09:42, Richmond via use-livecode 
>  wrote:
> 
> Having the ability to import resources into a stack, whether they be images, 
> videos or sounds is a great strength;
> and much better than having a ReadMe document accompanying one's standalones 
> telling people where they have to
> bung a slew of referenced resources . . . knowing that about 50% of people 
> will put them in the wrong place and then
> complain they want their money back because your application doesn't work.
> 
> This may be "old-fashioned", but so am I teaching kids how to program with 
> BBC computers from the 1980s;
> doesn't mean it is a bad thing.
> 
> And on Linux . . . what a shambles.
> 
> Re MP3s /per se/: either LiveCode should be capable of embedding them, or, 
> possibly by leveraging open source
> code, it should be able to read MP3 files and store the musical data 
> contained within them inwith stacks in some
> format that can then be played . . .
> 
> The compression available via MP3 well outweighs any possible loss in sound 
> quality - frankly I wonder if anyone over the
> age of 18 can tell the difference unless the sound file is then played 
> through some high-end equipment.
> 
> When I was 23 I was walking past a HiFi shop in Durham City when I was 
> seduced to go inside and listen
> to a demonstration of Quadraphonic sound (does anyone except me actually 
> remember that?). I was sat down in an
> office chair between 4 speakers and listened to some music by Queen; then 
> again on another chair between 2 speakers.
> A slightly oily fellow with an unctuous voice then said, "Of course you heard 
> the difference between the stereo
> and the quad, didn't you?"  Talk about leading tag questions. Feeling like a 
> "right peasant," I said, "No" and left.
> 
> I did actually hear a difference: but not in terms of the musical quality as 
> such, but in the effect of being "within' the space where the music was 
> taking place.
> 
> I went home and by jacking together 6 loud speakers and a tobacco tin to my 
> record player I got a Quad effect for nix!
> 
> Purists (err; sound experts or plain posers? who knows) would have howled.
> 
> Now I listen to any old music "as it comes" and feel lucky that I can hear 
> it, especially on mornings like this one
> when my tinnitus is singing a song of its own.
> 
> Embed, embed, embed . . . Please.
> 
> Best, Richmond.
> 
> On 13.04.20 2:01, Richard Gaskin via use-livecode wrote:
>> Graham Samuel wrote:
>> 
>> > Still, subject closed - I presume the mother ship has long ago decided
>> > not to enhance LC in this respect any time soon.
>> 
>> Not at all.  I noticed this thread got off on the tangent of codec 
>> specifics, but never addressed your core question:
>> 
>> LiveCode can play all of those and more.
>> 
>> Just not specifically using the old audioClip method.  That method was an 
>> early attempt to emulate HC's resource-fork-based SND clips, and never got 
>> past using the .au format which was popular way back in the day on the 
>> platform MetaCard was born on, Unix.
>> 
>> Since then audio and video support assumes richer formats of greater length 
>> than are practical with embedded media clips.
>> 
>> Play them as files and you should be fine.
>> 
>> (That is, unless you need to deploy to Linux, where the Player object 
>> started breaking a few years after the turn of the century and has gotten 
>> steadily worse since.)
>> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Problem simulating a location

2020-04-13 Thread Graham Samuel via use-livecode
I’m trying to use the 10.2 XCode simulator to test an iOS app that uses the 
phone’s ability to know its location (usually via GPS). I can run the 
simulation and show that it’s working in a general way. Furthermore, 
mobileSensorAvailable("location”) responds in the simulated app, saying the 
sensor is ‘authorizedWhenInUse’

However the following button handler - adapted from a lesson by Devin Asay 
(very sincere thanks for all that, Devin!) always returns an empty result. I 
have set the location in the simulator to a (genuine) custom location, but if I 
choose one of the built-in locations, I still get the same result.

  On mouseUp
mobileStartTrackingSensor "location” -- enable the sensor first
put "now trying to get a one-off location reading" & return after fld 
“TheReport"
put mobileSensorReading("location",false) into tSensorData -- this returns 
a string with the current latitude, longitude and altitude
mobileStopTrackingSensor “location” -- turn off the sensor when done
if tSensorData is empty then
put "no location info!!" & return after fld "TheReport"
else
put tSensorData & return after fld "TheReport"
   end if
 end mouseUp


Of course it’s me, but what am I doing wrong?

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem simulating a location

2020-04-14 Thread Graham Samuel via use-livecode
Folks, I am still struggling with this. Alan Stenhouse has been kind enough to 
help me, but so far I have not got the simulator to simulate any kind of 
location information.

There is a function, mobileCurrentLocation, that is supposed to return an array 
provided tracking is enabled and mobileSensorAvailable(“location”) has been 
invoked (see the LC Dictionary). I have made sure that both these things have  
been done, but In my tests on the simulator the array appears to be empty.

I suppose I can try the test on a real phone, but I would rather stick to the 
simulator for now. And I haven’t found out how LC knows I’ve got a provisioning 
profile (separate problem I admit).

Has anyone got any idea what’s going wrong?

Puzzled.

Graham

> On 13 Apr 2020, at 14:38, Graham Samuel  wrote:
> 
> I’m trying to use the 10.2 XCode simulator to test an iOS app that uses the 
> phone’s ability to know its location (usually via GPS). I can run the 
> simulation and show that it’s working in a general way. Furthermore, 
> mobileSensorAvailable("location”) responds in the simulated app, saying the 
> sensor is ‘authorizedWhenInUse’
> 
> However the following button handler - adapted from a lesson by Devin Asay 
> (very sincere thanks for all that, Devin!) always returns an empty result. I 
> have set the location in the simulator to a (genuine) custom location, but if 
> I choose one of the built-in locations, I still get the same result.
> 
>  On mouseUp
>mobileStartTrackingSensor "location” -- enable the sensor first
>put "now trying to get a one-off location reading" & return after fld 
> “TheReport"
>put mobileSensorReading("location",false) into tSensorData -- this returns 
> a string with the current latitude, longitude and altitude
>mobileStopTrackingSensor “location” -- turn off the sensor when done
>if tSensorData is empty then
>put "no location info!!" & return after fld "TheReport"
>else
>put tSensorData & return after fld "TheReport"
>   end if
> end mouseUp
> 
> 
> Of course it’s me, but what am I doing wrong?
> 
> Graham


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem simulating a location

2020-04-14 Thread Graham Samuel via use-livecode
Gents, thank you. Good advice, and I’m taking it! I will report back.

Graham

> On 14 Apr 2020, at 19:39, Andrew at MidWest Coast Media via use-livecode 
>  wrote:
> 
>> 
>> From: Graham Samuel 
>> I suppose I can try the test on a real phone, but I would rather stick to 
>> the simulator for now.
> If you have a physical device, regardless of age, try it. There are some 
> things that either don’t work (like camera) or are spotty in the emulator.
> 
> 
>> And I haven?t found out how LC knows I?ve got a provisioning profile 
>> (separate problem I admit).
> 
> When you download from the Apple Developer site, just double-click the 
> provisioning profile to open it in Xcode. Livecode will know it’s installed 
> next time you open the Save As Standalone window (but won’t recognize if you 
> install while that window is open)
>> 
> —Andrew Bell

> On 14 Apr 2020, at 17:33, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
> You should really try it on the phone before knocking yourself out
> about why it doesn’t work on the simulator.  I have found that
> some things involving sensors simply don’t work on the simulator.
> 
> Try that, if it doesn’t work on the phone let us know.
> 
> Good luck!
> 
> Rick
> 
>> On Apr 14, 2020, at 11:18 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Folks, I am still struggling with this. Alan Stenhouse has been kind enough 
>> to help me, but so far I have not got the simulator to simulate any kind of 
>> location information.
>> 
>> There is a function, mobileCurrentLocation, that is supposed to return an 
>> array provided tracking is enabled and mobileSensorAvailable(“location”) has 
>> been invoked (see the LC Dictionary). I have made sure that both these 
>> things have  been done, but In my tests on the simulator the array appears 
>> to be empty.
>> 
>> I suppose I can try the test on a real phone, but I would rather stick to 
>> the simulator for now. And I haven’t found out how LC knows I’ve got a 
>> provisioning profile (separate problem I admit).
>> 
>> Has anyone got any idea what’s going wrong?
>> 
>> Puzzled.
>> 
>> Graham
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem simulating a location

2020-04-15 Thread Graham Samuel via use-livecode
Panos, this is solid gold as far as I’m concerned! I had no idea that 
mobileStartTrackingSensor would return control to the script without finishing 
its job, Wouldn’t it be better, since it isn’t blocking, to provide some sort 
of status token that could be queried by script? Thanks also for the note about 
the bug. I feel I can make progress!

Cheers

Graham

> On 15 Apr 2020, at 16:58, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> I have done a couple of tweaks to your code, and I can now successfully
> read the location data from the simulator.
> 
> First thing - it is not suggested to call all these 3 commands/functions in
> one go:
> 
> mobileStartTrackingSensor
> mobileSensorReading()
> mobileStopTrackingSensor
> 
> as the "mobileStartTrackingSensor" command takes some time for the sensors
> to start tracking. So a good place to add this would be on openCard, or in
> a separate button.
> 
> Similarly, I have removed the "mobileStopTrackingSensor" from the button
> script, and have put it on the closeCard handler (you can but it in a
> separate button for your testing if you wish)
> 
> So the main button code becomes:
> 
> On mouseUp
>   put "now trying to get a one-off location reading" & return after fld
> "TheReport"
>   put mobileSensorReading("location",true) into tSensorData -- this
> returns a string with the current latitude, longitude and altitude
>   if tSensorData is empty then
>  put "no location info!!" & return after fld "TheReport"
>   else
>  put tSensorData & return after fld "TheReport"
>   end if
> end mouseUp
> 
> However, it seems there is a bug in the function
> mobileSensorReading("location",false)
> 
> which will be fixed asap
> 
> You can workaround this bug by using the "detailed" form of this function,
> i.e. mobileSensorReading("location",true)
> 
> Note that the "detailed" form returns an array instead of a comma separated
> list, so you have to modify the script as follows:
> 
> On mouseUp
>   put "now trying to get a one-off location reading" & return after fld
> "TheReport"
>   put mobileSensorReading("location",true) into tSensorData -- this
> returns a string with the current latitude, longitude and altitude
>   if tSensorData is empty then
>  put "no location info!!" & return after fld "TheReport"
>   else
>      combine tSensorData using return and ":"
>  put tSensorData & return after fld "TheReport"
>   end if
> end mouseUp
> 
> Also, in the Simulator menubar, choose a location such as "City Run" or
> "Freeway Drive" so as you could see the changes.
> 
> Hope this helps.
> 
> Kind regards,
> Panos
> --
> 
> On Tue, 14 Apr 2020 at 21:14, Graham Samuel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Gents, thank you. Good advice, and I’m taking it! I will report back.
>> 
>> Graham
>> 
>>> On 14 Apr 2020, at 19:39, Andrew at MidWest Coast Media via use-livecode
>>  wrote:
>>> 
>>>> 
>>>> From: Graham Samuel
>>>> I suppose I can try the test on a real phone, but I would rather stick
>> to the simulator for now.
>>> If you have a physical device, regardless of age, try it. There are some
>> things that either don’t work (like camera) or are spotty in the emulator.
>>> 
>>> 
>>>> And I haven?t found out how LC knows I?ve got a provisioning profile
>> (separate problem I admit).
>>> 
>>> When you download from the Apple Developer site, just double-click the
>> provisioning profile to open it in Xcode. Livecode will know it’s installed
>> next time you open the Save As Standalone window (but won’t recognize if
>> you install while that window is open)
>>>> 
>>> —Andrew Bell
>> 
>>> On 14 Apr 2020, at 17:33, Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi Graham,
>>> 
>>> You should really try it on the phone before knocking yourself out
>>> about why it doesn’t work on the simulator.  I have found that
>>> some things involving sensors simply don’t work on the simulator.
>>> 
>>> Try that, if it doesn’t work on the phone let us know.
>>> 
>>> Good luck!
>>> 
>>> Rick
>>> 
>>>> On Apr 14, 2020, at 11:18 AM, Graham Samuel via use-livecode <
>> use-livecode@lists.runre

Making an iOS app look like one

2020-04-16 Thread Graham Samuel via use-livecode
Folks, I know this is a desperately naive question, but as I progress with my 
first serious attempt at an iOS app, which I’m trying to do in a hurry with 
only my experience of developing LC desktop apps to go on, I am struck by how 
un-iOS-like it looks. Richard Gaskin has already suggested that I look for good 
practice amongst existing apps from all sources, and I’ve tried to do this. 
Where I come unstuck is how to imitate the ‘look’ of such apps.

I am trying, for example by getting the Native Control Widget pack from the LC 
store, and by attempting (but not so far succeeding) to understand the LC 
lesson about Native text controls, especially how I can create such controls in 
the first place.

My app is not outrageously complicated. What it needs is

  -  Fields to display information, some of which must allow input via keyboard 
or pasting. Although there is a Native Android Field widget, there isn’t one 
for iOS, so I don’t know what my options are. I want the kind of fonts and font 
sizes that are typical of iOS, but so far I haven’t found a reference to these 
properties in the LC documentation. I found a command, mobileControlCreate, 
which it appears can only function dynamically in a mobile app, which seems to 
mean I can’t create and place controls until the app is running. I find that 
confusing.

  -  Small, tidy icons, for use as the equivalent of menus or menu items, for 
example acting as links to various settings cards - so typically an image like 
a cogwheel for example. I would like these to be SVG, but none of LC’s SVG 
images have the necessary unchunky look. Do I have to create them from scratch 
(it would not be the end of the world if I did, but I imagine that there’s a 
library of them somewhere).

  -  “Done” type buttons (there is a built in widget for this but it doesn’t 
end up looking like the ‘done’ buttons I see on typical apps) and other buttons 
to start off processes or displays.

  -  Some kind of control that acts like a radio button group, so that one 
option is chosen to the exclusion of any others in the group (I suppose it’s a 
picking list, but I don’t know how to implement such a thing in an 
iOS-compatible way and the widgets on offer are specialised to date and time)

LC Support has been helpful in pointing me at various lessons, but I have 
obviously missed masses of stuff which must be there somewhere. As usual I am 
searching for pointers and examples in order to try to fast track this 
development.

Sorry for asking yet more questions.

Graham



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


A short question about Xcode

2020-04-16 Thread Graham Samuel via use-livecode
I’m following the LC lesson 'How do I build an iOS application?’. I think I’ve 
done everything they mention, and I have my Apple developer credentials and 
three iOS devices registered. I have saved my iOS app as a standalone. But when 
I get to this instruction about getting my app on a real device:

> 1) Open Xcode
> 
> 2) In the 'Window' menu select "Devices"
> 
> 4) Select your connected iOS device
> 
> 5) Drag standalone app to "Installed Apps" section of device window
> 
> Your app should now be on your device


There is nothing in the Devices section for me to select (plenty of stuff in 
the Simulators, but so what?). Do I have to fiddle with keychain or particular 
folders or what? I have no idea what to do next (not for the first time!).

Graham


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Making an iOS app look like one

2020-04-16 Thread Graham Samuel via use-livecode
Just a quick ‘Thank You’ to Andrew, Devin and Bill for their ultra-rapid and 
detailed replies. There is a lot to take in there, and I’ll respond later if I 
have to ask yet more questions. It does seem a bit of a dog’s breakfast (if I 
can say that), doesn’t it? I did not realise you could buy in other SCGs 
without some kind of intervention from the mother ship - I will check that out.

I’ll be back.

Thanks again

Graham



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-16 Thread Graham Samuel via use-livecode
Sadly, my test targets are just simulators. No real device is mentioned.

However, following Ralph’s advice (thanks), i reconnected with my phone 
unlocked. Things looked promising, but then a message came up saying that maybe 
this version of Xcode (10.1) was not compatible with the iOS 13 on my iPhone 
XS, which is my main test device (it’s OK in the simulator). It then tried to 
do the loading of the app into the phone and eventually said

> The entitlements specified in your application’s Code Signing Entitlements 
> file are invalid, not permitted, or do not match those specified in your 
> provisioning profile. (0xE8008016).

I suppose that may be the end of that. I need a new iMac - the one I’ve got 
won’t run a later version of Xcode. Sadly they are rather expensive. I can’t 
visit anyone else’s, even if I could find one, since i’m in lockdown.

Nothing, but nothing, is simple when trying to deploy to iOS.

[Sound of grinding teethe]

Graham

> On 16 Apr 2020, at 20:22, scott--- via use-livecode 
>  wrote:
> 
> I can’t recall whether this is specific to a particular LC license but when 
> physically attaching a device to the computer, on my setup that mobile device 
> appears under the menu Development —> Test Target (along with simulator 
> options) and can simply be selected as the test device… which saves the added 
> step of dragging into Xcode.
> 
> --
> Scott Morrow
> 
> Elementary Software
> (Now with 20% less chalk dust!)
> web   https://elementarysoftware.com/
> email sc...@elementarysoftware.com
> booth1-800-615-0867
> ------------------
>> On Apr 16, 2020, at 10:11 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> I’m following the LC lesson 'How do I build an iOS application?’. I think 
>> I’ve done everything they mention, and I have my Apple developer credentials 
>> and three iOS devices registered. I have saved my iOS app as a standalone. 
>> But when I get to this instruction about getting my app on a real device:
>> 
>>> 1) Open Xcode
>>> 
>>> 2) In the 'Window' menu select "Devices"
>>> 
>>> 4) Select your connected iOS device
>>> 
>>> 5) Drag standalone app to "Installed Apps" section of device window
>>> 
>>> Your app should now be on your device
>> 
>> 
>> There is nothing in the Devices section for me to select (plenty of stuff in 
>> the Simulators, but so what?). Do I have to fiddle with keychain or 
>> particular folders or what? I have no idea what to do next (not for the 
>> first time!).
>> 
>> Graham
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-16 Thread Graham Samuel via use-livecode
Just got the same error with an iPhone 5, which is only running iOS 10.4 - so 
whatever is wrong, it’s not to do with the newness of the operating system in 
the device. Why is it so complicated? How can anyone write a single piece of 
software (I’m talking about XCode) that uses up more bytes than would be needed 
for the Library of Babel? Things have got out of hand. Rant ends.

Graham

> On 16 Apr 2020, at 21:04, Graham Samuel via use-livecode 
>  wrote:
> 
> Sadly, my test targets are just simulators. No real device is mentioned.
> 
> However, following Ralph’s advice (thanks), i reconnected with my phone 
> unlocked. Things looked promising, but then a message came up saying that 
> maybe this version of Xcode (10.1) was not compatible with the iOS 13 on my 
> iPhone XS, which is my main test device (it’s OK in the simulator). It then 
> tried to do the loading of the app into the phone and eventually said
> 
>> The entitlements specified in your application’s Code Signing Entitlements 
>> file are invalid, not permitted, or do not match those specified in your 
>> provisioning profile. (0xE8008016).
> 
> I suppose that may be the end of that. I need a new iMac - the one I’ve got 
> won’t run a later version of Xcode. Sadly they are rather expensive. I can’t 
> visit anyone else’s, even if I could find one, since i’m in lockdown.
> 
> Nothing, but nothing, is simple when trying to deploy to iOS.
> 
> [Sound of grinding teethe]
> 
> Graham
> 
>> On 16 Apr 2020, at 20:22, scott--- via use-livecode 
>>  wrote:
>> 
>> I can’t recall whether this is specific to a particular LC license but when 
>> physically attaching a device to the computer, on my setup that mobile 
>> device appears under the menu Development —> Test Target (along with 
>> simulator options) and can simply be selected as the test device… which 
>> saves the added step of dragging into Xcode.
>> 
>> --
>> Scott Morrow
>> 
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web   https://elementarysoftware.com/
>> email sc...@elementarysoftware.com
>> booth1-800-615-0867
>> --
>>> On Apr 16, 2020, at 10:11 AM, Graham Samuel via use-livecode 
>>>  wrote:
>>> 
>>> I’m following the LC lesson 'How do I build an iOS application?’. I think 
>>> I’ve done everything they mention, and I have my Apple developer 
>>> credentials and three iOS devices registered. I have saved my iOS app as a 
>>> standalone. But when I get to this instruction about getting my app on a 
>>> real device:
>>> 
>>>> 1) Open Xcode
>>>> 
>>>> 2) In the 'Window' menu select "Devices"
>>>> 
>>>> 4) Select your connected iOS device
>>>> 
>>>> 5) Drag standalone app to "Installed Apps" section of device window
>>>> 
>>>> Your app should now be on your device
>>> 
>>> 
>>> There is nothing in the Devices section for me to select (plenty of stuff 
>>> in the Simulators, but so what?). Do I have to fiddle with keychain or 
>>> particular folders or what? I have no idea what to do next (not for the 
>>> first time!).
>>> 
>>> Graham
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-16 Thread Graham Samuel via use-livecode
Ralph, I am using a development provisioning profile for iPhone. It was created 
this month and expires next year. I will try to go over the whole process 
again. I did as much as I could to include all the icons and splash pages 
needed for all the phones I was likely to encounter (that was about 5 different 
types). Do I have to include ones that nobody is going to use?

Graham

> On 16 Apr 2020, at 22:04, Ralph DiMola via use-livecode 
>  wrote:
> 
> You can ignore the "this version of Xcode (10.1) was not compatible with the 
> iOS 13 on my iPhone XS"
> 
> Make sure your using a development provisioning profile. Create a new one and 
> try using it. If I remember correctly I've also seen this when not all Icons 
> or Splash pages are included.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Graham Samuel via use-livecode
> Sent: Thursday, April 16, 2020 3:05 PM
> To: How to use LiveCode
> Cc: Graham Samuel
> Subject: Re: A short question about Xcode
> 
> Sadly, my test targets are just simulators. No real device is mentioned.
> 
> However, following Ralph’s advice (thanks), i reconnected with my phone 
> unlocked. Things looked promising, but then a message came up saying that 
> maybe this version of Xcode (10.1) was not compatible with the iOS 13 on my 
> iPhone XS, which is my main test device (it’s OK in the simulator). It then 
> tried to do the loading of the app into the phone and eventually said
> 
>> The entitlements specified in your application’s Code Signing Entitlements 
>> file are invalid, not permitted, or do not match those specified in your 
>> provisioning profile. (0xE8008016).
> 
> I suppose that may be the end of that. I need a new iMac - the one I’ve got 
> won’t run a later version of Xcode. Sadly they are rather expensive. I can’t 
> visit anyone else’s, even if I could find one, since i’m in lockdown.
> 
> Nothing, but nothing, is simple when trying to deploy to iOS.
> 
> [Sound of grinding teethe]
> 
> Graham
> 
>> On 16 Apr 2020, at 20:22, scott--- via use-livecode 
>>  wrote:
>> 
>> I can’t recall whether this is specific to a particular LC license but when 
>> physically attaching a device to the computer, on my setup that mobile 
>> device appears under the menu Development —> Test Target (along with 
>> simulator options) and can simply be selected as the test device… which 
>> saves the added step of dragging into Xcode.
>> 
>> --
>> Scott Morrow
>> 
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web   https://elementarysoftware.com/
>> email sc...@elementarysoftware.com
>> booth1-800-615-0867
>> --
>>> On Apr 16, 2020, at 10:11 AM, Graham Samuel via use-livecode 
>>>  wrote:
>>> 
>>> I’m following the LC lesson 'How do I build an iOS application?’. I think 
>>> I’ve done everything they mention, and I have my Apple developer 
>>> credentials and three iOS devices registered. I have saved my iOS app as a 
>>> standalone. But when I get to this instruction about getting my app on a 
>>> real device:
>>> 
>>>> 1) Open Xcode
>>>> 
>>>> 2) In the 'Window' menu select "Devices"
>>>> 
>>>> 4) Select your connected iOS device
>>>> 
>>>> 5) Drag standalone app to "Installed Apps" section of device window
>>>> 
>>>> Your app should now be on your device
>>> 
>>> 
>>> There is nothing in the Devices section for me to select (plenty of stuff 
>>> in the Simulators, but so what?). Do I have to fiddle with keychain or 
>>> particular folders or what? I have no idea what to do next (not for the 
>>> first time!).
>>> 
>>> Graham
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-17 Thread Graham Samuel via use-livecode
I feel that pain too.

When I bought my Mac Plus, my mother had to help me - comparatively speaking (I 
mean compared with my income) I seem to remember it was even more expensive in 
those days! Anyway, my perfectly fine iMac (mid-2011) can’t go beyond High 
Sierra. Wondering whether to scrape up enough for a new one, tho funds are low 
- anyway will Apple France deliver during the lockdown?

> On 16 Apr 2020, at 22:49, Dev via use-livecode 
>  wrote:
> 
> I feel for you Ralph. My general solution is that it is time for my wife to 
> get a new computer - ie pass on my old one. Pain in the neck and so on, but 
> it doesn’t happen too often. I don’t know how old yours is, but I usually get 
> 5-6 years out of a Mac laptop, and that means my $$$/yr stays in just in the 
> painful range, and I keep doing it (3x now). So for me it is the cost of my 
> hobby or a cost of doing business.
> Sorry to say, but this has been going on for a while - since I bought my 
> first 286 and MacPlus.
> 
> 
> 
>> On 16-Apr-2020, at 2:45 PM, Ralph DiMola via use-livecode 
>>  wrote:
> 
>>  I'm facing the fact that my 16 gig 2TB perfectly running MacBook Pro 
>> still with great performance is too old to update to Catalina. This means I 
>> have to scrape up $1,800 minimum to get even a 2018 MacBook Pro. And then 
>> you get what you buy because memory and hard drives are now soldered in so 
>> no upgrades can be done 
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-17 Thread Graham Samuel via use-livecode
Thanks Jacque - simulator testing is fine, but I need to get the wretched app 
on the device, mostly so that I can walk around and watch the GPS working, but 
also of course for proof of concept. I am on the verge of giving up, but thanks 
to this list I may conquer the mountain of obscurity that is iOS deployment, so 
one more try before I go back to something simply like learning about 
relativity (a real bucket list item for me).

Graham

> On 16 Apr 2020, at 22:59, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 4/16/20 2:04 PM, Graham Samuel via use-livecode wrote:
>> Sadly, my test targets are just simulators. No real device is mentioned.
> 
> Missed this the first time around. You can still do everything from LC, once 
> you launch a simulator which you need to do from XCode. Wait until it is 
> fully launched and running.
> 
> Then you can choose the simulator from the LC Development menu, hit the Test 
> button and it should go.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: A short question about Xcode

2020-04-17 Thread Graham Samuel via use-livecode
Yup, I’ve only got one currently valid profile and I selected it in the 
Standalone Settings for my app. Looks like I will have to go over all that 
again - the problem being that I don’t know why, and XCode error reporting 
doesn’t really tell you anything useful.

Thanks - and in case I don’t get round to it - thanks to so many others on this 
list who are trying to help me.

Graham

> On 16 Apr 2020, at 23:57, scott--- via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> When you created the development provisioning profile, I assume you added 
> your iPhone’s UUID to the list of allowed test devices. In the Standalone 
> Application Settings—> iOS—> Basic Settings (tab) did you select the correct 
> profile. (Simulator doesn’t care about profiles but your real devices need to 
> be specifically allowed.) If you just added one, be sure to restart LC so 
> that it sill see it.
> —
> Scott Morrow
> 
>> On Apr 16, 2020, at 1:20 PM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Ralph, I am using a development provisioning profile for iPhone. It was 
>> created this month and expires next year. I will try to go over the whole 
>> process again. I did as much as I could to include all the icons and splash 
>> pages needed for all the phones I was likely to encounter (that was about 5 
>> different types). Do I have to include ones that nobody is going to use?
>> 
>> Graham
>> 
>>> On 16 Apr 2020, at 22:04, Ralph DiMola via use-livecode 
>>>  wrote:
>>> 
>>> You can ignore the "this version of Xcode (10.1) was not compatible with 
>>> the iOS 13 on my iPhone XS"
>>> 
>>> Make sure your using a development provisioning profile. Create a new one 
>>> and try using it. If I remember correctly I've also seen this when not all 
>>> Icons or Splash pages are included.
>>> 
>>> Ralph DiMola
>>> IT Director
>>> Evergreen Information Services
>>> rdim...@evergreeninfo.net
>>> 
>>> 
>>> -Original Message-
>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
>>> Of Graham Samuel via use-livecode
>>> Sent: Thursday, April 16, 2020 3:05 PM
>>> To: How to use LiveCode
>>> Cc: Graham Samuel
>>> Subject: Re: A short question about Xcode
>>> 
>>> Sadly, my test targets are just simulators. No real device is mentioned.
>>> 
>>> However, following Ralph’s advice (thanks), i reconnected with my phone 
>>> unlocked. Things looked promising, but then a message came up saying that 
>>> maybe this version of Xcode (10.1) was not compatible with the iOS 13 on my 
>>> iPhone XS, which is my main test device (it’s OK in the simulator). It then 
>>> tried to do the loading of the app into the phone and eventually said
>>> 
>>>> The entitlements specified in your application’s Code Signing Entitlements 
>>>> file are invalid, not permitted, or do not match those specified in your 
>>>> provisioning profile. (0xE8008016).
>>> 
>>> I suppose that may be the end of that. I need a new iMac - the one I’ve got 
>>> won’t run a later version of Xcode. Sadly they are rather expensive. I 
>>> can’t visit anyone else’s, even if I could find one, since i’m in lockdown.
>>> 
>>> Nothing, but nothing, is simple when trying to deploy to iOS.
>>> 
>>> [Sound of grinding teethe]
>>> 
>>> Graham
>>> 
>>>> On 16 Apr 2020, at 20:22, scott--- via use-livecode 
>>>>  wrote:
>>>> 
>>>> I can’t recall whether this is specific to a particular LC license but 
>>>> when physically attaching a device to the computer, on my setup that 
>>>> mobile device appears under the menu Development —> Test Target (along 
>>>> with simulator options) and can simply be selected as the test device… 
>>>> which saves the added step of dragging into Xcode.
>>>> 
>>>> --
>>>> Scott Morrow
>>>> 
>>>> Elementary Software
>>>> (Now with 20% less chalk dust!)
>>>> web   https://elementarysoftware.com/
>>>> email sc...@elementarysoftware.com
>>>> booth1-800-615-0867
>>>> --
>>>>> On Apr 16, 2020, at 10:11 AM, Graham Samuel via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> I’m following the LC lesson 'How do I build an iOS app

Re: A short question about Xcode

2020-04-17 Thread Graham Samuel via use-livecode
Thanks Bill - I will try very  hard to take your advice. Right now I am a 
couple of steps back as I am getting strange results on the simulator - widgets 
(just mobile labels) disappearing, and the GPS activation which worked a couple 
of hours ago, suddenly failing… hope to get back to the real device issue soon.

Graham

> On 17 Apr 2020, at 17:35, William Prothero via use-livecode 
>  wrote:
> 
> Graham:
> I’ve been where you are, with the maze of requirements to get an app on 
> iPhone. One thing I found was that the trail of mis-steps left a confusing 
> mess of invalid entries in the keychain and Xcode app, and in the other 
> places in my . When I got rid of every entry that I had made and started over 
> from scratch, I had success finally. So, every time I get to that point in 
> the project, I do a housecleaning, then religiously followed the steps some 
> of the livecode app gurus have posted. I’m fortunate in that I only need to 
> use my app on my own iPhone and don’t have to go thru the apple store.
> 
> FYI— Sorry that I didn’t note the author of this snippet, but I found it very 
> useful and stored it in my notes. It may not be the most current, as well.
> Ah yes - one of the biggest GOTCHA’s there is when working on Apple 
> certification…
> 
> I’ve found the best approach is to keep my dev machine scrupulously clean as 
> regards old certificates, and a session with Keychain Access pays dividends. 
> 
> The same thing goes as regards old provisioning profiles - you should find 
> all provisioning profiles on your mac stored at 
> '/Users/ cleaning out of that folder and then using Xcode to pull down fresh copies is 
> the way to go
> 
> In general ‘good hygiene’ with your certificates and profiles is necessary 
> and will prevent much head thumping, cursing, gnashing of teeth and tears at 
> bedtime :)
> 
> And finally, I’ve found it best to keep old copies of Xcode on my machine in 
> their own sub-folder (individually named) in the Applications folder whilst 
> keeping the executable named “Xcode.app”
> —End of snippet
> 
> Good luck,
> Bill
> 
> William A. Prothero
> https://earthlearningsolutions.org
> 
>> On Apr 16, 2020, at 2:57 PM, scott--- via use-livecode 
>>  wrote:
>> 
>> Hello Graham,
>> 
>> When you created the development provisioning profile, I assume you added 
>> your iPhone’s UUID to the list of allowed test devices. In the Standalone 
>> Application Settings—> iOS—> Basic Settings (tab) did you select the correct 
>> profile. (Simulator doesn’t care about profiles but your real devices need 
>> to be specifically allowed.) If you just added one, be sure to restart LC so 
>> that it sill see it.
>> —
>> Scott Morrow
>> 
>>> On Apr 16, 2020, at 1:20 PM, Graham Samuel via use-livecode 
>>>  wrote:
>>> 
>>> Ralph, I am using a development provisioning profile for iPhone. It was 
>>> created this month and expires next year. I will try to go over the whole 
>>> process again. I did as much as I could to include all the icons and splash 
>>> pages needed for all the phones I was likely to encounter (that was about 5 
>>> different types). Do I have to include ones that nobody is going to use?
>>> 
>>> Graham
>>> 
>>>> On 16 Apr 2020, at 22:04, Ralph DiMola via use-livecode 
>>>>  wrote:
>>>> 
>>>> You can ignore the "this version of Xcode (10.1) was not compatible with 
>>>> the iOS 13 on my iPhone XS"
>>>> 
>>>> Make sure your using a development provisioning profile. Create a new one 
>>>> and try using it. If I remember correctly I've also seen this when not all 
>>>> Icons or Splash pages are included.
>>>> 
>>>> Ralph DiMola
>>>> IT Director
>>>> Evergreen Information Services
>>>> rdim...@evergreeninfo.net
>>>> 
>>>> 
>>>> -Original Message-
>>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
>>>> Behalf Of Graham Samuel via use-livecode
>>>> Sent: Thursday, April 16, 2020 3:05 PM
>>>> To: How to use LiveCode
>>>> Cc: Graham Samuel
>>>> Subject: Re: A short question about Xcode
>>>> 
>>>> Sadly, my test targets are just simulators. No real device is mentioned.
>>>> 
>>>> However, following Ralph’s advice (thanks), i reconnected with my phone 
>>>> unlocked. Things looked promising, but then a message came up saying that 
>>>> maybe this version of Xcode (10.1) was no

Sound and the Xcode simulator

2020-04-18 Thread Graham Samuel via use-livecode
This is a simple one.

I have a sound (and audioclip) that plays in the IDE (it’s a WAV), but when I 
try it in the iPhone simulator it doesn’t play. The simulated phone is not 
silent and has a decent amount of sound volume. I have tried both ‘System’ and 
‘Internal Speakers’ as outputs from the simulator. 

Is this my fault or the simulator’s?

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sound and the Xcode simulator

2020-04-19 Thread Graham Samuel via use-livecode
My script (which works fine in the IDE) is just

  play audioclip  “myClip.wav" looping


The audioclip is certainly there in the stack, and that snippet can be run in 
the message box. It can be stopped by

play stop

Is this stuff not available on mobile? After all, phones make sounds!

Graham

> On 19 Apr 2020, at 04:03, J. Landman Gay via use-livecode 
>  wrote:
> 
> Are you using a scripted player?
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On April 18, 2020 4:19:52 PM Graham Samuel via use-livecode 
>  wrote:
> 
>> This is a simple one.
>> 
>> I have a sound (and audioclip) that plays in the IDE (it’s a WAV), but when 
>> I try it in the iPhone simulator it doesn’t play. The simulated phone is not 
>> silent and has a decent amount of sound volume. I have tried both ‘System’ 
>> and ‘Internal Speakers’ as outputs from the simulator.
>> 
>> Is this my fault or the simulator’s?
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sound and the Xcode simulator

2020-04-19 Thread Graham Samuel via use-livecode
Oops, read Jacque’s email first. I replied that I am using an audioclip - in an 
earlier conversation, it seemed that people were saying that if you want to 
embed a sound (rather than have it as a file) then it can’t be an mp3. In fact 
I’d started with an mp3 and had to grumpily change it to WAV to get it to sound 
using the “play audioclip” statement. 

However, I just did a lot more research in the LC dictionary and elsewhere and 
I think what I want is accomplished using ‘beep’ and ‘the beepsound’. This 
apparently works uniquely for iOS. If I ever get to Android I will probably 
have to do something different, but first things first.

Woo hoo - just about to try it.

Graham

> On 19 Apr 2020, at 01:41, Mark Talluto via use-livecode 
>  wrote:
> 
> On Apr 18, 2020, at 2:17 PM, Graham Samuel via use-livecode 
>  wrote:
>> 
>> This is a simple one.
>> 
>> I have a sound (and audioclip) that plays in the IDE (it’s a WAV), but when 
>> I try it in the iPhone simulator it doesn’t play. The simulated phone is not 
>> silent and has a decent amount of sound volume. I have tried both ‘System’ 
>> and ‘Internal Speakers’ as outputs from the simulator. 
>> 
>> Is this my fault or the simulator’s?
> 
> Hi Graham,
> 
> iOS can not play WAV sounds. You will need to convert the sound file to 
> another format like mp3.
> 
> Best regards,
> 
> Mark Talluto
> livecloud.io <http://livecloud.io/>
> nursenotes.net <http://nursenotes.net/>
> canelasoftware.com <http://www.canelasoftware.com/>
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
When doing standalone settings for mobile, if one chooses to copy files  where 
do they go? My simulator setup is having a meltdown at present so it’s hard to 
test. I hope it’s the ‘resources’ folder. LC docs don’t say AFAICS.

Graham

Sent from my iPhone
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
Thanks Klaus. I am parking a sound in there and obviously only reading it, so 
should be OK. My mysterious unresponsiveness in my app must be something else...

Keep safe 

Graham

Sent from my iPhone

> On 19 Apr 2020, at 13:40, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 13:34 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> When doing standalone settings for mobile, if one chooses to copy files  
>> where do they go? My simulator setup is having a meltdown at present so it’s 
>> hard to test. I hope it’s the ‘resources’ folder. LC docs don’t say AFAICS.
> 
> yes, everything you add to our app via the "Copy files" tab in the 
> "Standalone Application Settings"
> will be found in the runtime in  -> specialfolderpath("resources") on ANY 
> platform!
> 
> Hint:
> We are not allowed to write in that folder and even opening a database here 
> is considered
> "writing" and will fail.
> 
> So if you have a database (SQLite) file in your app, you need to copy it to 
> the users DOCUMENTS
> folder first and open it there!
> 
>> Graham
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
Hi Klaus

Thanks for your continued interest. In fact I got it working! As stated 
earlier, I converted my sound to .m4a (there are internet services for this 
kind of conversion) and included it in the Standalone Copy Files section.

I have this in the OpenStack handler of the main stack of the app (there is 
only one stack).

put specialFolderPath("resources") & “/MySound.m4a" into tBeepPath
set the beepsound to tBeepPath
beep 3 — as a test

I ran it on the iPhone simulator and it did beep! I have something wrong 
further on in my app when the beep is supposed to react as an alarm, but it 
isn’t the sound itself. 

I am struggling with these additional problems and will almost certainly be 
asking for more advice shortly!

Thanks again for your help.

Graham


> On 19 Apr 2020, at 14:13, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 13:46 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> Thanks Klaus. I am parking a sound in there and obviously only reading it, 
>> so should be OK.
> 
> yep!
> 
>> My mysterious unresponsiveness in my app must be something else...
> 
> Hm, what fileformat are you using and what is the syntax in your script?
> 
>> Keep safe 
> 
> You BET! :-)
> 
>> Graham
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


What makes everything on a card unresponsive?

2020-04-19 Thread Graham Samuel via use-livecode
Sorry to trouble this list yet again, but the main screen (in fact the the 
first card) in my mobile app has a “settings” graphic which acts as a button 
which to take the user to a ‘menu’ card. That card contains buttons and 
graphics which lead on (via very simple MouseUp handlers) to specialised menu 
actions, each on its own card. One can return to the main screen from each of 
these action cards.

When I run my app in the iPhone simulator, the activities on the main screen 
all work, with buttons, fields etc. When I click on the ‘go to menu card’ 
graphic, that always works. But when I get there, sometimes some of the menu 
buttons work, but sometimes the whole card becomes unresponsive, so that none 
of the buttons work, not even a ‘cancel’ button whose job is just to go back to 
the main screen. This didn’t used to happen, so I have messed up somehow. But 
my question is, what sort of action would make an entire card unresponsive? 
Maybe the app is stuck doing something I can’t see, but what could it be?

Any ideas welcome, including a debugging strategy.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What makes everything on a card unresponsive?

2020-04-19 Thread Graham Samuel via use-livecode
Hard to extract, but I have a new idea - what if the message queue is being 
swamped? I have flimsy evidence that the simulator is generating 
locationChanged message (odd, because I don’t think it really has changed). Can 
I interrogate the queue?

Just feeling my way.

Graham

Sent from my iPhone

> On 19 Apr 2020, at 20:02, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 19:34 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> Sorry to trouble this list yet again, but the main screen (in fact the the 
>> first card) in my mobile app has a “settings” graphic which acts as a button 
>> which to take the user to a ‘menu’ card. That card contains buttons and 
>> graphics which lead on (via very simple MouseUp handlers) to specialised 
>> menu actions, each on its own card. One can return to the main screen from 
>> each of these action cards.
>> 
>> When I run my app in the iPhone simulator, the activities on the main screen 
>> all work, with buttons, fields etc. When I click on the ‘go to menu card’ 
>> graphic, that always works. But when I get there, sometimes some of the menu 
>> buttons work, but sometimes the whole card becomes unresponsive, so that 
>> none of the buttons work, not even a ‘cancel’ button whose job is just to go 
>> back to the main screen. This didn’t used to happen, so I have messed up 
>> somehow. But my question is, what sort of action would make an entire card 
>> unresponsive? Maybe the app is stuck doing something I can’t see, but what 
>> could it be?
>> 
>> Any ideas welcome, including a debugging strategy.
>> 
>> Graham
> 
> any script? card, front, back, behavior?
> A loop that can get stuck?
> Accessing a file that is not there?
> 
> Maybe you can post your card script of the "menu card".
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Native Switch Button Widget [was: Re: What makes everything on a card unresponsive?]

2020-04-20 Thread Graham Samuel via use-livecode
My ideas were wrong. What I think now was that the whole of my app was halted 
by the existence of a Native Switch Button widget on the card I was trying to 
go to. I am not sure if I have time to prepare a proper bug report, but i found 
it by a process of elimination of all other objects on the card. Of course the 
widget might work in other circumstances. I will try to do a few more tests.

Has anyone any experience of using this widget successfully? Perhaps I  need to 
start another conversation about these Native-look widgets.

Graham

> On 19 Apr 2020, at 21:28, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 21:16 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> Hard to extract, but I have a new idea - what if the message queue is being 
>> swamped? I have flimsy evidence that the simulator is generating 
>> locationChanged message (odd, because I don’t think it really has changed). 
>> Can I interrogate the queue?
> 
> not sure, but I don't think so.
> 
>> Just feeling my way.
> 
> What if you comment out the "locationchanged" handler?
> 
>> Graham
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Issues with Mobile Native controls

2020-04-20 Thread Graham Samuel via use-livecode
I’ve recently bought Mobile Native Essential pack in a slightly desperate 
attempt to get my mobile app look more native, but I’ve had trouble with the 
bits I’ve used:

Labels - sometimes are not visible even when the vis is definitely true; 
strange scheme which means that the name you give it is the same as the name 
displayed, leading to very much deprecated names with spaces in them.

Switch - caused a (simulated) version of my app to seize up. As a test, I tried 
to open a card containing just that one object and it zonked the app. I will be 
reporting this, but of course wonder it it’s something I’ve done.

Outside the paid-for pack, I also have issues with the native button (doesn’t 
look all that native in iOS) and the navigation bar (eccentric choice of icons 
IMHO, and no apparent way of adding to them).

I don’t really want to moan but I would like to see some improvement. Is this 
list a good place to discuss these issues?

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Issues with Mobile Native controls

2020-04-20 Thread Graham Samuel via use-livecode
Thanks Brian, that looks really useful. I am looking for icons that are tools, 
such as for settings (often a cogwheel or a set of horizontal bars) and stuff 
like that - anyway I will have a good look. I am very pleased that the system 
is more flexible than I first thought, since it isn’t mentioned in the 
dictionary entry for the Navigation Bar. Maybe I can report this as a needed 
documentation enhancement. As you have noticed from my earlier mails, it is a 
tough job for a mobile newbie (if you know what I mean!) to find out how to 
make his or her app look like a native product. I am still a very long way from 
this.

Cheers

Graham

> On 20 Apr 2020, at 15:05, Brian Milby via use-livecode 
>  wrote:
> 
> Icons can be updated to anything you want.  See this thread about the SVG
> Icon Tool that I developed.  The package on my website has a large number
> of icons included that you can browse and combine into your own Icon Family.
> 
> http://forums.livecode.com/viewtopic.php?f=10&t=30411
> 
> Once you change the default family, then those icons are visible from the
> chooser in the PI.
> 
> On Mon, Apr 20, 2020 at 6:30 AM Graham Samuel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> I’ve recently bought Mobile Native Essential pack in a slightly desperate
>> attempt to get my mobile app look more native, but I’ve had trouble with
>> the bits I’ve used:
>> 
>> Labels - sometimes are not visible even when the vis is definitely true;
>> strange scheme which means that the name you give it is the same as the
>> name displayed, leading to very much deprecated names with spaces in them.
>> 
>> Switch - caused a (simulated) version of my app to seize up. As a test, I
>> tried to open a card containing just that one object and it zonked the app.
>> I will be reporting this, but of course wonder it it’s something I’ve done.
>> 
>> Outside the paid-for pack, I also have issues with the native button
>> (doesn’t look all that native in iOS) and the navigation bar (eccentric
>> choice of icons IMHO, and no apparent way of adding to them).
>> 
>> I don’t really want to moan but I would like to see some improvement. Is
>> this list a good place to discuss these issues?
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Issues with Mobile Native controls

2020-04-20 Thread Graham Samuel via use-livecode
Just a quick addition - it’s a whole world out there, isn’t it? I am so behind 
the curve… anyway very useful. I am not sure why so many icon designers go for 
chunky designs - it’s as if they preferred bold type over regular. The little 
icons at the top and bottom of the screen in your own tool are more my style! 
But I suppose that’s just a personal preference.

Thanks again for all this.

Graham

> On 20 Apr 2020, at 15:39, Graham Samuel via use-livecode 
>  wrote:
> 
> Thanks Brian, that looks really useful. I am looking for icons that are 
> tools, such as for settings (often a cogwheel or a set of horizontal bars) 
> and stuff like that - anyway I will have a good look. I am very pleased that 
> the system is more flexible than I first thought, since it isn’t mentioned in 
> the dictionary entry for the Navigation Bar. Maybe I can report this as a 
> needed documentation enhancement. As you have noticed from my earlier mails, 
> it is a tough job for a mobile newbie (if you know what I mean!) to find out 
> how to make his or her app look like a native product. I am still a very long 
> way from this.
> 
> Cheers
> 
> Graham
> 
>> On 20 Apr 2020, at 15:05, Brian Milby via use-livecode 
>>  wrote:
>> 
>> Icons can be updated to anything you want.  See this thread about the SVG
>> Icon Tool that I developed.  The package on my website has a large number
>> of icons included that you can browse and combine into your own Icon Family.
>> 
>> http://forums.livecode.com/viewtopic.php?f=10&t=30411
>> 
>> Once you change the default family, then those icons are visible from the
>> chooser in the PI.
>> 
>> On Mon, Apr 20, 2020 at 6:30 AM Graham Samuel via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> I’ve recently bought Mobile Native Essential pack in a slightly desperate
>>> attempt to get my mobile app look more native, but I’ve had trouble with
>>> the bits I’ve used:
>>> 
>>> Labels - sometimes are not visible even when the vis is definitely true;
>>> strange scheme which means that the name you give it is the same as the
>>> name displayed, leading to very much deprecated names with spaces in them.
>>> 
>>> Switch - caused a (simulated) version of my app to seize up. As a test, I
>>> tried to open a card containing just that one object and it zonked the app.
>>> I will be reporting this, but of course wonder it it’s something I’ve done.
>>> 
>>> Outside the paid-for pack, I also have issues with the native button
>>> (doesn’t look all that native in iOS) and the navigation bar (eccentric
>>> choice of icons IMHO, and no apparent way of adding to them).
>>> 
>>> I don’t really want to moan but I would like to see some improvement. Is
>>> this list a good place to discuss these issues?
>>> 
>>> Graham
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Issues with Mobile Native controls

2020-04-20 Thread Graham Samuel via use-livecode
Yes, I was probably quite hasty paying for it - if it’s in beta still after two 
years, it looks kind of abandoned. I would certainly say it looks unfinished, 
even though the individual widgets are described in the LC dictionary. And in 
my environment, which is not new but not that old, the switch widget crashed 
the simulator (LC Support- thank you Elanor - are looking at that one). Maybe I 
just went down the wrong path. As previously discussed, it seems getting on for 
impossible to quickly make an LC iPhone app look reasonably familiar to a 
typically iPhone user.

Graham

> On 20 Apr 2020, at 21:43, matthias rebbe via use-livecode 
>  wrote:
> 
> I´ve purchased it already in 2018. In my account it shows now version 1.0.0, 
> but the download is still the same  beta as the one from 2018 when it was 
> released. The files are still from 2018. Maybe the people at LC did not 
> update the d/l link. I will ask Heather by e-mail tomorrow.
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 20.04.2020 um 21:28 schrieb Mark Wieder via use-livecode 
>> :
>> 
>> On 4/20/20 12:05 PM, matthias rebbe via use-livecode wrote:
>>> It´s from Todd Fabacher and his team.
>>> And here´s a link to  a discussion about it in this list
>>> https://www.mail-archive.com/use-livecode@lists.runrev.com/msg93988.html
>> 
>> OK - now I looked as well. Still not sure what that is. The description says 
>> "This package is currently in beta, all purchasers will receive any updates 
>> available up to the full version 1 release, free". There's only one review, 
>> and that one is from two years ago and asks as question that hasn't been 
>> answered. Still in beta at version 0.5.0?
>> 
>> -- 
>> Mark Wieder
>> ahsoftw...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Issues with Mobile Native controls

2020-04-20 Thread Graham Samuel via use-livecode
Well, looking at my iPhone, there are many many designs for apps, but there are 
very often (OK, not always) tidy little icons which lead to 
settings/preferences or give information, or make it clear that you can close 
something. I don’t know if my finger uses them as buttons exactly, but I find 
the idea of touching one to make something happen to be perfectly intuitive. 
And nearly always these are unclunky little objects taking up a minimum of 
screen real estate. I would like there to be a library of such things, and 
hoped they’d be SVGs. Still hoping.

Graham

> On 20 Apr 2020, at 21:19, Mark Wieder via use-livecode 
>  wrote:
> 
> On 4/20/20 10:53 AM, Sannyasin Brahmanathaswami via use-livecode wrote:
> 
>> I know Apple and Google have designs that are looking for the "Wow, new 
>> look!" ...  but frankly e.g. their flat new button style (we used in the web 
>> for a recent UI) ... people did realize it was a button! To make such a 
>> subtle distinction (graphically) between a "touch link" and  "label" gets 
>> you nothing but N number of people not clinking!
> 
> One of the basic tenets of UX design is "make buttons look like buttons"
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What makes everything on a card unresponsive?

2020-04-20 Thread Graham Samuel via use-livecode
Thanks Mark - I am very glad you reminded me of the way puts go into the 
console window. I knew about that once (two or three  years ago, when I last 
tried to do a mobile app) and just forgot about it. I have kind of emerged, 
blinking, into the light after being in the dark for a long time.

I also do the trick of having a “debug” scrolling field on the most frequently 
seen card, and I have a tiny handler which accepts text and puts it into the 
next line of the field. When the app goes live, I can remove all the calls to 
the handler or simply arrange for the handler to have nothing in its script - 
the speed hit on the kind of app I’m interested is negligible, I find. And I 
also use ‘answe'r in an emergency, tho of course it disrupts the flow of the 
app.

I think the remote debugger doesn’t work with Indy, but i’ll check.

By the way I traced down the actual problem I had when I wrote my original mail 
in this conversation, using the methods you mention. It seems to be something 
to do with a widget that’s supposed to provide a native-appearance switch. I 
have isolated it and can continue to work in other ways for a time.

Thanks very much for the input.

Graham

> On 20 Apr 2020, at 20:25, Mark Talluto via use-livecode 
>  wrote:
> 
> On Apr 19, 2020, at 10:34 AM, Graham Samuel via use-livecode 
>  wrote:
>> 
>> Any ideas welcome, including a debugging strategy.
> 
> I use:
> 
> --quick a dirty value check
> answer “VariableName:” && tVariable
> 
> —did my code get this far
> answer “Handler name, label that may provide extra context”
> 
> —breakpoints
> Sometimes the remote debugger works and sometimes it doesn’t. When it does, 
> you breakpoint will fire in your app and show up in the LC IDE
> 
> —console
> You can open the console app on your Mac. On the left side of the console, 
> you will see your plugged in device. Click on that.
> Any empty puts like:  put “My code got this far”
> These will output to your console.
> 
> —debug field
> I put a field called “debug” on a card I am working on. I can output what I 
> want to that field when I want to check the state of things.
> 
> These are some tools I use to work on mobile. 
> 
> Best regards,
> 
> Mark Talluto
> livecloud.io <http://livecloud.io/>
> nursenotes.net <http://nursenotes.net/>
> canelasoftware.com <http://www.canelasoftware.com/>
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Issues with Mobile Native controls

2020-04-21 Thread Graham Samuel via use-livecode
I’ve got ‘Switch Button’ and a ‘Native Switch Button’ in the LC toolbox. Not 
sure which one you are talking about.

The second one came with the widget set I bought, I think. Anyway it has caused 
me a lot of trouble with the iOS simulator, but that may be because the 
environment I’m working in is rather out of date apart from LC itself (I’m 
using 9.5.1). LC Support are looking at it for me, but I already guess that 
they will say “it works here”, since they will be running the latest version of 
XCode etc. which is not permitted with my setup.

Graham

> On 21 Apr 2020, at 02:37, J. Landman Gay via use-livecode 
>  wrote:
> 
> The one I mean is actually a widget but we're probably talking about the same 
> thing. I like it because you can set the theme and it displays correctly for 
> either iOS or Android.
> 
> I'd love to see more themed widgets like that, maybe a mobileButton widget 
> for example.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On April 20, 2020 6:24:48 PM Rick Harrison via use-livecode 
>  wrote:
> 
>> Are you referring to the switch button?
>> If so, yes it is in Indy.
>> 
>> Rick
>> 
>>> On Apr 20, 2020, at 5:48 PM, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> I've used LC's built-in switch widget without any problems. I don't know if 
>>> that's included in Indy though.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


What's a Capability in an Apple Provisioning Profile?

2020-04-21 Thread Graham Samuel via use-livecode
I’m trying to get my iOS app, now ready for beta test, transferred to an actual 
phone, after what I think are all the earlier steps both in the Apple 
certification system (Franz Kafka would be proud!) and in LC and in the 
simulator. I have also tried to follow advice generously given on this list, 
especially from Bill Prothero.

However, XCode refuses to put my app on the phone, and among other things seems 
to suggest that my Profile doesn’t have the right Capabilities. But when I 
return to the Apple Developer profile and look at the Profile I generated, sure 
enough it says ‘Enabled Capabilities: none’, but the editing function for the 
Profile doesn’t give an option to add any.

Does anyone know what a Capability is in this context, whether I need one, and 
if so, what to do to get one (or more)? If i don’t need one, why is Xcode 
complaining?

It is so hard to keep going in these circumstances.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What's a Capability in an Apple Provisioning Profile?

2020-04-21 Thread Graham Samuel via use-livecode
I kind of answered my own question: the Capabilities are not available via the 
editing function of the Provisioning Profile, but are associated with something 
called the App ID Configuration (why?). However, most of the capabilities are 
greyed out for me (why?) and those that could be added aren’t interesting for 
my particular app (iCloud for example). The mystery remains. I’m beginning to 
wonder whether LC somehow expects one to have added Capabilities for its own 
reasons. LC does do some mysterious things such as code signing without the 
developers intervention, so maybe.

But I am still stuck and would still like someone who actually understands 
Capabilities to explain them.

Graham

> On 21 Apr 2020, at 15:11, Graham Samuel via use-livecode 
>  wrote:
> 
> I’m trying to get my iOS app, now ready for beta test, transferred to an 
> actual phone, after what I think are all the earlier steps both in the Apple 
> certification system (Franz Kafka would be proud!) and in LC and in the 
> simulator. I have also tried to follow advice generously given on this list, 
> especially from Bill Prothero.
> 
> However, XCode refuses to put my app on the phone, and among other things 
> seems to suggest that my Profile doesn’t have the right Capabilities. But 
> when I return to the Apple Developer profile and look at the Profile I 
> generated, sure enough it says ‘Enabled Capabilities: none’, but the editing 
> function for the Profile doesn’t give an option to add any.
> 
> Does anyone know what a Capability is in this context, whether I need one, 
> and if so, what to do to get one (or more)? If i don’t need one, why is Xcode 
> complaining?
> 
> It is so hard to keep going in these circumstances.
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What's a Capability in an Apple Provisioning Profile?

2020-04-21 Thread Graham Samuel via use-livecode
Thanks Ralph

The only even vaguely relevant one for me which is not greyed out (most are, as 
I said) is Maps. Since the app calls for GPS in the Standalone Settings, maybe 
that’s a requirement - no, hold it! The info button says it’s for MacOS only 
(really?). So still stuck. I am going to have to ask the mother ship, since

> The entitlements specified in your application’s Code Signing Entitlements 
> file are invalid, not permitted, or do not match those specified in your 
> provisioning profile. (0xE8008016).

Means nothing that I can understand.

Graham

> On 21 Apr 2020, at 16:14, Ralph DiMola via use-livecode 
>  wrote:
> 
> Graham,
> 
> Unless anything has changed since my last month's release(could be possible) 
> all I have selected is "Game Center"(can't be un-ticked), "In-App 
> Purchase"(also can't be un-ticked). All the others can be ticked and 
> optionally configured. Do you use any of the un-ticked options in your app?
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Graham Samuel via use-livecode
> Sent: Tuesday, April 21, 2020 9:36 AM
> To: How to use LiveCode
> Cc: Graham Samuel
> Subject: Re: What's a Capability in an Apple Provisioning Profile?
> 
> I kind of answered my own question: the Capabilities are not available via 
> the editing function of the Provisioning Profile, but are associated with 
> something called the App ID Configuration (why?). However, most of the 
> capabilities are greyed out for me (why?) and those that could be added 
> aren’t interesting for my particular app (iCloud for example). The mystery 
> remains. I’m beginning to wonder whether LC somehow expects one to have added 
> Capabilities for its own reasons. LC does do some mysterious things such as 
> code signing without the developers intervention, so maybe.
> 
> But I am still stuck and would still like someone who actually understands 
> Capabilities to explain them.
> 
> Graham
> 
>> On 21 Apr 2020, at 15:11, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> I’m trying to get my iOS app, now ready for beta test, transferred to an 
>> actual phone, after what I think are all the earlier steps both in the Apple 
>> certification system (Franz Kafka would be proud!) and in LC and in the 
>> simulator. I have also tried to follow advice generously given on this list, 
>> especially from Bill Prothero.
>> 
>> However, XCode refuses to put my app on the phone, and among other things 
>> seems to suggest that my Profile doesn’t have the right Capabilities. But 
>> when I return to the Apple Developer profile and look at the Profile I 
>> generated, sure enough it says ‘Enabled Capabilities: none’, but the editing 
>> function for the Profile doesn’t give an option to add any.
>> 
>> Does anyone know what a Capability is in this context, whether I need one, 
>> and if so, what to do to get one (or more)? If i don’t need one, why is 
>> Xcode complaining?
>> 
>> It is so hard to keep going in these circumstances.
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What's a Capability in an Apple Provisioning Profile?

2020-04-21 Thread Graham Samuel via use-livecode
Bill, I do really appreciate your help and Ralph’s. I admit I know nothing 
about this Apple-designed maze and somehow the whole process is so different 
from software development that it is almost impossible to learn a rational 
route through it all, so I applaud your idea that someone could provide that, 
with lots of ways of backing out of gotchas, as it were. 

In my particular case, I have definitely got an iOS Development Profile, and 
indeed no other. I have a thing called an iOS WildCard app ID as well. I have 
tried to follow your advice and clear out all my expired stuff from when I 
created desktop apps etc. But I am still stuck.

I have finally asked LC support about it, and perhaps they will have the time 
to help. If they do find a way through, then I will report back here to say how 
the problem was solved. If I can’t get anywhere, then I think I shall have to 
abandon this development. As it was supposed to be a free app, i won’t lose any 
money, but my pride will definitely be hurt! I really don’t know how much 
benefit it would have provided to my target community, but looks like I’m never 
going to find out.

Thanks for all your help so far.

Graham

> On 21 Apr 2020, at 18:36, Prothero-earthlearningsol via use-livecode 
>  wrote:
> 
> Graham,
> This is from memory. When you are in Apple’s developer portal, you choose the 
> application destination you are targeting, and when you set the capabilities, 
> they are appropriate for the destination hardware. It sounds like you chose 
> MacOS instead of Mobile, iOS. It’s really easy to skip over a detail when 
> making these provisioning decisions. Also, it’s very easy to get your latest 
> file confused with an older one, and that’s what I suspect you did. I I were 
> you, I’d clean out all the old Apple Developer generated stuff and start 
> over. That’s part of the rub. You generate files on the Developer portal, 
> they get downloaded, loaded into keychain and Xcode, stored in your library 
> and in folders generated by  livecode, and then it’s s easy to leave one 
> of those little buggers to confuse you.
> 
> It would be really nice if there was a diagram or step by step procedure that 
> takes you through, starting with cleaning out all files, that results in 
> success and shows where files are stored at each step (who would’ve thought 
> files got stored in the Library folder?). Of course, Apple’s regular updates 
> and security improvements make this more challenging. It needs to be pegged 
> at the grade-schooler level though, so we geezers can follow it. Sounds like 
> a plan for a creative app designer. But perhaps this already exists??
> 
> PS. I give Ralph DiMola a lot of credit and thanks for his insight and help. 
> Thanks, Ralph!
> 
> Best,
> Bill
> 
> William Prothero
> http://es.earthednet.org
> 
>> On Apr 21, 2020, at 9:04 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Thanks Ralph
>> 
>> The only even vaguely relevant one for me which is not greyed out (most are, 
>> as I said) is Maps. Since the app calls for GPS in the Standalone Settings, 
>> maybe that’s a requirement - no, hold it! The info button says it’s for 
>> MacOS only (really?). So still stuck. I am going to have to ask the mother 
>> ship, since
>> 
>>> The entitlements specified in your application’s Code Signing Entitlements 
>>> file are invalid, not permitted, or do not match those specified in your 
>>> provisioning profile. (0xE8008016).
>> 
>> Means nothing that I can understand.
>> 
>> Graham
>> 
>>> On 21 Apr 2020, at 16:14, Ralph DiMola via use-livecode 
>>>  wrote:
>>> 
>>> Graham,
>>> 
>>> Unless anything has changed since my last month's release(could be 
>>> possible) all I have selected is "Game Center"(can't be un-ticked), "In-App 
>>> Purchase"(also can't be un-ticked). All the others can be ticked and 
>>> optionally configured. Do you use any of the un-ticked options in your app?
>>> 
>>> Ralph DiMola
>>> IT Director
>>> Evergreen Information Services
>>> rdim...@evergreeninfo.net
>>> 
>>> -Original Message-
>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
>>> Of Graham Samuel via use-livecode
>>> Sent: Tuesday, April 21, 2020 9:36 AM
>>> To: How to use LiveCode
>>> Cc: Graham Samuel
>>> Subject: Re: What's a Capability in an Apple Provisioning Profile?
>>> 
>>> I kind of answered my own question: the Capabilities are not available via 
>>> the editing function of the Provisioning Profile, but are associat

Re: Issues with Mobile Native controls

2020-04-21 Thread Graham Samuel via use-livecode
Yes, it was the “native” one. 

I caused the error which I saw by creating an infinite loop. I did not realise 
that the ‘hiliteChanged’ message is sent after the graphic representation of 
the switch has been changed within the widget itself, so I scripted:
   on hiliteChanged

  set the highlight of me to not the highlight of me

   end hiliteChanged

By doing that I generated another hiliteChanged message, and so an infinitum. 
It was slightly less obvious than it might have been because the test started 
on a card with a button scripted"

  go cd “testCard”

which was supposed to show the card with the switch on it. This doesn’t happen 
in this case - the screen freezes before the ‘go’ is actioned, so it looks like 
we never left the first card.

It was Elanor at LiveCode who explained that to me. I am somewhat embarrassed, 
but it may help someone else to know what I did wrong.

Graham

PS This widget has a property ‘highlight’ and a message ‘hiliteChanged’. I 
think the spelling should be consistent.

> On 21 Apr 2020, at 19:04, J. Landman Gay via use-livecode 
>  wrote:
> 
> I think you're right, the "native" switch is the one you bought. I've had no 
> issues with the one that comes with LC.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On April 21, 2020 4:19:45 AM Graham Samuel via use-livecode 
>  wrote:
> 
>> I’ve got ‘Switch Button’ and a ‘Native Switch Button’ in the LC toolbox. Not 
>> sure which one you are talking about.
>> 
>> The second one came with the widget set I bought, I think. Anyway it has 
>> caused me a lot of trouble with the iOS simulator, but that may be because 
>> the environment I’m working in is rather out of date apart from LC itself 
>> (I’m using 9.5.1). LC Support are looking at it for me, but I already guess 
>> that they will say “it works here”, since they will be running the latest 
>> version of XCode etc. which is not permitted with my setup.
>> 
>> Graham
>> 
>>> On 21 Apr 2020, at 02:37, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> The one I mean is actually a widget but we're probably talking about the 
>>> same thing. I like it because you can set the theme and it displays 
>>> correctly for either iOS or Android.
>>> 
>>> I'd love to see more themed widgets like that, maybe a mobileButton widget 
>>> for example.
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On April 20, 2020 6:24:48 PM Rick Harrison via use-livecode 
>>>  wrote:
>>> 
>>>> Are you referring to the switch button?
>>>> If so, yes it is in Indy.
>>>> 
>>>> Rick
>>>> 
>>>>> On Apr 20, 2020, at 5:48 PM, J. Landman Gay via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> I've used LC's built-in switch widget without any problems. I don't know 
>>>>> if that's included in Indy though.
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode
As usual, the problem will be my fault, but I can’t get a mobile input field to 
appear on a card. I’m debugging it at present, which explains the answer 
statement:

on opencard -- we dynamically create a field for the user to key in
 global sinputID -- this is all from the LC lesson. It’s a global because I 
need to refer to it in a button later
 if environment() = "mobile" then
 mobileControlCreate "input", "FMyText" -- so the user can type in
 put the result into sinputID — the Dictionary doesn’t mention ‘the 
result’ but it does seem to be right
 answer "opening text field for input. ID created is:" && sinputID
mobileControlSet sinputID, "rect", “114,135,163,158” — this is a real 
location on the card
mobileControlSet sinputID, "visible", "true"
mobileControlSet sinputID, "opaque", "true"
  end if
end opencard


As far as I’m concerned this comes straight out of the LC dictionary. When I 
run this in the iPhone simulator, it the ‘answer’ fires, and the ID is 1. But 
nothing appears on the card.

Can anyone explain what I’m doing wrong this time? I seem to have a lot of 
trouble getting dynamic elements like fields, keyboards and selection scrollers 
to appear, but the above is the simplest problem I have in that line.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode
 Reading your response, Mark, I didn't feel so bad, since the LC Dictionary 
says for example about mobileControlSet

 syntax: mobileControlSet idOrName, PropertyName, value

and later explains

 idOrName  - the id or name of the control

So I therefore saw the two ways of referring to the control as apparently 
interchangeable.

However, I changed my openCard handler according to your suggestion and nothing 
at all changed. I think there must be some other factor, but as usual I just 
can’t see it.

Just to labour the point, here is my actual handler with the original names in 
place. The answer call works as expected:

on opencard -- we dynamically create a field for the user to key in the radius

global sinputID -- this is all from the LC lesson

   if environment() = "mobile" then

  mobileControlCreate "input", "FRadiusText" -- so the user can type in

  put the result into sinputID

  answer "opening text field for radius input. ID created is:" && sinputID 
&& "Name is:" && "FRadiusText"

 mobileControlSet "FRadiusText", "rect", "114,135,163,158" -- this is where 
the original rect was

  mobileControlSet "FRadiusText", "visible", "true"

  mobileControlSet "FRadiusText", "opaque", "true"

end if

end opencard


Still puzzled

Graham

> On 22 Apr 2020, at 18:34, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2020-04-22 17:00, Graham Samuel via use-livecode wrote:
>> As usual, the problem will be my fault, but I can’t get a mobile input
>> field to appear on a card. I’m debugging it at present, which explains
>> the answer statement:
>>on opencard -- we dynamically create a field for the user to key in
>> global sinputID -- this is all from the LC lesson. It’s a global
>> because I need to refer to it in a button later
>> if environment() = "mobile" then
>> mobileControlCreate "input", "FMyText" -- so the user can type in
>> put the result into sinputID — the Dictionary doesn’t mention
>> ‘the result’ but it does seem to be right
>> answer "opening text field for input. ID created is:" && sinputID
>>mobileControlSet sinputID, "rect", “114,135,163,158” — this is
>> a real location on the card
>>mobileControlSet sinputID, "visible", "true"
>>mobileControlSet sinputID, "opaque", "true"
>>  end if
>> end opencard
> 
> I'm pretty sure if you give your mobileControl a name (FMyText) in this case, 
> then that is the only way you can refer to it. You can only use 'the result' 
> of the Create function *if* you didn't give it a name.
> 
> So you need to do either:
> 
>  mobileControlCreate "input", "FMyText"
>  mobileControlSet "FMyText", ...
> 
> OR
> 
>  mobileControlCreate "input"
>  put the result into sinputID
>  mobileControlSet sinputID, ...
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Fwd: Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode


Sent from my iPad

Begin forwarded message:

> From: Graham Samuel 
> Date: 22 April 2020 at 22:14:37 CEST
> To: Mark Waddingham 
> Subject: Re:  Mobile text input mystery
> 
> Thanks Mark. Although making the field opaque wasn’t enough, giving it a 
> black border worked and I can now see it. I can edit it with the mouse, and I 
> can even put something in it with
> 
>  mobileControlSet "FRadiusText", "text", "1.0"
> 
> but despite executing
> 
>  mobileControlSet "FRadiusText", "keyboardType", "numeric"
>  mobileControlDo "FRadiusText", "focus"
> 
> following what the  LC Dictionary says , I do not see the soft keyboard, nor 
> does a subsequent
> 
>  mobileControlGet "FRadiusText", "text"
> 
> ever result in anything but empty even though I can see a text in the native 
> field object.
> 
> But I can’t keep asking questions. I’ll just tinker as usual and hope to get 
> a result.
> 
> Thanks again
> 
> Graham
> 
>> On 22 Apr 2020, at 19:52, Mark Waddingham  wrote:
>> 
>>> On 2020-04-22 18:38, Graham Samuel wrote:
>>> Reading your response, Mark, I didn't feel so bad, since the LC
>>> Dictionary says for example about mobileControlSet
>>> syntax: mobileControlSet idOrName, PropertyName, value
>>> and later explains
>>> idOrName  - the id or name of the control
>>> So I therefore saw the two ways of referring to the control as
>>> apparently interchangeable.
>> 
>> It is - apologies - the engine does look up both by id or name...
>> 
>> Do you see something if you also set the 'text' property?
>> 
>> There's also the 'borderStyle' property too.
>> 
>> My hunch is that something is there, but the background color is the same as 
>> the card, the border style is none and it has no content so it looks like 
>> nothing is there?
>> 
>> Warmest Regards,
>> 
>> Mark.
>> 
>> -- 
>> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
>> LiveCode: Everyone can create apps
> 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Native Switch Button?

2020-04-23 Thread Graham Samuel via use-livecode
Is anyone using the Native Switch Button? It looks OK (a bit big on my iOS 
simulator, but it will do) and it works - although the insanity of spelling 
“highlight” two ways in the one object is apparent - but running an experiment 
just now in which I go to a card with such an on object on it and not much 
else, certainly nothing in the card script, a ‘hiliteChanged’ event is 
triggered even though AFAIKS the highlight (see what I did there?) hasn’t 
changed.

Is this expected behaviour? I can’t really believe it, but as usual I can’t see 
what i’m doing wrong. I certainly don’t want the message to be triggered unless 
the user touches the screen or I deliberately change the state by script.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Native Switch Button?

2020-04-23 Thread Graham Samuel via use-livecode
To add to my query below, there’s something even more strange. In my beta app 
there is a card with three Native Switch Buttons on it (they all have different 
names). i have another test card, as described before, with its own switch. 
When a button script on yet another card executes a ‘go' to the 3-switch card, 
the hiliteChanged handler in the test card fires, even though the card isn’t 
open! Again, the switch on this card has a different name - I read somewhere 
that widget names have to be unique - but this CAN’T be expected behaviour, can 
it? I am about to issue a bug report, but it may take too long to get a recipe.

Graham

> On 23 Apr 2020, at 11:28, Graham Samuel via use-livecode 
>  wrote:
> 
> Is anyone using the Native Switch Button? It looks OK (a bit big on my iOS 
> simulator, but it will do) and it works - although the insanity of spelling 
> “highlight” two ways in the one object is apparent - but running an 
> experiment just now in which I go to a card with such an on object on it and 
> not much else, certainly nothing in the card script, a ‘hiliteChanged’ event 
> is triggered even though AFAIKS the highlight (see what I did there?) hasn’t 
> changed.
> 
> Is this expected behaviour? I can’t really believe it, but as usual I can’t 
> see what i’m doing wrong. I certainly don’t want the message to be triggered 
> unless the user touches the screen or I deliberately change the state by 
> script.
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Just tried it after switching to LC9.6.0 DP4 - no change. I’m keen to see if 
you can indeed reproduce it.

Graham

> On 23 Apr 2020, at 13:03, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> Oh, ignore my previous comment about mobileControlDo , "focus",
> as this bug affected Android only.
> 
> I'll try to reproduce the recipe here and see if I get the same problem.
> 
> Kind regards,
> Panos
> --
> 
> 
> On Thu, 23 Apr 2020 at 13:54, panagiotis merakos  wrote:
> 
>> Hello Graham,
>> 
>> 
>> 
>> 
>> 
>> 
>> *> but despite executing> >  mobileControlSet "FRadiusText",
>> "keyboardType", "numeric">  mobileControlDo "FRadiusText", "focus"> >
>> following what the  LC Dictionary says , I do not see the soft keyboard*
>> 
>> This will not work in LC 9.5.1 - it is an old bug that is fixed in LC 9.6
>> DP-3:
>> 
>> https://github.com/livecode/livecode/pull/7259
>> 
>> *>>nor does a subsequent*
>> 
>> *>  mobileControlGet "FRadiusText", "text"> ever result in anything but
>> empty even though I can see a text in the native field object.*
>> 
>> Are you calling mobileControlGet "FRadiusText", "text" from the same
>> handler that has created the mobile input field, or from a different one?
>> 
>> Kind regards,
>> Panos
>> --
>> 
>> On Wed, 22 Apr 2020 at 23:39, Graham Samuel via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> 
>>> 
>>> Sent from my iPad
>>> 
>>> Begin forwarded message:
>>> 
>>>> From: Graham Samuel 
>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>> To: Mark Waddingham 
>>>> Subject: Re:  Mobile text input mystery
>>>> 
>>>> Thanks Mark. Although making the field opaque wasn’t enough, giving it
>>> a black border worked and I can now see it. I can edit it with the mouse,
>>> and I can even put something in it with
>>>> 
>>>> mobileControlSet "FRadiusText", "text", "1.0"
>>>> 
>>>> but despite executing
>>>> 
>>>> mobileControlSet "FRadiusText", "keyboardType", "numeric"
>>>> mobileControlDo "FRadiusText", "focus"
>>>> 
>>>> following what the  LC Dictionary says , I do not see the soft
>>> keyboard, nor does a subsequent
>>>> 
>>>> mobileControlGet "FRadiusText", "text"
>>>> 
>>>> ever result in anything but empty even though I can see a text in the
>>> native field object.
>>>> 
>>>> But I can’t keep asking questions. I’ll just tinker as usual and hope
>>> to get a result.
>>>> 
>>>> Thanks again
>>>> 
>>>> Graham
>>>> 
>>>>> On 22 Apr 2020, at 19:52, Mark Waddingham  wrote:
>>>>> 
>>>>>> On 2020-04-22 18:38, Graham Samuel wrote:
>>>>>> Reading your response, Mark, I didn't feel so bad, since the LC
>>>>>> Dictionary says for example about mobileControlSet
>>>>>> syntax: mobileControlSet idOrName, PropertyName, value
>>>>>> and later explains
>>>>>> idOrName  - the id or name of the control
>>>>>> So I therefore saw the two ways of referring to the control as
>>>>>> apparently interchangeable.
>>>>> 
>>>>> It is - apologies - the engine does look up both by id or name...
>>>>> 
>>>>> Do you see something if you also set the 'text' property?
>>>>> 
>>>>> There's also the 'borderStyle' property too.
>>>>> 
>>>>> My hunch is that something is there, but the background color is the
>>> same as the card, the border style is none and it has no content so it
>>> looks like nothing is there?
>>>>> 
>>>>> Warmest Regards,
>>>>> 
>>>>> Mark.
>>>>> 
>>>>> --
>>>>> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
>>>>> LiveCode: Everyone can create apps
>>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Sorry Panos, my short email crossed with your long one. I am trying all your 
suggestions now!

Graham

> On 23 Apr 2020, at 13:39, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> The following works as expected for me:
> 
> on opencard
>   global gInputID
>   if environment() = "mobile" then
>  mobileControlCreate "input" -- so the user can type in
>  put the result into gInputID
>  answer "opening text field for input. ID created is:" && gInputID
>  mobileControlSet gInputID, "rect", "114,135,163,158"
>  mobileControlSet gInputID, "visible", "true"
>  mobileControlSet gInputID, "opaque", "true"
>  mobileControlSet gInputID, "borderstyle", "line"
>   end if
> end opencard
> 
> also I have added two buttons to test the other issues:
> 
> script of button 1:
> 
> on mouseup
>   local tText
>   global gInputID
>   put mobileControlGet(gInputID,"text") into tText
>   answer tText
> end mouseup
> 
> 
> script of button 2:
> 
> on mouseUp pButtonNumber
>   global gInputID
>   mobileControlSet gInputID, "keyboardType", "numeric"
>   mobileControlDo gInputID, "focus"
> end mouseUp
> 
> Also, while testing the focus, I realised that you have to enable the
> setting "Toggle Software Keyboard" in the simulator menubar (Hardware ->
> Keyboard -> Toggle Software Keyboard).
> 
> Important: Note that you have to FIRST click on the field with the mouse to
> focus it, and THEN check this option, otherwise your choice will not have
> any effect. This might be a bug in the simulator app, but once you do that,
> your choice of showing the soft keyboard will be remembered.
> 
> So now, if you add some text to the field, it will be returned correctly if
> you press the first button. Also, if you click on the second button, you
> should see a numeric soft keyboard appearing, and the field will get the
> focus.
> 
> Hope this helps.
> 
> Kind regards,
> Panos
> --
> 
> On Thu, 23 Apr 2020 at 14:03, panagiotis merakos  wrote:
> 
>> Hello Graham,
>> 
>> Oh, ignore my previous comment about mobileControlDo ,
>> "focus", as this bug affected Android only.
>> 
>> I'll try to reproduce the recipe here and see if I get the same problem.
>> 
>> Kind regards,
>> Panos
>> --
>> 
>> 
>> On Thu, 23 Apr 2020 at 13:54, panagiotis merakos 
>> wrote:
>> 
>>> Hello Graham,
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> *> but despite executing> >  mobileControlSet "FRadiusText",
>>> "keyboardType", "numeric">  mobileControlDo "FRadiusText", "focus"> >
>>> following what the  LC Dictionary says , I do not see the soft keyboard*
>>> 
>>> This will not work in LC 9.5.1 - it is an old bug that is fixed in LC 9.6
>>> DP-3:
>>> 
>>> https://github.com/livecode/livecode/pull/7259
>>> 
>>> *>>nor does a subsequent*
>>> 
>>> *>  mobileControlGet "FRadiusText", "text"> ever result in anything but
>>> empty even though I can see a text in the native field object.*
>>> 
>>> Are you calling mobileControlGet "FRadiusText", "text" from the same
>>> handler that has created the mobile input field, or from a different one?
>>> 
>>> Kind regards,
>>> Panos
>>> --
>>> 
>>> On Wed, 22 Apr 2020 at 23:39, Graham Samuel via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> 
>>>> 
>>>> Sent from my iPad
>>>> 
>>>> Begin forwarded message:
>>>> 
>>>>> From: Graham Samuel 
>>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>>> To: Mark Waddingham 
>>>>> Subject: Re:  Mobile text input mystery
>>>>> 
>>>>> Thanks Mark. Although making the field opaque wasn’t enough, giving
>>>> it a black border worked and I can now see it. I can edit it with the
>>>> mouse, and I can even put something in it with
>>>>> 
>>>>> mobileControlSet "FRadiusText", "text", "1.0"
>>>>> 
>>>>> but despite executing
>>>>> 
>>>>> mobileControlSet "FRadiusText", "keyboardType&quo

Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Thanks a million, Panos, it all works! Apart from the simulator keyboard trick, 
I can’t see immediately what I did wrong. Probably haven’t got time to crawl 
over it now… obviously I can use this as a model in any part of the app that 
needs it.

Thanks again

Graham

> On 23 Apr 2020, at 13:39, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> The following works as expected for me:
> 
> on opencard
>   global gInputID
>   if environment() = "mobile" then
>  mobileControlCreate "input" -- so the user can type in
>  put the result into gInputID
>  answer "opening text field for input. ID created is:" && gInputID
>  mobileControlSet gInputID, "rect", "114,135,163,158"
>  mobileControlSet gInputID, "visible", "true"
>  mobileControlSet gInputID, "opaque", "true"
>  mobileControlSet gInputID, "borderstyle", "line"
>   end if
> end opencard
> 
> also I have added two buttons to test the other issues:
> 
> script of button 1:
> 
> on mouseup
>   local tText
>   global gInputID
>   put mobileControlGet(gInputID,"text") into tText
>   answer tText
> end mouseup
> 
> 
> script of button 2:
> 
> on mouseUp pButtonNumber
>   global gInputID
>   mobileControlSet gInputID, "keyboardType", "numeric"
>   mobileControlDo gInputID, "focus"
> end mouseUp
> 
> Also, while testing the focus, I realised that you have to enable the
> setting "Toggle Software Keyboard" in the simulator menubar (Hardware ->
> Keyboard -> Toggle Software Keyboard).
> 
> Important: Note that you have to FIRST click on the field with the mouse to
> focus it, and THEN check this option, otherwise your choice will not have
> any effect. This might be a bug in the simulator app, but once you do that,
> your choice of showing the soft keyboard will be remembered.
> 
> So now, if you add some text to the field, it will be returned correctly if
> you press the first button. Also, if you click on the second button, you
> should see a numeric soft keyboard appearing, and the field will get the
> focus.
> 
> Hope this helps.
> 
> Kind regards,
> Panos
> --
> 
> On Thu, 23 Apr 2020 at 14:03, panagiotis merakos  wrote:
> 
>> Hello Graham,
>> 
>> Oh, ignore my previous comment about mobileControlDo ,
>> "focus", as this bug affected Android only.
>> 
>> I'll try to reproduce the recipe here and see if I get the same problem.
>> 
>> Kind regards,
>> Panos
>> --
>> 
>> 
>> On Thu, 23 Apr 2020 at 13:54, panagiotis merakos 
>> wrote:
>> 
>>> Hello Graham,
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> *> but despite executing> >  mobileControlSet "FRadiusText",
>>> "keyboardType", "numeric">  mobileControlDo "FRadiusText", "focus"> >
>>> following what the  LC Dictionary says , I do not see the soft keyboard*
>>> 
>>> This will not work in LC 9.5.1 - it is an old bug that is fixed in LC 9.6
>>> DP-3:
>>> 
>>> https://github.com/livecode/livecode/pull/7259
>>> 
>>> *>>nor does a subsequent*
>>> 
>>> *>  mobileControlGet "FRadiusText", "text"> ever result in anything but
>>> empty even though I can see a text in the native field object.*
>>> 
>>> Are you calling mobileControlGet "FRadiusText", "text" from the same
>>> handler that has created the mobile input field, or from a different one?
>>> 
>>> Kind regards,
>>> Panos
>>> --
>>> 
>>> On Wed, 22 Apr 2020 at 23:39, Graham Samuel via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> 
>>>> 
>>>> Sent from my iPad
>>>> 
>>>> Begin forwarded message:
>>>> 
>>>>> From: Graham Samuel 
>>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>>> To: Mark Waddingham 
>>>>> Subject: Re:  Mobile text input mystery
>>>>> 
>>>>> Thanks Mark. Although making the field opaque wasn’t enough, giving
>>>> it a black border worked and I can now see it. I can edit it with the
>>>> mouse, and I can even put something in it with
>>>>> 
>>>>> mobileControlSet "FRadiusText", "text", "1.0"
>&

Is there a general mobile picker available?

2020-04-23 Thread Graham Samuel via use-livecode
Another mobile question:

We have a Native Date Picker, and a Native Time Picker, but what about a picker 
where you construct your own picking list? I would like to use a picker on iOS 
to replace radio buttons, but I don’t know a way to do it. Have I just missed 
it, or isn’t it possible?

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a general mobile picker available?

2020-04-23 Thread Graham Samuel via use-livecode
Thanks Klaus and Ben! It’s easy to miss stuff, then one feels stupid. I can’t 
immediately remember what an “options” menu is, or how to invoke one, so I’ll 
just go with a simple ‘mobilepick’ for now. 

Graba

> On 23 Apr 2020, at 17:18, Ben Rubinstein via use-livecode 
>  wrote:
> 
> Also, a standard LiveCode "Options" menu renders as a native picker on iOS 
> (not sure about Android). This is convenient, because it works in a sensible 
> way on desktop, and in a native way on iOS. Of course, it looks like a shitty 
> motif button until the user touches it...
> 
> On 23/04/2020 13:48, Klaus major-k via use-livecode wrote:
>> Hi Graham,
>>> Am 23.04.2020 um 14:39 schrieb Graham Samuel via use-livecode 
>>> :
>>> 
>>> Another mobile question:
>>> 
>>> We have a Native Date Picker, and a Native Time Picker, but what about a 
>>> picker where you construct your own picking list? I would like to use a 
>>> picker on iOS to replace radio buttons, but I don’t know a way to do it. 
>>> Have I just missed it, or isn’t it possible?
>> you just missed it! :-)
>> Check -> mobilepick
>> in the dictionary, that will let you create your own list and let the user 
>> pick one!
>>> Graham
>> Best
>> Klaus
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Widget Properties

2020-04-23 Thread Graham Samuel via use-livecode
I am getting rather fed up with the widgets I’ve been trying to use for my 
mobile app. For example, the iOS button widget (a press button, not a switch) 
has so few properties that you can’t change the colour of the text in any way I 
could see and sometimes mine turn out blue or red for no apparent reason. 
Hoping that other properties were just not showing up, I tried

  put the properties of widget “myWidget”

in the message box and got nothing, so I don’t know how to proceed. 

I also hate that the object doesn’t have a label separate from its name. I 
would never recommend anyone to put spaces in names of objects for scripting, 
but of course they’re essential for many kinds of label seen by a user, so the 
two different strings which work in normal LC are essential, in my opinion.

Oh dear, this has some danger of becoming a rant…

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Widget Properties

2020-04-24 Thread Graham Samuel via use-livecode
Hello Scott

Just to keep you in the loop, I have been trying to produce a mobile app (right 
now it’s iPhone — Android may come later). I’m trying to do this as rapidly as 
possible (it is connected in a minor way to the lockdown measures for the 
pandemic).  I have lots of experience of LiveCode development but almost zero 
for mobile. 

As my app took shape, I noticed how unlike a typical iPhone app it looked, 
mostly because I was using the controls I was familiar with, such as radio 
buttons and ordinary fields. I wondered if my users might find its interface 
unfamiliar. Therefore I have been seeking to make my app’s user interface look 
and feel more like other iPhone apps. I have already had a lot of help from 
this list, but it seems there is no one packaged solution to getting an ‘iPhone 
look and feel’. As LC offers some ‘native’ controls, I tried to use the maximum 
of these - I even paid for a pack of native widgets. That’s why I was using the 
button widget.

So far the results have been disappointing in the widget line, although other 
features like mobilePick and the choice of soft keyboards have worked well. On 
the whole up to now, the widget solutions have only been marginally helpful. 

Hope that explains it - probably more than you want to know!

Graham

> On 23 Apr 2020, at 22:32, scott--- via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> Sorry if I missed this earlier but, what made you go with a button widget 
> rather than just using a standard LiveCode button?
> 
> —
> Scott
> 
>> On Apr 23, 2020, at 9:41 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> I am getting rather fed up with the widgets I’ve been trying to use for my 
>> mobile app. For example, the iOS button widget (a press button, not a 
>> switch) has so few properties that you can’t change the colour of the text 
>> in any way I could see and sometimes mine turn out blue or red for no 
>> apparent reason. Hoping that other properties were just not showing up, I 
>> tried
>> 
>> put the properties of widget “myWidget”
>> 
>> in the message box and got nothing, so I don’t know how to proceed. 
>> 
>> I also hate that the object doesn’t have a label separate from its name. I 
>> would never recommend anyone to put spaces in names of objects for 
>> scripting, but of course they’re essential for many kinds of label seen by a 
>> user, so the two different strings which work in normal LC are essential, in 
>> my opinion.
>> 
>> Oh dear, this has some danger of becoming a rant…
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Widget Properties

2020-04-24 Thread Graham Samuel via use-livecode
Thanks Jacque - info safely stored in my “how to make a mobile app look like 
one” archive!

Thanks for the other info about properties - how would you then refer to a 
property that isn’t shown in the Property Inspector for a widget, such as 
fontColor (or whatever)? I assume the array is just a way of accessing the 
whole collection and not the route to setting an individual property - but I’m 
probably wrong.

Graham

> On 24 Apr 2020, at 20:26, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 4/24/20 3:37 AM, Graham Samuel via use-livecode wrote:
>> As my app took shape, I noticed how unlike a typical iPhone app it looked, 
>> mostly because I was using the controls I was familiar with, such as radio 
>> buttons and ordinary fields. I wondered if my users might find its interface 
>> unfamiliar. Therefore I have been seeking to make my app’s user interface 
>> look and feel more like other iPhone apps. I have already had a lot of help 
>> from this list, but it seems there is no one packaged solution to getting an 
>> ‘iPhone look and feel’.
> 
> You mentioned the iOS native button doesn't look right. If it makes you feel 
> better, the Android one doesn't either. So what I did was use a round-rect 
> graphic as a button. Set the linesize to 1 and the round radius to 8. You can 
> set the border color and the text color.
> 
> I use the same graphic for Android. Sometimes Android buttons have a fill 
> color, sometimes they are just borderless text. I adjust those properties 
> based on platform. IOS buttons use sentence capitalization, Android buttons 
> use all-caps. The label can be adjusted the same way based on platform.
> 
> It's an easy fix and looks native.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Detecting full Mobile Sensor activation

2020-04-25 Thread Graham Samuel via use-livecode
Typical fitness apps (such as iCardio by FitDigits)  can read various sensors 
including a Heart Rate Monitor via Bluetooth, and one’s location via inbuilt 
GPS. When you start an activity like a run or a workout, the app goes through 
an acquisition phase, and won’t start recording until the sensors are 
functioning. This is made clear to the user by a display.

I want to do this in my LC iOS app, specifically for the GPS. I know how to 
start the location function on the device and I know how to handle the position 
via ‘locationChanged' and/or ‘mobileCurrentLocation', and these work. The big 
problem is at the start of such a sequence. I can use 'mobileStartTracking 
Sensor “location” ’ to get going, but experience shows that this takes an 
unpredictable amount of time, sometimes of the order of seconds. You would 
think that the locationChanged messages wouldn’t start firing until the start 
tracking process had done its job, but it seems this is not so, and nonsense 
locations can appear at the beginning of the sequence. At least that’s my 
experience.

I am loth to use a loop to see if the tracking is really started and legit, and 
anyhow this would be problematical if my app was being inundated with 
‘locationChanged' messages while the loop is running. 

Has anyone any experience of this issue? As usual, I feel I’m missing 
something. Perhaps the ‘trackingError’ message might help, but I don’t see how.

Graham



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Widget Properties

2020-04-25 Thread Graham Samuel via use-livecode
Thanks Jacque

You’re adding to my gloom about widgets being offered as native controls - the 
only reason they were produced AFAIKS was to produce a superior result to 
whatever else was on offer, and if they don’t, why bother? I have a feeling not 
many people are trying to use them - you don’t for example, and so far nobody 
on this list has come to their defence. Perhaps LC’s widget factory is right to 
put their energies elsewhere.

Graham

> On 25 Apr 2020, at 00:03, J. Landman Gay via use-livecode 
>  wrote:
> 
> My suggestion was just to see what properties are available in the widget. 
> But when I just tried it, I see that it doesn't respond in the IDE, what you 
> see is just a placeholder. You can search for "ios native button" in the 
> dictionary, where I see only two available properties: enabled and label.
> 
> If the widget author doesn't support the rest of them, they don't exist. I do 
> see that you can resize the rectangle, but since I don't use the native 
> buttons I'm not sure if the size will be retained on an iPhone or whether it 
> just defaults to the standard native size.
> 
> Typically only the properties that the author has supported will appear in 
> the property inspector.
> 
> 
> On 4/24/20 3:35 PM, Graham Samuel via use-livecode wrote:
>> Thanks Jacque - info safely stored in my “how to make a mobile app look like 
>> one” archive!
>> Thanks for the other info about properties - how would you then refer to a 
>> property that isn’t shown in the Property Inspector for a widget, such as 
>> fontColor (or whatever)? I assume the array is just a way of accessing the 
>> whole collection and not the route to setting an individual property - but 
>> I’m probably wrong.
>> Graham
>>> On 24 Apr 2020, at 20:26, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> On 4/24/20 3:37 AM, Graham Samuel via use-livecode wrote:
>>>> As my app took shape, I noticed how unlike a typical iPhone app it looked, 
>>>> mostly because I was using the controls I was familiar with, such as radio 
>>>> buttons and ordinary fields. I wondered if my users might find its 
>>>> interface unfamiliar. Therefore I have been seeking to make my app’s user 
>>>> interface look and feel more like other iPhone apps. I have already had a 
>>>> lot of help from this list, but it seems there is no one packaged solution 
>>>> to getting an ‘iPhone look and feel’.
>>> 
>>> You mentioned the iOS native button doesn't look right. If it makes you 
>>> feel better, the Android one doesn't either. So what I did was use a 
>>> round-rect graphic as a button. Set the linesize to 1 and the round radius 
>>> to 8. You can set the border color and the text color.
>>> 
>>> I use the same graphic for Android. Sometimes Android buttons have a fill 
>>> color, sometimes they are just borderless text. I adjust those properties 
>>> based on platform. IOS buttons use sentence capitalization, Android buttons 
>>> use all-caps. The label can be adjusted the same way based on platform.
>>> 
>>> It's an easy fix and looks native.
>>> 
>>> -- 
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software   | http://www.hyperactivesw.com
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Detecting full Mobile Sensor activation

2020-04-25 Thread Graham Samuel via use-livecode
I do sympathise.

I would love a more comprehensive system of sensor acquisition - but right now 
I’m just trying to cope with the GPS start up issue. Bluetooth and all that is 
further away from me.

Graham

> On 25 Apr 2020, at 16:20, JeeJeeStudio via use-livecode 
>  wrote:
> 
> Some apps even measure the heartbeat via the camera and turn on the 
> cameralight.
> 
> I don't know how we could do that in LC.
> 
> Even for barcode reader the camera light would be convenient for dark spaces, 
> i added a feature request, but it's hibernated.
> 
> Who knows how long it takes before it gets integrated.
> 
> Op 25-4-2020 om 14:07 schreef Graham Samuel via use-livecode:
>> Typical fitness apps (such as iCardio by FitDigits)  can read various 
>> sensors including a Heart Rate Monitor via Bluetooth, and one’s location via 
>> inbuilt GPS. When you start an activity like a run or a workout, the app 
>> goes through an acquisition phase, and won’t start recording until the 
>> sensors are functioning. This is made clear to the user by a display.
>> 
>> I want to do this in my LC iOS app, specifically for the GPS. I know how to 
>> start the location function on the device and I know how to handle the 
>> position via ‘locationChanged' and/or ‘mobileCurrentLocation', and these 
>> work. The big problem is at the start of such a sequence. I can use 
>> 'mobileStartTracking Sensor “location” ’ to get going, but experience shows 
>> that this takes an unpredictable amount of time, sometimes of the order of 
>> seconds. You would think that the locationChanged messages wouldn’t start 
>> firing until the start tracking process had done its job, but it seems this 
>> is not so, and nonsense locations can appear at the beginning of the 
>> sequence. At least that’s my experience.
>> 
>> I am loth to use a loop to see if the tracking is really started and legit, 
>> and anyhow this would be problematical if my app was being inundated with 
>> ‘locationChanged' messages while the loop is running.
>> 
>> Has anyone any experience of this issue? As usual, I feel I’m missing 
>> something. Perhaps the ‘trackingError’ message might help, but I don’t see 
>> how.
>> 
>> Graham
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Detecting full Mobile Sensor activation

2020-04-26 Thread Graham Samuel via use-livecode
Alan, thanks for your two messages. II’m doing most of what you suggest (not 
using accuracy so far, but the prudent person probably should do!), but 
nevertheless I would like to emulate my fitness app example. I have apps that 
positively know when they have acquired a meaningful GPS signal, whereas the 
methods i’m using contain an element of chance or guesswork. I want to 
completely eliminate that.

In practical terms, I can’t start the sensor until the user needs it, because 
of battery drain - you will find this in most trekking and fitness apps - one 
is more or less confined to a button ‘Start’ or something similar. At that 
point, my ideal would be to show the user that I’ve started the sensor 
acquisition and tell them when it’s succeeded or failed. I feel it has to be 
possible, but perhaps not with LC.

Graham


> On 26 Apr 2020, at 02:47, Alan Stenhouse  wrote:
> 
> Hi Graham
> 
> Some ideas, from experience:
> 
> 1. Start your sensor on openStack or as soon as possible.
> 
> 2. Ignore locationChanged messages with empty location or if "horizontal 
> accuracy" is outside a threshold of x metres.
> 
> 3. Just set a flag or other mechanism when you want to start and stop 
> tracking which indicates to your locationChanged handler to record or stop 
> recording the track.
> 
> Hopefully that sounds reasonable?
> 
> cheers
> 
> Alan
> 
>> On Sat, 25 Apr 2020 14:07:01,Graham Samuel > > wrote:
>> 
>> 
>> Typical fitness apps (such as iCardio by FitDigits)  can read various 
>> sensors including a Heart Rate Monitor via Bluetooth, and one?s location via 
>> inbuilt GPS. When you start an activity like a run or a workout, the app 
>> goes through an acquisition phase, and won?t start recording until the 
>> sensors are functioning. This is made clear to the user by a display.
>> 
>> I want to do this in my LC iOS app, specifically for the GPS. I know how to 
>> start the location function on the device and I know how to handle the 
>> position via ?locationChanged' and/or ?mobileCurrentLocation', and these 
>> work. The big problem is at the start of such a sequence. I can use 
>> 'mobileStartTracking Sensor ?location? ? to get going, but experience shows 
>> that this takes an unpredictable amount of time, sometimes of the order of 
>> seconds. You would think that the locationChanged messages wouldn?t start 
>> firing until the start tracking process had done its job, but it seems this 
>> is not so, and nonsense locations can appear at the beginning of the 
>> sequence. At least that?s my experience.
>> 
>> I am loth to use a loop to see if the tracking is really started and legit, 
>> and anyhow this would be problematical if my app was being inundated with 
>> ?locationChanged' messages while the loop is running. 
>> 
>> Has anyone any experience of this issue? As usual, I feel I?m missing 
>> something. Perhaps the ?trackingError? message might help, but I don?t see 
>> how.
>> 
>> Graham
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
Folks, I’m finding it difficult to search the lessons and the LC Guide to get 
really simple info, so forgive me for these grossly newbie questions: 
 
 


1. In the IDE, the ‘Align Selected Controls’ menu item doesn’t allow all 
possible combinations of alignment, particularly aligning horizontal and 
vertical centres; nor does it allow alignments in relation to the stack 
dimensions. I think this functionality used to exist, but maybe (very likely!) 
my memory is faulty. If these functions are available somewhere in the IDE, I 
don’t see where.

2. I’ve not had to use LC arrays much, at least not ones containing my own 
data. The description of arrays is somewhat scattered throughout the lessons 
and the Guide, and I failed to find a thorough treatment of the whole idea of 
arrays in LC, which I find quite slippery. I am looking to use a two- or 
three-dimensional array, where you can script something like 

  put myArray[2,7] into…, or
  get myArray[x,y,z]

I still don’t know if this is possible. I kind of think it is, but I can’t 
grasp how to do it.

3. I can’t work out if you can construct an array using the IDE, i.e. prior to 
actually executing the code. I was thinking for example of an array of 
constants (really strings) which could be written into my script. Again, if 
that’s possible I don’t know how. It seems odd to have to do something like 
convert lists of constants into array form only when the program is running. 
Somehow I don’t think this is possible in LC, but I’m not sure.

Maybe Klaus, who tells us that he sleeps with the LC documentation under his 
pillow, can help!

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
I’m sending this again because some strange text appeared in my message the 
first time. Don’t know how it go there!

Folks, I’m finding it difficult to search the lessons and the LC Guide to get 
really simple info, so forgive me for these grossly newbie questions:

1. In the IDE, the ‘Align Selected Controls’ menu item doesn’t allow all 
possible combinations of alignment, particularly aligning horizontal and 
vertical centres; nor does it allow alignments in relation to the stack 
dimensions. I think this functionality used to exist, but maybe (very likely!) 
my memory is faulty. If these functions are available somewhere in the IDE, I 
don’t see where.

2. I’ve not had to use LC arrays much, at least not ones containing my own 
data. The description of arrays is somewhat scattered throughout the lessons 
and the Guide, and I failed to find a thorough treatment of the whole idea of 
arrays in LC, which I find quite slippery. I am looking to use a two- or 
three-dimensional array, where you can script something like 

 put myArray[2,7] into…, or
 get myArray[x,y,z]

I still don’t know if this is possible. I kind of think it is, but I can’t 
grasp how to do it.

3. I can’t work out if you can construct an array using the IDE, i.e. prior to 
actually executing the code. I was thinking for example of an array of 
constants (really strings) which could be written into my script. Again, if 
that’s possible I don’t know how. It seems odd to have to do something like 
convert lists of constants into array form only when the program is running. 
Somehow I don’t think this is possible in LC, but I’m not sure.

Maybe Klaus, who tells us that he sleeps with the LC documentation under his 
pillow, can help!

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
Yes, thanks! That’s exactly what I was hoping for. I know that LC is strictly a 
real-time interpreter of a script rather than a compiler -> runtime system, but 
nevertheless it would be more comfortable to allow a better range of constants. 
Right now you can’t even write

constant K= 2/3

and get the calculation done by the IDE before the script is executed. "So 
what?”, you might say, but it would be grand to be able to declare an entire 
array structure without writing a program to make it happen every time a script 
is executed.

Still, I got the answer to my question: it’s “NO”

Graham

> On 26 Apr 2020, at 15:41, Alex Tweedly via use-livecode 
>  wrote:
> 
> 
> On 26/04/2020 13:28, Klaus major-k via use-livecode wrote:
>> 
>> I was thinking for example of an array of constants (really strings) which 
>> could be written into my script. Again, if that’s possible I don’t know how. 
>> It seems odd to have to do something like convert lists of constants into 
>> array form only when the program is running.
>> Monsieur?
>> Well, when else would you like to do it in LC, when it is not running? :-D
>> I'm sure I did nto really understand what you mean.
>> 
> I think Graham was hoping for more powerful 'constant' statement.
> 
> I know I'd like to be able to say things like
> 
> constant kA["help"][1] = "This is the help string"
> 
> or
> 
> constant N = 1
> constant kA["help"][N] = "some string"
> constant kA["help"][N+1] = "next string"
> 
> or indeed my old favourite
> 
> constant kManyLinesOfText = """
> here's a version of the constant string
> which spans multiple lines"""
> 
> Alex.
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
Thanks, see my other replies. Three questions deserve three replies -  I hope 
the cooking went well.

Graham

> On 26 Apr 2020, at 14:27, Alex Tweedly via use-livecode 
>  wrote:
> 
> Sorry for sending 3 replies - but I don't know when I will run out of time, 
> and wanted to get some sent before the oven demands attention :-)
> 
> On 26/04/2020 13:11, Graham Samuel via use-livecode wrote:
>> 3. I can’t work out if you can construct an array using the IDE, i.e. prior 
>> to actually executing the code. I was thinking for example of an array of 
>> constants (really strings) which could be written into my script. Again, if 
>> that’s possible I don’t know how. It seems odd to have to do something like 
>> convert lists of constants into array form only when the program is running. 
>> Somehow I don’t think this is possible in LC, but I’m not sure.
> 
> No easy way to do it as constants. It is odd, but easiest is to just do it in 
> an "opencard" or openstack handler, with a global array.
> 
> on opencard
>   put "This is the help introduction" into gStrings["help"][1]
>   put "(C) 2020 Graham Samuel" into gStrings["help"[2]
>   ...
> end opencard
> 
> 
> Or, you can use Custom Properties (or Property Arrays) - but I don't remember 
> how; it's just easier to do it as an array.
> 
> Or you can hold it in an external text file (e.g. Tab Separated file) so it 
> is easier to edit with your favourite text editor, or import from 
> spreadsheet, or ...). If you do that, I'd recommend reading it into a 
> (global?) array, and providing a "write back to file" function so you can 
> easily update it while in the IDE, and save those changes.
> 
> Alex.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
Thanks Alex, I just missed it! I knew it was there somewhere… have written to 
Klaus about it too.

Graham

> On 26 Apr 2020, at 14:21, Alex Tweedly via use-livecode 
>  wrote:
> 
> 
> On 26/04/2020 13:11, Graham Samuel via use-livecode wrote:
>> 1. In the IDE, the ‘Align Selected Controls’ menu item doesn’t allow all 
>> possible combinations of alignment, particularly aligning horizontal and 
>> vertical centres; nor does it allow alignments in relation to the stack 
>> dimensions. I think this functionality used to exist, but maybe (very 
>> likely!) my memory is faulty. If these functions are available somewhere in 
>> the IDE, I don’t see where.
>> 
> Select multiple objects.
> 
> Then from the menuObject / Object Inspector
> 
> then the rightmost tab in the property inspector should be the align icon 
> (like a left-aligned text symbol). Select that, and you will see all the 
> options such as  center-aligned, etc.
> 
> I don't think they are available from the menu, but I didn't even realize any 
> alignment could be done there.
> 
> Alex.
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-26 Thread Graham Samuel via use-livecode
Thanks Klaus, you are very patient with my stupid questions, as is Alex. 

In general I am looking for ways to define stuff in the IDE to create objects 
and align them etc during the design phase, rather than make such essentially 
static things happen at run time. It seems silly to have to run a setting-up 
routine to do something that could have been set up once as a declaration 
before the program runs. Maybe that’s the legacy of HyperCard, where there 
wasn’t much of a difference between scripting a program and running it.

Apropos of alignment, of course you can do anything by script. I was just 
hoping the IDE could help with the static layout of objects on cards. Turns out 
it can, because the rather odd menu item in the IDE (“Align Selected Controls”) 
is not the whole story. Actually as Alex explains, you can get a more 
comprehensive set of alignments via the Property Inspector when multiple 
objects are selected. I just forgot about that. I wonder why the strangely 
incomplete menu item is there at all.

Arrays - Alex confirms there is no such thing as a constant declaration for 
arrays. Ah well. As to multi-dimensional arrays, I see the answer is “yes”, but 
I have to struggle to create the array (both structure and contents) rather 
than create it at design time as it were in the IDE as you would any other 
object. I will simply learn to live with it.

Sorry for all the bandwidth.

Graham



> On 26 Apr 2020, at 14:28, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
> someone called my name? :-D
> 
>> Am 26.04.2020 um 14:11 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> I’m sending this again because some strange text appeared in my message the 
>> first time. Don’t know how it go there!
>> 
>> Folks, I’m finding it difficult to search the lessons and the LC Guide to 
>> get really simple info, so forgive me for these grossly newbie questions:
>> 
>> 1. In the IDE, the ‘Align Selected Controls’ menu item doesn’t allow all 
>> possible combinations of alignment, particularly aligning horizontal and 
>> vertical centres; nor does it allow alignments in relation to the stack 
>> dimensions. I think this functionality used to exist, but maybe (very 
>> likely!) my memory is faulty. If these functions are available somewhere in 
>> the IDE, I don’t see where.
> 
> not sure I understand you correctly.
> If the inspector does not offer some alignement that you need, it will be 
> easy to script, the inspector does the same.
> 
>> particularly aligning horizontal and vertical centres
> 
> Just use the two items of THE LOC OF WHATEVER to do youralignement:
> x -> horizontal centre
> y -> vertical centre
> 
>> 2. I’ve not had to use LC arrays much, at least not ones containing my own 
>> data. The description of arrays is somewhat scattered throughout the lessons 
>> and the Guide, and I failed to find a thorough treatment of the whole idea 
>> of arrays in LC, which I find quite slippery. I am looking to use a two- or 
>> three-dimensional array, where you can script something like 
>> put myArray[2,7] into…, or
>> get myArray[x,y,z]
>> I still don’t know if this is possible. I kind of think it is, but I can’t 
>> grasp how to do it.
> 
> Yes, sure, but read up Alex last mail for "better" syntax.
> 
>> 3. I can’t work out if you can construct an array using the IDE, i.e. prior 
>> to actually executing the code.
> 
> That depends. :-D
> 
> You can create an array whenever you need one and we can also store an array 
> into a custom property,
> so it will survive the LC session if you save the stack.
> 
> ...
> put "this is string1_1" into tArray[1]["string1"]
> put "this is string1_2" into tArray[1]["string2"]
> put "this is string2_1" into tArray[2]["string1"]
> put "this is string2_1" into tArray[2]["string2"]
> ## etc.
> ...
> answer "This is the string 1, stored in my array[2][string2]:" && 
> tArray[2]["string2"]
> ...
> Silly example, but you shlould get the picture...
> And if possible, named keys are much more readable
> 
>> I was thinking for example of an array of constants (really strings) which 
>> could be written into my script. Again, if that’s possible I don’t know how. 
>> It seems odd to have to do something like convert lists of constants into 
>> array form only when the program is running.
> 
> Monsieur?
> Well, when else would you like to do it in LC, when it is not running? :-D
> I'm sure I did nto really understand what you mean.
> 
>> Somehow I don’t think this is possible in LC, but I’m not sure.
>>

How to make a mobile app stay alive in the background?

2020-04-26 Thread Graham Samuel via use-livecode
The app I’m developing runs continuously once launched, recording quantities 
such as the elepsed time and sensor data. In the version I’ve managed to load 
into my phone (thanks, Panos!) it does this quite efficiently, but if the phone 
locks or another app is launched, my app stops running and apparently quits. It 
quits in good order and can be restarted with cached data from the last run, 
but it doesn’t continue to run in the background. It does seem to be still in 
the machine, as one can see it among the currently loaded apps, but if I bring 
it back to the front, I see the splash screen, and it restarts.

I want my app to continues to run in the background unless it’s explicitly 
stopped. Existing apps can do it, typically sports apps like Strava, which 
records information which needs constant updating such as distance travelled. 
But I don’t know how. 

I notice in the Standalone Settings for iOS in LC 9.5.1, a button ‘Background 
Execution’. If I click it, I get a warning that I don’t really understand which 
suggests that LC doesn’t officially support the feature. I’m not even sure if 
this feature is what I need.

Has anyone produced a mobile app that runs in the background? Or should I be 
asking LC Support about this?

Graham

PS - Klaus, if your name appears as part of the ‘to’ address of this mail, it’s 
unintentional, and sue to a quirk of Mac mail. I apologise.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to make a mobile app stay alive in the background?

2020-04-27 Thread Graham Samuel via use-livecode
Thanks Jacque and Mark - very interesting! Your messages told me stuff I did 
not know. mergBgTask looks scary and somewhat unsure of itself, but i’ll try.

What is happening to me is that the app is suspended and effectively stopped 
when it goes into the background. From this state it can only be relaunched, 
showing the splash screen which I had to provide to iOS (this is not a card in 
my stack, just a PNG file insisted on by Apple), so the user does not perceive 
the app to be resuming, but rather restarting. I want them to see the screen 
they last saw when the app was in the foreground. Plenty of apps do this - 
Strava, FitDigits, etc. More importantly they do continue to actually run in 
the background, so that there are for example no gaps in the sensor records 
they are displaying, either via Bluetooth (Heart Rate Monitors for example) or 
direct via the OS (GPS information). I need that facility or my app is dead in 
the water. I don’t have trouble restoring the  app’s status on a restart, as I 
keep updating the status and storing it in the cache area of my app - but that 
doesn’t help with the continuous-monitoring-in-the-background requirement.

BTW, Jacque you said

> You are probably running an older version of LC since that checkbox has been 
> removed recently. 

Perhaps in the latest DP, but it’s there in the latest official version, 9.5.1, 
at least in Indy, which I use.

Will keep trying.

Graham

> On 27 Apr 2020, at 08:48, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2020-04-27 07:25, J. Landman Gay via use-livecode wrote:
>> On 4/26/20 4:43 PM, Graham Samuel via use-livecode wrote:
>>> I notice in the Standalone Settings for iOS in LC 9.5.1, a button 
>>> ‘Background Execution’. If I click it, I get a warning that I don’t really 
>>> understand which suggests that LC doesn’t officially support the feature. 
>>> I’m not even sure if this feature is what I need.
>> Basically you have to save the user state repeatedly whenever anything
>> significant changes, in case the app goes dormant.
> 
> You actually need to do this regardless of having suspend/resume messages as 
> there's no guarantee that (1) you will get them and (2) you will be able to 
> execute them long enough to save all current state.
> 
> Both mergBgTask and mergNotify provide features to enable managing the 
> background task feature of iOS, and the suspend/resume notifications though.
> 
> Warmest Regards
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to make a mobile app stay alive in the background?

2020-04-27 Thread Graham Samuel via use-livecode
Panos, thanks for that info. The truth is my particular app has proved such a 
challenge for me in so many different ways that it may never reach its intended 
user population - but on the off-chance that I do finish it, then I think I may 
have to get involved with the Apple App Store, if only to use TestFlight to get 
it out to quite a lot of people. So maybe my announcement at that point will be 
that if your phone only runs earlier versions of iOS, sorry it won’t work 
unless you are willing to use it without ever letting the app go into the 
background - something very awkward in practice if you’re walking for an hour, 
which is what first use is all about. Can you say what is the lowest version of 
iOS is that would allow background working without a problem? Right now in my 
other test device I’m running iOS 13, which must be OK, but are there others, 
11.x and 12. x that would be OK?

Having asked that, please note that ‘running in the background’ seems to mean 
different things to different people, but to me it means continuing to receive 
sensor data while in the background, since as far as I know, such data would be 
unrecoverable if not collected in real time. A good example would be working 
out how far a person has walked. This can only be done by accumulating 
increments of change of location (via GPS) without any serious gaps, so data 
acquisition has to be continuous. There are lots of other examples, specially 
if we’re allowing Bluetooth connected sensors.

Just for completeness I should say that I have asked LC Support to explain 
commands like mergBgTask, as the available documentation does not give examples 
etc. and really does not help the newbie in this area.

Graham

> On 27 Apr 2020, at 10:24, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello all,
> 
> Just to add to the discussion that one of Graham's phones runs iOS 10.x, so
> in this case, if you need your app to continue running in the background,
> you do need to build it with 9.5.1 and check the "enable background
> execution" checkbox in the iOS settings. However, you will not be able to
> submit this build to the AppStore, as Apple no longer accepts applications
> that have this key that is added to the plist if you check "Enable
> Background execution". Devices running newer iOS versions will   allow apps
> running in the background anyway, so you do not need this key in the plist
> - and this is why this key (i.e. the checkbox) was removed in LC 9.6 DP-3.
> 
> So, to conclude, given that you are not interested in submitting the app to
> the AppStore, I believe you can include this key to the plist (i.e. check
> "Enable Background Execution" checkbox), so your app will continue running
> in the background in both old and new iOS devices.
> 
> Kind regards,
> Panos
> --
> 
> On Mon, 27 Apr 2020 at 10:42, Graham Samuel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thanks Jacque and Mark - very interesting! Your messages told me stuff I
>> did not know. mergBgTask looks scary and somewhat unsure of itself, but
>> i’ll try.
>> 
>> What is happening to me is that the app is suspended and effectively
>> stopped when it goes into the background. From this state it can only be
>> relaunched, showing the splash screen which I had to provide to iOS (this
>> is not a card in my stack, just a PNG file insisted on by Apple), so the
>> user does not perceive the app to be resuming, but rather restarting. I
>> want them to see the screen they last saw when the app was in the
>> foreground. Plenty of apps do this - Strava, FitDigits, etc. More
>> importantly they do continue to actually run in the background, so that
>> there are for example no gaps in the sensor records they are displaying,
>> either via Bluetooth (Heart Rate Monitors for example) or direct via the OS
>> (GPS information). I need that facility or my app is dead in the water. I
>> don’t have trouble restoring the  app’s status on a restart, as I keep
>> updating the status and storing it in the cache area of my app - but that
>> doesn’t help with the continuous-monitoring-in-the-background requirement.
>> 
>> BTW, Jacque you said
>> 
>>> You are probably running an older version of LC since that checkbox has
>> been removed recently.
>> 
>> Perhaps in the latest DP, but it’s there in the latest official version,
>> 9.5.1, at least in Indy, which I use.
>> 
>> Will keep trying.
>> 
>> Graham
>> 
>>> On 27 Apr 2020, at 08:48, Mark Waddingham via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> On 2020-04-27 07:25, J. Landman Gay via use-livecode wrote:
>>>> On 4/26/20 4:43 

Re: How to make a mobile app stay alive in the background?

2020-04-27 Thread Graham Samuel via use-livecode
Panos, as usual, this is terrific information! I am applying your advice 
immediately.

Not to start an argument, the statistics you quote don’t accord with my 
personal experience. Almost everyone I know who owns Apple kit has at least one 
phone or iPad that can’t be upgraded to the latest OS version - and these 
devices still work well. In our house for example there are three iPhones, only 
one of which can run 13.x; two iPads, one newish one and another which is back 
at iOS 9 I think (still works for email and browsing, at any rate). However, to 
be practical I will  do as you suggest with my own app.

Thanks for your continued interest in these issues.

Graham

> On 27 Apr 2020, at 14:11, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> I could not find any *official* source from Apple, as their docs are
> scattered around and it is not easy to determine always if a document is
> out of date, but from what I understand iOS apps are running in the
> background by default since iOS 12+. Given how quickly people are moving
> (or forced to move) to using the latest iOS versions, I would not worry if
> my app (in the AppStore) only covered iOS 12+:
> 
> iOS version stats: (from https://david-smith.org/iosversionstats/)
> 
> 13.X --> 92.5%
> 12.X --> 5.1%
> 11.X --> 0.7%
> 10.X --> 0.7%
> 9.X --> 1.0%
> 
> For your use case, I think this should work:
> 
> - Use LC 9.5.1 and check "Enable Background Execution" and "Location
> Updates" in the background modes in the iOS settings. This should allow
> your app to receive the "locationChanged" msg even when in background. Then
> use an ad-hoc distribution profile to sign your app and deliver it to
> specific devices (including pre-ios12) to get some feedback
> 
> - When you are ready for publishing the app to the AppStore, just rebuild
> it with LC 9.6, using an AppStore distribution profile, and upload it to
> the AppStore. You will be able to deliver it to some beta testers via
> TestFlight at this point (running iOS 12+)
> 
> Hope this helps.
> 
> Kind regards,
> Panos
> --
> 
> On Mon, 27 Apr 2020 at 14:14, Graham Samuel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Panos, thanks for that info. The truth is my particular app has proved
>> such a challenge for me in so many different ways that it may never reach
>> its intended user population - but on the off-chance that I do finish it,
>> then I think I may have to get involved with the Apple App Store, if only
>> to use TestFlight to get it out to quite a lot of people. So maybe my
>> announcement at that point will be that if your phone only runs earlier
>> versions of iOS, sorry it won’t work unless you are willing to use it
>> without ever letting the app go into the background - something very
>> awkward in practice if you’re walking for an hour, which is what first use
>> is all about. Can you say what is the lowest version of iOS is that would
>> allow background working without a problem? Right now in my other test
>> device I’m running iOS 13, which must be OK, but are there others, 11.x and
>> 12. x that would be OK?
>> 
>> Having asked that, please note that ‘running in the background’ seems to
>> mean different things to different people, but to me it means continuing to
>> receive sensor data while in the background, since as far as I know, such
>> data would be unrecoverable if not collected in real time. A good example
>> would be working out how far a person has walked. This can only be done by
>> accumulating increments of change of location (via GPS) without any serious
>> gaps, so data acquisition has to be continuous. There are lots of other
>> examples, specially if we’re allowing Bluetooth connected sensors.
>> 
>> Just for completeness I should say that I have asked LC Support to explain
>> commands like mergBgTask, as the available documentation does not give
>> examples etc. and really does not help the newbie in this area.
>> 
>> Graham
>> 
>>> On 27 Apr 2020, at 10:24, panagiotis merakos via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hello all,
>>> 
>>> Just to add to the discussion that one of Graham's phones runs iOS 10.x,
>> so
>>> in this case, if you need your app to continue running in the background,
>>> you do need to build it with 9.5.1 and check the "enable background
>>> execution" checkbox in the iOS settings. However, you will not be able to
>>> submit this build to the AppStore, as Apple no longer accepts
>> applications
>>>

Re: Mobile screen sizes - another naive question

2020-04-28 Thread Graham Samuel via use-livecode
Richard, thanks for these valuable insights. I am doing my best to absorb them 
as quick as I can, meanwhile making use of FullScreen mode just to get my app 
running before it becomes redundant. You are right, it has been very difficult 
to gather comprehensive info on the topic until now.

Graham

> On 27 Apr 2020, at 22:29, Richard Gaskin via use-livecode 
>  wrote:
> 
> Graham (and Brahmanathaswami may enjoy this too):
> 
> I've been itching to write a tutorial on using specific object placement 
> ("Responsive Design", as the kids call it) to compliment the Lesson we've had 
> for years on the other mobile layout option, FullScreenMode.
> 
> I had a few minutes over the weekend, and a discussion with a new developer 
> prompted me to craft a simple example of how groups can be used to handle 
> common design patterns with little code.
> 
> This may be fleshed out more fully in the future, but for now at least it's 
> more than the zero tutorials we've had on it thus far:
> 
> https://forums.livecode.com/viewtopic.php?f=53&t=33989&start=15#p190927
> 
> --
> Richard Gaskin
> Fourth World Systems
> 
> 
> 
> -- original post from 9 April -
> 
> Graham Samuel wrote:
> 
> > Folks, yet again I don’t know where to look for an answer in the LC
> > documentation.
> >
> > The issue is the enormous variety of screen sizes on smart phones.
> > For example the iPhone XS Max has 1242 pixels width, the iPhone 5 has
> > 640. And there are many many more before we even get to tablets…
> >
> > The question is, how do most of you tackle this, and does LC help?
> > Obviously an object taking up a fixed number of pixels on one phone
> > will look absurdly large or small on another one, or of course may not
> > fit on the screen at all. Not all objects can be vector drawings, and
> > the ones that are still have to be resized according to device
> >
> > Is there anything better than the obvious trick of resizing everything
> > in sight when the app is being initialised, including substituting the
> > more sensitive graphics from a library of appropriate sizes? Seems
> > tedious.
> 
> Is it all that tedious?
> 
> Computers have had resizable windows since Mac 1.0, and even HyperCard
> stacks could be resize after its first version.
> 
> True, in the very olden days we all enjoyed the simplicity of knowing we
> never had to accommodate any screen size other than 512x342.  Ah, those
> were the days! :)
> 
> But 640x480 came along not long after, and it caused much concern among
> developers. Suddenly we had to become aware of screen metrics, and
> rearrange our layouts to make good use of the available space.
> 
> Then 1024x768 came along, and then we had THREE(!) screen sizes to
> contend with. Oh the humanity! :)
> 
> Then by the early 90s we got over it.  Anticipating multiple screen
> sizes became the norm, new tools like SuperCard, OMO, and MetaCard came
> along offering true resizable windows, and we learned to respond to
> notification that the window had resized so we can adjust our interior
> contents nicely.
> 
> Flash forward to 2010: iPhone comes out, with the presumption that one
> size will satisfy all tastes.  That didn't last long.  History doesn't
> always repeat itself, but it often rhymes. :)
> 
> 
> 
> As with desktop software, I find it instructive to observe how the best
> apps on mobile behave, and then - because those establish user
> expectations - do what they do.
> 
> And what we see is not all that different from how designers handle
> resizable windows on the desktop: some objects stay where they are,
> those that make sense to enlarge enlarge, those that make sense to
> remain adjacent to something next to them remain adjacent to something
> next to them, etc.
> 
> If you've written resizeStack handlers at any point in the last 28 years
> since MC premiered, you've already learned most of what you need to know
> to handle a resizeStack message on a mobile device.
> 
> The specifics of how this plays out in your layout will of course depend
> entirely on your layout.  But I have found a few things that have
> greatly simplified my UI work, chiefly:
> 
> - Use Groups Smartly
> 
> Relatively recently (a few years ago) the engine now sends a
> resizeControl message to groups whenever they're resized by any means,
> either user interaction with the pointer tool (as had always been the
> case) or via script (the new addition).
> 
> This allows us to work with our UIs very cleanly, recognizing that an
> app is ultimately a set of rows, and that some rows are divided into
> blocks.  When we group controls by their location/purpose logically, we
> get to take advantage of a wonderfully simplifying cascading effect with
> regard to resizing, which allows us to keep control adjustments local to
> their containing group.
> 
> Imagine a simple message form, where the rows are:
> 
> - Icons for navigating to different screens
> 
> - Message, which includes three rows:
>   - S

Another widget grumble

2020-04-28 Thread Graham Samuel via use-livecode
I’m still trying to use the ‘mobile native’ style of widget. Previously I’ve 
objected to the idea of an object that displays its name and has no label or 
alias. My objection was mostly that names that the user sees often have spaces 
in them (“Stop Now” or whatever), whereas names with spaces in them are 
dangerous to refer to in scripts because it’s so easy to put two in instead of 
one, and is either illegal or deprecated in almost all computer languages.

Today I came across an even more annoying aspect of this, when I added a 
facility to my app to change the language of the display. So a button in 
English displaying “Cancel” gets changed to “Annuler”. So if I need to refer to 
the button in script, the simplest way is to use its ID and not its name. The 
ID is a fine thing, but it doesn’t make for readable code!

Seriously, is there any chance of these widgets being improved by somebody? 
They just need more properties really.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-28 Thread Graham Samuel via use-livecode
Bill, I think you’re right about the Guide not being searchable. I was going to 
point it out myself, but I began to think that I had used up my grumbling 
allowance, or at least I had not much left and needed to use it for other 
things.

Of course the Giude should be searchable!

Graham

Re grumbling - I have always been delighted by the way people on this list come 
to each other’s aid. This ‘invisible college’ is a really essential part of the 
LiveCode experience, I believe. I hope I say ‘thank you’ enough.



> On 26 Apr 2020, at 23:52, prothero--- via use-livecode 
>  wrote:
> 
> Folks:
> I think Graham is doing LiveCode a favor by pointing out some of the ways a 
> newby (even though he isn’t) might get messed up when learning LiveCode. We 
> all get used to various approaches and newbies (even tho Graham isn’t) alert 
> us to impediments for that very vital population of potential or new users.
> 
> One thing that has bugged me is that when I click on the dictionary, I get a 
> nice display of commands, etc, searchable. But when I click on the “Guide” 
> tab, I get what looks like a very informative document. However, if I’m 
> looking for a particular task and want to do a search, there is none. So, it 
> seems to me like a very valuable newby document is crippled by the omission 
> of a very basic feature.
> 
> Or have I just missed something?
> 
> Best,
> Bill
> 
> William A. Prothero
> Santa Barbara, CA. 93105
> http://earthlearningsolutions.org/
> 
>> On Apr 26, 2020, at 12:23 PM, Mark Wieder via use-livecode 
>>  wrote:
>> 
>> On 4/26/20 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>>> "globals are evil"
>>> But we use  one array
>>> Global gConfigA
>>> and we stuff it with all manner of "things" including another arrays
>>> it turns about to quite useful
>> 
>> Yes, I do what you and Jacque do as a workaround, of course. I recently 
>> implemented a feature management infrastructure the same way, given the lack 
>> of globally available constants.
>> 
>> on preOpenStack
>> global gFeatures
>> put "feature1,feature2,feature3" into gFeatures
>> end preOpenStack
>> 
>> ...some other stack
>> 
>> global gfeatures
>> if "feature2" is among the items of gfeatures then
>> ...
>> 
>> on closeStackRequest
>> delete variable gFeatures
>> end closestackRequest
>> 
>> great for A/B testing, rolling out new features without messing with 
>> existing code, being able to roll back unwanted or not-working features 
>> after beta testing... and would be so much cleaner if we didn't have to 
>> resort to global variables and remember to put a reference to them in each 
>> place they're referenced...
>> 
>> -- 
>> Mark Wieder
>> ahsoftw...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Three very simple questions

2020-04-29 Thread Graham Samuel via use-livecode
OK, I’ll bite - how d’ya do it?

Graham

> On 28 Apr 2020, at 22:28, dunbarx--- via use-livecode 
>  wrote:
> 
> The user guide?
> It certainly is searchable. I do it all the time.
> Craig
> 
> 
> -Original Message-----
> From: Graham Samuel via use-livecode 
> To: How to use LiveCode 
> Cc: Graham Samuel 
> Sent: Tue, Apr 28, 2020 3:44 pm
> Subject: Re: Three very simple questions
> 
> Bill, I think you’re right about the Guide not being searchable. I was going 
> to point it out myself, but I began to think that I had used up my grumbling 
> allowance, or at least I had not much left and needed to use it for other 
> things.
> 
> Of course the Giude should be searchable!
> 
> Graham
> 
> Re grumbling - I have always been delighted by the way people on this list 
> come to each other’s aid. This ‘invisible college’ is a really essential part 
> of the LiveCode experience, I believe. I hope I say ‘thank you’ enough.
> 
> 
> 
>> On 26 Apr 2020, at 23:52, prothero--- via use-livecode 
>>  wrote:
>> 
>> Folks:
>> I think Graham is doing LiveCode a favor by pointing out some of the ways a 
>> newby (even though he isn’t) might get messed up when learning LiveCode. We 
>> all get used to various approaches and newbies (even tho Graham isn’t) alert 
>> us to impediments for that very vital population of potential or new users.
>> 
>> One thing that has bugged me is that when I click on the dictionary, I get a 
>> nice display of commands, etc, searchable. But when I click on the “Guide” 
>> tab, I get what looks like a very informative document. However, if I’m 
>> looking for a particular task and want to do a search, there is none. So, it 
>> seems to me like a very valuable newby document is crippled by the omission 
>> of a very basic feature.
>> 
>> Or have I just missed something?
>> 
>> Best,
>> Bill
>> 
>> William A. Prothero
>> Santa Barbara, CA. 93105
>> http://earthlearningsolutions.org/
>> 
>>> On Apr 26, 2020, at 12:23 PM, Mark Wieder via use-livecode 
>>>  wrote:
>>> 
>>> On 4/26/20 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>>>> "globals are evil"
>>>> But we use  one array
>>>> Global gConfigA
>>>> and we stuff it with all manner of "things" including another arrays
>>>> it turns about to quite useful
>>> 
>>> Yes, I do what you and Jacque do as a workaround, of course. I recently 
>>> implemented a feature management infrastructure the same way, given the 
>>> lack of globally available constants.
>>> 
>>> on preOpenStack
>>> global gFeatures
>>> put "feature1,feature2,feature3" into gFeatures
>>> end preOpenStack
>>> 
>>> ...some other stack
>>> 
>>> global gfeatures
>>> if "feature2" is among the items of gfeatures then
>>> ...
>>> 
>>> on closeStackRequest
>>> delete variable gFeatures
>>> end closestackRequest
>>> 
>>> great for A/B testing, rolling out new features without messing with 
>>> existing code, being able to roll back unwanted or not-working features 
>>> after beta testing... and would be so much cleaner if we didn't have to 
>>> resort to global variables and remember to put a reference to them in each 
>>> place they're referenced...
>>> 
>>> -- 
>>> Mark Wieder
>>> ahsoftw...@gmail.com
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Quick IDE question

2020-04-29 Thread Graham Samuel via use-livecode
Since yesterday, running either LC 9.5.1  or 9.6.0 dp4 on a Mac, every time I 
open the Script Editor window, it overfills my screen, so I can’t see the 
bottom of the window. There are no decorations, so I can’t resize or minimise 
the window; and dragging the window by the title bar doesn’t work either. I’ve 
restarted both versions but no joy. Everything else seems to be working 
normally and the other LC windows have decorations.

I don’t believe I’ve ever seen this before. Does anyone know how I can get out 
of it?

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Quick IDE question

2020-04-29 Thread Graham Samuel via use-livecode
Stone the crows, it worked!! Even the decorations came back, and the ability to 
drag the window - neither of which are obviously related to the rect or height 
of the stack, as far as I can see.

Thanks so much Martin. I wonder how just the Script Editor got so out of whack 
- but it’s just a theoretical wonder, as I am back to normal.

Thanks again.

> On 29 Apr 2020, at 15:35, Martin Koob via use-livecode 
>  wrote:
> 
> Hi Graham
> 
> Try this in the message box
> 
> set the rect of stack "revNewScriptEditor 1" to the screenrect; set the 
> height of stack "revNewScriptEditor 1" to 750
> 
> 
> 
> 
> Regards,
> 
> Martin Koob
> 
> 
> 
> 
> 
>> On Apr 29, 2020, at 9:11 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Since yesterday, running either LC 9.5.1  or 9.6.0 dp4 on a Mac, every time 
>> I open the Script Editor window, it overfills my screen, so I can’t see the 
>> bottom of the window. There are no decorations, so I can’t resize or 
>> minimise the window; and dragging the window by the title bar doesn’t work 
>> either. I’ve restarted both versions but no joy. Everything else seems to be 
>> working normally and the other LC windows have decorations.
>> 
>> I don’t believe I’ve ever seen this before. Does anyone know how I can get 
>> out of it?
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: FormattedHeight

2020-05-03 Thread Graham Samuel via use-livecode
I agree that that’s what Widgets are for, but I don’t think there’s been enough 
input from the mother ship to ensure that all published widgets look as much as 
possible like ‘normal’ LC objects, with the expected properties and full 
documentation. Obviously some are very powerful and useful and amount to nice 
little bits of software one can slip into a program, like for example the  
browser or even the clock - but some are so mysterious that they are unusable. 
Heather recently told me that there is some hidden documentation and examples 
of some of the ‘Mg' series, which seems kind of ludicrous. 

But my main point is that anything which ends up appearing on a screen should 
have all the usual properties like colours, tooltips etc - several of the 
things that I’ve been trying to use lack the most simple properties and 
therefore seem very ‘foreign’, which surely is counter-productive. As I see it, 
widgets are intended to be a way of integrating new objects and capabilities 
into LC without needing changes in the engine. I think that the technical 
foundation is good but the implementation and presentation up to now is not 
sufficiently mature.

Just my two locked-down Eurocents.

Graham

> On 3 May 2020, at 06:42, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 5/2/20 8:20 PM, Richard Gaskin via use-livecode wrote:
>> LiveCode is nearly unmatched for making desktop apps, but for mobile 
>> development there are so many unfinished edges it's barely a contender for 
>> anyone not already heavily invested in LiveCode from desktop work.
>> It would be reassuring if the LC team could share with us their plan to 
>> finish their mobile implementation, to deliver a user experience on par with 
>> its best-of-breed desktop workflows.
> 
> That's what widgets are for. There are native fields and buttons, though some 
> are still missing, but not enough people are writing them. And unfortunately, 
> mobile GUIs change often enough on both Android and iOS that the native 
> buttons aren't so native any more.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Has anyone experience of GPS on iPhone?

2020-05-04 Thread Graham Samuel via use-livecode
I’m using GPS on iPhone using the various commands and functions available in 
LC. Most of this works, but I am having difficulty with the quantity 
“horizontal accuracy”. This can be queried via an array which is returned when 
mobileCurrentLocation() is executed. 

Looking at other iOS apps that use GPS and allow one to examine their data, I 
find that in my part of the world, accuracy for them is of the order of 5 
metres: but when I query it using LC I get much higher numbers, indeed some of 
them look like nonsense, being hundreds of metres!

I am aware that it takes time for a GPS signal to settle down after 
mobileStartTrackingSensor “location” has been called, but even if I script the 
examination of accuracy to wait for it to settle down (I look for a run of 
similar or identical readings against a ‘reasonable’ criterion, such as 5 
metres), it still sometimes settles on very large numbers comparatively 
speaking, for example it might stabilise at 65 metres. With that level of 
inaccuracy any cumulative use, as in working out the number of kilometres in a 
trip, would not be reliable.

I wonder if my expectation is wrong, or if there is something different about 
LC’s encapsulation of these iOS outputs, or if there is some other explanation.

In the short term, I’m simply going to have to relax my search for a reasonable 
accuracy of the order of 5 metres, and just go for the first run of stable 
readings. But I would love to hear any further insight from anyone who’s 
already tried it.

Graham
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Has anyone experience of GPS on iPhone?

2020-05-04 Thread Graham Samuel via use-livecode
Thanks Ralph. To answer your questions:

1. I left the mobileStartTrackingSensor to the default second parameter, i.e. I 
didn’t put anything. The LC dictionary says that the default value is false 
which means

> readings are determined using accurate (but power consuming) sources such as 
> GPS

of course I could put in “false” explicitly. But looking at the actual output 
data from the GPS functions, I think it’s evident that the GPS is actually 
being used. Nevertheless I will try including “false”.

2.  Yes, I do require GPS as well as Location Services

So, those bits seem OK.

Still thinking about it, obviously.

Graham

> On 4 May 2020, at 16:22, Ralph DiMola via use-livecode 
>  wrote:
> 
> 1) Did you set the second parameter of mobileStartTrackingSensor to "false"?
> 2) Did you require "GPS" as well as "Location Services" in the standalone 
> settings? If you don’t tick GPS then the GPS chip will not be used and you 
> will get rough location readings.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Graham Samuel via use-livecode
> Sent: Monday, May 04, 2020 8:07 AM
> To: How to use LiveCode
> Cc: Graham Samuel
> Subject: Has anyone experience of GPS on iPhone?
> 
> I’m using GPS on iPhone using the various commands and functions available in 
> LC. Most of this works, but I am having difficulty with the quantity 
> “horizontal accuracy”. This can be queried via an array which is returned 
> when mobileCurrentLocation() is executed. 
> 
> Looking at other iOS apps that use GPS and allow one to examine their data, I 
> find that in my part of the world, accuracy for them is of the order of 5 
> metres: but when I query it using LC I get much higher numbers, indeed some 
> of them look like nonsense, being hundreds of metres!
> 
> I am aware that it takes time for a GPS signal to settle down after 
> mobileStartTrackingSensor “location” has been called, but even if I script 
> the examination of accuracy to wait for it to settle down (I look for a run 
> of similar or identical readings against a ‘reasonable’ criterion, such as 5 
> metres), it still sometimes settles on very large numbers comparatively 
> speaking, for example it might stabilise at 65 metres. With that level of 
> inaccuracy any cumulative use, as in working out the number of kilometres in 
> a trip, would not be reliable.
> 
> I wonder if my expectation is wrong, or if there is something different about 
> LC’s encapsulation of these iOS outputs, or if there is some other 
> explanation.
> 
> In the short term, I’m simply going to have to relax my search for a 
> reasonable accuracy of the order of 5 metres, and just go for the first run 
> of stable readings. But I would love to hear any further insight from anyone 
> who’s already tried it.
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Has anyone experience of GPS on iPhone?

2020-05-05 Thread Graham Samuel via use-livecode
Thanks Bill for your two messages. I see from the link you gave that the LC 
system is (as expected) simply a wrapper for the iOS API, and indeed the term 
“horizontal accuracy” is actually used internally in iOS. So it’s unlikely that 
LC itself is adding to my problems.

I don’t have access to an entirely different GPS system - all mine are on 
iPhones and I’m in lockdown. Google Earth reckons my reference point is at 
43.276693, 2.160029. (The curious can see where I live).

Here is a little test done by simply sitting on a bench in my garden - as far 
as possible, this is what Google Earth is looking at.

Another app - “MyAltitude” on my phone. Location 43.2766, 2.1601

Built-in “Compass” app. Location 43.2766, 2.1600

My app - successive calls to mobileCurrentLocation a few seconds apart differ 
only beyond the fourth decimal place, a typical one is 43.276732 (so 43.277), 
2.160163 (so 2.1602). During this set of about 20 measurements, horizontal 
accuracy varied from a minimum of 5 to a maximum of 23, tending to settle down 
to the lower end - but on other days I’ve seen much higher maxima, certainly 
above 60 and very occasionally a lot more.

So the readings agree, at least to three decimal places. Presumably the 
accuracy is supposed to tell me the amount of wobble to expect, although it’s 
measured in metres, whereas longitude and latitude are not so straightforward, 
since the grid covers a spherical earth. Where I live (England and the South of 
France), the North-South distance of a second of arc (or .000278 in decimal 
measurement) is about 20 metres, which is perhaps acceptable in short journeys 
such as walks, so I need to take account of say four or five decimal places if 
I’m going to hope for reasonable accuracy. This certainly looks feasible - my 
only real problem therefore is the wild variation in horizontal accuracy that 
I’m seeing.

All this makes me think that I should not have a target accuracy, since I may 
never hit the target and my user will be waiting forever to start his or her 
trip. I am therefore about to modify the app so it only looks for consistency - 
as soon as the horizontal accuracy settles down to a value without say more 
than five percent of variation, I will allow the trip to start. Seems weird but 
it’s the best I can do. Without access to anyone else’s coding for an iOS app, 
I can’t see a way to improve on that strategy. Obviously I will now run tests 
to see how my app compared with others that measure on-the-ground trip 
distance, particularly for short distances. 

In case anyone else thinks this is interesting (!), I’ll report back.

Graham

> On 4 May 2020, at 16:02, Prothero-ELS via use-livecode 
>  wrote:
> 
> Graham,
> I would want to be verifying the coordinates with another gps device. I’d 
> also check it against apps that give lat/Lon. 
> 
> Bill
> 
> William Prothero
> https://earthlearningsolutions.org
> 
>> On May 4, 2020, at 5:07 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> I’m using GPS on iPhone using the various commands and functions available 
>> in LC. Most of this works, but I am having difficulty with the quantity 
>> “horizontal accuracy”. This can be queried via an array which is returned 
>> when mobileCurrentLocation() is executed. 
>> 
>> Looking at other iOS apps that use GPS and allow one to examine their data, 
>> I find that in my part of the world, accuracy for them is of the order of 5 
>> metres: but when I query it using LC I get much higher numbers, indeed some 
>> of them look like nonsense, being hundreds of metres!
>> 
>> I am aware that it takes time for a GPS signal to settle down after 
>> mobileStartTrackingSensor “location” has been called, but even if I script 
>> the examination of accuracy to wait for it to settle down (I look for a run 
>> of similar or identical readings against a ‘reasonable’ criterion, such as 5 
>> metres), it still sometimes settles on very large numbers comparatively 
>> speaking, for example it might stabilise at 65 metres. With that level of 
>> inaccuracy any cumulative use, as in working out the number of kilometres in 
>> a trip, would not be reliable.
>> 
>> I wonder if my expectation is wrong, or if there is something different 
>> about LC’s encapsulation of these iOS outputs, or if there is some other 
>> explanation.
>> 
>> In the short term, I’m simply going to have to relax my search for a 
>> reasonable accuracy of the order of 5 metres, and just go for the first run 
>> of stable readings. But I would love to hear any further insight from anyone 
>> who’s already tried it.
>> 
>> Graham
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>&g

Re: Has anyone experience of GPS on iPhone?

2020-05-06 Thread Graham Samuel via use-livecode
Bill, I think you are confirming that there is some mystery here. There are a 
lot of apps that seem to get location, and measures derived from location, 
almost completely right, whereas I am having trouble doing so with what must be 
the same essential data.

Take the problem of measuring the length of a country walk (I mean a walk not 
in a straight line). My basic approach is to process locationChanged messages, 
which unsurprisingly are triggered every time the GPS-measured location 
changes. So as not to get overwhelmed with very small, frequent changes, I only 
process a locationChanged message every 3 seconds - I know at least one other 
app that does this. As a person probably walks up to two metres a second, this 
fits in with what we know about accuracy, I think. The method is very simple. 
Every time we respond to a locationChanged message, we work out the straight 
line distance delta as in

  delta = (where we were 3 seconds ago) - (where we are now)

Ignoring the sign of the result, of course. This can be done by Haversine or 
similar algorithms for measuring short distances on the Earth’s surface - it’s 
essentially a Pythagoras calculation. Then we add up all the deltas and we know 
how far we walked on the trip with a fair if not complete degree of accuracy - 
easy! 

Only there are complications. Of course if any delta is zero, it doesn’t 
contribute to the trip; but what if it’s **nearly** zero - is it sensible to 
ignore very small deltas on the grounds that they are due to GPS wobble, or 
should we put them all in? 

Here’s what happened when I tried to do it: first I calculated the deltas to 
two decimal places, and I found that I was badly underestimating the distance 
walked; so then I pushed up the accuracy of the calculation to 5 decimal 
places. Sure enough, the measured route got longer in kilometers, until I 
noticed that if I simply put the phone on the grass and left it, so it wasn’t 
moving at all, in about 45 minutes I’d accumulated a completely spurious half a 
kilometre of walking! The small variations in the GPS signal (what I call the 
wobble) must have been responsible, since there was no other source of data but 
the GPS reading.

How then to avoid either under- or over-estimating the trip distance? Plenty of 
apps have done it but I just can’t see how, although I keep tinkering with the 
parameters. Of course I can never forget that my scripting might just be plain 
wrong, but so far my incremental method hasn’t worked sufficiently well, in the 
sense that if run the app and choose to walk in an exact straight line, I can 
compare a single measure of distance from the starting point with my integral 
approach. So far the result is not even close. As you say, intensive Internet 
searches are called for.

I wish all this were easier.

Graham

> On 5 May 2020, at 15:58, Prothero-ELS via use-livecode 
>  wrote:
> 
> Graham,
> This makes me wonder how the Google and Apple Maps get their accuracy. When 
> driving or walking, trying to figure out how to get to an address, it shows 
> me walking along a street, certainly more accurate than 20meters. Yet, when 
> I’m wondering where my wife is, and load up “Find My iphone”, the location 
> does jump around (easily 20 meters) for awhile, then seems to settle down. 
> Hmm... In the olden days, NASA used to add error into publicly available gps 
> readings, for security reasons. But now errors are not added and geo 
> scientists are measuring very small fault motion with gps, but it’s comparing 
> relative motion between two stations so wouldn’t apply in your case. I think 
> some serious internet searching may be in order.
> 
> You must have tried Google Maps with satellite view, to see where it puts you 
> relative to your house. You might be interested in this demo of getting 
> google maps from Livecode.
> 
> http://earthlearningsolutions.org/google-static-maps-demo/
> 
> I  made a basic version of this and a hermann (hh), who helped me figure out 
> the boundary coordinate calculation, added to it. I think it’s also in the 
> livecode repository. It’s a couple of years old, so  
> 
> Best,
> Bill
> 
> William Prothero
> https://earthlearningsolutions.org
> 
>> On May 5, 2020, at 2:30 AM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Thanks Bill for your two messages. I see from the link you gave that the LC 
>> system is (as expected) simply a wrapper for the iOS API, and indeed the 
>> term “horizontal accuracy” is actually used internally in iOS. So it’s 
>> unlikely that LC itself is adding to my problems.
>> 
>> I don’t have access to an entirely different GPS system - all mine are on 
>> iPhones and I’m in lockdown. Google Earth reckons my reference point is at 
>> 43.276693, 2.160029. (The curious can see where I live).
>> 
>> Here is a 

Re: Has anyone experience of GPS on iPhone?

2020-05-06 Thread Graham Samuel via use-livecode
Mark, thanks for that contribution. Looks like more maths is needed. I will 
follow up on your approach, as mine really only works if all GPS readings are 
nearly accurate. As I have seen accuracies (really inaccuracies!) as large as 
65 metres even after a settling-down period, a few of those will certainly put 
the integral-style calculation way out.

Really for this part of my app I need to emulate the work done in dozens of 
trekking apps available in lots of countries. I have one sneaky idea, which is 
to approach the developers of one of my favourite apps, since I have had some 
contact with them on other matters, and just see if they might tell me their 
approach - I can easily show that I am not a competitor! But that’s not an 
approach I can rely on, of course!

I will keep plugging away even though the initial motivation for my app (local 
lockdown) is probably going away. Hard to give up now.

Thanks everyone for their input.

Graham

> On 6 May 2020, at 16:52, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2020-05-06 14:09, Graham Samuel via use-livecode wrote:
>> Bill, I think you are confirming that there is some mystery here.
>> There are a lot of apps that seem to get location, and measures
>> derived from location, almost completely right, whereas I am having
>> trouble doing so with what must be the same essential data.
>> How then to avoid either under- or over-estimating the trip distance?
>> Plenty of apps have done it but I just can’t see how, although I keep
>> tinkering with the parameters. Of course I can never forget that my
>> scripting might just be plain wrong, but so far my incremental method
>> hasn’t worked sufficiently well, in the sense that if run the app and
>> choose to walk in an exact straight line, I can compare a single
>> measure of distance from the starting point with my integral approach.
>> So far the result is not even close. As you say, intensive Internet
>> searches are called for.
> 
> I'm pretty sure that the data you are getting is precisely what all other 
> apps will get - we are just returning the location data as provided by 
> CoreLocation. The difference will be the analysis which these apps are doing 
> on the data to derive an accurate assessment of the route taken I'd imagine. 
> Indeed, it could be they also take into account other senses (compass and 
> accelerometer) to help - but I don't know that for sure.
> 
> There are two functions which might help you with your endeavour:
> 
>  mobileSetLocationHistoryLimit
>  mobileGetLocationHistory()
> 
> The details are in the docs, but basically the engine can collect and keep a 
> list of locations which you can collect periodically.
> 
> I suspect the way to think about this is not to think about it as an 
> incremental thing at all as any outliers will completely destroy the 
> accuracy. Instead imagine it as a 'curve-fitting' exercise (piece-wise linear 
> approximation is probably sufficient!) - i.e. taking sets of (slightly) 
> overlapping samples and derive a 'best-guess' path which fits the data.
> 
> It is likely that some cleaning of the data would be needed first to 
> eliminate outliers also. e.g. You can compute speed needed to get between 
> individual points, if any given point is outside of a reasonable range of 
> 'current' speed with approximated acceleration/deceleration taken into 
> account then it should be discarded.
> 
> Doing a google search for "deriving a approximate path from gps data" turns 
> up quite a lot of literature on the subject, so this is definitely something 
> which has/is studied in depth...
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Has anyone experience of GPS on iPhone?

2020-05-08 Thread Graham Samuel via use-livecode
Just to conclude the tale: I have consulted the developers of one of my 
favourite apps that tells you how far you’ve walked or cycled (maybe long 
journeys as on sees on car satnavs are a different proposition, and I am not so 
interested in these for my own purposes). I am not revealing any secrets when I 
say that the lead guy reports that they have dedicated "tens of thousands of 
lines of code” to the issue. True, they cope with elevation, which I was 
planning to ignore, but nevertheless their ways of handling changes in accuracy 
include several things like reasonableness checks, so not even just simple 
curve-fitting.

In my particular circumstances and with my own limited skills I have simply 
decided to give up on that part of my app. A user can run another app 
simultaneously to mine to find out how far they’ve travelled - that’s easy. So, 
a wiser and a sadder man, I will try to finish what I started but with limited 
functionality.

Thanks to everyone who chipped in with advice, facts etc.

Graham

> On 6 May 2020, at 18:24, Graham Samuel via use-livecode 
>  wrote:
> 
> Mark, thanks for that contribution. Looks like more maths is needed. I will 
> follow up on your approach, as mine really only works if all GPS readings are 
> nearly accurate. As I have seen accuracies (really inaccuracies!) as large as 
> 65 metres even after a settling-down period, a few of those will certainly 
> put the integral-style calculation way out.
> 
> Really for this part of my app I need to emulate the work done in dozens of 
> trekking apps available in lots of countries. I have one sneaky idea, which 
> is to approach the developers of one of my favourite apps, since I have had 
> some contact with them on other matters, and just see if they might tell me 
> their approach - I can easily show that I am not a competitor! But that’s not 
> an approach I can rely on, of course!
> 
> I will keep plugging away even though the initial motivation for my app 
> (local lockdown) is probably going away. Hard to give up now.
> 
> Thanks everyone for their input.
> 
> Graham
> 
>> On 6 May 2020, at 16:52, Mark Waddingham via use-livecode 
>>  wrote:
>> 
>> On 2020-05-06 14:09, Graham Samuel via use-livecode wrote:
>>> Bill, I think you are confirming that there is some mystery here.
>>> There are a lot of apps that seem to get location, and measures
>>> derived from location, almost completely right, whereas I am having
>>> trouble doing so with what must be the same essential data.
>>> How then to avoid either under- or over-estimating the trip distance?
>>> Plenty of apps have done it but I just can’t see how, although I keep
>>> tinkering with the parameters. Of course I can never forget that my
>>> scripting might just be plain wrong, but so far my incremental method
>>> hasn’t worked sufficiently well, in the sense that if run the app and
>>> choose to walk in an exact straight line, I can compare a single
>>> measure of distance from the starting point with my integral approach.
>>> So far the result is not even close. As you say, intensive Internet
>>> searches are called for.
>> 
>> I'm pretty sure that the data you are getting is precisely what all other 
>> apps will get - we are just returning the location data as provided by 
>> CoreLocation. The difference will be the analysis which these apps are doing 
>> on the data to derive an accurate assessment of the route taken I'd imagine. 
>> Indeed, it could be they also take into account other senses (compass and 
>> accelerometer) to help - but I don't know that for sure.
>> 
>> There are two functions which might help you with your endeavour:
>> 
>> mobileSetLocationHistoryLimit
>> mobileGetLocationHistory()
>> 
>> The details are in the docs, but basically the engine can collect and keep a 
>> list of locations which you can collect periodically.
>> 
>> I suspect the way to think about this is not to think about it as an 
>> incremental thing at all as any outliers will completely destroy the 
>> accuracy. Instead imagine it as a 'curve-fitting' exercise (piece-wise 
>> linear approximation is probably sufficient!) - i.e. taking sets of 
>> (slightly) overlapping samples and derive a 'best-guess' path which fits the 
>> data.
>> 
>> It is likely that some cleaning of the data would be needed first to 
>> eliminate outliers also. e.g. You can compute speed needed to get between 
>> individual points, if any given point is outside of a reasonable range of 
>> 'current' speed with approximated accelera

  1   2   3   4   >