Re: Is the DateFormat read only?
I don't think it "strips" the TZ info - it simply ignores it. I think the key phrase is in the dictionary as : *Note:* The *convert* command assumes all dates / times are in local time except for 'the seconds', which is taken to be universal time. So it assume syou date is in local time (regardless of the +0300), and therefore your example returns + for you (I assume you're in the UK, or equivalent, now). It does the same for me, and returns the date with "+". However, the same code run on my LC server (wherever on-rev is these days), changes the +0300 to -0500 - i.e. it's taken as local time where the server is. I assume you should be able to do something with the TimeZone library - but I'm struggling to figure that out. local tNow put the seconds into tNow put FromUniversalTime(tNow,"US/Central") into tt put tNow && tt put FromUniversalTime(tNow,"US/Alaska") into tt put CR & tt after msg gives me 1604709030 1604709030 1604709030 so I don't have a clue what it was trying to do !?! Alex. On 06/11/2020 21:28, David Bovill via use-livecode wrote: Why does: get "Fri, 06 Nov 2020 10:57:37 +0300" convert it to internet date put it — give "Fri, 06 Nov 2020 10:57:37 +" Just seems to strip the timezone info? On 30 Oct 2020, 21:29 +, How to use LiveCode , wrote: ToUniversalTime ___ 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: Basic question: Time Zone Library
Hi, i am not sure if this is still the way how to do it with newer LC Server versions, but at least it still works with LC 9.6.1 First copy the folder of of the time zone library to your server for example into a folder extension Then, to use the library you'll have to put the following 2 lines before your time zone specific code. set the revLibraryMapping["tz"] to "/home/ua829968/public_html/livecode.dermattes.de/tz-test/extensions/com.livecode.library.timezone/code/x86_64-linux/tz.so" load extension from file "./extensions/com.livecode.library.timezone/module.lcm" //here comes your timezone script In the first line you define where the needed shared libraries are located. It must contain the complete path to the shared libraries. In the above example the shared library for 64bit Linux is used. The second line then loads the extension. Mark Waddingham provided that information here 2 years ago https://www.mail-archive.com/use-livecode@lists.runrev.com/msg97605.html Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 06.11.2020 um 23:29 schrieb David Bovill via use-livecode > : > > Just created a handler that I want to use in a Livecode server that uses the > Time Zone Library handler TimeZones(). So: > > 1. How do I find where the library is? > 2. How do I add it so the server code can use it? > > On 6 Nov 2020, 21:28 +, How to use LiveCode > , wrote: >> >> ToUniversalTime > ___ > 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
Basic question: Time Zone Library
Just created a handler that I want to use in a Livecode server that uses the Time Zone Library handler TimeZones(). So: 1. How do I find where the library is? 2. How do I add it so the server code can use it? On 6 Nov 2020, 21:28 +, How to use LiveCode , wrote: > > ToUniversalTime ___ 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 the DateFormat read only?
Why does: get "Fri, 06 Nov 2020 10:57:37 +0300" convert it to internet date put it — give "Fri, 06 Nov 2020 10:57:37 +" Just seems to strip the timezone info? On 30 Oct 2020, 21:29 +, How to use LiveCode , wrote: > > ToUniversalTime ___ 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?
Hi Matthias, Hmm, I should never do things when I’m tired. I do the following all the time with LC session variables and they do use the quotes. put $_SESSION["userid"] into Varuserid Yet the following works nicely and no array is needed: var amount1 = 23; var amount2 = 56; var total = amount1 + amount2; document.cookie = "AdditionResult=" + total + ";" " put "VarAdditionResult = " & VarAdditionResult put "" ?> So $_cookie[AdditionResult] and $_cookie[“AdditionResult”] are different variables? I will have to play around some more. I’m happy that at least something is working now. I just need to know why. Cheers, Rick > On Nov 6, 2020, at 6:04 AM, matthias rebbe via use-livecode > wrote: > > I doubt that the qoutes were the problem. ;) > > Your > put $_cookie[username] > will replace the content of the var username. > In your case, if the value of variable username for example is Peter then > LC would replace $_cookie[username] with $_cookie["Peter"] > > If username wasn't used before then LC uses username as the value of username > > In this case LC would replace $_cookie[username] with $_cookie["username"]. > > So for example > put "hallo" into tArray["mytext"] > put tArray["mytext"]--returns hallo > put tArray[mytext]-- returns hallo > put "test" into mytext > put tArray[mytext] -- returns nothing > > So i am not sure, what the problem was, but definitely not the quotes. ;) > > 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: Segmented Control Widget
I can see the advantages of doing it yourself and intend trying both methods as suggested by yourself and Jaqueline. I have noted when trying some of the widgets that they do seem to be rather incomplete. All the best Terry > On 5 Nov 2020, at 22:43, Bob Sneidar via use-livecode > wrote: > > The segmented control is fairly limited. Most of the widgets are. The > properties you see are the properties you get. I did however, with a bit of > clever scripting, develop a tabbed object group that works as well or better > that the built in tabbed button. And for a bonus, it looks in Windows the > same as it loos on the Mac. Really, the Windows UI is really horrible for LC. > I just gotta say. It puts the Ugh in Ughly. > > Bob S > > >> On Nov 5, 2020, at 12:10 PM, J. Landman Gay via use-livecode >> wrote: >> >> On 11/5/20 1:47 AM, Terence Heaford via use-livecode wrote: >>> 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. >> >> I've done this with a custom control group, it should work with a widget >> too. Calculate the rectangles (or at least the left and right edges) of each >> segment and in a mouseEnter handler compare the mouseLoc to the rectangles >> to see which one it's in. Then set the tooltip to the appropriate string. >> You can also add a mouseMove handler to do the same thing if you want to >> change tooltips as the mouseLoc changes inside the widget. >> >> If the updated tooltip doesn't display reliably, set the tooltip to empty, >> wait a millisecond or so, and then set it to the new string. >> >> -- >> Jacqueline Landman Gay | jac...@hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ 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: Segmented Control Widget
Thanks for your suggestion will give it a try. All the best Terry > On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode > wrote: > > On 11/5/20 1:47 AM, Terence Heaford via use-livecode wrote: >> 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. > > I've done this with a custom control group, it should work with a widget too. > Calculate the rectangles (or at least the left and right edges) of each > segment and in a mouseEnter handler compare the mouseLoc to the rectangles to > see which one it's in. Then set the tooltip to the appropriate string. You > can also add a mouseMove handler to do the same thing if you want to change > tooltips as the mouseLoc changes inside the widget. > > If the updated tooltip doesn't display reliably, set the tooltip to empty, > wait a millisecond or so, and then set it to the new string. > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pass Javascript Session Cookie to LiveCode Variable?
I doubt that the qoutes were the problem. ;) Your put $_cookie[username] will replace the content of the var username. In your case, if the value of variable username for example is Peter then LC would replace $_cookie[username] with $_cookie["Peter"] If username wasn't used before then LC uses username as the value of username In this case LC would replace $_cookie[username] with $_cookie["username"]. So for example put "hallo" into tArray["mytext"] put tArray["mytext"]--returns hallo put tArray[mytext] -- returns hallo put "test" into mytext put tArray[mytext] -- returns nothing So i am not sure, what the problem was, but definitely not the quotes. ;) Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 06.11.2020 um 03:54 schrieb Rick Harrison via use-livecode > : > > Hi Matthias, > > I found the problem. > > You had: put $_Cookie["username”] > > It shouldn’t have the quotes. > > put $_Cookie[username] > > works fine. > > I think I made the same mistake sometime! LOL > > Cookies reside in the client’s web-browser which is why > as users were are always clearing them out. > > So, LiveCode can read Javascript cookies! Yay! > > It’s good enough for now. I’ll revisit Javascript session variables later. > > Thanks for your help! > > Rick > >> On Nov 4, 2020, at 2:04 PM, matthias rebbe via use-livecode >> wrote: >> >> 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 > > ___ > 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