Re: Is there a command to display number of seconds as hrs:min:seconds?

2019-10-16 Thread hh via use-livecode
> Bill V. wrote:
> I know how to do the math to figure it out but I’m wondering if there
> is a built in function to do this. Convert wants to deal with actual time
> so I would get something like “0:1:15 PM”. 

That needs the same energy as the simple math method but as you ask:

1. set the twelvehourtime to false
2. compute what you get when converting t=0 to long time (=diff)
3. subtract diff from your start time
4. repeat converting your seconds value to long time


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


Re: Is there a command to display number of seconds as hrs:min:seconds?

2019-10-16 Thread Dar Scott Consulting via use-livecode
Perhaps the dateItems format would get you part of the way there. 

It seems like I have reinvented this in the past several times.

> On Oct 16, 2019, at 6:41 PM, Terry Judd via use-livecode 
>  wrote:
> 
> Not built-in but...
> 
> function formatRemainingTime pTime
>   put trunc(pTime/3600) into tHours
>   put pTime mod 3600 into tTimeX
>   put trunc(tTimeX/60) into tMins
>   put tTimeX mod 60 into tSecs
>   if tHours < 10 then put "0" before tHours
>   if tMins < 10 then put "0" before tMins
>   if tSecs < 10 then put "0" before tSecs
>   return tHours&":"&":"
> end formatRemainingTime
> 
> On 17/10/19, 11:24 am, "use-livecode on behalf of Bill Vlahos via 
> use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>I’m writing a countdown timer application and want to display the 
> remaining time not as the number of seconds but in the format of HR:MIN:SEC 
> left.
> 
>For example 75 seconds would display as “0:1:15”.
>130 seconds would display as “0:2:10”.
> 
>I know how to do the math to figure it out but I’m wondering if there is a 
> built in function to do this.
> 
>Convert wants to deal with actual time so I would get something like 
> “0:1:15 PM”.
> 
>Thanks,
>Bill Vlahos
>___
>use-livecode mailing list
>use-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: Is there a command to display number of seconds as hrs:min:seconds?

2019-10-16 Thread Terry Judd via use-livecode
Not built-in but...

function formatRemainingTime pTime
   put trunc(pTime/3600) into tHours
   put pTime mod 3600 into tTimeX
   put trunc(tTimeX/60) into tMins
   put tTimeX mod 60 into tSecs
   if tHours < 10 then put "0" before tHours
   if tMins < 10 then put "0" before tMins
   if tSecs < 10 then put "0" before tSecs
   return tHours&":"&":"
end formatRemainingTime

On 17/10/19, 11:24 am, "use-livecode on behalf of Bill Vlahos via 
use-livecode"  wrote:

I’m writing a countdown timer application and want to display the remaining 
time not as the number of seconds but in the format of HR:MIN:SEC left.

For example 75 seconds would display as “0:1:15”.
130 seconds would display as “0:2:10”.

I know how to do the math to figure it out but I’m wondering if there is a 
built in function to do this.

Convert wants to deal with actual time so I would get something like 
“0:1:15 PM”.

Thanks,
Bill Vlahos
___
use-livecode mailing list
use-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


Is there a command to display number of seconds as hrs:min:seconds?

2019-10-16 Thread Bill Vlahos via use-livecode
I’m writing a countdown timer application and want to display the remaining 
time not as the number of seconds but in the format of HR:MIN:SEC left.

For example 75 seconds would display as “0:1:15”.
130 seconds would display as “0:2:10”.

I know how to do the math to figure it out but I’m wondering if there is a 
built in function to do this.

Convert wants to deal with actual time so I would get something like “0:1:15 
PM”.

Thanks,
Bill Vlahos
___
use-livecode mailing list
use-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 Session Cookies

2019-10-16 Thread Ralph DiMola via use-livecode
I started getting this warning in Chrome yesterday. It pops up when I start
an LC Server session. I don't see a way to set this attribute when creating
the session. I also don't see a way to set the attribute when creating a
cookie with "put cookie". Does this require a change to LC Server or am I
missing something?

A cookie associated with a cross-site resource at http://x.on-rev.com/
was set without the `SameSite` attribute. A future release of Chrome will
only deliver cookies with cross-site requests if they are set with
`SameSite=None` and `Secure`. You can review cookies in developer tools
under Application>Storage>Cookies and see more details at
https://www.chromestatus.com/feature/5088147346030592 and
https://www.chromestatus.com/feature/5633521622188032.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


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


RE: Set font dynamically to fit text

2019-10-16 Thread Ralph DiMola via use-livecode
This is how I fit text into fields and buttons. This the first LC code I wrote 
back in LC 4.6. I did not follow best practices back then. After looking at it 
again I see that I optimized it so you don't have to set the textsize to some 
huge number.

https://tinyurl.com/y2jtt877

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 
Sannyasin Brahmanathaswami via use-livecode
Sent: Monday, October 14, 2019 3:21 PM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: Set font dynamically to fit text

Dan: Thanks for the handler!

Ralph: Actually that last solution offered was fromr Dan Friedman not mine. 
Can you put your two handlers on the list?  " I also have an option to fit 
either by height or width." 

Doc Hawk:  I give in , " Font scaling itself is nonlinear enough, but the way 
margins scale with font size is downright psychotic " that's two unknowns in 
the equation. So iterationis required



Ralph wrote
I use the same technique as BR with a couple of diffs. I originally went down 
by 1's like BR but changed it for increased performance. I set the textsize to 
a large number(I like BR's initial size option) I then go down by 8s, add 7, 
down by 4s, add 3, down by 2s, add 1 finally down by ones until it fits. Each 
of the 4 loops has a check for min size so it down not go down below 2. I guess 
2 is too low but it's been working.
I also have an option to fit either by height or width. 


___
use-livecode mailing list
use-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: Catalina and stuff other than 32bit—USB broken

2019-10-16 Thread Dar Scott Consulting via use-livecode
No, I haven't tried QUEMU.

However, I downloaded a new xCode and, when I ran it the first time, my little 
board started working and showed up as a virtual serial port and as a disk 
drive. 

The good news is that it works. Perhaps xCode swapped out something, maybe 
drivers.

The bad news is that I have no idea whether something that runs on my machine 
will run on another without xCode installed.

Dar
Mad Scientist
Sad Scientist


> On Oct 16, 2019, at 2:31 PM, hh via use-livecode 
>  wrote:
> 
> @Dar.
> Did you already try to use QUEMU?
> https://www.qemu.org
> 
> 
> 
> ___
> use-livecode mailing list
> use-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: Re: Catalina and stuff other than 32bit—USB broken

2019-10-16 Thread hh via use-livecode
@Dar.
Did you already try to use QUEMU?
https://www.qemu.org



___
use-livecode mailing list
use-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: Catalina and stuff other than 32bit—USB broken

2019-10-16 Thread Dar Scott Consulting via use-livecode
I'm not sure how this addresses my concern. Uh, rant. Lament. 

If this is an OS problem, then a Hackintosh system would not solve it.
If this is a driver problem, then perhaps Clover will work, but maybe not.
(When I build a machine, I would use Windows or Linux, so—for me—Hackintosh is 
not a solution.)

I like working with USB gadgets on the Mac, but if "Works with Catalina" has to 
become a de facto standard for USB, then Apple is going to lose a market. A 
virtual Windows machine is of no help here. 

Oh, and I said AdaFruit has a fix for Feather boards. It doesn't work for me. 

This also means my advice to use virtual machines for Windows is flawed.

Maybe this is Apple's way of saying I should get a new Mac, but I hear even 
some new Macs have the problem.

> On Oct 14, 2019, at 2:10 PM, Erik Beugelaar via use-livecode 
>  wrote:
> 
> That is why I rely for the last 10 years on myself built Hackintosh systems. 
> They run faster for less money and they are modular and easy to upgrade. 
> With the introduction of Clover it has never been a problem to use hardware 
> components (especially graphic cards, wifi/bt cards, sound cards etc.) which 
> were not supported by Apple anymore.
> 
> On 14/10/2019, 21:58, "use-livecode on behalf of Dar Scott Consulting via 
> use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>Catalina does not recognize the bootloader for atmega32u4 Arduino boards 
> such as Leonardo. The IDE 1.8.10 avr toolchain works (64-bit); this is not 
> related to 32-bit. 
> 
>Catalina does not recognize the AdaFruit Feather ...BOOT drives. Actually 
> this started with macOS 10.14.4. According to Dan Halbert, "Apple changed how 
> USB devices are recognized on certain Macs", creating a timing problem. 
> AdaFruit has a fix.
> 
>There are some indications that some USB devices made with Jan Atkinson's 
> examples are having problems on Catalina on some hardware.
> 
>I don't know if Apple is stepping outside USB specs or is pushing the 
> specs. Or whether the small board community has been spec-lax. 
> 
>Not directly LiveCode related, but more reason to hesitate, especially for 
> gadget folks like me. 
> 
>Dar Scott
>Mad Scientist
> 
> 
> 
> 
>___
>use-livecode mailing list
>use-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: Catalina and stuff other than 32bit

2019-10-16 Thread Eller, Roger via use-livecode
Morganaut has the best tutorials out there for a modern MacOS build.

https://www.youtube.com/channel/UCg5TS2EmMutPd7Y1zqfQ3iA


~Roger






From: use-livecode  on behalf of Bob 
Sneidar via use-livecode 
Sent: Tuesday, October 15, 2019 10:45 AM
To: How to use LiveCode 
Cc: Bob Sneidar 
Subject: Re: Catalina and stuff other than 32bit

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


I need to look into this again. I made one Hackintosh with an eye to play video 
games but could never get the graphics card to work. That was a long time ago. 
If you have any links for making this happen I would be very interested. Thanks.

Bob S


> On Oct 14, 2019, at 13:10 , Erik Beugelaar via use-livecode 
>  wrote:
>
> That is why I rely for the last 10 years on myself built Hackintosh systems. 
> They run faster for less money and they are modular and easy to upgrade.
> With the introduction of Clover it has never been a problem to use hardware 
> components (especially graphic cards, wifi/bt cards, sound cards etc.) which 
> were not supported by Apple anymore.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.runrev.com%2Fmailman%2Flistinfo%2Fuse-livecodedata=02%7C01%7Croger.e.eller%40sealedair.com%7C661d2fed28a145cc431008d7517e724b%7C2691a2514c384643af0b0c0982f197bd%7C0%7C0%7C637067475833169150sdata=E9p3IYKxS67%2BSVjyAv%2B5TDkJ6mcRnkpjVE5s08aFzoo%3Dreserved=0
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode