Re: Atkinson dither algorithm
Hi All, This forum message contains the final version of this stack. It includes a Color version of this algorithm. https://forums.livecode.com/viewtopic.php?f=10&p=159173#p159173 Thanks again to Malte Brill, Richard Gaskin, Hermann Hoch, Mark Waddingham, Peter Reid, Ben Rubinstein, Bob Sneidar and Lagi Pittas for posting scripts and writing ideas to improve this handler. Al ___ 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: [ANN] Release 8.2.0 DP-2
That, and the standalone settings are on my list of things I want to take a shot at when I get time. The PB is buggy, and I miss thumbnails. On Fri, Oct 13, 2017 at 5:41 PM, Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 10/13/2017 12:40 PM, J. Landman Gay via use-livecode wrote: > > Seconded. It isn't easy to change the visual settings of controls while >> selected any more. >> >> I think I understand why they did it though. It maches the dotted >> selection in the project browser. >> >> > Yeah. One of the reasons I find the PB unusable. > > -- > 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 > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." ___ 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
Rotating widgets
Hi All, Effectively, SVG Icon widget grows and shrink when rotating, but Peter Thirkell SVG Multicolor widget does not. This Multicolor svg widget only clips it's content and stays the same size. Richmond, Have you installed SVG Multicolor widget? Download and install from this forum thread: http://forums.livecode.com/viewtopic.php?f=93&t=27811 Jacque wrote: > Another disadvantage of using a rotated SVG is that > is will resize to fill its rectangle when rotating. > The clock hand will change its size on each rotation. ___ 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 a date
What about this from the Master Library from Ken Ray? function isDate pWhat /* isDate Date Syntax: isDate (pWhat) Examples: isDate("10/10/2001") Description: Determines if the container passed to it in contains a valid date. Returns true or false. Source: Ken Ray, sdtlib 1.0b isDate */ convert pWhat to short date return not(the result is "invalid date") end isDate On 10/14/17 3:52 PM, J. Landman Gay via use-livecode wrote: On 10/14/17 2:14 PM, Yves COPPE via use-livecode wrote: Try this function CheckDate pDateToCheck return matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])") end CheckDate Promising, but fails with dates like "1/1/19". ___ 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 a date
On 10/14/17 2:14 PM, Yves COPPE via use-livecode wrote: Try this function CheckDate pDateToCheck return matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])") end CheckDate Promising, but fails with dates like "1/1/19". -- 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
Re: Rotating widgets
Another disadvantage of using a rotated SVG is that is will resize to fill its rectangle when rotating. The clock hand will change its size on each rotation. On 10/14/17 2:17 PM, Tore Nilsen via use-livecode wrote: That is why I suggest using a png-file, where all but the hand is transparent. Setting the resizeQuality to best should give a good result without reducing the speed of any animation you do. Tore 14. okt. 2017 kl. 21:06 skrev Richmond Mathewson via use-livecode : But one cannot make an SVG image "twice as long, with half of it transparent": belive me I have tried that already. -- 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
Re: Rotating widgets
That is why I suggest using a png-file, where all but the hand is transparent. Setting the resizeQuality to best should give a good result without reducing the speed of any animation you do. Tore > 14. okt. 2017 kl. 21:06 skrev Richmond Mathewson via use-livecode > : > > But one cannot make an SVG image "twice as long, with half of it > transparent": belive me > I have tried that already. ___ 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 a date
Hi, Try this function CheckDate pDateToCheck return matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])") end CheckDate answer CheckDate(tDate) > Le 14 oct. 2017 à 19:27, Roger Eller via use-livecode > a écrit : > > That's what I suspected. So to build a slightly better trap, I am doing > this: > > if tDate is a date and length(tDate) > 5 and tDate contains "/" then > put "true" > else > put "false" > end if > > I am sure there is probably a standard way to catch all possible date > formats (excluding "the seconds"), but this works for most. > > ~Roger > > > On Sat, Oct 14, 2017 at 12:44 PM, Klaus major-k via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Hi Roger, >> >>> Am 14.10.2017 um 18:30 schrieb Roger Eller via use-livecode < >> use-livecode@lists.runrev.com>: >>> >>> put "11/20/2017" is a date >>> returns true >>> >>> put "10" is a date >>> returns true >>> >>> put "raccoon" is a date >>> returns false >>> >>> >>> WHY is "10" seen as a date? >> >> looks like the engine is seeing seconds also as a possible valid date. >> >> convert 0 to long date and long time;put it -> Thursday, January 1, 1970 >> 1:00:00 AM >> 1:00:00 = DST here in germany! >> >> convert 10 to long date and long time;put it -> Thursday, January 1, 1970 >> 1:00:10 AM >> etc... >> >> And of course: >> put (the seconds) is a date -> TRUE >> >>> ~Roger >> >> Best >> >> Klaus >> >> -- >> Klaus Major >> http://www.major-k.de >> kl...@major-k.de >> >> >> ___ >> 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: Rotating widgets
But one cannot make an SVG image "twice as long, with half of it transparent": belive me I have tried that already. Richmond. On 10/14/17 9:44 pm, Mark Wieder via use-livecode wrote: On 10/14/2017 11:30 AM, Tore Nilsen via use-livecode wrote: You would probably be better off using a transparent png-image that is square for the clock hand, and where the rotation point of the clock hand was at the center of the square. You could then put the clock hand on top of the clock face and rotate the hand at will. My students hand the same kind of problem as part of their national exam this spring. You could also do some vector calculations to find the new center for your widget, but I must admit that I am not all that certain how you would go about it then. Mathematics is not my strongest subject, and I must admit that at 56 I have forgotten most of the maths I learnt in my upper secondary years. This is where I miss having Scott Rossi around. My simplistic take on this would be similar: Make your clock hand twice as long, with half of it transparent. ___ 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: Rotating widgets
On 10/14/2017 11:30 AM, Tore Nilsen via use-livecode wrote: You would probably be better off using a transparent png-image that is square for the clock hand, and where the rotation point of the clock hand was at the center of the square. You could then put the clock hand on top of the clock face and rotate the hand at will. My students hand the same kind of problem as part of their national exam this spring. You could also do some vector calculations to find the new center for your widget, but I must admit that I am not all that certain how you would go about it then. Mathematics is not my strongest subject, and I must admit that at 56 I have forgotten most of the maths I learnt in my upper secondary years. This is where I miss having Scott Rossi around. My simplistic take on this would be similar: Make your clock hand twice as long, with half of it transparent. -- 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: Rotating widgets
You would probably be better off using a transparent png-image that is square for the clock hand, and where the rotation point of the clock hand was at the center of the square. You could then put the clock hand on top of the clock face and rotate the hand at will. My students hand the same kind of problem as part of their national exam this spring. You could also do some vector calculations to find the new center for your widget, but I must admit that I am not all that certain how you would go about it then. Mathematics is not my strongest subject, and I must admit that at 56 I have forgotten most of the maths I learnt in my upper secondary years. Regards Tore > 14. okt. 2017 kl. 20:14 skrev Richmond Mathewson via use-livecode > : > > I am getting a bit fudgey with clock hands. > > I have used my SVG importer stack to import a minute and an hour hand as SVG > widgets, as well as > a clock face. > > The "only snag" is that when I do this sort of thing: > > set the angle of widget "hourHand" to 90 > > it rotates the widget round its centre rather than round the bit that a clock > hand would naturally rotate around. > > So . . . > > is there a way to do something like this: > > [pseudo-code] > > set the angle of widget "hourHand" to 90 at point 20,200 > > ? > > where "point 20,200" refers to a position on the widget around which rotation > can take place. > > Richmond. > ___ > 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
Rotating widgets
I am getting a bit fudgey with clock hands. I have used my SVG importer stack to import a minute and an hour hand as SVG widgets, as well as a clock face. The "only snag" is that when I do this sort of thing: set the angle of widget "hourHand" to 90 it rotates the widget round its centre rather than round the bit that a clock hand would naturally rotate around. So . . . is there a way to do something like this: [pseudo-code] set the angle of widget "hourHand" to 90 at point 20,200 ? where "point 20,200" refers to a position on the widget around which rotation can take place. Richmond. ___ 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 a date
That's what I suspected. So to build a slightly better trap, I am doing this: if tDate is a date and length(tDate) > 5 and tDate contains "/" then put "true" else put "false" end if I am sure there is probably a standard way to catch all possible date formats (excluding "the seconds"), but this works for most. ~Roger On Sat, Oct 14, 2017 at 12:44 PM, Klaus major-k via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Roger, > > > Am 14.10.2017 um 18:30 schrieb Roger Eller via use-livecode < > use-livecode@lists.runrev.com>: > > > > put "11/20/2017" is a date > > returns true > > > > put "10" is a date > > returns true > > > > put "raccoon" is a date > > returns false > > > > > > WHY is "10" seen as a date? > > looks like the engine is seeing seconds also as a possible valid date. > > convert 0 to long date and long time;put it -> Thursday, January 1, 1970 > 1:00:00 AM > 1:00:00 = DST here in germany! > > convert 10 to long date and long time;put it -> Thursday, January 1, 1970 > 1:00:10 AM > etc... > > And of course: > put (the seconds) is a date -> TRUE > > > ~Roger > > Best > > Klaus > > -- > Klaus Major > http://www.major-k.de > kl...@major-k.de > > > ___ > 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 a date
Hi Roger, > Am 14.10.2017 um 18:30 schrieb Roger Eller via use-livecode > : > > put "11/20/2017" is a date > returns true > > put "10" is a date > returns true > > put "raccoon" is a date > returns false > > > WHY is "10" seen as a date? looks like the engine is seeing seconds also as a possible valid date. convert 0 to long date and long time;put it -> Thursday, January 1, 1970 1:00:00 AM 1:00:00 = DST here in germany! convert 10 to long date and long time;put it -> Thursday, January 1, 1970 1:00:10 AM etc... And of course: put (the seconds) is a date -> TRUE > ~Roger Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de ___ 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 a date
put "11/20/2017" is a date returns true put "10" is a date returns true put "raccoon" is a date returns false WHY is "10" seen as a date? ~Roger ___ 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