Shouldn't space or enter in a menu select the hilited item?

2022-08-12 Thread Bob Sneidar via use-livecode
Hi all. Very odd, I thought this worked. 

I am programmatically popping up a menu, then I want to be able to jse the 
arrow keys to traverse the selections available. If I click any of the choices, 
the menuPick handler gets the choice as the first parameter. If however I use 
the spacebar or the enterKey to select a choice, the parameter is empty in 
menuPick! That isn't right, is it??

MacOS 10.15.7 LC 9.6.9 rc1

Bob S


___
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: Server globals

2022-08-12 Thread Alex Tweedly via use-livecode

Hi Tim,

I think there are many easy ways to do this - and many not-so-easy ones too.

IMO, easiest for something simple like this is to just use the url.

See tweedly.net/page_by_url.txt for the code, or try it out at 
tweedly.net/page_by_url.lc


(or try tweedly.net/page_by_url.lc?row=14 )

You can do something very similar using a cookie, with the 'row' value 
stored in the cookie each time (remember to "put cookie ..." before 
*any* other output.)


Or by using the cookie to hold the name of a file in which you store 
this kind of info. This is necessary if you need to store a lot of data 
- if there is not already a cookie, create a filename using something 
like uuid(), and store the file name in it - then retrieve the cookie, 
and read or write the file.


Alex.

On 12/08/2022 14:18, Tim Selander via use-livecode wrote:

Hi Matthias,

It is user specific, but I just tried the saving to a text file on the 
server -- very fast. Got the user IP from $_Server, and used that in 
the filename for easy later retrieval. How much data can a cookie 
hold? Guess I'll test that.


One of the reasons I'm fussing with this is I'm trying to come up with 
some kind of pagination system. I'm probably trying to re-invent the 
wheel -- badly.


It's a simple membership list, with a few hundred records. Only want 
to show 30 on the page at a time. I wonder if anyone has a LC sample 
for doing that. I tried Ralph Bitter's Revigniter but just can't wrap 
my head around it.


Using MySQL for testing, so could try to figure out using the CURSOR 
feature. But know nothing about avoiding injection attacks, so may 
fall back to using  a .csv for the datafile. I've done that for all my 
other projects


Anyway, thanks for the info; no global variables, but file saves look 
like they'll work!


Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that changes 
from time to time, but is the same for all users?


I've done something some time ago and used a text file on the server 
which stored that value. In my case the value was not user specific 
so it was an easy task.



If the variable is user specific, why don't you use a  cookies for 
that? That will grant that the value is available  at all pages in 
the same domain.


Regards,
Matthias


Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
:


As always, appreciate everyone's help.

Have made several little projects using LC Server on the on-rev.com 
host. For the first time, I would like a global variable -- that is 
a variable that would retain it's value even if the page is 
re-loaded. Or if a user goes to another .lc page/file in the domain.


All my playing around, and Googling around, has been for nought. Is 
there a way to hang on to a bit of data was you move around pages in 
the same domain?


Thanks.

Tim Selander
Tokyo, Japan

___
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: Server globals

2022-08-12 Thread Tim Selander via use-livecode
Ah! Big problem I hadn't thought of  -- thank you!! I'll try the 
local storage script Jacques offered.


Many thanks.

Tim

On 2022.08.13 2:18, Ralph DiMola via use-livecode wrote:

Using the IP can fail if more than one user is on the same IP via a router
using NAT. The Browser local storage is a better solution.

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 Tim Selander via use-livecode
Sent: Friday, August 12, 2022 9:18 AM
To: use-livecode@lists.runrev.com
Cc: Tim Selander
Subject: Re: Server globals

Hi Matthias,

It is user specific, but I just tried the saving to a text file on the
server -- very fast. Got the user IP from $_Server, and used that in the
filename for easy later retrieval. How much data can a cookie hold? Guess
I'll test that.

One of the reasons I'm fussing with this is I'm trying to come up with some
kind of pagination system. I'm probably trying to re-invent the wheel --
badly.

It's a simple membership list, with a few hundred records. Only want to show
30 on the page at a time. I wonder if anyone has a LC sample for doing that.
I tried Ralph Bitter's Revigniter but just can't wrap my head around it.

Using MySQL for testing, so could try to figure out using the CURSOR
feature. But know nothing about avoiding injection attacks, so may fall back
to using  a .csv for the datafile. I've done that for all my other
projects

Anyway, thanks for the info; no global variables, but file saves look like
they'll work!

Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that changes from

time to time, but is the same for all users?


I've done something some time ago and used a text file on the server which

stored that value. In my case the value was not user specific so it was an
easy task.



If the variable is user specific, why don't you use a  cookies for that?

That will grant that the value is available  at all pages in the same
domain.


Regards,
Matthias



Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode

:


As always, appreciate everyone's help.

Have made several little projects using LC Server on the on-rev.com host.

For the first time, I would like a global variable -- that is a variable
that would retain it's value even if the page is re-loaded. Or if a user
goes to another .lc page/file in the domain.


All my playing around, and Googling around, has been for nought. Is there

a way to hang on to a bit of data was you move around pages in the same
domain?


Thanks.

Tim Selander
Tokyo, Japan

___
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: Server globals

2022-08-12 Thread Ralph DiMola via use-livecode
Using the IP can fail if more than one user is on the same IP via a router
using NAT. The Browser local storage is a better solution.

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 Tim Selander via use-livecode
Sent: Friday, August 12, 2022 9:18 AM
To: use-livecode@lists.runrev.com
Cc: Tim Selander
Subject: Re: Server globals

Hi Matthias,

It is user specific, but I just tried the saving to a text file on the
server -- very fast. Got the user IP from $_Server, and used that in the
filename for easy later retrieval. How much data can a cookie hold? Guess
I'll test that.

One of the reasons I'm fussing with this is I'm trying to come up with some
kind of pagination system. I'm probably trying to re-invent the wheel --
badly.

It's a simple membership list, with a few hundred records. Only want to show
30 on the page at a time. I wonder if anyone has a LC sample for doing that.
I tried Ralph Bitter's Revigniter but just can't wrap my head around it.

Using MySQL for testing, so could try to figure out using the CURSOR
feature. But know nothing about avoiding injection attacks, so may fall back
to using  a .csv for the datafile. I've done that for all my other
projects

Anyway, thanks for the info; no global variables, but file saves look like
they'll work!

Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:
> Hi Tim,
> 
> does the variable have a user specific value or a value, that changes from
time to time, but is the same for all users?
> 
> I've done something some time ago and used a text file on the server which
stored that value. In my case the value was not user specific so it was an
easy task.
> 
> 
> If the variable is user specific, why don't you use a  cookies for that?
That will grant that the value is available  at all pages in the same
domain.
> 
> Regards,
> Matthias
> 
> 
>> Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode
:
>>
>> As always, appreciate everyone's help.
>>
>> Have made several little projects using LC Server on the on-rev.com host.
For the first time, I would like a global variable -- that is a variable
that would retain it's value even if the page is re-loaded. Or if a user
goes to another .lc page/file in the domain.
>>
>> All my playing around, and Googling around, has been for nought. Is there
a way to hang on to a bit of data was you move around pages in the same
domain?
>>
>> Thanks.
>>
>> Tim Selander
>> Tokyo, Japan
>>
>> ___
>> 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: Server globals

2022-08-12 Thread Jacques Clavel via use-livecode
Hi Tim,

You can also use localStorage for user specific data at the browser level :
In your .lc script on the server :
to store

 localStorage.jcf2 = '" &sDir&  "'


and retrieve data

 var jMem = localStorage.getItem('jcf2');


Regards,

JC

Le ven. 12 août 2022 à 15:19, Tim Selander via use-livecode <
use-livecode@lists.runrev.com> a écrit :

> Hi Matthias,
>
> It is user specific, but I just tried the saving to a text file
> on the server -- very fast. Got the user IP from $_Server, and
> used that in the filename for easy later retrieval. How much data
> can a cookie hold? Guess I'll test that.
>
> One of the reasons I'm fussing with this is I'm trying to come up
> with some kind of pagination system. I'm probably trying to
> re-invent the wheel -- badly.
>
> It's a simple membership list, with a few hundred records. Only
> want to show 30 on the page at a time. I wonder if anyone has a
> LC sample for doing that. I tried Ralph Bitter's Revigniter but
> just can't wrap my head around it.
>
> Using MySQL for testing, so could try to figure out using the
> CURSOR feature. But know nothing about avoiding injection
> attacks, so may fall back to using  a .csv for the datafile. I've
> done that for all my other projects
>
> Anyway, thanks for the info; no global variables, but file saves
> look like they'll work!
>
> Tim
>
> On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:
> > Hi Tim,
> >
> > does the variable have a user specific value or a value, that changes
> from time to time, but is the same for all users?
> >
> > I've done something some time ago and used a text file on the server
> which stored that value. In my case the value was not user specific so it
> was an easy task.
> >
> >
> > If the variable is user specific, why don't you use a  cookies for that?
> That will grant that the value is available  at all pages in the same
> domain.
> >
> > Regards,
> > Matthias
> >
> >
> >> Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode <
> use-livecode@lists.runrev.com>:
> >>
> >> As always, appreciate everyone's help.
> >>
> >> Have made several little projects using LC Server on the on-rev.com
> host. For the first time, I would like a global variable -- that is a
> variable that would retain it's value even if the page is re-loaded. Or if
> a user goes to another .lc page/file in the domain.
> >>
> >> All my playing around, and Googling around, has been for nought. Is
> there a way to hang on to a bit of data was you move around pages in the
> same domain?
> >>
> >> Thanks.
> >>
> >> Tim Selander
> >> Tokyo, Japan
> >>
> >> ___
> >> 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
>


-- 
Jacques Clavel
___
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: Server globals

2022-08-12 Thread matthias rebbe via use-livecode
Hi Tim,

the maximum size of a cookie is 4096 bytes.

I am using Sitelok from Vibralogix on one site for a membership list. I've 
integrated it in a site i created with Rapidweaver. 
I am also using Livecode Server scripts on that site for several tasks 
including form processing. The good thing is that i can add my Livecode Server 
scripts to my Rapidweaver pages, either the whole script or only an   include 
statement that includes the script.
I just need to tell Rapidweaver to store that page with file extension .lc 
instead of .html.

I also had a look at Reviginiter. Looks so powerful, but i have not enough time 
in a row to get used with it. So i have to stay with my Rapidweaver/Livecode 
server script solutions.


Regards,
Matthias


> Am 12.08.2022 um 15:18 schrieb Tim Selander via use-livecode 
> :
> 
> Hi Matthias,
> 
> It is user specific, but I just tried the saving to a text file on the server 
> -- very fast. Got the user IP from $_Server, and used that in the filename 
> for easy later retrieval. How much data can a cookie hold? Guess I'll test 
> that.
> 
> One of the reasons I'm fussing with this is I'm trying to come up with some 
> kind of pagination system. I'm probably trying to re-invent the wheel -- 
> badly.
> 
> It's a simple membership list, with a few hundred records. Only want to show 
> 30 on the page at a time. I wonder if anyone has a LC sample for doing that. 
> I tried Ralph Bitter's Revigniter but just can't wrap my head around it.
> 
> Using MySQL for testing, so could try to figure out using the CURSOR feature. 
> But know nothing about avoiding injection attacks, so may fall back to using  
> a .csv for the datafile. I've done that for all my other projects
> 
> Anyway, thanks for the info; no global variables, but file saves look like 
> they'll work!
> 
> Tim
> 
> On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:
>> Hi Tim,
>> does the variable have a user specific value or a value, that changes from 
>> time to time, but is the same for all users?
>> I've done something some time ago and used a text file on the server which 
>> stored that value. In my case the value was not user specific so it was an 
>> easy task.
>> If the variable is user specific, why don't you use a  cookies for that? 
>> That will grant that the value is available  at all pages in the same domain.
>> Regards,
>> Matthias
>>> Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
>>> :
>>> 
>>> As always, appreciate everyone's help.
>>> 
>>> Have made several little projects using LC Server on the on-rev.com host. 
>>> For the first time, I would like a global variable -- that is a variable 
>>> that would retain it's value even if the page is re-loaded. Or if a user 
>>> goes to another .lc page/file in the domain.
>>> 
>>> All my playing around, and Googling around, has been for nought. Is there a 
>>> way to hang on to a bit of data was you move around pages in the same 
>>> domain?
>>> 
>>> Thanks.
>>> 
>>> Tim Selander
>>> Tokyo, Japan
>>> 
>>> ___
>>> 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: Server globals

2022-08-12 Thread Tim Selander via use-livecode

Hi Matthias,

It is user specific, but I just tried the saving to a text file 
on the server -- very fast. Got the user IP from $_Server, and 
used that in the filename for easy later retrieval. How much data 
can a cookie hold? Guess I'll test that.


One of the reasons I'm fussing with this is I'm trying to come up 
with some kind of pagination system. I'm probably trying to 
re-invent the wheel -- badly.


It's a simple membership list, with a few hundred records. Only 
want to show 30 on the page at a time. I wonder if anyone has a 
LC sample for doing that. I tried Ralph Bitter's Revigniter but 
just can't wrap my head around it.


Using MySQL for testing, so could try to figure out using the 
CURSOR feature. But know nothing about avoiding injection 
attacks, so may fall back to using  a .csv for the datafile. I've 
done that for all my other projects


Anyway, thanks for the info; no global variables, but file saves 
look like they'll work!


Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that changes from time 
to time, but is the same for all users?

I've done something some time ago and used a text file on the server which 
stored that value. In my case the value was not user specific so it was an easy 
task.


If the variable is user specific, why don't you use a  cookies for that? That 
will grant that the value is available  at all pages in the same domain.

Regards,
Matthias



Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
:

As always, appreciate everyone's help.

Have made several little projects using LC Server on the on-rev.com host. For 
the first time, I would like a global variable -- that is a variable that would 
retain it's value even if the page is re-loaded. Or if a user goes to another 
.lc page/file in the domain.

All my playing around, and Googling around, has been for nought. Is there a way 
to hang on to a bit of data was you move around pages in the same domain?

Thanks.

Tim Selander
Tokyo, Japan

___
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: Server globals

2022-08-12 Thread matthias rebbe via use-livecode
Hi Tim,

does the variable have a user specific value or a value, that changes from time 
to time, but is the same for all users?

I've done something some time ago and used a text file on the server which 
stored that value. In my case the value was not user specific so it was an easy 
task.


If the variable is user specific, why don't you use a  cookies for that? That 
will grant that the value is available  at all pages in the same domain.

Regards,
Matthias


> Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
> :
> 
> As always, appreciate everyone's help.
> 
> Have made several little projects using LC Server on the on-rev.com host. For 
> the first time, I would like a global variable -- that is a variable that 
> would retain it's value even if the page is re-loaded. Or if a user goes to 
> another .lc page/file in the domain.
> 
> All my playing around, and Googling around, has been for nought. Is there a 
> way to hang on to a bit of data was you move around pages in the same domain?
> 
> Thanks.
> 
> Tim Selander
> Tokyo, Japan
> 
> ___
> 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


Server globals

2022-08-12 Thread Tim Selander via use-livecode

As always, appreciate everyone's help.

Have made several little projects using LC Server on the 
on-rev.com host. For the first time, I would like a global 
variable -- that is a variable that would retain it's value even 
if the page is re-loaded. Or if a user goes to another .lc 
page/file in the domain.


All my playing around, and Googling around, has been for nought. 
Is there a way to hang on to a bit of data was you move around 
pages in the same domain?


Thanks.

Tim Selander
Tokyo, Japan

___
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