Re: Can a stack know which standalone engine it's running on?

2020-04-27 Thread Mark Waddingham via use-livecode

On 2020-04-27 23:08, Devin Asay via use-livecode wrote:

But doesn’t the processor just report on the host operating system? I
wan’t to know which LiveCode engine is running.


No 'the processor' reports what architecture the engine was built for. 
From the dictionary:



Use the processor function to determine the system architecture. The 
system architecture may either be emulated or the architecture of the 
host CPU. For example, when running the application in an android 
emulator the processor will return the emulated architecture rather than 
the architecture of the host CPU.


Note: Some operating systems have emulators built in. For example, 
Windows has WOW64 which allows x86 executables to run under x86_64 
versions of Windows.



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


Re: Mobile screen sizes - another naive question

2020-04-27 Thread Alex Tweedly via use-livecode



On 27/04/2020 21:29, Richard Gaskin via use-livecode wrote:


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

Interesting, and as you say, a good start can be made easily. But it has 
many built-in assumption that may come back to bite you 


on resizeControl -- Allow the user to enjoy whichever orientation -- 
they prefer with responsive design: -- put item 1 of the loc of me 
into tMidX put item 2 of the loc of me into tMidY -- if the width of 
this cd < the height of this cd then -- Portrait: set the loc of grp 
"UserInfo" to \ tMidX, tMidY - (the formattedHeight of grp "UserInfo" 
div 2) set the loc of grp "MembershipInfo" to \ tMidX, tMidY + (the 
formattedHeight of grp "MembershipInfo" div 2) else -- Landscape: set 
the loc of grp "UserInfo" to \ tMidX - (the formattedWidth of grp 
"UserInfo" div 2), tMidY set the loc of grp "MembershipInfo" to \ 
tMidX + (the formattedWidth of grp "MembershipInfo" div 2), tMidY end 
if -- end resizeControl
In Portrait mode, this assumes that the two groups are the same height 
(or nearly so). If they're not, one or other of them will finish up 
bumping against the top (or bottom) of the card.


Similarly, in Landscape, it assumes they are same-ish width, otherwise 
one of them will stick out the side.
*AND* it assumes they are the same height, otherwise the tops will be 
mis-aligned and potentially ugly.

( you could add lines like
put the min(top of grp "MembershipInfo", the top of grp "Userinfo") into 
temp if temp < the top of me + 10 then put the top of me + 10 into temp 
set the top of grp "MembershipInfo" to temp set the top of grp 
"UserInfo" to temp


to the end of the Landscape case).

And there are other assumptions

1. the fields are sized suitable to fit in the width of the narrowest 
device. If a narrow device is small enough, maybe the labels should 
slide around to above its field, rather than be beside it.


2. assumes that you don't want to widen the fields on not-very-narrow 
devices - whether stretching the fields, or increasing spacing between them.


3. In landscape, there may well not be enough width to allow the two 
groups side-by-side (say, on a phone), and you would really prefer to 
have the stacked vertically, even though in Landscape.


4. (perhaps the hardest) if you have text areas (i.e. multi-line 
fields), how do you decide whether to expand vertically depending on the 
height of the card, versus simply allowing vertical scroll bars within 
the field.



In summary - I absolutely agree that LC has everything needed to provide 
responsive layouts, and that with even a modicum of effort (which might 
seem tedious the first few times :-), it can produce layouts which are 
MUCH more responsive than a typical web page/app. But there is a danger 
of thinking it is too easy, and producing semi-responsive designs which 
are not quite good enough.


Things that would help:

1. either a widget or a compound-control for labelled field which wold 
allow the encapsulation for the sizing options for label+field; and 
would allow for labelling above or beside the field depending on 
context, space available and kind of field.


And there are others -library functions or behaviours that will help 
with the common cases - more thought on that tomorrow.


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


Re: Dark Mode support and iOS startup screens

2020-04-27 Thread hlowe--- via use-livecode
Thank you Panos. Looking forward to seeing this.

Best wishes,

Henry


Hello Henry,

Support for storyboards is coming in the next LC 9.6 RC-1 release.

Kind regards,
Panos
--

On Mon, 27 Apr 2020 at 23:32, HENRY LOWE via use-livecode <
use-livecode@lists.runrev.com> wrote:

> As of LC 9.6.0 (dp4) there is support for detecting whether the system is
> in dark or light mode and also a message that signals when the display
> mode
> changes. This works well and we have successfully added dark mode support
> to our iOS app. However, there appears to be no support for adding a light
> & dark mode startup screen. So when the app launches in dark mode it will
> displays the bright light mode start up screen. Different dark and light
> mode startup screens are supported by Xcode’s storyboards, which will soon
> be mandated by Apple as the only way to support iOS launch screens. Any
> idea when this support might be available? We were hoping to release an
> update to our iOS app implementing dark mode, as this is a much requested
> feature, but are now blocked by the startup screen issue.
>
> Thanks,
>
> Henry
> ___
> 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


Quoted from: 
http://runtime-revolution.278305.n4.nabble.com/Dark-Mode-support-and-iOS-startup-screens-tp4737982p4737983.html


_
Sent from http://runtime-revolution.278305.n4.nabble.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


Re: Can a stack know which standalone engine it's running on?

2020-04-27 Thread Devin Asay via use-livecode
But doesn’t the processor just report on the host operating system? I wan’t to 
know which LiveCode engine is running.

Here’s the scenario:

I have a LiveCode splash screen-type application for which I’ve compiled both 
Windows-32 and Windows-64-bit versions. The standalone opens a stack that 
contains the actual business logic. In my About dialog, I’d like to be able to 
report which LiveCode engine the stack is running under. Do we have a way to 
get that information?

Devin


> On Apr 27, 2020, at 3:56 PM, Mark Waddingham via use-livecode 
>  wrote:
> 
> The version almost uniquely identifies every public engine build - the 
> buildNumber always does.
> 
> The platform together with the processor uniquely identify the target it was 
> built for.
> 
> Warmest Regards,
> 
> Mark.
> 
> Sent from my iPhone
> 
>> On 27 Apr 2020, at 22:43, Devin Asay via use-livecode 
>>  wrote:
>> 
>> The subject line says it. Is there a way for my stack to know which Windows 
>> standalone engine it is running on? For diagnostic purposes I would like to 
>> be able to report the current LiveCode standalone engine. I’m probably 
>> missing something obvious.
>> 
>> Devin
>> 
>> 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

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


Re: Can a stack know which standalone engine it's running on?

2020-04-27 Thread Mark Waddingham via use-livecode
The version almost uniquely identifies every public engine build - the 
buildNumber always does.

The platform together with the processor uniquely identify the target it was 
built for.

Warmest Regards,

Mark.

Sent from my iPhone

> On 27 Apr 2020, at 22:43, Devin Asay via use-livecode 
>  wrote:
> 
> The subject line says it. Is there a way for my stack to know which Windows 
> standalone engine it is running on? For diagnostic purposes I would like to 
> be able to report the current LiveCode standalone engine. I’m probably 
> missing something obvious.
> 
> Devin
> 
> 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


Can a stack know which standalone engine it's running on?

2020-04-27 Thread Devin Asay via use-livecode
The subject line says it. Is there a way for my stack to know which Windows 
standalone engine it is running on? For diagnostic purposes I would like to be 
able to report the current LiveCode standalone engine. I’m probably missing 
something obvious.

Devin

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


Re: Dark Mode support and iOS startup screens

2020-04-27 Thread panagiotis merakos via use-livecode
Hello Henry,

Support for storyboards is coming in the next LC 9.6 RC-1 release.

Kind regards,
Panos
--

On Mon, 27 Apr 2020 at 23:32, HENRY LOWE via use-livecode <
use-livecode@lists.runrev.com> wrote:

> As of LC 9.6.0 (dp4) there is support for detecting whether the system is
> in dark or light mode and also a message that signals when the display mode
> changes. This works well and we have successfully added dark mode support
> to our iOS app. However, there appears to be no support for adding a light
> & dark mode startup screen. So when the app launches in dark mode it will
> displays the bright light mode start up screen. Different dark and light
> mode startup screens are supported by Xcode’s storyboards, which will soon
> be mandated by Apple as the only way to support iOS launch screens. Any
> idea when this support might be available? We were hoping to release an
> update to our iOS app implementing dark mode, as this is a much requested
> feature, but are now blocked by the startup screen issue.
>
> Thanks,
>
> Henry
> ___
> 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


Dark Mode support and iOS startup screens

2020-04-27 Thread HENRY LOWE via use-livecode
As of LC 9.6.0 (dp4) there is support for detecting whether the system is in 
dark or light mode and also a message that signals when the display mode 
changes. This works well and we have successfully added dark mode support to 
our iOS app. However, there appears to be no support for adding a light & dark 
mode startup screen. So when the app launches in dark mode it will displays the 
bright light mode start up screen. Different dark and light mode startup 
screens are supported by Xcode’s storyboards, which will soon be mandated by 
Apple as the only way to support iOS launch screens. Any idea when this support 
might be available? We were hoping to release an update to our iOS app 
implementing dark mode, as this is a much requested feature, but are now 
blocked by the startup screen issue.

Thanks,

Henry
___
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-27 Thread Richard Gaskin via use-livecode

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:
   - Subject field
   - Body field
   - Send button

With that, our card script need only bother itself with the general
placement of the two main goups:

on resizeStack x,y
set the rect of grp "Nav" to 0,0,x,40
set the rect of grp "Message" to 0,40,x,y
end resizeStack

And because the groups will get a resizeControl message when that card
script adjust them, each can contain its own handler to take care of its
interior contents.  This might be the script for the Message group:

on resizeControl
set the rect of fld "Subject" to the left of me, the top of me, \
  the rig

Re: Which git service suits a LiveCoder best?

2020-04-27 Thread Brian Milby via use-livecode
ScriptTracker isn’t necessarily incompatible with Levure, but if using that 
framework as intended then all of the scripts would be in script only stacks as 
behaviors which would make it unnecessary.

I have thought about setting up a hybrid project as a test but never have 
gotten around to playing with it.

Thanks,
Brian
On Apr 27, 2020, 3:53 PM -0400, Andreas Bergendal via use-livecode 
, wrote:
> As to the ’how’, I planned to move into script-only stacks more anyway, and 
> will also test the Levure framework, and/or Script Tracker.
> I’m not sure if those two are compatible though? I mean, if I use Levure 
> framework I can’t (needn’t?) use Script Tracker as well, right?
>
> Anyway, with the help of a good free tutorial I’ve set up a GitHub account 
> and done the necessary local stuff, including doing basic command line 
> actions (yeah, wasn’t that scary after all…), so I’m progressing one step at 
> a time… :)
>
> Andreas
> ___
> 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: Counting unique items in a file

2020-04-27 Thread Ralph DiMola via use-livecode
I would change the first line below and add one line and one 
parameter(dateTimeColumn). This assumes that the date/time is converted into 
seconds or milliseconds).

add 1 to uNames[item pColumn of l]["Count"]
if item dateTimeColumn of l > uNames[item pColumn of l]["DateTime"] then put 
item dateTimeColumn of l into uNames[item pColumn of l]["DateTime"]

Then the returned array will still have the keys of all unique drivers and each 
key will have 2 keys "Count" and "Datetime"

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 
Skip Kimpel via use-livecode
Sent: Monday, April 27, 2020 3:29 PM
To: How to use LiveCode
Cc: Skip Kimpel
Subject: Re: Counting unique items in a file

All of that works perfectly.  Thank you everybody!

Let's through a layer of complexity in here... each of of those names has 
another column with a time associated with it, for instance "13:02:58"
 I would like to only show the LATEST time associated with that particular name.

Premise behind this whole exercise:  I have a list of drivers and I want to 
produce a report that shows the driver name, number of jobs (both of these 
accomplished through the last script) and when they finished their last 
delivery.

Should I just break this out into a separate function or would it make sense to 
modify this function to fit these additional needs?

SKIP

On Mon, Apr 27, 2020 at 3:05 PM Skip Kimpel  wrote:

> Silly me... of course.  Thank you, Dunbarx for pointing out the 
> obvious :)
>
> SKIP
>
> On Mon, Apr 27, 2020 at 2:27 PM dunbarx--- via use-livecode < 
> use-livecode@lists.runrev.com> wrote:
>
>> Hi.
>> You are getting empty because the information returned from the 
>> function is an array.
>> "combine " the array with "return and "comma"
>> Craig
>>
>>
>> -Original Message-
>> From: Skip Kimpel via use-livecode 
>> To: Dan Friedman 
>> Cc: Skip Kimpel ; How to use LiveCode < 
>> use-livecode@lists.runrev.com>
>> Sent: Mon, Apr 27, 2020 1:52 pm
>> Subject: Re: Counting unique items in a file
>>
>> Thanks Dan!
>>
>> Upon very quick implementation, I am getting empty results back.  I 
>> think I need to play around with this a little bit more but I feel 
>> you got me on the right track.
>>
>> Thanks again,
>>
>> SKIP
>>
>> On Mon, Apr 27, 2020 at 1:34 PM Dan Friedman 
>> 
>> wrote:
>>
>> > Skip,
>> >
>> > Haven't tested, but pope about this...
>> >
>> > function getUniqueNames inData,pColumn  put "" into uNames  set the 
>> > itemDel to tab  repeat for each line l in inData
>> >add 1 to uNames[item pColumn of l]  end repeat
>> >
>> >  return uNames
>> > end getUniqueNames
>> >
>> > You should get back an array keyed by the unique names, and how 
>> > many instances of each one
>> >
>> >
>> > -Dan
>> >
>> >
>> >
>> > On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via 
>> > use-livecode" > > use-livecode@lists.runrev.com> wrote:
>> >
>> >Good afternoon LC'ers,
>> >
>> >I am loading a tab delimited file into a variable and I need to 
>> > pull out
>> >all unique names from a certain column (let's say column 10) and
>> count
>> > how
>> >many times that name appears in that column.
>> >
>> >I know there has to be an easy way of doing it.  Every time I 
>> > try to start
>> >coding this it get wyyy too long :)
>> >
>> >Simple approach?
>> >
>> >SKIP
>> >___
>> >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


Re: Which git service suits a LiveCoder best?

2020-04-27 Thread Andreas Bergendal via use-livecode
As to the ’how’, I planned to move into script-only stacks more anyway, and 
will also test the Levure framework, and/or Script Tracker.
I’m not sure if those two are compatible though? I mean, if I use Levure 
framework I can’t (needn’t?) use Script Tracker as well, right?

Anyway, with the help of a good free tutorial I’ve set up a GitHub account and 
done the necessary local stuff, including doing basic command line actions 
(yeah, wasn’t that scary after all…), so I’m progressing one step at a time… :)

Andreas
___
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: Counting unique items in a file

2020-04-27 Thread Skip Kimpel via use-livecode
All of that works perfectly.  Thank you everybody!

Let's through a layer of complexity in here... each of of those names has
another column with a time associated with it, for instance "13:02:58"
 I would like to only show the LATEST time associated with that particular
name.

Premise behind this whole exercise:  I have a list of drivers and I want to
produce a report that shows the driver name, number of jobs (both of these
accomplished through the last script) and when they finished their last
delivery.

Should I just break this out into a separate function or would it make
sense to modify this function to fit these additional needs?

SKIP

On Mon, Apr 27, 2020 at 3:05 PM Skip Kimpel  wrote:

> Silly me... of course.  Thank you, Dunbarx for pointing out the obvious :)
>
> SKIP
>
> On Mon, Apr 27, 2020 at 2:27 PM dunbarx--- via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi.
>> You are getting empty because the information returned from the function
>> is an array.
>> "combine " the array with "return and "comma"
>> Craig
>>
>>
>> -Original Message-
>> From: Skip Kimpel via use-livecode 
>> To: Dan Friedman 
>> Cc: Skip Kimpel ; How to use LiveCode <
>> use-livecode@lists.runrev.com>
>> Sent: Mon, Apr 27, 2020 1:52 pm
>> Subject: Re: Counting unique items in a file
>>
>> Thanks Dan!
>>
>> Upon very quick implementation, I am getting empty results back.  I think
>> I
>> need to play around with this a little bit more but I feel you got me on
>> the right track.
>>
>> Thanks again,
>>
>> SKIP
>>
>> On Mon, Apr 27, 2020 at 1:34 PM Dan Friedman 
>> wrote:
>>
>> > Skip,
>> >
>> > Haven't tested, but pope about this...
>> >
>> > function getUniqueNames inData,pColumn
>> >  put "" into uNames
>> >  set the itemDel to tab
>> >  repeat for each line l in inData
>> >add 1 to uNames[item pColumn of l]
>> >  end repeat
>> >
>> >  return uNames
>> > end getUniqueNames
>> >
>> > You should get back an array keyed by the unique names, and how many
>> > instances of each one
>> >
>> >
>> > -Dan
>> >
>> >
>> >
>> > On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via
>> > use-livecode" > > use-livecode@lists.runrev.com> wrote:
>> >
>> >Good afternoon LC'ers,
>> >
>> >I am loading a tab delimited file into a variable and I need to pull
>> > out
>> >all unique names from a certain column (let's say column 10) and
>> count
>> > how
>> >many times that name appears in that column.
>> >
>> >I know there has to be an easy way of doing it.  Every time I try to
>> > start
>> >coding this it get wyyy too long :)
>> >
>> >Simple approach?
>> >
>> >SKIP
>> >___
>> >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: Counting unique items in a file

2020-04-27 Thread Skip Kimpel via use-livecode
Silly me... of course.  Thank you, Dunbarx for pointing out the obvious :)

SKIP

On Mon, Apr 27, 2020 at 2:27 PM dunbarx--- via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi.
> You are getting empty because the information returned from the function
> is an array.
> "combine " the array with "return and "comma"
> Craig
>
>
> -Original Message-
> From: Skip Kimpel via use-livecode 
> To: Dan Friedman 
> Cc: Skip Kimpel ; How to use LiveCode <
> use-livecode@lists.runrev.com>
> Sent: Mon, Apr 27, 2020 1:52 pm
> Subject: Re: Counting unique items in a file
>
> Thanks Dan!
>
> Upon very quick implementation, I am getting empty results back.  I think I
> need to play around with this a little bit more but I feel you got me on
> the right track.
>
> Thanks again,
>
> SKIP
>
> On Mon, Apr 27, 2020 at 1:34 PM Dan Friedman 
> wrote:
>
> > Skip,
> >
> > Haven't tested, but pope about this...
> >
> > function getUniqueNames inData,pColumn
> >  put "" into uNames
> >  set the itemDel to tab
> >  repeat for each line l in inData
> >add 1 to uNames[item pColumn of l]
> >  end repeat
> >
> >  return uNames
> > end getUniqueNames
> >
> > You should get back an array keyed by the unique names, and how many
> > instances of each one
> >
> >
> > -Dan
> >
> >
> >
> > On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via
> > use-livecode"  > use-livecode@lists.runrev.com> wrote:
> >
> >Good afternoon LC'ers,
> >
> >I am loading a tab delimited file into a variable and I need to pull
> > out
> >all unique names from a certain column (let's say column 10) and count
> > how
> >many times that name appears in that column.
> >
> >I know there has to be an easy way of doing it.  Every time I try to
> > start
> >coding this it get wyyy too long :)
> >
> >Simple approach?
> >
> >SKIP
> >___
> >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


mouseColor randomly returning "0,0,0"

2020-04-27 Thread Richard Gaskin via use-livecode
For years I've relied on the mouseColor to pick up colors for my 
layouts, but lately I've found something weird:


Most of the time it works, but sometimes it return "0,0,0" over things I 
know aren't black.


For example, this morning it's returning that color of a large block of 
solid light green.


Has anyone else seen oddities with the mousecolor?


Current test environment: LC 9.6dp4, Ubuntu 18.04

--
 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


Re: Counting unique items in a file

2020-04-27 Thread dunbarx--- via use-livecode
Hi.
You are getting empty because the information returned from the function is an 
array.
"combine " the array with "return and "comma"
Craig


-Original Message-
From: Skip Kimpel via use-livecode 
To: Dan Friedman 
Cc: Skip Kimpel ; How to use LiveCode 

Sent: Mon, Apr 27, 2020 1:52 pm
Subject: Re: Counting unique items in a file

Thanks Dan!

Upon very quick implementation, I am getting empty results back.  I think I
need to play around with this a little bit more but I feel you got me on
the right track.

Thanks again,

SKIP

On Mon, Apr 27, 2020 at 1:34 PM Dan Friedman 
wrote:

> Skip,
>
> Haven't tested, but pope about this...
>
> function getUniqueNames inData,pColumn
>  put "" into uNames
>  set the itemDel to tab
>  repeat for each line l in inData
>    add 1 to uNames[item pColumn of l]
>  end repeat
>
>  return uNames
> end getUniqueNames
>
> You should get back an array keyed by the unique names, and how many
> instances of each one
>
>
> -Dan
>
>
>
> On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
>    Good afternoon LC'ers,
>
>    I am loading a tab delimited file into a variable and I need to pull
> out
>    all unique names from a certain column (let's say column 10) and count
> how
>    many times that name appears in that column.
>
>    I know there has to be an easy way of doing it.  Every time I try to
> start
>    coding this it get wyyy too long :)
>
>    Simple approach?
>
>    SKIP
>    ___
>    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: Counting unique items in a file

2020-04-27 Thread Skip Kimpel via use-livecode
Thanks Dan!

Upon very quick implementation, I am getting empty results back.  I think I
need to play around with this a little bit more but I feel you got me on
the right track.

Thanks again,

SKIP

On Mon, Apr 27, 2020 at 1:34 PM Dan Friedman 
wrote:

> Skip,
>
> Haven't tested, but pope about this...
>
> function getUniqueNames inData,pColumn
>   put "" into uNames
>   set the itemDel to tab
>   repeat for each line l in inData
> add 1 to uNames[item pColumn of l]
>   end repeat
>
>   return uNames
> end getUniqueNames
>
> You should get back an array keyed by the unique names, and how many
> instances of each one
>
>
> -Dan
>
>
>
> On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Good afternoon LC'ers,
>
> I am loading a tab delimited file into a variable and I need to pull
> out
> all unique names from a certain column (let's say column 10) and count
> how
> many times that name appears in that column.
>
> I know there has to be an easy way of doing it.  Every time I try to
> start
> coding this it get wyyy too long :)
>
> Simple approach?
>
> SKIP
> ___
> 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: Counting unique items in a file

2020-04-27 Thread Dan Friedman via use-livecode
Skip,

Haven't tested, but pope about this...

function getUniqueNames inData,pColumn
  put "" into uNames
  set the itemDel to tab
  repeat for each line l in inData
add 1 to uNames[item pColumn of l]
  end repeat
  
  return uNames
end getUniqueNames

You should get back an array keyed by the unique names, and how many instances 
of each one


-Dan



On 4/27/20, 10:25 AM, "use-livecode on behalf of Skip Kimpel via use-livecode" 
 wrote:

Good afternoon LC'ers,

I am loading a tab delimited file into a variable and I need to pull out
all unique names from a certain column (let's say column 10) and count how
many times that name appears in that column.

I know there has to be an easy way of doing it.  Every time I try to start
coding this it get wyyy too long :)

Simple approach?

SKIP
___
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 J. Landman Gay via use-livecode

On 4/27/20 1:48 AM, Mark Waddingham via use-livecode wrote:


Both mergBgTask and mergNotify provide features to enable managing the background task feature 
of iOS, and the suspend/resume notifications though.


And for Android...what?

--
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


Counting unique items in a file

2020-04-27 Thread Skip Kimpel via use-livecode
Good afternoon LC'ers,

I am loading a tab delimited file into a variable and I need to pull out
all unique names from a certain column (let's say column 10) and count how
many times that name appears in that column.

I know there has to be an easy way of doing it.  Every time I try to start
coding this it get wyyy too long :)

Simple approach?

SKIP
___
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


[ANN] This Week in LiveCode 223

2020-04-27 Thread panagiotis merakos via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

Read issue #223 here: https://bit.ly/2yPFixO

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to you e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.



-- 
Panagiotis Merakos 
LiveCode Software Developer

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


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
>>> 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
>>> "En

Re: How do I format a handler in the use-List?

2020-04-27 Thread dunbarx--- via use-livecode
Jacque.
Came over just fine. I will try to reset the use-list to my business eMail.
Thanks,
Craig


-Original Message-
From: J. Landman Gay via use-livecode 
To: How to use LiveCode 
Cc: J. Landman Gay 
Sent: Mon, Apr 27, 2020 2:34 am
Subject: Re: How do I format a handler in the use-List?

On 4/26/20 2:20 PM, dunbarx--- via use-livecode wrote:
> Try as I might, I cannot format a handler example copied from the SE. The 
> result is always run-on, even though I add spaces and returns where 
> appropriate. The text seems readable when I send, but reverts to a run-on 
> string when I read in the list.
> Why is this so much more difficult than the forum?
> Is AOL the culprit?

Maybe. The list may be expecting different line endings than AOL provides. What 
we usually see 
when people paste here from the SE is a bunch of markup symbols, but the 
carriage returns 
generally come through okay.

Here's a copy/paste test from my LC editor, let's see what happens:

on mouseUp
  hide me
end mouseUp

-- 
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: Wildcard? replaceText, offset?

2020-04-27 Thread dunbarx--- via use-livecode
You are welcome.
Er, my offering IS a one liner.
Craig


-Original Message-
From: Rick Harrison via use-livecode 
To: How to use LiveCode 
Cc: Rick Harrison 
Sent: Mon, Apr 27, 2020 12:20 am
Subject: Re: Wildcard? replaceText, offset?

Thanks for the suggestions!

I was hoping that perhaps there was a very simple one liner or character that 
would do it for me.

I think I have a solution now.

Rick

> On Apr 26, 2020, at 3:15 PM, dunbarx--- via use-livecode 
>  wrote:
> 
> on mouseUpput offset("(",yourString) into startCharput offset(")", 
> yourString) into endCharput random(999) into char (startChar + 1) to (endChar 
> -1) of yourStringend mouseUp

___
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 panagiotis merakos via use-livecode
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
> > 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 sc

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 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 

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

2020-04-27 Thread panagiotis merakos via use-livecode
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 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
>
___
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