Segmented Control Widget

2020-11-04 Thread Terence Heaford via use-livecode
I have been messing about with the Segmented Control Widget and have been 
trying to apply a tooltip.

I noted that the tooltip can only be applied to the whole control, it does not 
appear possible to have a tooltip for each segment.

Is this possible and if so could someone please advise.


All the best


Terry
___
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: Plotting Equations that Bifurcate

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

Hi,

gmSetCustomMarker is the first gm Library handler called in the demo app 
- so it sounds like the library isn't being downloaded or set up properly.


I found one combination of browser and laptop here where the 
.livecodescript file is displayed as though it were a text file, rather 
than being downloaded! No idea why !!


So, I've uploaded a ZIP archive. Visit 
https://www.tweedly.org/lcms.lc/GraphMaker again, and use the archive 
link to download the zip fie and decompress it. Then open the demo app 
in the IDE.


In the IDE, you could set a breakpoint in 'openstack' on card 1 of the 
demo app, and verify that the library is being properly found in the 
'start using tt' line, e.g. by checking the stacksinuse just after it.


If the library is properly loaded, then the "can't find handler 
gmSetCustomMarker" problm should disappear.


Cool - I'll go take a look at CoupDeGraph.

I've been wondering how you handle multi-bifurcating functions - but 
that'll be a separate email (after I've looked at CoupDeGraph :-)


Alex.

On 04/11/2020 18:09, Roger Guay via use-livecode wrote:

Hi Alex,

Thanks for your continued interest in my little project. I have succeeded in 
implementing a multiple polygon approach, but it ain’t elegant as they say!

I seem to recall that I learned a lot from your GraphMaker some time ago, but 
as I try to review your latest on your website, I run into repeated errors 
about “can’t find handler gmSetCustomMarker”. I can’t seem to make any headway 
to resolve this. Am I supposed to do something with the “Library”? I could not 
find instructions anywhere.

Meanwhile, I should explain further that I am trying to expand on a stack that 
I built 2 or 3 years ago called CoupDeGraph which you can find in the Example 
Stacks of LiveCode. Put simply, I am currently trying to expand on CoupDeGraph 
to be able to handle double-valued equations.

Again, thanks for your help

Roger


On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
 wrote:

On 31/10/2020 02:28, Roger Guay via use-livecode wrote:


Lots of clever ideas here, Alex, but I think you’re missing the point of what I 
ultimately want to do. I'm building a plotting program for which I want to plot 
any equation including those that have multiple values of y for a given x. An 
equation might branch at any point and might even have multiple branches both 
of which are unknown before plotting.

Of course, there’s always the possibility that I’m not fully comprehending your 
suggestions??? What does NB stand for? Are you suggesting creating a new 
polygon every time a branch is detected? That just might work?!

Hi Roger. You're right - I missed the point; I jumped to the assumption that 
you were asking about a fairly small, specific issue - so leapt too quickly to 
a code sample. But before I address the general question(s), let me get the 
little points out of the way :-)

NB - sorry, kind of common usage in British English. Actually, it's from a Latin phrase - 
"Nota Bene" - meaning "note well". So basically just 'take note of'.

"a new polygon every branch" - yes, perfectly possible. Also possible is what I 
did in the first case of the code sample -  a new 'sequence of points' for each branch, 
and then stitch those together (with blank lines between) into a single polygon; but 
that's, for now, a detail.

The essence of the problem is that your app will (somehow) develop a number of 
'sequences of *data* points' - and then those need to be translated into 
equivalent sets of *display* points (by either a plotting library, or by your 
own code) to allow it to be displayed appropriately.

There are at least two possible plotting libraries that might do what you want 
(or do something close enough that they could be useful). By coincidence, they 
were both discussed at the San Jose LC conference in 2019.If you have access to 
the video / papers from that you might already have some of the info you need; 
I don't know if the conference papers are ever put out for more general usage 
later.

Option A. Monte described a wrapper for the JSPlot library. It's a very 
powerful library capable of many kinds of graphs / plots, and very quick and 
capable. The most obvious downside is that it needs to be used within a browser 
widget - but well worth looking at it if you can.

Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
library. It is (I think) fairly easy to use - but that may not be the case for someone 
else coming to it new. I know it can handle this case of bifurcating plots (using 
multiple sequences of data points). The conference slides were a decent, if very brief, 
introduction; the lengthier documentation was, maybe, not quite complete. However, it 
does come with a demo app that uses the library to draw a variety of graph types. Main 
advantage is it's pure LC, and hopefully easy to use - both in understanding and in ease 
of integration into an app (you just create a suitable group to 

Re: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread Rick Harrison via use-livecode
Hi Matthias,

Session Variables are like cookies except they auto-expire at the end of a 
browser session
like when you close a tab or window.

In Javascript one would set a session variable this way:






One would retrieve the session variable in Javascript this way:







In LiveCode one would set a session variable like this:



To retrieve the session variable in LiveCode:



So, I’m wondering that since we are able to have LiveCode retrieve Javascript 
cookies,
then perhaps it can retrieve Javascript session variables too.

I just haven’t quite made the connection yet.

Your thoughts?

Rick

> On Nov 4, 2020, at 7:00 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> What do you mean with session variables? 
> 
> To be honest i am not very used with Javascript. 
> I just did a quick test to write a cookie with JS and read it with LC server. 
> ;)
> 
> Regards,
> Matthias

___
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: Plotting Equations that Bifurcate

2020-11-04 Thread Roger Guay via use-livecode
PlotPurri and Plotpular 

R

> On Nov 4, 2020, at 5:01 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> The plot sickens…
> 
> Bob S
> 
> 
> On Nov 4, 2020, at 3:58 PM, Mark Wieder via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> On 11/4/20 3:37 PM, Jerry Jensen via use-livecode wrote:
> Neil DeGraph Tyson?
> On Nov 4, 2020, at 3:09 PM, Roger Guay via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Oooh, I like it! How about VanDeGraph?
> 
> The Graph is Always Greener.
> 
> --
> 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: Plotting Equations that Bifurcate

2020-11-04 Thread Bob Sneidar via use-livecode
The plot sickens…

Bob S


On Nov 4, 2020, at 3:58 PM, Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 11/4/20 3:37 PM, Jerry Jensen via use-livecode wrote:
Neil DeGraph Tyson?
On Nov 4, 2020, at 3:09 PM, Roger Guay via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Oooh, I like it! How about VanDeGraph?

The Graph is Always Greener.

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


Re: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread matthias rebbe via use-livecode
What do you mean with session variables? 

To be honest i am not very used with Javascript. 
I just did a quick test to write a cookie with JS and read it with LC server. ;)

Regards,
Matthias
-
Matthias Rebbe
Life Is Too Short For Boring Code



> Am 05.11.2020 um 00:31 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> Well, that works fine!
> 
> I’ll have to study what I did differently to figure why my method didn’t work.
> 
> Will this work with Session variables too?
> 
> Thanks,
> 
> Rick
> 
>> On Nov 4, 2020, at 4:35 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> Hi Rick,
>> 
>> there are two files:
>> 
>> writecookies.html
>> readcookies.lc 
>> 
>> See the code of each here
>> https://livecode.dermattes.de/javascript/showcode.lc 
>> 
>> 
>> -
>> Matthias Rebbe
> 
> ___
> 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: Plotting Equations that Bifurcate

2020-11-04 Thread Mark Wieder via use-livecode

On 11/4/20 3:37 PM, Jerry Jensen via use-livecode wrote:

Neil DeGraph Tyson?


On Nov 4, 2020, at 3:09 PM, Roger Guay via use-livecode 
 wrote:

Oooh, I like it! How about VanDeGraph?


The Graph is Always Greener.

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


Re: Plotting Equations that Bifurcate

2020-11-04 Thread Roger Guay via use-livecode
I was thinking of taking a tangent approach. How about PlotDuJour?

> On Nov 4, 2020, at 3:37 PM, Jerry Jensen via use-livecode 
>  wrote:
> 
> Neil DeGraph Tyson?
> 
>> On Nov 4, 2020, at 3:09 PM, Roger Guay via use-livecode 
>>  wrote:
>> 
>> Oooh, I like it! How about VanDeGraph?
>> 
>> Roger
>> 
>>> On Nov 4, 2020, at 3:03 PM, scott--- via use-livecode 
>>>  wrote:
>>> 
>>> I assume the expanded version will be called SedanDeGraph.
>>> —
>>> Scott
>>> 
 On Nov 4, 2020, at 10:09 AM, Roger Guay via use-livecode 
  wrote:
 
 Hi Alex,
 
 Thanks for your continued interest in my little project. I have succeeded 
 in implementing a multiple polygon approach, but it ain’t elegant as they 
 say!
 
 I seem to recall that I learned a lot from your GraphMaker some time ago, 
 but as I try to review your latest on your website, I run into repeated 
 errors about “can’t find handler gmSetCustomMarker”. I can’t seem to make 
 any headway to resolve this. Am I supposed to do something with the 
 “Library”? I could not find instructions anywhere. 
 
 Meanwhile, I should explain further that I am trying to expand on a stack 
 that I built 2 or 3 years ago called CoupDeGraph which you can find in the 
 Example Stacks of LiveCode. Put simply, I am currently trying to expand on 
 CoupDeGraph to be able to handle double-valued equations.
 
 Again, thanks for your help
 
 Roger
 
> On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
>  wrote:
> 
> On 31/10/2020 02:28, Roger Guay via use-livecode wrote:
> 
>> Lots of clever ideas here, Alex, but I think you’re missing the point of 
>> what I ultimately want to do. I'm building a plotting program for which 
>> I want to plot any equation including those that have multiple values of 
>> y for a given x. An equation might branch at any point and might even 
>> have multiple branches both of which are unknown before plotting.
>> 
>> Of course, there’s always the possibility that I’m not fully 
>> comprehending your suggestions??? What does NB stand for? Are you 
>> suggesting creating a new polygon every time a branch is detected? That 
>> just might work?!
> 
> Hi Roger. You're right - I missed the point; I jumped to the assumption 
> that you were asking about a fairly small, specific issue - so leapt too 
> quickly to a code sample. But before I address the general question(s), 
> let me get the little points out of the way :-)
> 
> NB - sorry, kind of common usage in British English. Actually, it's from 
> a Latin phrase - "Nota Bene" - meaning "note well". So basically just 
> 'take note of'.
> 
> "a new polygon every branch" - yes, perfectly possible. Also possible is 
> what I did in the first case of the code sample -  a new 'sequence of 
> points' for each branch, and then stitch those together (with blank lines 
> between) into a single polygon; but that's, for now, a detail.
> 
> The essence of the problem is that your app will (somehow) develop a 
> number of 'sequences of *data* points' - and then those need to be 
> translated into equivalent sets of *display* points (by either a plotting 
> library, or by your own code) to allow it to be displayed appropriately.
> 
> There are at least two possible plotting libraries that might do what you 
> want (or do something close enough that they could be useful). By 
> coincidence, they were both discussed at the San Jose LC conference in 
> 2019.If you have access to the video / papers from that you might already 
> have some of the info you need; I don't know if the conference papers are 
> ever put out for more general usage later.
> 
> Option A. Monte described a wrapper for the JSPlot library. It's a very 
> powerful library capable of many kinds of graphs / plots, and very quick 
> and capable. The most obvious downside is that it needs to be used within 
> a browser widget - but well worth looking at it if you can.
> 
> Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
> library. It is (I think) fairly easy to use - but that may not be the 
> case for someone else coming to it new. I know it can handle this case of 
> bifurcating plots (using multiple sequences of data points). The 
> conference slides were a decent, if very brief, introduction; the 
> lengthier documentation was, maybe, not quite complete. However, it does 
> come with a demo app that uses the library to draw a variety of graph 
> types. Main advantage is it's pure LC, and hopefully easy to use - both 
> in understanding and in ease of integration into an app (you just create 
> a suitable group to contain the graph, set its rect properly and pass in 
> all the point data along with various 

Re: Plotting Equations that Bifurcate

2020-11-04 Thread Jerry Jensen via use-livecode
Neil DeGraph Tyson?

> On Nov 4, 2020, at 3:09 PM, Roger Guay via use-livecode 
>  wrote:
> 
> Oooh, I like it! How about VanDeGraph?
> 
> Roger
> 
>> On Nov 4, 2020, at 3:03 PM, scott--- via use-livecode 
>>  wrote:
>> 
>> I assume the expanded version will be called SedanDeGraph.
>> —
>> Scott
>> 
>>> On Nov 4, 2020, at 10:09 AM, Roger Guay via use-livecode 
>>>  wrote:
>>> 
>>> Hi Alex,
>>> 
>>> Thanks for your continued interest in my little project. I have succeeded 
>>> in implementing a multiple polygon approach, but it ain’t elegant as they 
>>> say!
>>> 
>>> I seem to recall that I learned a lot from your GraphMaker some time ago, 
>>> but as I try to review your latest on your website, I run into repeated 
>>> errors about “can’t find handler gmSetCustomMarker”. I can’t seem to make 
>>> any headway to resolve this. Am I supposed to do something with the 
>>> “Library”? I could not find instructions anywhere. 
>>> 
>>> Meanwhile, I should explain further that I am trying to expand on a stack 
>>> that I built 2 or 3 years ago called CoupDeGraph which you can find in the 
>>> Example Stacks of LiveCode. Put simply, I am currently trying to expand on 
>>> CoupDeGraph to be able to handle double-valued equations.
>>> 
>>> Again, thanks for your help
>>> 
>>> Roger
>>> 
 On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
  wrote:
 
 On 31/10/2020 02:28, Roger Guay via use-livecode wrote:
 
> Lots of clever ideas here, Alex, but I think you’re missing the point of 
> what I ultimately want to do. I'm building a plotting program for which I 
> want to plot any equation including those that have multiple values of y 
> for a given x. An equation might branch at any point and might even have 
> multiple branches both of which are unknown before plotting.
> 
> Of course, there’s always the possibility that I’m not fully 
> comprehending your suggestions??? What does NB stand for? Are you 
> suggesting creating a new polygon every time a branch is detected? That 
> just might work?!
 
 Hi Roger. You're right - I missed the point; I jumped to the assumption 
 that you were asking about a fairly small, specific issue - so leapt too 
 quickly to a code sample. But before I address the general question(s), 
 let me get the little points out of the way :-)
 
 NB - sorry, kind of common usage in British English. Actually, it's from a 
 Latin phrase - "Nota Bene" - meaning "note well". So basically just 'take 
 note of'.
 
 "a new polygon every branch" - yes, perfectly possible. Also possible is 
 what I did in the first case of the code sample -  a new 'sequence of 
 points' for each branch, and then stitch those together (with blank lines 
 between) into a single polygon; but that's, for now, a detail.
 
 The essence of the problem is that your app will (somehow) develop a 
 number of 'sequences of *data* points' - and then those need to be 
 translated into equivalent sets of *display* points (by either a plotting 
 library, or by your own code) to allow it to be displayed appropriately.
 
 There are at least two possible plotting libraries that might do what you 
 want (or do something close enough that they could be useful). By 
 coincidence, they were both discussed at the San Jose LC conference in 
 2019.If you have access to the video / papers from that you might already 
 have some of the info you need; I don't know if the conference papers are 
 ever put out for more general usage later.
 
 Option A. Monte described a wrapper for the JSPlot library. It's a very 
 powerful library capable of many kinds of graphs / plots, and very quick 
 and capable. The most obvious downside is that it needs to be used within 
 a browser widget - but well worth looking at it if you can.
 
 Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
 library. It is (I think) fairly easy to use - but that may not be the case 
 for someone else coming to it new. I know it can handle this case of 
 bifurcating plots (using multiple sequences of data points). The 
 conference slides were a decent, if very brief, introduction; the 
 lengthier documentation was, maybe, not quite complete. However, it does 
 come with a demo app that uses the library to draw a variety of graph 
 types. Main advantage is it's pure LC, and hopefully easy to use - both in 
 understanding and in ease of integration into an app (you just create a 
 suitable group to contain the graph, set its rect properly and pass in all 
 the point data along with various parameters.  It has nowhere near the 
 coverage of different graph types that JSPlot does - it's basically line, 
 bar and scatter plots, with primary X-axis, and can have shading, etc.
 
 Option C. Roll your own.
 
 I'd 

Re: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread Rick Harrison via use-livecode
Hi Matthias,

Well, that works fine!

I’ll have to study what I did differently to figure why my method didn’t work.

Will this work with Session variables too?

Thanks,

Rick

> On Nov 4, 2020, at 4:35 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> Hi Rick,
> 
> there are two files:
> 
> writecookies.html
> readcookies.lc 
> 
> See the code of each here
> https://livecode.dermattes.de/javascript/showcode.lc 
> 
> 
> -
> Matthias Rebbe

___
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: Plotting Equations that Bifurcate

2020-11-04 Thread Roger Guay via use-livecode
Oooh, I like it! How about VanDeGraph?

Roger

> On Nov 4, 2020, at 3:03 PM, scott--- via use-livecode 
>  wrote:
> 
> I assume the expanded version will be called SedanDeGraph.
> —
> Scott
> 
>> On Nov 4, 2020, at 10:09 AM, Roger Guay via use-livecode 
>>  wrote:
>> 
>> Hi Alex,
>> 
>> Thanks for your continued interest in my little project. I have succeeded in 
>> implementing a multiple polygon approach, but it ain’t elegant as they say!
>> 
>> I seem to recall that I learned a lot from your GraphMaker some time ago, 
>> but as I try to review your latest on your website, I run into repeated 
>> errors about “can’t find handler gmSetCustomMarker”. I can’t seem to make 
>> any headway to resolve this. Am I supposed to do something with the 
>> “Library”? I could not find instructions anywhere. 
>> 
>> Meanwhile, I should explain further that I am trying to expand on a stack 
>> that I built 2 or 3 years ago called CoupDeGraph which you can find in the 
>> Example Stacks of LiveCode. Put simply, I am currently trying to expand on 
>> CoupDeGraph to be able to handle double-valued equations.
>> 
>> Again, thanks for your help
>> 
>> Roger
>> 
>>> On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
>>>  wrote:
>>> 
>>> On 31/10/2020 02:28, Roger Guay via use-livecode wrote:
>>> 
 Lots of clever ideas here, Alex, but I think you’re missing the point of 
 what I ultimately want to do. I'm building a plotting program for which I 
 want to plot any equation including those that have multiple values of y 
 for a given x. An equation might branch at any point and might even have 
 multiple branches both of which are unknown before plotting.
 
 Of course, there’s always the possibility that I’m not fully comprehending 
 your suggestions??? What does NB stand for? Are you suggesting creating a 
 new polygon every time a branch is detected? That just might work?!
>>> 
>>> Hi Roger. You're right - I missed the point; I jumped to the assumption 
>>> that you were asking about a fairly small, specific issue - so leapt too 
>>> quickly to a code sample. But before I address the general question(s), let 
>>> me get the little points out of the way :-)
>>> 
>>> NB - sorry, kind of common usage in British English. Actually, it's from a 
>>> Latin phrase - "Nota Bene" - meaning "note well". So basically just 'take 
>>> note of'.
>>> 
>>> "a new polygon every branch" - yes, perfectly possible. Also possible is 
>>> what I did in the first case of the code sample -  a new 'sequence of 
>>> points' for each branch, and then stitch those together (with blank lines 
>>> between) into a single polygon; but that's, for now, a detail.
>>> 
>>> The essence of the problem is that your app will (somehow) develop a number 
>>> of 'sequences of *data* points' - and then those need to be translated into 
>>> equivalent sets of *display* points (by either a plotting library, or by 
>>> your own code) to allow it to be displayed appropriately.
>>> 
>>> There are at least two possible plotting libraries that might do what you 
>>> want (or do something close enough that they could be useful). By 
>>> coincidence, they were both discussed at the San Jose LC conference in 
>>> 2019.If you have access to the video / papers from that you might already 
>>> have some of the info you need; I don't know if the conference papers are 
>>> ever put out for more general usage later.
>>> 
>>> Option A. Monte described a wrapper for the JSPlot library. It's a very 
>>> powerful library capable of many kinds of graphs / plots, and very quick 
>>> and capable. The most obvious downside is that it needs to be used within a 
>>> browser widget - but well worth looking at it if you can.
>>> 
>>> Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
>>> library. It is (I think) fairly easy to use - but that may not be the case 
>>> for someone else coming to it new. I know it can handle this case of 
>>> bifurcating plots (using multiple sequences of data points). The conference 
>>> slides were a decent, if very brief, introduction; the lengthier 
>>> documentation was, maybe, not quite complete. However, it does come with a 
>>> demo app that uses the library to draw a variety of graph types. Main 
>>> advantage is it's pure LC, and hopefully easy to use - both in 
>>> understanding and in ease of integration into an app (you just create a 
>>> suitable group to contain the graph, set its rect properly and pass in all 
>>> the point data along with various parameters.  It has nowhere near the 
>>> coverage of different graph types that JSPlot does - it's basically line, 
>>> bar and scatter plots, with primary X-axis, and can have shading, etc.
>>> 
>>> Option C. Roll your own.
>>> 
>>> I'd certainly suggest investigating the use of an existing library first. 
>>> There's quite a lot of effort needs to go into determining how to scale the 
>>> data to the space available, how to label the axes, 

Re: Plotting Equations that Bifurcate

2020-11-04 Thread scott--- via use-livecode
I assume the expanded version will be called SedanDeGraph.
—
Scott

> On Nov 4, 2020, at 10:09 AM, Roger Guay via use-livecode 
>  wrote:
> 
> Hi Alex,
> 
> Thanks for your continued interest in my little project. I have succeeded in 
> implementing a multiple polygon approach, but it ain’t elegant as they say!
> 
> I seem to recall that I learned a lot from your GraphMaker some time ago, but 
> as I try to review your latest on your website, I run into repeated errors 
> about “can’t find handler gmSetCustomMarker”. I can’t seem to make any 
> headway to resolve this. Am I supposed to do something with the “Library”? I 
> could not find instructions anywhere. 
> 
> Meanwhile, I should explain further that I am trying to expand on a stack 
> that I built 2 or 3 years ago called CoupDeGraph which you can find in the 
> Example Stacks of LiveCode. Put simply, I am currently trying to expand on 
> CoupDeGraph to be able to handle double-valued equations.
> 
> Again, thanks for your help
> 
> Roger
> 
>> On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
>>  wrote:
>> 
>> On 31/10/2020 02:28, Roger Guay via use-livecode wrote:
>> 
>>> Lots of clever ideas here, Alex, but I think you’re missing the point of 
>>> what I ultimately want to do. I'm building a plotting program for which I 
>>> want to plot any equation including those that have multiple values of y 
>>> for a given x. An equation might branch at any point and might even have 
>>> multiple branches both of which are unknown before plotting.
>>> 
>>> Of course, there’s always the possibility that I’m not fully comprehending 
>>> your suggestions??? What does NB stand for? Are you suggesting creating a 
>>> new polygon every time a branch is detected? That just might work?!
>> 
>> Hi Roger. You're right - I missed the point; I jumped to the assumption that 
>> you were asking about a fairly small, specific issue - so leapt too quickly 
>> to a code sample. But before I address the general question(s), let me get 
>> the little points out of the way :-)
>> 
>> NB - sorry, kind of common usage in British English. Actually, it's from a 
>> Latin phrase - "Nota Bene" - meaning "note well". So basically just 'take 
>> note of'.
>> 
>> "a new polygon every branch" - yes, perfectly possible. Also possible is 
>> what I did in the first case of the code sample -  a new 'sequence of 
>> points' for each branch, and then stitch those together (with blank lines 
>> between) into a single polygon; but that's, for now, a detail.
>> 
>> The essence of the problem is that your app will (somehow) develop a number 
>> of 'sequences of *data* points' - and then those need to be translated into 
>> equivalent sets of *display* points (by either a plotting library, or by 
>> your own code) to allow it to be displayed appropriately.
>> 
>> There are at least two possible plotting libraries that might do what you 
>> want (or do something close enough that they could be useful). By 
>> coincidence, they were both discussed at the San Jose LC conference in 
>> 2019.If you have access to the video / papers from that you might already 
>> have some of the info you need; I don't know if the conference papers are 
>> ever put out for more general usage later.
>> 
>> Option A. Monte described a wrapper for the JSPlot library. It's a very 
>> powerful library capable of many kinds of graphs / plots, and very quick and 
>> capable. The most obvious downside is that it needs to be used within a 
>> browser widget - but well worth looking at it if you can.
>> 
>> Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
>> library. It is (I think) fairly easy to use - but that may not be the case 
>> for someone else coming to it new. I know it can handle this case of 
>> bifurcating plots (using multiple sequences of data points). The conference 
>> slides were a decent, if very brief, introduction; the lengthier 
>> documentation was, maybe, not quite complete. However, it does come with a 
>> demo app that uses the library to draw a variety of graph types. Main 
>> advantage is it's pure LC, and hopefully easy to use - both in understanding 
>> and in ease of integration into an app (you just create a suitable group to 
>> contain the graph, set its rect properly and pass in all the point data 
>> along with various parameters.  It has nowhere near the coverage of 
>> different graph types that JSPlot does - it's basically line, bar and 
>> scatter plots, with primary X-axis, and can have shading, etc.
>> 
>> Option C. Roll your own.
>> 
>> I'd certainly suggest investigating the use of an existing library first. 
>> There's quite a lot of effort needs to go into determining how to scale the 
>> data to the space available, how to label the axes, how to add tick marks, 
>> grid lines and (perhaps) multiple Y-axes. That stuff probably accounted for 
>> 90% of the effort of creating the library.
>> 
>> If you'd like to try out my library, the latest version 

Re: Ideas on iOS GPS tracking needed

2020-11-04 Thread Graham Samuel via use-livecode
Thanks Alan and Bob - I was beginning to think I was alone on this one…

Yes, I do look at horizontal accuracy. I found out the following using my 
iPhone XS.

1. Horizontal accuracy tends to be rather poor for the first 10 to 20 readings 
after activation, typically 65 metres. In context, a test walking round my 
garden, which is about 110 x 60 meters, can quite often be woefully inaccurate 
at the beginning.

2. Even when has settled down it is still  quite variable, but tends to settle 
to an average less than 10 metres after a time.

3. Occasionally it throws colossal anomalies, like 5000 metres, with a 
corresponding crazy waypoint taking someone on foot right out of the park.

Of course I can catch the really big ones and ignore them, especially as they 
are infrequent (maybe two or three in an hour’s walk); but on my tests, the 
issue is the points that are a bit out, which can be fairly subtle - I mean if 
you draw them on a map, they are obvious to the human eye, but detecting them 
is quite difficult. For those, Bob’s idea is a good one, though of course it 
works best after the trip has been going for while. Anyway, thanks, I'm 
planning to use it. I agree seconds is the way to go - especially if the app 
doesn’t know the intended speed (it might be walking, cycling or driving for 
example). You can tell the user what you’re doing (some apps do this) but I 
prefer not to ask the user to make that choice.

I just bought a little app from the App Store, GPSOdometer by Kevin Willett. 
This does more or less what I want my app to do (it’s cosmetically quite 
different), and it offers a “Filter Level” setting, which effectively allows 
the user to decide how much horizontal (in)accuracy to accept. The level varies 
between 0.05 and 2.00, where a higher number means a larger tolerance of 
inaccuracies. I’ve written to Kevin to ask for a little more detail - of course 
he doesn’t have to reply, but I hope he does.

I will come back to the list to say how I got on. You never know, this may help 
others eventually.

Graham

PS The only test data I have been able to find for the XCode Simulator is a 
bike ride in California which runs along giving a succession of GPS . It is 
quite useful, but naturally it doesn’t involve anomalies.


> On 3 Nov 2020, at 23:55, Bob Sneidar via use-livecode 
>  wrote:
> 
> Seems to me if you are tracking linear movement, you need to average the 
> trending values, say the last 5 or 10 reads, against a time base, and reject 
> the ones outside an acceptable tolerance. You may reject some good data here 
> and there, but something grossly outside tolerance should be pretty easy to 
> grok.
> 
> Sounds easy, huh? :-) But it really is. For a car moving at 60mph, obviously 
> the trend is going to be greater than a person walking, and slower than a 
> small airplane. For an alien spacecraft traveling at insane speeds and making 
> wild maneuvers, I’m afraid you are on your own. The tolerance can be a 
> percentage of the average of the last x reads or the last x seconds. Seconds 
> makes more sense to me since if you drop 2 or 3 reads it will skew the 
> averages significantly. That is likely how Google Maps does it.
> 
> Bob S
> 
> 
> On Nov 3, 2020, at 2:39 PM, Alan Stenhouse via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Hi Graham
> 
> Are you checking the horizontal accuracy of each reading? (It's part of the 
> array of data with your lat-longs, as well as speed, etc - though not on 
> every phone).
> 
> If not, try that and see if the anomalous readings are hugely out. From my 
> experience, that's normally the case. If so, the easiest thing is to drop 
> them in the short term, unless you get too many and then you may need to be a 
> bit fancier. If you do, would love to hear the solution that you come up with.
> 
> HTH, cheers
> 
> Alan
> 
> On 4 Nov 2020, at 3:30 am, Graham Samuel  > wrote:
> 
> From: Graham Samuel mailto:livf...@mac.com>>
> To: How to use LiveCode  >
> Subject: Ideas on iOS GPS tracking needed
> Message-ID: <6c855814-1850-4975-b185-1731efcd6...@mac.com 
> >
> Content-Type: text/plain; charset=utf-8
> 
> Sorry this is a bit long.
> 
> For a long time I?ve been tinkering with an app that uses the GPS on iPhones 
> to show how far ?as the crow flies? the user is from some base point, which 
> is set before the journey starts. It?s intended for walkers and cyclists, and 
> I was using a beta version in the first French lockdown, which forbade one 
> walking more than 1km from one?s house. I put the completion of this aside, 
> but now we?re in the second French lockdown and it looks worth finishing - 
> but I have some issues which I believe are not just down to my bad coding 
> (though of course that?s more than possible), and I wonder if anyone else has 
> thought about this stuff.
> 
> The basic idea is 

Re: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread matthias rebbe via use-livecode
Hi Rick,

there are two files:

writecookies.html
readcookies.lc

See the code of each here
https://livecode.dermattes.de/javascript/showcode.lc

-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 04.11.2020 um 22:10 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> I just tried your code and it didn’t go across from one format file to the 
> next.
> 
> I got:   username = “username”
> 
> What’s wrong?
> 
> If you can give me your full code for both mini format files I will try it
> and we can see the results exactly.
> 
> Thanks for helping!
> 
> Rick
> 
>> On Nov 4, 2020, at 2:04 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>>  
>> document.cookie = "username=Rick"; 
>> 
>> 
>> Then in LC Server i used the array $_cookie to read the content of the cookie
>> 
>> Doing a
>> put $_Cookie["username"] 
> 
> ___
> 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: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread Rick Harrison via use-livecode
Hi Matthias,

I just tried your code and it didn’t go across from one format file to the next.

I got:   username = “username”

What’s wrong?

If you can give me your full code for both mini format files I will try it
and we can see the results exactly.

Thanks for helping!

Rick

> On Nov 4, 2020, at 2:04 PM, matthias rebbe via use-livecode 
>  wrote:
> 
>  
> document.cookie = "username=Rick"; 
> 
> 
> Then in LC Server i used the array $_cookie to read the content of the cookie
> 
> Doing a
> put $_Cookie["username"] 

___
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: Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread matthias rebbe via use-livecode
Hi Rick,

i just did a quick test and created an html file which wrote a cookie with 
javascript

 
 document.cookie = "username=Rick"; 


Then in LC Server i used the array $_cookie to read the content of the cookie

Doing a
put $_Cookie["username"] 

returned  Rick


Regards
Matthias


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 04.11.2020 um 18:16 schrieb Rick Harrison via use-livecode 
> :
> 
> Greetings LiveCoders,
> 
> I have an LC server format file that uses a Javascript video player.
> The video player has a nice time progress bar that shows how far
> the user has played the video. All of that works just fine.
> 
> What I would like to do is check what that time completion variable
> is when the user clicks on a button to leave the video so I will know
> if they finished watching it all the way to the end of the video or not. 
> I then want to make a note of it in my database which requires that 
> I am able to send that javascript variable value over to a LiveCode
> variable.
> 
> I’ve been looking at Session Cookies to see if LiveCode can read
> a Javascript Session Cookie, but so far have been unsuccessful.
> 
> Ideas, code or suggestions anyone?
> 
> Thanks!
> 
> Rick
> ___
> 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: Plotting Equations that Bifurcate

2020-11-04 Thread Roger Guay via use-livecode
Hi Alex,

Thanks for your continued interest in my little project. I have succeeded in 
implementing a multiple polygon approach, but it ain’t elegant as they say!

I seem to recall that I learned a lot from your GraphMaker some time ago, but 
as I try to review your latest on your website, I run into repeated errors 
about “can’t find handler gmSetCustomMarker”. I can’t seem to make any headway 
to resolve this. Am I supposed to do something with the “Library”? I could not 
find instructions anywhere. 

Meanwhile, I should explain further that I am trying to expand on a stack that 
I built 2 or 3 years ago called CoupDeGraph which you can find in the Example 
Stacks of LiveCode. Put simply, I am currently trying to expand on CoupDeGraph 
to be able to handle double-valued equations.

Again, thanks for your help

Roger

> On Nov 3, 2020, at 4:48 PM, Alex Tweedly via use-livecode 
>  wrote:
> 
> On 31/10/2020 02:28, Roger Guay via use-livecode wrote:
> 
>> Lots of clever ideas here, Alex, but I think you’re missing the point of 
>> what I ultimately want to do. I'm building a plotting program for which I 
>> want to plot any equation including those that have multiple values of y for 
>> a given x. An equation might branch at any point and might even have 
>> multiple branches both of which are unknown before plotting.
>> 
>> Of course, there’s always the possibility that I’m not fully comprehending 
>> your suggestions??? What does NB stand for? Are you suggesting creating a 
>> new polygon every time a branch is detected? That just might work?!
> 
> Hi Roger. You're right - I missed the point; I jumped to the assumption that 
> you were asking about a fairly small, specific issue - so leapt too quickly 
> to a code sample. But before I address the general question(s), let me get 
> the little points out of the way :-)
> 
> NB - sorry, kind of common usage in British English. Actually, it's from a 
> Latin phrase - "Nota Bene" - meaning "note well". So basically just 'take 
> note of'.
> 
> "a new polygon every branch" - yes, perfectly possible. Also possible is what 
> I did in the first case of the code sample -  a new 'sequence of points' for 
> each branch, and then stitch those together (with blank lines between) into a 
> single polygon; but that's, for now, a detail.
> 
> The essence of the problem is that your app will (somehow) develop a number 
> of 'sequences of *data* points' - and then those need to be translated into 
> equivalent sets of *display* points (by either a plotting library, or by your 
> own code) to allow it to be displayed appropriately.
> 
> There are at least two possible plotting libraries that might do what you 
> want (or do something close enough that they could be useful). By 
> coincidence, they were both discussed at the San Jose LC conference in 
> 2019.If you have access to the video / papers from that you might already 
> have some of the info you need; I don't know if the conference papers are 
> ever put out for more general usage later.
> 
> Option A. Monte described a wrapper for the JSPlot library. It's a very 
> powerful library capable of many kinds of graphs / plots, and very quick and 
> capable. The most obvious downside is that it needs to be used within a 
> browser widget - but well worth looking at it if you can.
> 
> Option B. I did a library called "GraphMaker" - a pure-Livecode plotting 
> library. It is (I think) fairly easy to use - but that may not be the case 
> for someone else coming to it new. I know it can handle this case of 
> bifurcating plots (using multiple sequences of data points). The conference 
> slides were a decent, if very brief, introduction; the lengthier 
> documentation was, maybe, not quite complete. However, it does come with a 
> demo app that uses the library to draw a variety of graph types. Main 
> advantage is it's pure LC, and hopefully easy to use - both in understanding 
> and in ease of integration into an app (you just create a suitable group to 
> contain the graph, set its rect properly and pass in all the point data along 
> with various parameters.  It has nowhere near the coverage of different graph 
> types that JSPlot does - it's basically line, bar and scatter plots, with 
> primary X-axis, and can have shading, etc.
> 
> Option C. Roll your own.
> 
> I'd certainly suggest investigating the use of an existing library first. 
> There's quite a lot of effort needs to go into determining how to scale the 
> data to the space available, how to label the axes, how to add tick marks, 
> grid lines and (perhaps) multiple Y-axes. That stuff probably accounted for 
> 90% of the effort of creating the library.
> 
> If you'd like to try out my library, the latest version can be found at
> 
> https://www.tweedly.org/lcms.lc/GraphMaker
> 
> (sorry - I haven't formatted it into my usual download structure - so this is 
> simply a page that gives links that allow you to download the 2 files you 
> need and 2 more files 

Pass Javascript Session Cookie to LiveCode Variable?

2020-11-04 Thread Rick Harrison via use-livecode
Greetings LiveCoders,

I have an LC server format file that uses a Javascript video player.
The video player has a nice time progress bar that shows how far
the user has played the video. All of that works just fine.

What I would like to do is check what that time completion variable
is when the user clicks on a button to leave the video so I will know
if they finished watching it all the way to the end of the video or not. 
I then want to make a note of it in my database which requires that 
I am able to send that javascript variable value over to a LiveCode
variable.

I’ve been looking at Session Cookies to see if LiveCode can read
a Javascript Session Cookie, but so far have been unsuccessful.

Ideas, code or suggestions anyone?

Thanks!

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