Re: LC Server - Check for Screen size?

2021-03-20 Thread Rick Harrison via use-livecode
Hi Matthias,

So you are thinking something like:





Your Screen:




var txt = "";
txt += "

Total width/height: " + screen.width + "*" + screen.height + "

"; txt += "

Available width/height: " + screen.availWidth + "*" + screen.availHeight + "

"; txt += "

Color depth: " + screen.colorDepth + "

"; txt += "

Color resolution: " + screen.pixelDepth + "

"; document.getElementById("demo").innerHTML = txt; And then put the information into a Javascript cookie and then read the cookie value with an LC Server script. I’ll see if I can get that to work. Thanks! Rick > On Mar 20, 2021, at 6:10 PM, matthias rebbe via use-livecode > wrote: > > As Livecode Server runs on the server there is no direct command/function in > LC Server available for this task. > > But you could use Javascript (document.cookie) in your LC Server script to > write the screen resolution into a cookie and read that cookie then with your > Livecode Server script. > > > - > Matthias Rebbe > Life Is Too Short For Boring Code ___ use-livecode mailing list use-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: LC Server - Check for Screen size?

2021-03-20 Thread matthias rebbe via use-livecode
As Livecode Server runs on the server  there is no direct command/function in 
LC Server available for this task.

But you could use Javascript (document.cookie)  in your LC Server script  to 
write the screen resolution into a cookie and read that cookie then with your 
Livecode Server script.


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 20.03.2021 um 22:59 schrieb Rick Harrison via use-livecode 
> :
> 
> I was wondering if there is anyway to check for the
> device type or screen size of the connected device
> for LC Server so I can serve the correct size screen?
> 
> 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


LC Server - Check for Screen size?

2021-03-20 Thread Rick Harrison via use-livecode
I was wondering if there is anyway to check for the
device type or screen size of the connected device
for LC Server so I can serve the correct size screen?

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


Re: Help! I'm stuck

2021-03-20 Thread ELS Prothero via use-livecode
Thank you, Matthias! I’ll try that.
Best,
Bill

William Prothero
https://earthlearningsolutions.org

> On Mar 20, 2021, at 1:39 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> Bill,
> 
> i've just checked the release notes of 9.0.x
> The release notes of 9.0.2 contain updated information about this topic and 
> an enhanced script example. 
> opencard scripts should also be adjusted.
> https://downloads.livecode.com/livecode/9_0_2/LiveCodeNotes-9_0_2.pdf
> 
> Please excuse me for pointing to 9.0.1rc1 release notes yesterday.
> 
> 
> Regards
> Matthias
> 
> 
> 
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 20.03.2021 um 18:22 schrieb William Prothero via use-livecode 
>> :
>> 
>> Matthias:
>> I see that openstack and closestack messages are inhibited during 
>> application build, using:
>> 
>> on closeStack
>>if the mode of stack “revStandaloneProgress” > 0 then
>>exit closeStack
>>end if
>> end
>> 
>> So, before I start adding this to all openstack, closestack, scripts of my 
>> 12 stacks, I'm’ wondering if I could mess up the build process by by-passing 
>> some of the scripts in these handlers. Is there any way to tell more 
>> precisely what is causing the problem? Any recommendations on strategy? 
>> Should I just change one stack at a time and look for changes in the error 
>> window, or just change all them and wonder what affect that would have on 
>> the integrity of the build process?
>> 
>> Also, opencard scripts are also called when a stack in launched and I wonder 
>> if those need to be escaped too.
>> 
>> Best,
>> Bill
>> 
 On Mar 19, 2021, at 5:46 PM, matthias rebbe via use-livecode 
  wrote:
>>> 
>>> Another thing. I am not sure if your problems are also a result of the 
>>> following, but you could giv it a try.
>>> 
>>> There was something changed in Standalonebuilder process starting  in LC 
>>> 9.0 or so to fix a problem. But this fix could cause other problems in some 
>>> situation.
>>> While before that fix the main stacks did not receive any openstack and 
>>> closestack messages during standalone build, now with the fixed standalone 
>>> builder they do.
>>> Therefore some lines of code need to be added to avoid this.
>>> 
>>> See here on page 2 for an explanation what you have to add to your 
>>> openstack and closestack handler
>>> https://downloads.livecode.com/livecode/9_0_1/LiveCodeNotes-9_0_1_rc_1.pdf 
>>> 
>>> 
>>> -
>>> Matthias Rebbe
>>> Life Is Too Short For Boring Code
>>> 
 Am 20.03.2021 um 01:31 schrieb ELS Prothero via use-livecode 
 :
 
 It’s mystifying that all messages seem to come from the rev builder 
 scripts, with no hint of what could be the problem.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> William Prothero
>> waproth...@gmail.com
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Help! I'm stuck

2021-03-20 Thread matthias rebbe via use-livecode
Bill,

i've just checked the release notes of 9.0.x
The release notes of 9.0.2 contain updated information about this topic and an 
enhanced script example. 
opencard scripts should also be adjusted.
https://downloads.livecode.com/livecode/9_0_2/LiveCodeNotes-9_0_2.pdf

Please excuse me for pointing to 9.0.1rc1 release notes yesterday.


Regards
Matthias






-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 20.03.2021 um 18:22 schrieb William Prothero via use-livecode 
> :
> 
> Matthias:
> I see that openstack and closestack messages are inhibited during application 
> build, using:
> 
> on closeStack
>   if the mode of stack “revStandaloneProgress” > 0 then
>   exit closeStack
>   end if
> end
> 
> So, before I start adding this to all openstack, closestack, scripts of my 12 
> stacks, I'm’ wondering if I could mess up the build process by by-passing 
> some of the scripts in these handlers. Is there any way to tell more 
> precisely what is causing the problem? Any recommendations on strategy? 
> Should I just change one stack at a time and look for changes in the error 
> window, or just change all them and wonder what affect that would have on the 
> integrity of the build process?
> 
> Also, opencard scripts are also called when a stack in launched and I wonder 
> if those need to be escaped too.
> 
> Best,
> Bill
> 
>> On Mar 19, 2021, at 5:46 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> Another thing. I am not sure if your problems are also a result of the 
>> following, but you could giv it a try.
>> 
>> There was something changed in Standalonebuilder process starting  in LC 9.0 
>> or so to fix a problem. But this fix could cause other problems in some 
>> situation.
>> While before that fix the main stacks did not receive any openstack and 
>> closestack messages during standalone build, now with the fixed standalone 
>> builder they do.
>> Therefore some lines of code need to be added to avoid this.
>> 
>> See here on page 2 for an explanation what you have to add to your openstack 
>> and closestack handler
>> https://downloads.livecode.com/livecode/9_0_1/LiveCodeNotes-9_0_1_rc_1.pdf 
>> 
>> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
>>> Am 20.03.2021 um 01:31 schrieb ELS Prothero via use-livecode 
>>> :
>>> 
>>> It’s mystifying that all messages seem to come from the rev builder 
>>> scripts, with no hint of what could be the problem.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> William Prothero
> waproth...@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: numberformat question

2021-03-20 Thread Paul Dupuis via use-livecode
I don't have an answer, other than to say there has been a LOT of 
discussion over the years about the limits of number precision in 
LiveCode and a number of enhancement requests and 3rd party libraries 
that have attempted to provide a framework for high precision math. You 
might search the list archives or search the forum on the LC web site 
for past discussions about number precision.


On 3/20/2021 3:06 PM, jbv via use-livecode wrote:

Hi list,
I am a bit lost :

   set numberformat to ".#"
   put -0.007347880794884118999 / 1000
-- returns -0.07347880794884119  which is ok

   put -0.007347880794884118999 / 100
-- returns -0.7347880794884 -> also ok

   put -0.007347880794884118999 / 1
-- returns -0.0073478807949 -> still ok

   put -0.007347880794884118999 / 10
-- returns 0 -> ?

Any explanations ?
Thanks in advance.
Best,
jbv

___
use-livecode mailing list
use-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


numberformat question

2021-03-20 Thread jbv via use-livecode

Hi list,
I am a bit lost :

   set numberformat to ".#"
   put -0.007347880794884118999 / 1000
-- returns -0.07347880794884119  which is ok

   put -0.007347880794884118999 / 100
-- returns -0.7347880794884 -> also ok

   put -0.007347880794884118999 / 1
-- returns -0.0073478807949 -> still ok

   put -0.007347880794884118999 / 10
-- returns 0 -> ?

Any explanations ?
Thanks in advance.
Best,
jbv

___
use-livecode mailing list
use-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: Help! I'm stuck

2021-03-20 Thread William Prothero via use-livecode
Matthias:
I see that openstack and closestack messages are inhibited during application 
build, using:

on closeStack
if the mode of stack “revStandaloneProgress” > 0 then
exit closeStack
end if
end

So, before I start adding this to all openstack, closestack, scripts of my 12 
stacks, I'm’ wondering if I could mess up the build process by by-passing some 
of the scripts in these handlers. Is there any way to tell more precisely what 
is causing the problem? Any recommendations on strategy? Should I just change 
one stack at a time and look for changes in the error window, or just change 
all them and wonder what affect that would have on the integrity of the build 
process?

Also, opencard scripts are also called when a stack in launched and I wonder if 
those need to be escaped too.

Best,
Bill

> On Mar 19, 2021, at 5:46 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> Another thing. I am not sure if your problems are also a result of the 
> following, but you could giv it a try.
> 
> There was something changed in Standalonebuilder process starting  in LC 9.0 
> or so to fix a problem. But this fix could cause other problems in some 
> situation.
> While before that fix the main stacks did not receive any openstack and 
> closestack messages during standalone build, now with the fixed standalone 
> builder they do.
> Therefore some lines of code need to be added to avoid this.
> 
> See here on page 2 for an explanation what you have to add to your openstack 
> and closestack handler
> https://downloads.livecode.com/livecode/9_0_1/LiveCodeNotes-9_0_1_rc_1.pdf 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 20.03.2021 um 01:31 schrieb ELS Prothero via use-livecode 
>> :
>> 
>> It’s mystifying that all messages seem to come from the rev builder scripts, 
>> with no hint of what could be the problem.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

William Prothero
waproth...@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: LC Bug: Copying an Image fails

2021-03-20 Thread e.beugelaar--- via use-livecode
Hi Curry,

It's always fun to read your comments and conclusions that can be somethimes  
interpreted in Dutch as: "de redding is nabij".
So, a solution is near to come!

Nice weekend,
Erik

Met vriendelijke groet,

Erik Beugelaar



From: use-livecode  on behalf of Curry 
Kenworthy via use-livecode 
Sent: Saturday, March 20, 2021 5:55:19 AM
To: use-livecode@lists.runrev.com 
Cc: Curry Kenworthy 
Subject: Re: LC Bug: Copying an Image fails


Bob:

 > MS Office copy operations are notoriously problematic.
 > Microsoft maintains their own clipboard format, so that when
 > switching to another product the clipboard must be translated.
 > Other apps may do the same.
 > The translation does not always go to plan.

Eh ... I think this is a more useful current summary:

1. The Windows blank pasted image bug was about a data stream pointer.
Thanks to the LC Team for looking into that; hope it's merged sooner.

2. There's a crash for some copied image data. Not just MS Office.

3. Mac has image copy/paste troubles too. Also not just MS Office.
I'll report that soon, and we'll probably see improvement.

4. There are dozens of issues with copied content being converted in LC.
I'm crushing many of those with workarounds, so improvement there too!

Is copy/paste between apps effortless? No.
Do users expect it? Yes.
Even with the most popular apps? Of course!
There are problems, but also progress

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

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