From MikeKerner at roadrunner.com Wed Jun 1 10:20:07 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 10:20:07 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: Since this is now in the wild, and has a very different layout, y'all should probably have a look at it and comment on it, before it gets too far down the road. LC has stated that this is the future. On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < use-livecode at lists.runrev.com> wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > You can find more details on the new features and the bug fixes of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From heather at livecode.com Wed Jun 1 10:35:40 2022 From: heather at livecode.com (Heather Laine) Date: Wed, 1 Jun 2022 15:35:40 +0100 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. In case anyone is confused. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: > > Since this is now in the wild, and has a very different layout, y'all > should probably have a look at it and comment on it, before it gets too far > down the road. LC has stated that this is the future. > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Dear list members, >> >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >> >> You can find more details on the new features and the bug fixes of this new >> release here: >> >> https://livecode.com/m1-native-latest-livecode-releases/ >> >> You can find the release in your LiveCode account area or get it via the >> automatic updater. >> >> Enjoy! >> >> Kind regards >> The LiveCode Team >> >> -- >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 1 12:44:25 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 17:44:25 +0100 Subject: Case sensitivity in Livecode ?? Message-ID: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> I was surprised to find that    constant K = TRUE produces an error, though   constant K = true is fine. In other contexts, you can say    put TRUE into myVar    put true into hisVar    etc. but in a constant statement, it seems to be case sensitive. Anyone got an interesting story (or theory) on why ?   :-) Thanks Alex. From bobsneidar at iotecdigital.com Wed Jun 1 12:51:14 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 16:51:14 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <5A4D8DBA-06E9-43D5-85FB-B0AD150FB104@iotecdigital.com> Not only that, but revOpenDatabase("sqlite", ":MEMORY:") will not work on Windows, but DOES on Mac. revOpenDatabase("sqlite", ":memory:") works on both platforms. Do you know why?? No you do not. No one knows, and will likely NEVER know. LOL! I suppose :memory: is a kind of system constant?!? But why it is case sensitive on Windows but not on Mac is beyond me. I put it into the bin labeled, "Things that make you go hmmm..." Bob S > On Jun 1, 2022, at 09:44 , Alex Tweedly via use-livecode wrote: > > I was surprised to find that > > constant K = TRUE > > produces an error, though > > constant K = true > > is fine. In other contexts, you can say > > put TRUE into myVar > put true into hisVar > etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ? :-) > > Thanks > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Wed Jun 1 13:05:42 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 01 Jun 2022 18:05:42 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <96b62f068eb95b27e8badeae5661cb43@livecode.com> On 2022-06-01 17:44, Alex Tweedly via use-livecode wrote: > I was surprised to find that > >    constant K = TRUE > > produces an error, though > >   constant K = true > > is fine. In other contexts, you can say > >    put TRUE into myVar >    put true into hisVar >    etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ?   :-) Its a small mitigation of https://quality.livecode.com/show_bug.cgi?id=19413 - i.e. where the initializer of constants (and locals) is currently treated as a single literal. In explicitVariables mode, unquoted literals are allowed on the RHS only if the literal is a (builtin) constant *and* the constants value is identical to the token you have provided. That extra check is there to ensure that the constants (and initializers) you have used are actually what you intended. Currently - the following does not do what you think: constant kEmptyString = empty Indeed, this isn't allowed in explicitVariables mode, as the constant empty's value is "" and not "empty" - which is what kEmptyString will actually be with explicitVariables turned off. Anyway, this rather odd and obscure facet of the language will disappear in 10 as we've made it so that initializers for constants and locals can be constant expressions. Thus: constant kTrue = TRUE local sEmptyString = empty Will do precisely what they look like they should do... Also, you'll be able to do things like: constant kPiBy2 = pi / 2 constant kPiBy2Squared = kPiBy2 * kPiBy2 constant kPiBy2String = format("%f", kPiBy2) local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } Warmest Regards, Mark. P.S. Amusingly, your question came up on exactly the same day I 'finished' my patch for the above - it now awaits review which may result in it not being quite finished ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Wed Jun 1 14:14:42 2022 From: richmondmathewson at gmail.com (Richmond) Date: Wed, 1 Jun 2022 21:14:42 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Certainly not round these parts: the IDE "we know and love" is still in place. Best, Richmond. On 1.06.22 17:35, Heather Laine via use-livecode wrote: > I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > >> On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: >> >> Since this is now in the wild, and has a very different layout, y'all >> should probably have a look at it and comment on it, before it gets too far >> down the road. LC has stated that this is the future. >> >> On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Dear list members, >>> >>> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >>> >>> You can find more details on the new features and the bug fixes of this new >>> release here: >>> >>> https://livecode.com/m1-native-latest-livecode-releases/ >>> >>> You can find the release in your LiveCode account area or get it via the >>> automatic updater. >>> >>> Enjoy! >>> >>> Kind regards >>> The LiveCode Team >>> >>> -- >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Wed Jun 1 14:34:47 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 11:34:47 -0700 Subject: Right click in field for menu Message-ID: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Hi, I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. How would I do this? Is the menu that would show Livecode, or from the OS? Thanks, Peter Bogdanoff From klaus at major-k.de Wed Jun 1 14:40:41 2022 From: klaus at major-k.de (Klaus major-k) Date: Wed, 1 Jun 2022 20:40:41 +0200 Subject: Right click in field for menu In-Reply-To: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Message-ID: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Hi Peter, > Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : > > Hi, > > I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. > How would I do this? on mousedown tNumber ## mousebutton 3 = right-click if tNumber = 3 then popup btn "your popup here..." at the mouseloc end if end mousedown > Is the menu that would show Livecode, or from the OS? That will popup a LC popup menu button. > Thanks, > > Peter Bogdanoff Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From alex at tweedly.net Wed Jun 1 14:54:18 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 19:54:18 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <96b62f068eb95b27e8badeae5661cb43@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> Message-ID: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> On 01/06/2022 18:05, Mark Waddingham via use-livecode wrote: > > Anyway, this rather odd and obscure facet of the language will > disappear in 10 as we've made it so that initializers for constants > and locals can be constant expressions. Thus: > >     constant kTrue = TRUE >     local sEmptyString = empty > > Will do precisely what they look like they should do... > Good. > Also, you'll be able to do things like: > >     constant kPiBy2 = pi / 2 >     constant kPiBy2Squared = kPiBy2 * kPiBy2 >     constant kPiBy2String = format("%f", kPiBy2) >     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } > Very good. In fact, great !! Thank you! Would you be ale to do something like constant kPiMap = { ... as above ... } And now I'll push my luck and ponder the possibility of 'global' constants. OK - 'global constant' is likely counter to the scope concepts. But perhaps they could be done as "write-once" variables, or as a more general "write-protected' variable. e.g. (somewhere in a start-up script ...)    put 17 into gkMyMagicValue    writeprotect "gkMyMagicValue" and any *subsequent* attempt to change the value would fail. > P.S. Amusingly, your question came up on exactly the same day I > 'finished' my patch for the above - it now awaits review which may > result in it not being quite finished ;) Yes, coincidences do happen :-) Thanks for the explanation Mark. Alex. From bogdanoff at me.com Wed Jun 1 16:53:20 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 13:53:20 -0700 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. Is there a better way to edit a selection in a field using a menu popup? Peter > On Jun 1, 2022, at 11:40 AM, Klaus major-k via use-livecode > wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode >: >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 1 16:54:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 20:54:47 +0000 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <0F93D036-0716-4567-BB4B-E2F858654AF6@iotecdigital.com> I didn't know mouse events were handled in an unlocked field! Nice to know. Curiously however, in that handler I substituted a put statement for the popup command using send "put " & quote & "this worked" & quote to me in 2 seconds In two seconds I get "worked" not "this worked" in the message box. Bob S > On Jun 1, 2022, at 11:40 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Wed Jun 1 17:10:52 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 17:10:52 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Then my bad, I presumed that the DP4 release was the DP4 release. On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < use-livecode at lists.runrev.com> wrote: > I think you are probably referring to the special prototype dp-4 with the > single window IDE in testing. This is not as yet "in the wild". This has > only so far been made available to the attendees for LCG 22/23 Feature > Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Since this is now in the wild, and has a very different layout, y'all > > should probably have a look at it and comment on it, before it gets too > far > > down the road. LC has stated that this is the future. > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> Dear list members, > >> > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > >> > >> You can find more details on the new features and the bug fixes of this > new > >> release here: > >> > >> https://livecode.com/m1-native-latest-livecode-releases/ > >> > >> You can find the release in your LiveCode account area or get it via the > >> automatic updater. > >> > >> Enjoy! > >> > >> Kind regards > >> The LiveCode Team > >> > >> -- > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at 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 at 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." From richmondmathewson at gmail.com Thu Jun 2 01:26:45 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Thu, 2 Jun 2022 08:26:45 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Well, obviously not. I hope LC will release a public beta shortly. Listen to feedback. Allow the new IDE not to be 'the' IDE, but one of 2 possible choices. On Thu, 2 Jun 2022, 00:12 Mike Kerner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Then my bad, I presumed that the DP4 release was the DP4 release. > > On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > I think you are probably referring to the special prototype dp-4 with the > > single window IDE in testing. This is not as yet "in the wild". This has > > only so far been made available to the attendees for LCG 22/23 Feature > > Focus sessions. > > > > In case anyone is confused. > > > > Best Regards, > > > > Heather > > > > Heather Laine > > Customer Services Manager > > LiveCode Ltd > > www.livecode.com > > > > > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > > Since this is now in the wild, and has a very different layout, y'all > > > should probably have a look at it and comment on it, before it gets too > > far > > > down the road. LC has stated that this is the future. > > > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > > use-livecode at lists.runrev.com> wrote: > > > > > >> Dear list members, > > >> > > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > >> > > >> You can find more details on the new features and the bug fixes of > this > > new > > >> release here: > > >> > > >> https://livecode.com/m1-native-latest-livecode-releases/ > > >> > > >> You can find the release in your LiveCode account area or get it via > the > > >> automatic updater. > > >> > > >> Enjoy! > > >> > > >> Kind regards > > >> The LiveCode Team > > >> > > >> -- > > >> _______________________________________________ > > >> use-livecode mailing list > > >> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 2 05:48:35 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 2 Jun 2022 10:48:35 +0100 Subject: OT Re: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: <8D1A5EF6-22B4-4420-A6F9-7E85AEAA5E25@gmail.com> > On 2 Jun 2022, at 6:26 am, Richmond Mathewson via use-livecode wrote: > > 2 possible choices. That’s 4 alternatives. Cheers David G Pedant extraordinaire From klaus at major-k.de Thu Jun 2 06:07:02 2022 From: klaus at major-k.de (Klaus major-k) Date: Thu, 2 Jun 2022 12:07:02 +0200 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi Peter, > Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : > > Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. > I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. > Is there a better way to edit a selection in a field using a menu popup? unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. This will "steal" the focus! :-/ Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. ... set the traversalon of btn "your popup here..." to FALSE ... > Peter Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bogdanoff at me.com Thu Jun 2 14:48:23 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Thu, 2 Jun 2022 11:48:23 -0700 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <4A06E2C5-B3A5-4BBD-81FA-7EDEA7E151B6@me.com> Klaus, thank you. Such a simple fix! > On Jun 2, 2022, at 3:07 AM, Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 2 18:14:29 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 2 Jun 2022 22:14:29 +0000 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <1CEE9304-6F51-4E0F-AF49-66B6AB5CD9D9@iotecdigital.com> More gems of LC wisdom from Klaus! Bob S > On Jun 2, 2022, at 03:07 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Fri Jun 3 09:56:17 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Fri, 3 Jun 2022 15:56:17 +0200 Subject: char as word boundary Message-ID: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Hi, Version 6.7 word boudary are char number 09,10,11,12,13,32 version 9.67 word boudary are char number 09,10,11,12,13,32,202 Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) Sincerely, Jean-Jacques Wagner. From iangmcknight at gmail.com Fri Jun 3 10:26:14 2022 From: iangmcknight at gmail.com (Ian McKnight) Date: Fri, 3 Jun 2022 15:26:14 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: Hi Look up numToChar in the dictionary. It's been deprecated since v7 0 because of unicode. This might explain things. Hope that helps Ian McKnight On Fri, 3 Jun 2022, 14:57 Jean-Jacques Wagner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, > as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 3 12:25:56 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 16:25:56 +0000 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: I get a compile error when using your syntax. If I insert the word "of" after "chars" I get 5 for version 9.6.8 as you would expect. Do you have the *actual* syntax that is causing you the problem? . Bob S > On Jun 3, 2022, at 06:56 , Jean-Jacques Wagner via use-livecode wrote: > > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 13:01:55 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 10:01:55 -0700 Subject: MrSign'n'Notarize In-Reply-To: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: Mark Smith wrote: > Hey Matthias, I just wanted to drop you a quick note to thank you for > the amazing utility you put together to sign and staple macOS apps. I > tried it for the first time the other day and it was a real joy to use > very well organised. Thanks for that. Definitely a life-saver (or at > least a life-enhancer!!). A life-saver indeed. Why isn't a tool like that included in the product? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From bobsneidar at iotecdigital.com Fri Jun 3 13:11:52 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 17:11:52 +0000 Subject: MrSign'n'Notarize In-Reply-To: References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: <4AA9A799-E7F4-4972-A055-EDB98470C7F9@iotecdigital.com> If I were Matthias, I would charge cash money for that. But then having LC release it in the distribution would kill the sales of it. Bob S > On Jun 3, 2022, at 10:01 , Richard Gaskin via use-livecode wrote: > > Mark Smith wrote: > > > Hey Matthias, I just wanted to drop you a quick note to thank you for > > the amazing utility you put together to sign and staple macOS apps. I > > tried it for the first time the other day and it was a real joy to use > > — very well organised. Thanks for that. Definitely a life-saver (or at > > least a life-enhancer!!). > > A life-saver indeed. > > Why isn't a tool like that included in the product? > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 3 17:29:28 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:29:28 +0000 Subject: storing binary data in a "memory" database Message-ID: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Hi all. I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. Bob S From bobsneidar at iotecdigital.com Fri Jun 3 17:41:21 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:41:21 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Right now I am querying for the hash directly from the source database when I need it. Just curious why sqLite cannot handle storing an encrypted string. Bob S > On Jun 3, 2022, at 14:29 , Bob Sneidar via use-livecode wrote: > > Hi all. > > I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. > > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dochawk at gmail.com Fri Jun 3 17:41:31 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 14:41:31 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <87E14DC8-7232-4C40-B4D2-DA72FB89BC7C@gmail.com> bob bobbled, > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. You shouldn’t need a BLOB for a hash. Either CHAR(), VARCHAR(), or TEXT. With the first two, you need to specify a long enough length. From dochawk at gmail.com Fri Jun 3 18:04:21 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 15:04:21 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: A couple of lines of code with declarations, storing, and retrieving would probably help. There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. From neville.smythe at optusnet.com.au Fri Jun 3 18:49:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 4 Jun 2022 08:49:08 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: Jean-Jacques In 9.6.8 the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 As it should be. Did you mean the number of words? But then the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) As it should be. Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. Neville > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > From bobsneidar at iotecdigital.com Fri Jun 3 18:55:09 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 22:55:09 +0000 Subject: storing binary data in a "memory" database In-Reply-To: References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. I suppose what I need is a statement to change the encoding of the database before I create it. put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID put the keys of pArrayDataA into tArrayKeys sort tArrayKeys numeric ascending IF pDBFile is empty THEN put ":memory:" into pDBFile IF pDBName is empty THEN put "arraydata" into pDBName TRY if pDBID is empty then \ put revOpenDatabase("sqlite", pDBFile) into pDBID IF "Error" is in pDBID THEN return empty END IF put "drop table " & pDBName into tDropSQL revExecuteSQL pDBID, tDropSQL put the result into tResult CATCH tError answer tError IF the environment is "development" THEN exit to top ELSE quit END TRY -- create the table put "create table" && quote & pDBName & quote \ & cr into tCreateCommand put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ & cr AFTER tCreateCommand put the keys of pArrayDataA [1] into tRecordKeyList REPEAT for each line tRecordKey in tRecordKeyList if pArrayDataA [1] [tRecordKey] is an array or \ pArrayDataA [1] [tRecordKey] begins with "Salted__" then put "BLOB" into tColumnType else put VARCHAR into tColumnType end if put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand END REPEAT delete char -3 to -1 of tCreateCommand put ")" AFTER tCreateCommand TRY revExecuteSQL pDBID, tCreateCommand put the result into tResult IF tResult is not 0 THEN breakpoint CATCH tError breakpoint END TRY put 1 into tRecordCounter put "recordid" & cr & tRecordKeyList into tColumns repeat with i = 1 to the number of lines of tColumns put ":" & i into item i of tColumnList end repeat put "(" & tColumnList & ")" into tColumnList -- insert data REPEAT for each line tKey in tArrayKeys put 1 into tColumnCounter put pArrayDataA [tKey] into tRecordDataA put tRecordCounter into tQueryDataA [1] REPEAT for each line tRecordKey in tRecordKeyList add 1 to tColumnCounter if tRecordDataA [tRecordKey] is an array then put arrayEncode(tRecordDataA [tRecordKey]) into tValue else put tRecordDataA [tRecordKey] into tValue end if put tValue into tQueryDataA [tColumnCounter] END REPEAT put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL TRY revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" put the result into tResult if the result is not a number then breakpoint CATCH tError breakpoint END TRY add 1 to tRecordCounter END REPEAT return pDBID END arrayToSQLite > On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: > > A couple of lines of code with declarations, storing, and retrieving would probably help. > > > There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 22:18:04 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 19:18:04 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. From irog at mac.com Fri Jun 3 22:53:15 2022 From: irog at mac.com (Roger Guay) Date: Fri, 3 Jun 2022 19:53:15 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: This is very cool, Richard! I truly appreciate all you do for us. Thanks and cheers, Roger > On Jun 3, 2022, at 7:18 PM, Richard Gaskin via use-livecode wrote: > > Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. > > Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. > > LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. > > So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. > > It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. > > -- > Richard Gaskin > Fourth World Systems > > > > Klaus wrote: > > unfortunately the "traversalon" property of popup menu buttons is set > > to TRUE by default. > > This will "steal" the focus! :-/ > > > > Use the message box (prop is also missing in the inspector) to set it > > to FALSE and it will work as advertised. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Sat Jun 4 09:29:44 2022 From: brian at milby7.com (Brian Milby) Date: Sat, 4 Jun 2022 09:29:44 -0400 Subject: storing binary data in a "memory" database In-Reply-To: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Message-ID: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Is this the issue? To pass binary data in an array element, prepend "*b" to the element's key. Sent from my iPhone > On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: > > Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. > > I suppose what I need is a statement to change the encoding of the database before I create it. > > put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB > > FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID > put the keys of pArrayDataA into tArrayKeys > sort tArrayKeys numeric ascending > IF pDBFile is empty THEN put ":memory:" into pDBFile > IF pDBName is empty THEN put "arraydata" into pDBName > > TRY > if pDBID is empty then \ > put revOpenDatabase("sqlite", pDBFile) into pDBID > > IF "Error" is in pDBID THEN > return empty > END IF > > put "drop table " & pDBName into tDropSQL > revExecuteSQL pDBID, tDropSQL > put the result into tResult > CATCH tError > answer tError > IF the environment is "development" THEN exit to top ELSE quit > END TRY > > -- create the table > put "create table" && quote & pDBName & quote \ > & cr into tCreateCommand > put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ > & cr AFTER tCreateCommand > > put the keys of pArrayDataA [1] into tRecordKeyList > > REPEAT for each line tRecordKey in tRecordKeyList > if pArrayDataA [1] [tRecordKey] is an array or \ > pArrayDataA [1] [tRecordKey] begins with "Salted__" then > put "BLOB" into tColumnType > else > put VARCHAR into tColumnType > end if > > put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand > END REPEAT > > delete char -3 to -1 of tCreateCommand > put ")" AFTER tCreateCommand > > TRY > revExecuteSQL pDBID, tCreateCommand > put the result into tResult > IF tResult is not 0 THEN breakpoint > CATCH tError > breakpoint > END TRY > > put 1 into tRecordCounter > put "recordid" & cr & tRecordKeyList into tColumns > > repeat with i = 1 to the number of lines of tColumns > put ":" & i into item i of tColumnList > end repeat > > put "(" & tColumnList & ")" into tColumnList > > -- insert data > REPEAT for each line tKey in tArrayKeys > put 1 into tColumnCounter > put pArrayDataA [tKey] into tRecordDataA > put tRecordCounter into tQueryDataA [1] > > REPEAT for each line tRecordKey in tRecordKeyList > add 1 to tColumnCounter > > if tRecordDataA [tRecordKey] is an array then > put arrayEncode(tRecordDataA [tRecordKey]) into tValue > else > put tRecordDataA [tRecordKey] into tValue > end if > > put tValue into tQueryDataA [tColumnCounter] > END REPEAT > > put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL > > TRY > revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" > put the result into tResult > if the result is not a number then breakpoint > CATCH tError > breakpoint > END TRY > > add 1 to tRecordCounter > END REPEAT > > return pDBID > END arrayToSQLite > > >> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >> >> A couple of lines of code with declarations, storing, and retrieving would probably help. >> >> >> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sat Jun 4 10:49:01 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sat, 4 Jun 2022 07:49:01 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Looks like a very nice utility ... *BUT*, I get an error when trying to run it, either directly from the GoLiveNet app or by installing it and letting it run: "There was an error executing a script in the stack 4WProps. No more information is available because the stack is password protected" Although the pop-up does appear. The drop-down field at the top of the pop-up references: stack "libConcord". The other "options" from the drop-down list are: "card id 1002" and "Global Properties". Choosing either of these two choices also produces the error described above. I am running Livecode v 9.6.1 on Windows 10 Pro Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Friday, June 3, 2022 7:18 PM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Property Sheet for LC (was Re: Right click in field for menu) Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sat Jun 4 14:10:07 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:10:07 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <881619d7-a834-5333-8518-ef863aa18417@fourthworld.com> Kind of you to say, Roger. Thank you. Roger Guay wrote: > This is very cool, Richard! I truly appreciate all you do for us. > Richard wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. -- Richard Gaskin Fourth World Systems From ambassador at fourthworld.com Sat Jun 4 14:38:49 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:38:49 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Message-ID: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Sun Jun 5 07:57:24 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 5 Jun 2022 12:57:24 +0100 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: I'll add my thanks for such a usefull tool. On 04/06/2022 19:38, Richard Gaskin via use-livecode wrote: > > Thanks for the report. Please keep me posted if you find any other > anomalies. > I don't know if it's an anomaly or another failing in widget support :-) The NavBar widget has a number of properties (itemNames, itemStyle, hilitedItem, itemArray, ..) which are visible in the Object Inspector, but not in 4WProps. Alex. From General.2018 at outlook.com Sun Jun 5 08:51:39 2022 From: General.2018 at outlook.com (General 2018) Date: Sun, 5 Jun 2022 12:51:39 +0000 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Hi, So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. Just found some odd behaviour :- The mainstack and substacks have items in PreOpenStack. The substack has for example, On preopenstack Set the foregroundcolor of fld “xyz” to red End preopenstack This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld “xyz” is not found. To get round this I added the cd in the substack - fld “xyz” of cd “123” . Two questions :- 1. Is this the expected behaviour ? 2. Why does it work on the first pass without using - of cd “123” Regards Camm > On 29 May 2022, at 20:32, General 2018 wrote: > > Hi Jacquline, > > Think your question lead me to the issue. > > For some reason on the stack that did not work I added the substack by opening the mainstack and substack and saving the substack into the mainstack somehow. > > I started from new and added the substack by using the add stack file button within standalone settings and it worked fine. > > > Regards > Camm > >> On 29 May 2022, at 17:27, J. Landman Gay via use-livecode wrote: >> >> Just to clarify, are they real substacks or do you mean they are separate stacks that you include in the build? Also, double check that standalone settings isn't set up to move substacks into separate files. I think that option is in the general pane but I'm not at my computer to check. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >>>> On May 29, 2022 6:05:08 AM General 2018 via use-livecode wrote: >>> >>> Still no luck, no closestack handler in “main stack” , tried the other suggestions with hide/show etc. But still “mainstack” quits on closing the “substack xyz” >>> >>> Will keep looking…….. >>> >>> Regards >>> >>>>> On 29 May 2022, at 00:12, Mark Wieder via use-livecode wrote: >>>> >>>> On 5/28/22 07:15, General 2018 via use-livecode wrote: >>>>> Hi , >>>>> New to substacks - I have a “mainstack” used as a menu page for 2x “substacks” >>>>> When “substacks” opened from “mainstack” they open fine using — go to stack “xyz” >>>>> The problem is closing of the “substacks” using - close stack, go to “mainstack” or close this stack it always closes (quit) everything. Need “mainstack” to reappear/remain ? >>>>> Looked at docs and other posts. But stuck no doubt I have missed something. >>>> >>>> Do you have a closeStack handler in the script of the mainstack? >>>> >>>> >>>> -- >>>> Mark Wieder >>>> ahsoftware at gmail.com >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sun Jun 5 13:02:47 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sun, 5 Jun 2022 10:02:47 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: <017b01d878fe$1593be60$40bb3b20$@telus.net> The link provided works perfectly! ... Thanks very much! Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Saturday, June 4, 2022 11:39 AM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Re: Property Sheet for LC (was Re: Right click in field for menu) Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sun Jun 5 14:01:13 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:01:13 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <70e7b5d3-48de-4206-a068-de43cc3179f5@fourthworld.com> Alex Tweedly wrote: > I'll add my thanks for such a useful tool. Thank you for the kind words. > I don't know if it's an anomaly or another failing in widget support > :-) > > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. (Pardon my verbosity, but leisurely Sunday mornings find me erring on the side of completeness; at least for readability I've included section headings ). The Question: Seeking Unified Introspection ------------------------------------------- Ah yes, the perennial question of the difference in accessing complete properties for LC-native objects and widgets... Neville asked about this here in April: http://lists.runrev.com/pipermail/use-livecode/2022-April/267711.html It resulted in a thread of healthy length that IMO is worth reading. You can see it all sorting by topic in the archives - scroll down to Neville's "Widget properties" post as the entry point: http://lists.runrev.com/pipermail/use-livecode/2022-April/thread.html#start IIRC Monte was the only team member to chime in on that thread, the first of his posts sharing his uniquely valuable perspective is here: http://lists.runrev.com/pipermail/use-livecode/2022-April/267732.html Along the way Neville submitted an enhancement request, currently flagged for "Expert Review": https://quality.livecode.com/show_bug.cgi?id=23670 The implications for my lil' Property Sheet tool was among my contributions to that thread. That we currently have no unified introspection mechanism results in threads like that every now and then, in one form or another, every few months among the various LC discussion venues. The true scope of the challenge isn't limited to just adding widgets: compound objects like the DataGrid should arguably be included as well, and there's been talk of revisiting that model in an extended form for LC v10 or later, which might then potentially be a fourth object model. In short, "the properties" has been the primary introspection method used by scripters as far back as I can recall, and I've been using this engine since '97. The addition of new object paradigms multiplies the range of things scripters need to know, and which toolmakers need to account for. This is apparently known to the company, and while there is indication of interest in providing a unified introspection mechanism it's unclear to me what form it might take, and when or even if it might become at least a convention (like the old RIP community standards once attempted) if not an engine feature. The Challenge: Finding net-positive ROI in LC Tools --------------------------------------------------- So that's the scope of the issue. The question you asked is how I'll address it in 4W Props. I've spent a good portion of the last two decades trying to find a break-even for LC aftermarket stuff. So very tempting to me, having launched my business as a provider of SuperCard add-ons back in the day. It's a business model I know well and enjoy. I miss my monthly train rides to the SuperCard headquarters where we'd outline co-marketing plans, product strategy, IDE features, and the like. And my partnership with Hiezer to add Fourth World pages in their catalog was great fun; I learned much from Heizer manager Brian Molyneaux. The effort was reasonably satisfying: even before the execs at SuperCard invited me into an advisory role, revenue from my SC tools paid most of my bills. (Allegiant's eventual demise is another story best told round a campfire, but the cause wasn't a lack of money; their four-space booth at MacWorld Expo every six months had brisk traffic). Given my business history, it's probably not surprising that I have a few GBs of LC tools, books, interactive training materials, etc. in various stages on my hard drive, all waiting for me to discover the magic formula for break-even in the LC universe. Despite the success I'd found almost accidentally in the SC world, I know of no third-party add-on for LC that has hit a true break-even. So in this universe I've had to adjust my expectations. Like most tools providers here, any tools I take the time to tidy up enough to publish are things I built to support my own work, effectively subsidized by what would otherwise be net income. I very much appreciate the occasional donations that come in now and then; they keep me motivated to keep this published subset of tools current with new LC versions, and occasionally add new features. But still the need to subsidize them remains. And all the while my internal business needs for LC-specific tools has leveled off, as an ever-larger percentage of the systems I deliver are not in LC. The Answer: Anticipating Revelation of Unknowns ----------------------------------------------- All this combines to a needlessly-lengthy way of just saying: My tools are currently only what I need them to be, and I'd be more than happy (thrilled, actually) to make them into what others want them to be if I can find a way to afford to do so. Toolmaking is my roots, and I enjoy it. With 4W Props, the prospect of at last having a unified introspection mechanism is enticing enough to encourage me to hold off on further expense until I see where things go with that in v10. Support for widget-specific properties is only one set of enhancements. A wider range of GUI value pickers has been spec'd, along with options for grouping the settings so rather than just alphabetical they can also be arranged topically, perhaps with a set of favorites at the top (each of us has our own needs, and the rich scope of LC object properties is enjoyed by all of us sooner or later). So much that can be done, the moment I can find the cost justification for doing it... -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 14:04:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:04:26 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <017b01d878fe$1593be60$40bb3b20$@telus.net> References: <017b01d878fe$1593be60$40bb3b20$@telus.net> Message-ID: <9732663f-4bfc-3cde-7db7-db5b8795eae9@fourthworld.com> Thank you for the confirmation, Douglas. Please keep me posted if you see any other anomalies. -- Richard Gaskin Fourth World Systems Douglas A. Ruisaard wrote: > The link provided works perfectly! ... Thanks very much! > > Douglas Ruisaard > > Trilogy Software > (250) 573-3935 > > -----Original Message----- > From: use-livecode On Behalf Of > Richard Gaskin via use-livecode > > Douglas A. Ruisaard wrote: > > > Richard Gaskin wrote: > >> So I made a Property Sheet for LC some time ago, accessible right >> > from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and > you'll find "4W Props" in the Stacks section. > > > > Looks like a very nice utility ... *BUT*, I get an error when trying > > to run it, either directly from the GoLiveNet app or by installing it > and > letting it run: > > "There was an error executing a script in the stack 4WProps. No more > > information is available because the stack is password protected" > > > My apologies. The locked script was a holdover from another time. When the > audience for a software is other scripters, leaving source accessible is > mutually beneficial. > > I've now removed the password protection, and in addition to fixing that > issue I also updated the UI to be a little more modernly spacious, making > its list of properties a but easier to read. > > The latest version of 4W Props is now available through LiveNet, or can be > directly downloaded here: > https://fourthworld.com/rev/channel/4W_Props.rev > > Thanks for the report. Please keep me posted if you find any other > anomalies. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 15:36:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 12:36:28 -0700 Subject: Calling all Grognards Message-ID: <3ef8d1e5-d59e-71d6-dcce-5e607f72e0bb@fourthworld.com> One of the unexpected personal upsides to the pandemic has been a discovery of tabletop games, at last recognizing them as forms of systems design. Of the many types of board games I've developed a particular interest in hex-and-counter wargaming. While mostly used to model historical battles, the format is both simple and extensible enough that I've seen it employed for modeling encounters as varied as pre-European conflict among Tahitian tribes all the way to the protester-vs-police conflicts of Seattle during the WTO "Occupy" movement. I've even seen it used in modeling non-combat encounters like those related to supply chains and other logistics challenges. The classic counter format is so flexible I find myself daydreaming about using it to model peacetime activities for possible learning systems. I have some work obligations to fulfill so this is definitely back-burner and non-urgent, but while it was one my mind this morning it occurs to me that given the demographic intersection of some of our members and many fans of old-school wargaming there's a likelihood some of our members may have already done some work in this area. If you've ever built anything that delivers a hex-and-counter format game, or tooling for print-and-play options for enjoying such things, please feel free to drop me a note. I'd love to learn what you've been working on, and see if there are ways we might share bits and pieces to move such systems forward more easily. -- Richard Gaskin Fourth World Systems From ahsoftware at sonic.net Sun Jun 5 18:21:04 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 5 Jun 2022 15:21:04 -0700 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: On 6/5/22 05:51, General 2018 via use-livecode wrote: > Hi, > > So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. > > Just found some odd behaviour :- > > The mainstack and substacks have items in PreOpenStack. > > The substack has for example, > > On preopenstack > Set the foregroundcolor of fld xyz to red > End preopenstack > > This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld xyz is not found. > > To get round this I added the cd in the substack - fld xyz of cd 123 . > > Two questions :- > 1. Is this the expected behaviour ? > 2. Why does it work on the first pass without using - of cd 123 A little hard to diagnose from a distance but here are some thoughts: First of all, per the docs, the preOpenStack handlers should be in the first card of the stacks, not in the scripts of the stacks themselves. Then it sounds like maybe you have multiple cards in your substack and the currently selected card is not card "123" at the time you invoke the goto command the second time. If the (badly-named) destroyStack property of the substack is set to false (the default) then the substack will still be in memory and your preOpenStack handler will be triggered at its current card setting. -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Sun Jun 5 18:58:58 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Mon, 6 Jun 2022 08:58:58 +1000 Subject: Property Sheet for LC In-Reply-To: References: Message-ID: Alex wrote > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. As discussed in a post a while ago, the problem is that requesting the properties of a widget object returns nothing [it is supposed to return enough property settings to be able to completely reproduce the object]. I guess Richard has assumed a list of basic properties and reported those, unless he has more information about widgets than I know. I do the same in nsScriptDatabase, the current version of which will report what I am calling the extrinsic properties of the object such as its rect, visibility etc. It’s a slightly different list from Richards, but achieves much the same result. It just displays the values, it does not allow setting them as does Richard's excellent tool, because the objective of my app is as an archive not an IDE tool so it doesn’t alter the inspected stack. However nsScriptDatabase will also expose the intrinsic properties of the widget reported by exporting the widget, such as the itemNames of the navBar widget etc. It turns out there are sometimes other internal properties of a widget which are only discoverable through the manifest for the widget, which is held by the IDE. An example is the scaledHeight of an SVG Icon widget. The next version of nsScriptDatabase will display the values of these properties, together with their default and expected values. Further, it it will also expose the public handlers for the widget with their input and output parameters. I expect to finish coding nsScriptDatabase 2.2 in the next few days. Neville From bobsneidar at iotecdigital.com Sun Jun 5 19:58:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 5 Jun 2022 23:58:42 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Message-ID: Oooh that may do it. I’ll try when I get the chance. Sent from my iPhone > On Jun 4, 2022, at 06:31, Brian Milby via use-livecode wrote: > > Is this the issue? > > To pass binary data in an array element, prepend "*b" to the element's key. > > Sent from my iPhone > >> On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: >> >> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. >> >> I suppose what I need is a statement to change the encoding of the database before I create it. >> >> put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB >> >> FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID >> put the keys of pArrayDataA into tArrayKeys >> sort tArrayKeys numeric ascending >> IF pDBFile is empty THEN put ":memory:" into pDBFile >> IF pDBName is empty THEN put "arraydata" into pDBName >> >> TRY >> if pDBID is empty then \ >> put revOpenDatabase("sqlite", pDBFile) into pDBID >> >> IF "Error" is in pDBID THEN >> return empty >> END IF >> >> put "drop table " & pDBName into tDropSQL >> revExecuteSQL pDBID, tDropSQL >> put the result into tResult >> CATCH tError >> answer tError >> IF the environment is "development" THEN exit to top ELSE quit >> END TRY >> >> -- create the table >> put "create table" && quote & pDBName & quote \ >> & cr into tCreateCommand >> put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ >> & cr AFTER tCreateCommand >> >> put the keys of pArrayDataA [1] into tRecordKeyList >> >> REPEAT for each line tRecordKey in tRecordKeyList >> if pArrayDataA [1] [tRecordKey] is an array or \ >> pArrayDataA [1] [tRecordKey] begins with "Salted__" then >> put "BLOB" into tColumnType >> else >> put VARCHAR into tColumnType >> end if >> >> put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand >> END REPEAT >> >> delete char -3 to -1 of tCreateCommand >> put ")" AFTER tCreateCommand >> >> TRY >> revExecuteSQL pDBID, tCreateCommand >> put the result into tResult >> IF tResult is not 0 THEN breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> put 1 into tRecordCounter >> put "recordid" & cr & tRecordKeyList into tColumns >> >> repeat with i = 1 to the number of lines of tColumns >> put ":" & i into item i of tColumnList >> end repeat >> >> put "(" & tColumnList & ")" into tColumnList >> >> -- insert data >> REPEAT for each line tKey in tArrayKeys >> put 1 into tColumnCounter >> put pArrayDataA [tKey] into tRecordDataA >> put tRecordCounter into tQueryDataA [1] >> >> REPEAT for each line tRecordKey in tRecordKeyList >> add 1 to tColumnCounter >> >> if tRecordDataA [tRecordKey] is an array then >> put arrayEncode(tRecordDataA [tRecordKey]) into tValue >> else >> put tRecordDataA [tRecordKey] into tValue >> end if >> >> put tValue into tQueryDataA [tColumnCounter] >> END REPEAT >> >> put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL >> >> TRY >> revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" >> put the result into tResult >> if the result is not a number then breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> add 1 to tRecordCounter >> END REPEAT >> >> return pDBID >> END arrayToSQLite >> >> >>>> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >>> >>> A couple of lines of code with declarations, storing, and retrieving would probably help. >>> >>> >>> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Mon Jun 6 09:52:51 2022 From: craig at starfirelighting.com (Craig Newman) Date: Mon, 6 Jun 2022 09:52:51 -0400 Subject: char as word boundary In-Reply-To: References: Message-ID: Apart from omitting the “of” in any of your posted lines of code, I am confused.. The number of chars of any string of concatenated “numToChar” functions will be the number of those functions, that is, 5, since each returns a single character. How did you get any of the other results? Craig > On Jun 3, 2022, at 6:49 PM, Neville Smythe via use-livecode wrote: > >> the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) From benr_mc at cogapp.com Mon Jun 6 10:50:41 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 15:50:41 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: References: Message-ID: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Hi Panos, This is very exciting, thank you. If we find anomalies in the Apple Silicon side, should we raise them in the first instance - to you directly? - on this list? - straight into LQCC? thanks, Ben On 31/05/2022 16:27, panagiotis merakos via use-livecode wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 9.6.8 RC-1. > > You can find more details on the bug fixes and improvements of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 6 11:19:17 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 06 Jun 2022 16:19:17 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> References: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Message-ID: <14aee2b7bc991451829aa45c04eb4939@livecode.com> On 2022-06-06 15:50, Ben Rubinstein via use-livecode wrote: > This is very exciting, thank you. If we find anomalies in the Apple > Silicon side, should we raise them in the first instance > - to you directly? > - on this list? > - straight into LQCC? Just file a bug in the LQCC - indicating that the discrepancy is between Apple and Intel architectures :) Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 6 14:45:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 18:45:17 +0000 Subject: Limit on the number of parameters? Message-ID: Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. Bob S From phil at pdslabs.net Mon Jun 6 16:00:39 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 6 Jun 2022 13:00:39 -0700 Subject: Limit on the number of parameters? In-Reply-To: References: Message-ID: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> In LC 9.6.7, this works in a button script: on mouseUp     tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" end mouseUp command tryThis     put the params -- the handler name and all 10 params are there end tryThis I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. Phil Davis On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: > Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From bobsneidar at iotecdigital.com Mon Jun 6 16:08:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 20:08:40 +0000 Subject: Limit on the number of parameters? In-Reply-To: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> Message-ID: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. Bob S > On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: > > In LC 9.6.7, this works in a button script: > > on mouseUp > tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" > end mouseUp > > > command tryThis > put the params -- the handler name and all 10 params are there > end tryThis > > > I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. > > Phil Davis > > > On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >> >> Bob S >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Mon Jun 6 18:01:20 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 23:01:20 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? Message-ID: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Not strictly speaking a LiveCode question, but... I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. Is there a way to run the intel code from a universal binary under Rosetta from the command line? TIA, Ben From matthias_livecode_150811 at m-r-d.de Mon Jun 6 18:13:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 7 Jun 2022 00:13:25 +0200 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Maybe this is of help for you. https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 Regards, Matthias > Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : > > Not strictly speaking a LiveCode question, but... > > I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. > > Is there a way to run the intel code from a universal binary under Rosetta from the command line? > > TIA, > > Ben > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 7 03:18:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 08:18:06 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> Message-ID: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >> Also, you'll be able to do things like: >> >>     constant kPiBy2 = pi / 2 >>     constant kPiBy2Squared = kPiBy2 * kPiBy2 >>     constant kPiBy2String = format("%f", kPiBy2) >>     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> > Very good. In fact, great !! Thank you! > > Would you be ale to do something like > > constant kPiMap = { ... as above ... } Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > And now I'll push my luck and ponder the possibility of 'global' > constants. Haha... > OK - 'global constant' is likely counter to the scope concepts. But > perhaps they could be done as "write-once" variables, or as a more > general "write-protected' variable. > >    put 17 into gkMyMagicValue >    writeprotect "gkMyMagicValue" > > and any *subsequent* attempt to change the value would fail. How is that any better than putting something like this in a library or back script: function gkMyMagicValue return 17 end gkMyMagicValue Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From benr_mc at cogapp.com Tue Jun 7 05:10:17 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 7 Jun 2022 10:10:17 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Thanks Matthias, that's exactly what I need. My googling was inadequate! Ben On 06/06/2022 23:13, matthias rebbe via use-livecode wrote: > Maybe this is of help for you. > https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 > > Regards, > Matthias > > >> Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : >> >> Not strictly speaking a LiveCode question, but... >> >> I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. >> >> Is there a way to run the intel code from a universal binary under Rosetta from the command line? >> >> TIA, >> >> Ben From craig at starfirelighting.com Tue Jun 7 08:49:09 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 08:49:09 -0400 Subject: Limit on the number of parameters? In-Reply-To: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Message-ID: <091A9628-504E-4DB0-98D7-3AAA6D67EA6A@starfirelighting.com> I have never had any issues with the number of parameters that can be passed to a custom handler. Nor any issue with “seeing” them all in the debugger. I would say that the largest number of params I ever sent was about 15. Craig > On Jun 6, 2022, at 4:08 PM, Bob Sneidar via use-livecode wrote: > > Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. > > Bob S > > >> On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: >> >> In LC 9.6.7, this works in a button script: >> >> on mouseUp >> tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" >> end mouseUp >> >> >> command tryThis >> put the params -- the handler name and all 10 params are there >> end tryThis >> >> >> I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. >> >> Phil Davis >> >> >> On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >>> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >>> >>> Bob S >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >> >> -- >> Phil Davis >> (503) 307-4363 >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Tue Jun 7 09:01:57 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Tue, 7 Jun 2022 15:01:57 +0200 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: Hi Sorry, I ment the number of words. Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). Sincerely, Jean-Jacques Wagner. > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtonativer(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: > > Jean-Jacques > > In 9.6.8 > > the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 > > As it should be. > > Did you mean the number of words? > > But then > > the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) > > As it should be. > > Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. > > > Neville > >> >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >> >> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >> > From craig at starfirelighting.com Tue Jun 7 10:22:11 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 10:22:11 -0400 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: <02997394-A42F-493D-B7C5-C5C96011466C@starfirelighting.com> Though it is true that “numToChar” and “charToNum” are deprecated, they still live and work the same as always. Old habits die hard, andI still use them. One day I will move on., but the original issue has not changed. Craig > On Jun 7, 2022, at 9:01 AM, Jean-Jacques Wagner via use-livecode wrote: > > Hi > Sorry, I ment the number of words. > > Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. > However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. > > Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, > eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for > the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). > > Sincerely, > > Jean-Jacques Wagner. > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtonativer(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > >> Version 6.7 word boudary are char number 09,10,11,12,13,32 >> version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > > > >> Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: >> >> Jean-Jacques >> >> In 9.6.8 >> >> the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 >> >> As it should be. >> >> Did you mean the number of words? >> >> But then >> >> the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) >> >> As it should be. >> >> Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. >> >> >> Neville >> >>> >>> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >>> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >>> >>> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >>> >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 7 11:27:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 7 Jun 2022 15:27:59 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <81FCCF4C-A169-4164-8B4B-42B7B0FFEA44@iotecdigital.com> I thought we already had global constants?? I think they are called, "Literals." ;-) Bob S > On Jun 7, 2022, at 24:18 , Mark Waddingham via use-livecode wrote: > > On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >>> Also, you'll be able to do things like: >>> constant kPiBy2 = pi / 2 >>> constant kPiBy2Squared = kPiBy2 * kPiBy2 >>> constant kPiBy2String = format("%f", kPiBy2) >>> local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> Very good. In fact, great !! Thank you! >> Would you be ale to do something like >> constant kPiMap = { ... as above ... } > > Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > >> And now I'll push my luck and ponder the possibility of 'global' constants. > > Haha... > >> OK - 'global constant' is likely counter to the scope concepts. But >> perhaps they could be done as "write-once" variables, or as a more >> general "write-protected' variable. >> put 17 into gkMyMagicValue >> writeprotect "gkMyMagicValue" >> and any *subsequent* attempt to change the value would fail. > > How is that any better than putting something like this in a library or back script: > > function gkMyMagicValue > return 17 > end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ahsoftware at sonic.net Tue Jun 7 12:16:21 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 09:16:21 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> On 6/7/22 00:18, Mark Waddingham via use-livecode wrote: > How is that any better than putting something like this in a library or > back script: > >     function gkMyMagicValue >         return 17 >     end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed > less, as you'd need to put a global declaration in every script which > wanted to use said global constant...). 1. Because it's a function, not a constant. put gkMyMagicValue() into tVar is cognitively different from put gkMyMagicValue into tVar Something like 17 is a trivial case. Something more like real world usage would be constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" 2. Because the server already build supports the "include" keyword which would neatly solve the issue, but none of the other platforms do. Why? 3. Because every other language I've used has global constants and makes this easy. It's only xtalk that makes this hard. If an LC goal is to provide a tool for learning coding then multiple definitions of the same constant is a paradigm that is not transportable to other languages, and indeed will probably result in a compiler error. 4. Because it gets tiresome having to explain to new developers that you have to declare constants in multiple scripts even though it's the same constant you already declared and the workaround is to use a getter function as you described. -- Mark Wieder ahsoftware at gmail.com From mark at livecode.com Tue Jun 7 13:55:52 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 18:55:52 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: > 1. Because it's a function, not a constant. > put gkMyMagicValue() into tVar > is cognitively different from > put gkMyMagicValue into tVar > > Something like 17 is a trivial case. Something more like real world > usage would be > > constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" I see and what is kRootURL the Url for? If I were writing a library for a web-service and needed (for some reason) to expose the underlying URL to callers of the library, then I'd have simply define a function as part of its public API: function myRestLibraryGetRootUrl return "http://example.com/aUrlThatMightChange/api/v2" end myRestLibraryGetRootUrl I don't buy the 'cognitively different' argument - different languages have different patterns. I really don't see that getting into the habit of using 'constant functions' instead of 'constant variables' is any different from getting into the habit of doing assignment as 'source into target', rather than 'target = source'; or getting your head around the message path. It is definitely *not* unusual for libraries in any language to expose *all* that they do via functions - whilst you can use enums and preprocessor defines in C/C++ for global constants - they make your library unwrappable easily by higher-level languages. Indeed, you tend to find that as published low-level (C/C++) libraries have evolved they have changed to ensure their interfaces are entirely function based ones (indeed, oftentimes C++-based libraries gain a C function wrapper to make this easier - as C++ is a nightmare to wrap stuff from due to the immensely complicated semantics, these days, of C++ classes). > 2. Because the server already build supports the "include" keyword > which would neatly solve the issue, but none of the other platforms > do. Why? You can't really compare the features of the PHP (C preprocessor) style operation of the server engine with the object-based scripting of the normal LiveCode engine. In that PHP-likeness, 'include' makes sense as the server engine is essentially doing a continuous 'merge' - emitting interleaved blocks of content (text) with content generated from code. The include which is present there makes sense for that form of coding - i.e. for generating text documents from a mixture of prewritten text, and evaluated script. I don't think it makes sense when scripts are attached to objects where more structure is needed and they exist in a dynamic environment. Critically, the server engine loads and parses files in a linear fashion - emitting the text, and executing the interleaved script. Everything is completely transient - when the document has finished being emitted, the engine terminates. It raises too many edge-cases and questions as to what should happen in various different scenarios (as well as being a very large noose with which people could hang themselves) when you try to add its 'include' operation to the normal LiveCode environment. Remember that in the server engine include operates on a file so what would you expect to happen if you change the file? Does the engine have to track changes and recompile any object scripts including it when they change? (Remember that object scripts are compiled on being set, or when first tickled by a handler lookup if already set and loaded from disk). > 3. Because every other language I've used has global constants and > makes this easy. It's only xtalk that makes this hard. If an LC goal > is to provide a tool for learning coding then multiple definitions of > the same constant is a paradigm that is not transportable to other > languages, and indeed will probably result in a compiler error. xTalk does not make it hard - see above - its just different because of its model. Of the languages you've used how many are object-based, where objects have scripts which can be dynamically (re-)attached continuously throughout the lifetime of a programs execution and, moreover, can be dynamically created at runtime; and more specifically, where a script is a defined set of handlers and other definitions which are completely independent (from the point of view of compiling) of any other script? For those which you have found which fit that pattern, do any of them have global constants? > 4. Because it gets tiresome having to explain to new developers that > you have to declare constants in multiple scripts even though it's the > same constant you already declared and the workaround is to use a > getter function as you described. Then tell new developers that the xTalk way to do global constants is constant functions in the message path! Saying that is a workaround is akin to telling them that: "The workaround for not being able use the syntax 'X := Y' is to use the syntax 'put X into Y'" Or telling someone learning Java that: "The workaround for defining a global function is to make it a static method of some class" The point being that how you do things in different languages is different... xTalks don't have a concept of 'global constant' because the language and runtime model isn't one which really supports such a thing (as it stands) - however if you need a constant available globally then leverage a function in the message path to do so. Java doesn't have the concept of a 'global function' because it is a pure class-based language - however if you do need a global function, then you can just make a static method in a class. Neither of these things are 'workarounds' - they are how you do things in that language! FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... In that vein, what would be helpful is, instead of just going 'can we have global constants', propose problems you need to solve / would like to solve and use-cases you have encountered where the existing xTalky feature set is not sufficient to solve it in some reasonably elegant fashion without 'global constants'.* Warmest Regards, Mark. * I potentially have use-cases for non-script-local constants, but I don't have any for 'global variable'-like 'global constants' which aren't expressible with existing xTalk notions - hence why my request to 'put up or shut up' ;) --- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 7 16:51:12 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 7 Jun 2022 21:51:12 +0100 Subject: Generating Random numbers to conform a distribution Message-ID: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) Any hints from the stats gurus? Cheers David Glasgow From alex at tweedly.net Tue Jun 7 20:55:01 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 8 Jun 2022 01:55:01 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: { Aside: any discussion where both Mark Weider and Mark Waddingham take part is all the better because of that; two very knowledgeable people with two very different viewpoints (in some areas) is a good thing. BUT it makes it hard to refer to what each of them said - "MarkW" is still ambiguous. So I'm adopting the "English public school" solution - refer to everyone by their surname. ] On 07/06/2022 18:55, Mark Waddingham via use-livecode wrote: > On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: >> 1. Because it's a function, not a constant. > function myRestLibraryGetRootUrl >     return "http://example.com/aUrlThatMightChange/api/v2" >   end myRestLibraryGetRootUrl Here I agree with Waddingham. *IF* it's a library, then it feels right to have a function api. The cases where it doesn't, to me, are those where the constants are intrinsic to a (widespread) part of an app or subsystem ... more below. >> 2. Because the server already build supports the "include" keyword >> which would neatly solve the issue, but none of the other platforms >> do. Why? > I don't see that 'include' does what you expect in the context of lcserver. From the dictionary: > If you place the *constant* statement in a handler, you can use the > constant anywhere in the handler. If you place the* > constant* statement in a script outside any handler, you can use > the constant anywhere in the handlers of that > script. > The crucial phrase is the last one - "of that script". That script seems to be define such that the included text file is considered to be a different script from the main script. So you cannot put "constant k = 17" in an included file (outside of a handler) and have it take effect anywhere except within the included file !?! And obviously if you put it inside a handle then it can only be used within that handler. i.e. include "a.txt"     -- where a.txt contains     -- >> 4. Because it gets tiresome having to explain to new developers that >> you have to declare constants in multiple scripts even though it's the >> same constant you already declared and the workaround is to use a >> getter function as you described. > > Then tell new developers that the xTalk way to do global constants is > constant functions in the message path! > or perhaps as custom props  ? FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... I'm not sure Tweedly knows properly what he wants from 'global constants'  :-)     Maybe what I actually want would be better called "stack-local constants" ? > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would > like to solve and use-cases you have encountered where the existing > xTalky feature set is not sufficient to solve it in some reasonably > elegant fashion without 'global constants'.* > "global variables" in LC have a particular meaning - they are *NOT* usable globally, they are only available in any script in which the developer has chosen to declare them. That's a very different granularity of scope than 'available where the function is in the message path', and I think that higher level of granularity could/should/might-be-able-to-be provided for constants. As well as being more granular, it's also more consistent (I think) with 'global variables'. In my earlier email I tried to avoid the problems of dynamic re-setting of 'global constants' by describing them as "write-protected variables" or "write-once" variables - but I'm not sure if that really works. Case :  I have a CSV or TSV file, no headers, that I read in, and process various ways at various times. I'd like to use (in many places throughout the app) snippets like  put item kTitleColumn of tLine into myTitle  put the text of fld "Last Name" into item kLastName of myNewLine But I have a sneaking suspicion that at some point in the future additional columns will appear, or be re-arranged, or .... so I won't use literal constant values (NOT put item 3 of ...), however some form of 'global constant' seems like it should work here. There are (of course) a million ways that could be done - but none that I can think of provide the simplicity of usage as above, combined with the safety of the 'variables' being write-protected, as well as some form of pan-stack constants; variables which can be used (read) in the scope where the developer wants (by declaring as global variables), but are protected from inadvertent over-writing by somehow limiting when/where they can be written (e.g. maybe only in preOpenStack and librarystack). Kind regards, Alex. > Warmest Regards, > > Mark. > > * I potentially have use-cases for non-script-local constants, but I > don't have any for 'global variable'-like 'global constants' which > aren't expressible with existing xTalk notions - hence why my request > to 'put up or shut up' ;) > > --- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 7 21:03:42 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:03:42 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <39B82256-BC1F-4404-9A44-654B0E9BE1B8@optusnet.com.au> Hmm. I jumped without thinking…I was thinking if unicode char 2029 which is the paragraph separator. Unicode Char 202 is supposed to be Latin Capital Letter E With Circumflex. But 202 is beyond the standard ascii range so the deprecated numtochar(202) will return an extended ascii character depending on the platform. On a Mac, 202 is a non-breaking space which should be a word boundary (or maybe shouldn’t be? Looks like the LC team changed it’s collective mind). On Windows it is capital E circumflex, the same as unicode— I now understand your concern, Jean-Jacques. So it is a bug but as numtochar() is deprecated not one that is going to be fixed. Neville From neville.smythe at optusnet.com.au Tue Jun 7 21:48:50 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:48:50 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <4140B7FC-58E1-4D51-86B0-427D995C34D4@optusnet.com.au> Still jumping without thinking… If native char 202 or unicode char 202 is a word boundary in Windows it is a real bug — but is that the case? Native char 202, a non-breaking space, should (or maybe shouldn’t) be a word boundary in Mac - the docs say word boundaries are space, tab and return. Whether the change between versions of LC is bug or not is questionable, but not one which will be addressed in current versions (a deprecated bug?). One of course should not be using chars at all. NumtoCodepoint(202) is circumflex E on the Mac, and is not a word boundary, and surely that is also the situation on Windows. Neville From ahsoftware at sonic.net Tue Jun 7 22:18:27 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:18:27 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 6/7/22 10:55, Mark Waddingham via use-livecode wrote: > I don't buy the 'cognitively different' argument Mark- Thanks for the longish explanations there. I think we'll just have to disagree on the cognitive thing then - I normally would expect functions to return the result of some action, not just hand me back a constant. No worries though. Ruby deals with this very neatly: even though everything is an object the syntactic sugar allows you to code them like "normal" constants, the same way we can refer to xtalk global functions as "the capsLockKey" instead of "capsLockKey()". > FWIW, I'm not entirely sure whether what you (Mark) want from 'global > constants' is quite the same as what Alex wants from 'global constants', > and I'm not entirely sure whether what I *think* you both mean when you > ask for 'global constants' is what you are actually thinking of when you > ask for 'global constants'... Hah! Well, whatever anyone else means, I'd like constants to obey the inheritance of the message path. An 'effective' constant if you will. But *PLEASE* don't implement that particular syntax. > > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would like > to solve and use-cases you have encountered where the existing xTalky > feature set is not sufficient to solve it in some reasonably elegant > fashion without 'global constants'.* Thankfully I think there is nothing in this regard that is not expressible in the existing xtalk syntax. I use getter functions in my stack scripts (I don't think I've ever done that for a constant in a backscript) and sometimes I also just copy and paste constant declarations. -- Mark Wieder ahsoftware at gmail.com From ahsoftware at sonic.net Tue Jun 7 22:25:15 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:25:15 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: <230214cf-ce6c-73b4-0fc8-9057de449ab2@sonic.net> On 6/7/22 17:55, Alex Tweedly via use-livecode wrote: > So you cannot put "constant k = 17" in an included file (outside of a > handler) and have it take effect anywhere except within the included > file !?! Ah. I see I must be projecting my desired expansion of the "include" command onto what I expect that command to do in the server context. -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Tue Jun 7 23:24:43 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Tue, 07 Jun 2022 22:24:43 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 7, 2022 3:53:37 PM David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, the > Mean and the SD are variables specified by the user, and N random numbers > are then generated with the required mean and SD. ... > In general terms, how do they do this? From ahsoftware at sonic.net Tue Jun 7 23:50:43 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 20:50:43 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > > https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com From harrison at all-auctions.com Wed Jun 8 00:46:33 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Wed, 8 Jun 2022 00:46:33 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: Try rolling 2 six-sided dice. 7 is the number that appears the most so it’s at the middle of the curve, while 2 and 12 are at the ends of the distribution. Roll the dice multiple times to generate a distribution. Now simulate rolling the dice with random numbers in LC the same way. Now conduct your own experiments, and graph your results. Have fun! Rick > On Jun 7, 2022, at 4:51 PM, David V Glasgow via use-livecode wrote: > > > Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. > > In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. > > Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge > > Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) > > Any hints from the stats gurus? > > Cheers > > David Glasgow > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 8 01:50:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 22:50:28 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> David V Glasgow wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > In general terms, how do they do this? Mark Waddingham would be able to answer that rather excellently, if he has the time. My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? https://www.davidmlane.com/hyperstat/index.html -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 8 02:05:21 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 23:05:21 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: References: Message-ID: <75602b26-def7-ba32-99ed-02fb4d4be51a@fourthworld.com> Rick Harrison wrote: > Try rolling 2 six-sided dice. 7 is the number that appears the > most so its at the middle of the curve, while 2 and 12 are at > the ends of the distribution. Roll the dice multiple times to > generate a distribution. > > Now simulate rolling the dice with random numbers in LC the same way. > > Now conduct your own experiments, and graph your results. I've been poking at some of that now and then for prototyping board games in software (an ironic moment after all these years of making paper prototypes of what later becomes software ). For my needs I found the simplest way to get the same results in LC as with dice was to do what dice do: use "any" in a range of six, iterated by the number of virtual dice. There's probably a more clever mathy solution, but for my modest prototypes it helps me to keep the virtual implementation as close to the physical tabletop result as close as possible anyway, so I have a justification for making software that behaves no smarter than cardboard. :) When I was making a game for a friend last summer I fell in love with the Royal Game of Ur (RGoU)- good history with an online version here for those interested: https://royalur.net/ The dice used in RGoU are binary in range, tetrahedra with the faces blank and two of the four points painted. The game is played with four of those, delivering a range of 0 through 4 on a probability distribution of: Dice Result Likelihood 0 1 1 4 2 6 3 4 4 1 Or more graphy: + + + + + + + + + + + + + + + + 0 1 2 3 4 If you ever need to plot dice probabilities, this tool handles nearly any number of any type of dice you can think of (except Ur dice, it turns out, but oh well): https://anydice.com/ -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From mark at livecode.com Wed Jun 8 02:07:49 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 08 Jun 2022 07:07:49 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <233e971efb4d75eea47954eda6541383@livecode.com> On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > Or is there an elegant formula? I have Googled about and cant see > one, but maybe I dont know the magic words. And if someone wanted to > script this in LC what would be the best approach? (just general > guidance here, wouldnt want anyone to invest their valuable time in > what is at present just vague musings) > > Any hints from the stats gurus? I'm not a stats guru but... I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. Lets say you have a collection X of numbers then the following things are always true: P1: Mean(c * X) = c * Mean(X) P2: Mean(X + k) = k + Mean(X) P3: SD(c * X) = abs(c) * SD(X) P4: SD(X + k) = SD(X) In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). So with this in mind, let TMean and TSD be the target mean and target SD. Then: 1. Generate N random numbers in the range [0, 1] - S0, ..., SN 2. Compute SMean := Mean(S0, ..., SN) 3. Compute SSD := SD(S0, ..., SN) Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". The amount we need to scale by is mandated by the SD, specifically: c := TSD/SSD If we scale our source numbers by c and apply SD then we see: SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] = c * SSD = TSD / SSD * SSD = TSD i.e. Our scaled input numbers give us the desired SD! So now we just need to play the same 'game' with the Mean. We have: Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) = c * SMean However we really want a mean of TMean so define: k := TMean - c * SMean Then if we translate our (scaled!) source numbers by k and apply Mean then we see: Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] = c * SMean + k = c * SMean + TMean - c * SMean = TMean i.e. Our scaled and offset input numbers give us the desired Mean! Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! We can now return to our sequence of steps: 4. Compute c := TSD/SSD 5. Compute k := TMean - c * SMean 6. Compute the target random numbers, Tn := c * Sn + k So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. In LiveCode Script, the above is something like: function randomNumbers pN, pTMean, pTSD local tSource repeat pN times put random(2^31) & comma after tSource end repeat local tSMean, tSSD put average(tSource) into tSMean put stdDev(tSource) into tSSD local tC, tK put pTSD / pSSD into tC put pTMean - tC * tSMean into tK local tTarget repeat for each item tS in tSource put tC * tS + tK & comma after tTarget end repeat return tTarget end randomNumbers Hope this helps! Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Wed Jun 8 09:02:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:02:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> Message-ID: <27ACB6AD-29FF-45F1-808E-66836E93B8E0@gmail.com> > On 8 Jun 2022, at 6:50 am, Richard Gaskin via use-livecode wrote: > > My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? In the 1990s as a happy HyperStat user, I exchanged occasional mails with him. When I later discovered Metacard, I mailed him in some excitement hoping he would port HyperStat to it, but he was already committed to web. I will certainly have a further nose around… Cheers David G From dvglasgow at gmail.com Wed Jun 8 09:16:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:16:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: <89080C0C-291E-46A0-BEEA-10ABDA7B066A@gmail.com> > On 8 Jun 2022, at 7:07 am, Mark Waddingham via use-livecode wrote: > > I'm not a stats guru but... Pants SO on fire! That is fascinating. I really don’t think this has been made explicit anywhere else, including Stackoverflow - despite the fact that the question has been posed several times. I will enjoy working through it, although it will take a while Thanks, David G From ludovic.thebault at laposte.net Wed Jun 8 09:43:25 2022 From: ludovic.thebault at laposte.net (Ludovic THEBAULT) Date: Wed, 8 Jun 2022 15:43:25 +0200 Subject: Sqlite and Monterey on M1 In-Reply-To: <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> References: <1035540836.1342971.1652375436147@wlpnf0205> <7E16ABF6-B8E7-4DAE-92D5-312259D3F79E@iotecdigital.com> <24143D79-2908-4C19-BBC5-BD2424D59338@major-k.de> <1450985276.32571.1652379820671@wlpnf0217> <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> Message-ID: <377484DF-835A-4498-8214-B005E300C32E@laposte.net> Hello, These were file's attributes that were blocking the writing (noticed by an @ with an ‘ls’). They had to be removed with a "sudo xattr -c ..." (deleting only the com.apple.quarantine was not enough) HTH ! > Le 15 mai 2022 à 17:30, Ludovic THEBAULT a écrit : > > > >> Le 12 mai 2022 à 20:23, ludovic.thebault at laposte.net a écrit : >> >> >> >> Bonsoir Ludovic, >> >> on the Mac we have write permissions here -> specialFolderPath("preferences") >> Works on Monterey as well and is "out of sight" of the user. ;-) >> >> >> > > > Hello, Thanks > > But it seems is don’t work for my app. > > The sqlite file was copied from an Time Machine backup (but manually). > But i tested it on my Mac (Big Sur) and all work fine… > > there must be something else that blocks the writing in the database. The processor (M1) ? the user id ? > > I'll dig and test more deeply! > Ludovic Ludovic From prothero at earthlearningsolutions.org Wed Jun 8 11:18:43 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Wed, 8 Jun 2022 09:18:43 -0600 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: Mark W has it. The random number generator creates a "uniform" distribution. The distribution of the means of collection of randomly generated uniform number sequences will be gaussian in the limit of infinite numbers in the uniformly distributed sequences (but you don't need an infinite number to get a good approximation of a gaussian distribution). Mark has also demonstrated how to do the scaling. Good luck, Bill P William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 8, 2022, at 12:08 AM, Mark Waddingham via use-livecode wrote: > > On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: >> Quite a lot of stats and maths packages offer a feature whereby the N, >> the Mean and the SD are variables specified by the user, and N random >> numbers are then generated with the required mean and SD. I remember >> the venerable and excellent Hypercard HyperStat >> (1993) >> by David M Lane doing exactly that. >> Or is there an elegant formula? I have Googled about and can’t see >> one, but maybe I don’t know the magic words. And if someone wanted to >> script this in LC what would be the best approach? (just general >> guidance here, wouldn’t want anyone to invest their valuable time in >> what is at present just vague musings) >> Any hints from the stats gurus? > > I'm not a stats guru but... > > I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. > > Lets say you have a collection X of numbers then the following things are always true: > > P1: Mean(c * X) = c * Mean(X) > P2: Mean(X + k) = k + Mean(X) > P3: SD(c * X) = abs(c) * SD(X) > P4: SD(X + k) = SD(X) > > In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). > > Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). > > So with this in mind, let TMean and TSD be the target mean and target SD. Then: > > 1. Generate N random numbers in the range [0, 1] - S0, ..., SN > > 2. Compute SMean := Mean(S0, ..., SN) > > 3. Compute SSD := SD(S0, ..., SN) > > Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". > > The amount we need to scale by is mandated by the SD, specifically: > > c := TSD/SSD > > If we scale our source numbers by c and apply SD then we see: > > SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] > = c * SSD > = TSD / SSD * SSD > = TSD > > i.e. Our scaled input numbers give us the desired SD! > > So now we just need to play the same 'game' with the Mean. We have: > > Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) > = c * SMean > > However we really want a mean of TMean so define: > > k := TMean - c * SMean > > Then if we translate our (scaled!) source numbers by k and apply Mean then we see: > > Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] > = c * SMean + k > = c * SMean + TMean - c * SMean > = TMean > > i.e. Our scaled and offset input numbers give us the desired Mean! > > Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! > > We can now return to our sequence of steps: > > 4. Compute c := TSD/SSD > > 5. Compute k := TMean - c * SMean > > 6. Compute the target random numbers, Tn := c * Sn + k > > So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. > > In LiveCode Script, the above is something like: > > function randomNumbers pN, pTMean, pTSD > local tSource > repeat pN times > put random(2^31) & comma after tSource > end repeat > > local tSMean, tSSD > put average(tSource) into tSMean > put stdDev(tSource) into tSSD > > local tC, tK > put pTSD / pSSD into tC > put pTMean - tC * tSMean into tK > > local tTarget > repeat for each item tS in tSource > put tC * tS + tK & comma after tTarget > end repeat > > return tTarget > end randomNumbers > > Hope this helps! > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Wed Jun 8 11:49:28 2022 From: devin_asay at byu.edu (Devin Asay) Date: Wed, 8 Jun 2022 15:49:28 +0000 Subject: Generating Random numbers to conform a distribution In-Reply-To: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> Message-ID: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> I think Jacque has germaniums in her garden! On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mail at richard-hillen.de Wed Jun 8 12:54:29 2022 From: mail at richard-hillen.de (Hillen Richard) Date: Wed, 8 Jun 2022 18:54:29 +0200 Subject: Generating Random numbers to conform a distribution (David V Glasgow) Message-ID: <83ACE6BC-F84D-4760-8531-8CA3A4E41731@richard-hillen.de> Perhaps this helps: I needed lists of samples that obeyed a certain distribution for a few random experiments. I created these with help of built-in Excel-functions and then imported them into Livecode. Richard. From jacque at hyperactivesw.com Wed Jun 8 13:19:07 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 08 Jun 2022 12:19:07 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> Message-ID: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Eeww. But you're safe, I didn't plant any tomatoes. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: > I think Jacque has germaniums in her garden! > > > > On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > > wrote: > > On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > https://xkcd.com/2626/ > > Chortle. > > Back in the day I would generate a random number by back-biasing a > germanium diode and hook it up to an analog-to-digital converter. Great > white noise generator too. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > Devin Asay > Office of Digital Humanities > Brigham Young University > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Wed Jun 8 14:48:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 8 Jun 2022 14:48:20 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: A maths & stats explanation from the company CTO along with the code to implement it, a back in the day approach that the young makers can try, a HyperCard reference to warm the hearts of the xtalk vets and then a dad joke that unites all with a grin or a groan all in one thread! What a great list. Martin Koob Sent from my iPhone > On Jun 8, 2022, at 1:20 PM, J. Landman Gay via use-livecode wrote: > > Eeww. But you're safe, I didn't plant any tomatoes. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: >> >> I think Jacque has germaniums in her garden! >> >> >> >> On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: >> >> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: >> I don't have an answer. But apparently it's a common problem: >> https://xkcd.com/2626/ >> >> Chortle. >> >> Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. >> >> -- >> Mark Wieder >> ahsoftware at gmail.com >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> Devin Asay >> Office of Digital Humanities >> Brigham Young University >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From cubist at aol.com Wed Jun 8 18:06:10 2022 From: cubist at aol.com (Quentin Long) Date: Wed, 8 Jun 2022 22:06:10 +0000 (UTC) Subject: Funky dice (was Re: Generating Random numbers to conform a distribution) References: <2115663184.690405.1654725970264.ref@mail.yahoo.com> Message-ID: <2115663184.690405.1654725970264@mail.yahoo.com> From: Richard Gaskin > When I was making a game for a friend last summer I fell in love with  > the Royal Game of Ur (RGoU)…> The dice used in RGoU are binary in range, tetrahedra with the faces  > blank and two of the four points painted. > …> If you ever need to plot dice probabilities, this tool handles nearly  > any number of any type of dice you can think of (except Ur dice, it  > turns out, but oh well): >> https://anydice.com/ Ur dice are functionally synonymous with coin-flips—basically, D2s with nonstandard markings. Rather than a 2-sided die marked "1" and "2", an Ur die is effectively a 2-sided die marked "0" and "1". So if you want to implement Ur dice in LiveCode, you have a couple of options: any char of "01" (the random of 2) - 1 Or, if you want to play with Ur dice in anydice.com: output 1d2 - 1output 4d2 - 4 There are various nonstandard uses of dice in the roleplaying game hobby. Example: The FATE rolegame uses six-sided dice, but they aren't marked with the first six integers. Instead, two faces are marked with minus signs; two faces are blank; and the final two faces, with plus signs. When you roll FATE dice, any die that comes up with a minus sign is counted as negative one, any die that came up blank is counted as zero; and any die that came up with a plus sign is counted as positive one. The standard FATE die-roll uses four FATE dice, hence has a range of -4 (if all four dice came up minus) to +4 (if all four dice came up plus). To implement FATE dice in LiveCode, this will do the trick: (the random of 3) - 2 Or the anydice.com equivalent: output 1d3 - 2output 4d3 - 8 Example: The Shadowrun rolegame (basically a mashup between cyberpunk and high fantasy) uses normal six-sided dice, but rather than adding up all the dice, you instead count the quantity of dice which came up either 5 or 6. That is, you have a 1/3 chance of getting a 1, and a 2/3 chance of getting 0. To implement Shadowrun dice in LiveCode, the following one-liner will do: any char of "001" I *think* anydice.com *ought to* be able to handle Shadowrun dice, but at present, I don't know what sort of syntax is required to make that happen. "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ]. From jbv at souslelogo.com Thu Jun 9 03:37:14 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 03:37:14 -0400 Subject: LC 9.6.7 and Applescript Message-ID: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Hi list, I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. Now I am with LC 9.6.7 on OSX 10.15. The stack features some AppleScript commands such as : tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor utility. I am not really familiar with the relationship between LC and AppleScript. Where should I look to fix this issue ? Thank you in advance. jbv From merakosp at gmail.com Thu Jun 9 04:17:39 2022 From: merakosp at gmail.com (panagiotis m) Date: Thu, 9 Jun 2022 11:17:39 +0300 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: Hello jbv, This sounds like bug https://quality.livecode.com/show_bug.cgi?id=23576, which is fixed in LiveCode 9.6.8 rc1. Cheers, Panos -- On Thu, 9 Jun 2022 at 10:38, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to > work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 > to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run > fine in the script editor > utility. > I am not really familiar with the relationship between LC and > AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Thu Jun 9 04:20:26 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 9 Jun 2022 10:20:26 +0200 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <87949D2A-8B20-4B45-91B8-F825C622AF95@m-r-d.de> This was fixed in 9.6.8 RC1 see bug report https://quality.livecode.com/show_bug.cgi?id=23576 > Am 09.06.2022 um 09:37 schrieb jbv via use-livecode : > > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor > utility. > I am not really familiar with the relationship between LC and AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jbv at souslelogo.com Thu Jun 9 05:38:54 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 05:38:54 -0400 Subject: LC 9.6.7 and Applescript In-Reply-To: References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <954ff359efacd15648d50ce4125408a2@souslelogo.com> Hello Panos, I just installed LC 9.6.8 and everything works perfect. Thank you for your reply. I guess I should check https://quality.livecode.com more often :) Best, jbv Le 2022-06-09 04:17, panagiotis m via use-livecode a crit : > Hello jbv, > > This sounds like bug > https://quality.livecode.com/show_bug.cgi?id=23576, > which is fixed in LiveCode 9.6.8 rc1. > > Cheers, > Panos > -- From mark at livecode.com Thu Jun 9 08:44:46 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 13:44:46 +0100 Subject: Would anyone miss convertOctals? Message-ID: <86fc7306896b18dd8a63348049204d4a@livecode.com> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? 2) If you do, have you ever actually used it in any scripts which are actually still in use? 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From marksmithhfx at gmail.com Thu Jun 9 09:06:07 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Thu, 9 Jun 2022 14:06:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3C5A17D9-7A2C-4D6D-9FAF-45574B3CF7EE@gmail.com> > On 9 Jun 2022, at 1:44 pm, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > So three questions: > > 1) Do you know what convertOctals is, and what it does? No (I guessed it might be converting Octals to Decimals but a quick dictionary check indicated nope!) > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! Thanks for the section in the Release Notes called Breaking Changes. Very useful. > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 9 09:13:06 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 9 Jun 2022 09:13:06 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Hi Mark > On Jun 9, 2022, at 8:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing > (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? Without cheating and checking out the dictionary I have a general idea — my guess is… OH if I give my guess and it is right (or wrong) then it ruins your poll for everyone after ;-) You should run this as a web poll of some kind with no peeking at the dictionary allowed. :-) > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? No > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? No > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? No If convertOctals does go away maybe we can add an ode to the LiveCode poetry collection. I remember there were some haiku’s made several years ago. Martin From paul at researchware.com Thu Jun 9 10:37:31 2022 From: paul at researchware.com (Paul Dupuis) Date: Thu, 9 Jun 2022 10:37:31 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the > final thing to sort out before being able to merge my constant > expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) > - however, I would really like to make convertOctals have no effect at > all in 10.0+ as it adds a disproportionate amount of complexity > compared to (what I think, at least) its utility is (particularly in > the context of things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which > are actually still in use? > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be > to expand the numeric literal syntax to add both explicit octal and > binary number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > From rabit at revigniter.com Thu Jun 9 11:25:45 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 9 Jun 2022 17:25:45 +0200 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: On 09.06.22 14:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) - > however, I would really like to make convertOctals have no effect at all > in 10.0+ as it adds a disproportionate amount of complexity compared to > (what I think, at least) its utility is (particularly in the context of > things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? Yes > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? Yes, revIgniter uses "convertOctals" and "umask" dealing with access permissions of files and folders. > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? Sure, I would exchange them with carrots. > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? I have to admit, no. > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be to > expand the numeric literal syntax to add both explicit octal and binary > number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > Ralf From craig at starfirelighting.com Thu Jun 9 11:31:00 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 11:31:00 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Message-ID: <09E6BB0B-59FA-40AE-982B-B7ED9FE37652@starfirelighting.com> I have never used an octal. But it well might break legacy handlers of others, however simple it is to write a custom function to replicate. Craig > On Jun 9, 2022, at 10:37 AM, Paul Dupuis via use-livecode wrote: > > Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare > > > On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> >> So three questions: >> >> 1) Do you know what convertOctals is, and what it does? >> >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> >> Please let me know your thoughts :) >> >> Warmest Regards, >> >> Mark. >> >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Thu Jun 9 11:33:43 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 15:33:43 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> On Jun 9, 2022, at 6:44 AM, Mark Waddingham via use-livecode > wrote: So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? Nope 2) If you do, have you ever actually used it in any scripts which are actually still in use? Nyet 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? N/A 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Wait, you said three questions. But no. Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mark at livecode.com Thu Jun 9 11:53:07 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 16:53:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> Message-ID: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> On 2022-06-09 16:33, Devin Asay via use-livecode wrote: > Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From devin_asay at byu.edu Thu Jun 9 12:06:57 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 16:06:57 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> Message-ID: On Jun 9, 2022, at 9:53 AM, Mark Waddingham via use-livecode > wrote: On 2022-06-09 16:33, Devin Asay via use-livecode wrote: Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) I forget, but I’ve encountered all six of them. :D -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From ahsoftware at sonic.net Thu Jun 9 12:15:44 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Thu, 9 Jun 2022 09:15:44 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <10911935-89a8-2e93-53d9-6bd4781b0f6e@sonic.net> On 6/9/22 05:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. Wow... we have a convertOctals feature. I obviously need to spend more time with the dictionary. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Thu Jun 9 12:19:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 9 Jun 2022 16:19:17 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <2DAEBD57-EDBB-447E-8EAC-1F02A51A8D6F@iotecdigital.com> Does it have something to do with eye surgery? Bob S > On Jun 9, 2022, at 05:44 , Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Thu Jun 9 12:23:54 2022 From: brian at milby7.com (Brian Milby) Date: Thu, 9 Jun 2022 12:23:54 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Had to look it up, never used it. Sent from my iPhone > On Jun 9, 2022, at 8:45 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Thu Jun 9 13:03:56 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 18:03:56 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: 1) No (or didn't until I looked just now) 2) N/A 3) N/A 4) N/A On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final thing > to sort out before being able to merge my constant expression patch) and I was > reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature > (even those we have deprecated, unless we absolutely have to!) - however, I > would really like to make convertOctals have no effect at all in 10.0+ as it > adds a disproportionate amount of complexity compared to (what I think, at > least) its utility is (particularly in the context of things 'coming next' > like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? > >   3) If you do use it in any scripts which are still in use, would you be > willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this > case, an axe) being wielded and the carrot in this case would be to expand the > numeric literal syntax to add both explicit octal and binary number literals > alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is > that the former is not ambiguous at parse time, it doesn't require a runtime > property set to true in order for the engine to convert the string to a number > correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them > for 10 already, and my gut tells me removing convertOctals is likely to cause > less consternation than those we already have - but I could be wrong! > From craig at starfirelighting.com Thu Jun 9 15:54:42 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 15:54:42 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Mark. Gong the other way, is your task made much simpler by losing “converOctals”? I assume so, or the issue would never have come up. Are there other similar language elements that also are on the block? Craig > On Jun 9, 2022, at 1:03 PM, Ben Rubinstein via use-livecode wrote: > > 1) No (or didn't until I looked just now) > 2) N/A > 3) N/A > 4) N/A > > > On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> So three questions: >> 1) Do you know what convertOctals is, and what it does? >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> Please let me know your thoughts :) >> Warmest Regards, >> Mark. >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jerry at jhjensen.com Thu Jun 9 16:14:24 2022 From: jerry at jhjensen.com (Jerry Jensen) Date: Thu, 9 Jun 2022 13:14:24 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3AA83C11-6B11-45C0-BF08-77A3D640CB58@jhjensen.com> Wait, I like octal! I admit I have not used it since writing a disassembler for the HP-85, which nobody but me ever used. I agree with Ralf - carrots would be just fine. .Jerry > On Jun 9, 2022, at 5:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From benr_mc at cogapp.com Thu Jun 9 16:31:46 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 21:31:46 +0100 Subject: Have we lost the Oracle driver? In-Reply-To: <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> References: <7CFA6CE8-CB12-4233-A179-85A54E44A94D@m-r-d.de> <30ba104925924fe988d911669ecc60c0@livecode.com> <2a93b9dc-78ea-0196-5f74-eaa8b394bc03@cogapp.com> <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> Message-ID: <1495f9ef-f26a-29ea-dfd7-c131b732a71e@cogapp.com> I'm attempting to re-up this. I've been distracted by other issues, but now trying again to use the direct Oracle driver, rather than the ODBC one. I have confirmed that LiveCode is appropriately licensed ("professional" rather than "commercial"); and the standalone package contains "dboracle.bundle"(on Mac); on Windows the "dboracle.dll" is in the Externals folder. The current situation is that when I attempt this on Mac, I get the error message: 'revdberr,invalid database type' (30) On Windows, the standalone crashes. Where next...? TIA, Ben On 03/03/2022 17:14, Ben Rubinstein via use-livecode wrote: > Hi Panos, > > Alas, that's made no difference. > > Does this error message "revdberr,invalid database type" actually indicate a > failure to load the driver, or can it also occur if the driver was loaded but > there were issues initialising it, or some other issues connecting to the > given server and database? > > Is there any other detail of errors available anywhere (I looked at the > Console but there is just a continual tide of reports in that, so I couldn't > spot anything)? > > Thanks again, > > Ben > > On 03/03/2022 16:23, panagiotis m via use-livecode wrote: >> Hello Ben, >> >> I _think_ you just have to create a symlink to this version of the >> libclntsh: >> >> 1. Open a Terminal >> 2. Navigate to the instant client directory, e.g. suppose it is in your >> Downloads: >> >> cd ~/Downloads/instantclient_11_2 >> >> 3. Create the symlink: >> >> ln -s libclntsh.dylib.11.1 libclntsh.dylib >> >> Kind regards, >> Panos >> -- >> >> On Thu, 3 Mar 2022 at 15:25, Ben Rubinstein via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Hi Panos, >>> >>> LiveCode 9.6.6 on macOS 10.15.7 (Catalina). >>> >>> I've downloaded the Oracle stuff but it doesn't seem to have an install >>> script >>> - where should I put "libclntsh.dylib.11.1"? >>> >>> thanks for your help, >>> >>> Ben >>> >>> On 02/03/2022 12:58, panagiotis m via use-livecode wrote: >>>> Hello Ben, >>>> >>>> I take it you are on MacOS? Which MacOS version, and which LiveCode >>> version >>>> are you using? >>>> >>>> Could it be the case you haven't got the right version of Oracle Instant >>>> Client installed? You need libclntsh.dylib.11.1, found here: >>>> >>>> >>> https://download.oracle.com/otn/mac/instantclient/11204/instantclient-basic-macos.x64-11.2.0.4.0.zip >>> >>>> >>>> Kind regards, >>>> Panos >>>> -- >>>> >>>> On Tue, 1 Mar 2022 at 19:46, Ben Rubinstein via use-livecode < >>>> use-livecode at lists.runrev.com> wrote: >>>> >>>>> Hi Mark, >>>>> >>>>> Thanks for responding. Indeed 'the revLicenseInfo` returned >>>>> "...commercial". >>>>> After re-licensing, it now says "...professional" - however, I still >>> can't >>>>> open a connection to an Oracle database. >>>>> >>>>> Re-licensing *did* make a difference: whereas previously it broke into >>> the >>>>> debugger, and (sometimes) displayed the error >>>>>    > execution error at line n/a (External handler execution error: >>>>> revdberr,driver not licensed for this edition) >>>>> >>>>> now revOpenDatabase simply returns >>>>>    > revdberr,invalid database type >>>>> >>>>> So I guess it's not a licensing issue any more, which is good; but I >>> still >>>>> can't get at the database! Can you suggest where my next issue might be? >>>>> >>>>> Many thanks, >>>>> >>>>> Ben >>>>> >>>>> On 01/03/2022 16:08, Mark Waddingham via use-livecode wrote: >>>>>> On 2022-03-01 15:51, Ben Rubinstein via use-livecode wrote: >>>>>>> Hi Matthias, >>>>>>> >>>>>>> Good spot! Thanks for checking. >>>>>>> >>>>>>> I wonder whether this is an accidental omission, in that Oracle was at >>>>>>> one time only available at a certain higher level of license; maybe >>>>>>> now that there is only level, perhaps someone forgot to tweak whatever >>>>>>> bit of code checked that the 'correct' license was in place? >>>>>> >>>>>> All business-only features were moved to be part of the pro features >>>>> pack - >>>>>> the oracle driver included. >>>>>> >>>>>> If it isn't working in your current version of LC, check that the >>>>> license you >>>>>> have licensed LC with does have the pro features pack in it... >>>>>> >>>>>> If you do `put the revLicenseInfo` it should say professional, rather >>>>> than >>>>>> commercial. >>>>>> >>>>>> If it doesn't say professional, Relicense your IDE using the menu item >>>>> in Help >>>>>> and flick through the licenses you have available until one says 'pro' >>>>> in the >>>>>> title. >>>>>> >>>>>> If the revLicenseInfo does say professional then something odd has >>>>> happened >>>>>> somewhere which will need to look into more deeply! >>>>>> >>>>>> Warmest Regards, >>>>>> >>>>>> Mark. >>>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 9 20:51:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 10:51:08 +1000 Subject: Property sheets In-Reply-To: References: Message-ID: I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. Neville From neville.smythe at optusnet.com.au Thu Jun 9 23:26:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 13:26:35 +1000 Subject: Multiple revCursors substacks added to standalone In-Reply-To: References: Message-ID: <7F01C3B2-BF71-4FEA-90F2-6A2D9E715A89@optusnet.com.au> For a while now (LC 9.x) I have been finding that making a standalone sometimes adds multiple copies of revCursors to the standalone. One copy as a substack of the mainstack is expected, but under some unknown circumstances I get 3 more copies of the stack added (not as substacks). This on a Mac. I first thought this occurred when the standalone builder reported errors about the ask dialog, but my last build included the extra copies without any warnings occurring during the build process. The source file stack after the build has finished also has these copies of revCursors. I discovered this when I added the source stack to nsScriptDatabase. But it can also be seen in the Project Browser - a number of blank lines occur in the stack list tree, presumably because PB doesn’t like the duplicate stack names. A difficult bug to report to Quality Control without a recipe. Neville From mark at livecode.com Fri Jun 10 03:45:13 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 10 Jun 2022 08:45:13 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Message-ID: <20239d6bbd1a802ab9eb686762583396@livecode.com> On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > converOctals? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Fri Jun 10 11:16:24 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:16:24 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. Bob S > On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: > > Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). From bobsneidar at iotecdigital.com Fri Jun 10 11:18:38 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:18:38 +0000 Subject: Property sheets In-Reply-To: References: Message-ID: Hi Neville. A direct link, or where to go to get it would be helpful. Thanks. Bob S > On Jun 9, 2022, at 17:51 , Neville Smythe via use-livecode wrote: > > I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. > > There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. > > Neville > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rdimola at evergreeninfo.net Fri Jun 10 11:40:02 2022 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Fri, 10 Jun 2022 11:40:02 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <001401d87ce0$5cd91a00$168b4e00$@net> Same as many others on the octal question. Did not know/don’t use. (can see how it would be useful) On this one... don’t use it for msg or envs. I rarely use by ref to change calling parameters, but do it now and again. I mostly use by ref for performance in loops or extraordinary large data sets. Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net -----Original Message----- From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Mark Waddingham via use-livecode Sent: Friday, June 10, 2022 3:45 AM To: How to use LiveCode Cc: Mark Waddingham Subject: Re: Would anyone miss convertOctals? On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > “converOctals”? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From jacque at hyperactivesw.com Fri Jun 10 13:06:48 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 10 Jun 2022 12:06:48 -0500 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <1814e952c40.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I may be dreaming, but didn't you mention that using "the" before a property name would be required? That will throw a lot of people who've become used to omitting that. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 10, 2022 2:46:46 AM Mark Waddingham via use-livecode wrote: > > In terms of other things which are 'on the block' - then no explicit > features per-se but there are a couple of extreme 'edge cases' which > will likely be removed. From phil at pdslabs.net Fri Jun 10 13:12:17 2022 From: phil at pdslabs.net (Phil Davis) Date: Fri, 10 Jun 2022 10:12:17 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> I was thinking along those lines as well. Heck, I just saw my octalmologist last week. Phil Davis On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: > So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. > > Bob S > > >> On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: >> >> Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From ahsoftware at sonic.net Fri Jun 10 13:20:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 10 Jun 2022 10:20:10 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> Message-ID: On 6/10/22 10:12, Phil Davis via use-livecode wrote: "saw"... heh > I was thinking along those lines as well. Heck, I just saw my > octalmologist last week. > > Phil Davis > > > On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: >> So it has nothing to do with eye surgery?? Dang. I thought I was going >> to get a prize or something. >> >> Bob S -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Fri Jun 10 19:22:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 11 Jun 2022 09:22:35 +1000 Subject: nsScriptDatabase (was property sheets) In-Reply-To: References: Message-ID: <3CC942F3-B4FE-4022-BB92-AAD144002556@optusnet.com.au> Bob S wrote > On 11 Jun 2022, at 2:00 am, use-livecode-request at lists.runrev.com wrote: > > A direct link, or where to go to get it would be helpful. The stack is in the Development section of Sample Stacks, though it seems to help the extraordinarily slow search engine to click All before Go. There are only 542 stacks listed, why does it take so long to find one? Bob and I know a better way, eh? You can also download the stack and pre-build standalones from https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 I didn’t give the direct link in this list because I was interested in the number of downloads from Sample Stacks, but evidentlyI can track the number of accesses from my Dropbox folder. Neville Smythe neville.smythe at optusnet.com.au 0414517719 From jbv at souslelogo.com Mon Jun 13 04:30:34 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Mon, 13 Jun 2022 04:30:34 -0400 Subject: Best way to update a large DB ? Message-ID: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Hi list, I have a mySQL DB with about 400000 entries, and I need to update 190000 of them in the following way : update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 I have a file with all the requests that weights almost 200 Mb. I can't upload it via phpMyadmin, because it's too big and running all the requests in one go will end up with a server timeout. I was thinking of a cron job that would trigger every minute or so, and run a short script that would read successive portions of 100 requests and feed them so mySQL. Any better idea ? Thanks in advance. jbv From MikeKerner at roadrunner.com Mon Jun 13 09:58:59 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 13 Jun 2022 09:58:59 -0400 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: and you can't do it locally? that isn't that many records. it shouldn't take long at all. On Mon, Jun 13, 2022 at 4:31 AM jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all > the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and > run a short > script that would read successive portions of 100 requests and feed them > so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From mark at livecode.com Mon Jun 13 12:13:37 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 13 Jun 2022 17:13:37 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Hi Jean-Jacques, On 2022-06-03 14:56, Jean-Jacques Wagner via use-livecode wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word > boundary, as it is with numtochar(32) This is something we will need to consider - please do file a bug about it at quality.livecode.com (so you can track any further discussion about it). I can see how this change occurred, and it is perhaps more a 'side-effect of implementation' rather than an intended change. Prior to 7.0 - the word chunk used the C library 'ctype' isspace function - which returns true if a character is 'whitespace'. However, the engine *also* tweaked the C library character tables to make it so that NBSP (202 on MacRoman - something else on Windows/Linux - 160 maybe?) was *not* a space character. This was primarily a very dirty hack (which was done before my time!) to allow non-breaking spaces to prevent word breaks in fields (I strongly suspect the effect on the word chunk was never considered!). When we moved to Unicode - we changed the word-breaking detection in fields to use a simplified version of the Unicode algorithm and Unicode character properties (NBSP has the, unsurprisingly, no-break property!). Similarly, we changed the word chunk to use the Unicode 'whitespace' property. In the unicode world - being whitespace, and non-breaking are two separate properties... Hence the difference in behavior since 7. The reason this is 'of interest' is that the word chunk has had quite a hefty performance regression since 7.0 due to the switch to Unicode, so re-looking at what it should *actually* do (taking into account what it would be most useful in the widest possible circumstances) is definitely on the cards. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 13 12:15:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:15:47 +0000 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: <021CD806-1D77-44E5-B760-B54A8950F08F@iotecdigital.com> If ID is a unique identifier, you should not need the limit. I agree with Mike, you shouldn't need to do anything fancy. A button and a loop should do it. If the data is critical, you may want to step through a few loops to verify, or backup the database first, always a good idea. Nothing worse than discovering you have bad input data halfway through an update like this. Bob S > On Jun 13, 2022, at 01:30 , jbv via use-livecode wrote: > > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and run a short > script that would read successive portions of 100 requests and feed them so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Mon Jun 13 12:18:44 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:18:44 +0000 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: <60931B58-EF3F-404E-9EF4-BFF18C4B1F6F@iotecdigital.com> "dirty hack" is my middle name! :-) Bob S > On Jun 13, 2022, at 09:13 , Mark Waddingham via use-livecode wrote: > > This was primarily a very dirty hack (which was done before my time!) From paul at researchware.com Mon Jun 13 13:41:15 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 13 Jun 2022 13:41:15 -0400 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: On 6/13/2022 12:13 PM, Mark Waddingham via use-livecode wrote: > Hypercard and livecode 6.7:  the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67                      :   the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 LC 9.6.7 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 LC 6.7.11 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> ALSO results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 Or. at least those are the results I am getting, and I think that may be because numToChar(202) is a different character on macOS vs Windows. From neville.smythe at optusnet.com.au Mon Jun 13 19:19:01 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:19:01 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <456A7575-8628-42C4-8938-3F1663C7F263@optusnet.com.au> > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > I have a file with all the requests that weights almost 200 Mb. Unless your "blah blah”s are very large indeed shouldn’t your change data be packable into a much smaller file to transmit? Eg if they were integers (or could be made to be integer, ie indexes into string tables) 3 integers per line could be packed into 13 bytes, file length 2MB. If they are short strings and you needed say 100 bytes per line that’s still only 20MB. Then use php - if you have the luxury lcserver -to unpack at the server, wrapping the long list of requests with BEGIN and END TRANSACTION of course. Neville From neville.smythe at optusnet.com.au Mon Jun 13 19:22:49 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:22:49 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <7F274337-0C9C-47ED-A369-B2E8C6F8511D@optusnet.com.au> Oh and you can prevent a file transfer from timing out… look up libURLSetExpect10 Neville From david.bovill at gmail.com Tue Jun 14 07:30:43 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 12:30:43 +0100 Subject: Pointlist to Bezier? In-Reply-To: References: Message-ID: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? 📆    Schedule a call with me On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > Pointlist to Bezier > > Hi there > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > There are explanations around the net for C-code but it is very hard to understand. > > (one here said to be good but misses the graphics:) > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > What could this code be used for. > > — Tracing an image > > — Smoothing the lines drawn by a user > > plus a lot more Im sure > > Thanks > Michael > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Tue Jun 14 08:54:49 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 13:54:49 +0100 Subject: Pointlist to Bezier? In-Reply-To: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: I found some well documented python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py And some Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js The javascript code could be called from Livecode. To see the demo of how this would work in the browser: • http://soswow.github.io/fit-curve/demo/ • https://codepen.io/Sphinxxxx/pen/jrLxvQ Would seem to be a useful library to have available in native LC? 📆    Schedule a call with me On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > 📆    Schedule a call with me > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > Pointlist to Bezier > > > > Hi there > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > (one here said to be good but misses the graphics:) > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > What could this code be used for. > > > > — Tracing an image > > > > — Smoothing the lines drawn by a user > > > > plus a lot more Im sure > > > > Thanks > > Michael > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 14 09:42:01 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 14 Jun 2022 09:42:01 -0400 Subject: Pointlist to Bezier? In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> There is a similar thread on the forum: https://forums.livecode.com/viewtopic.php?f=8&t=34550 Craig > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > I found some well documented python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > And some Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > • http://soswow.github.io/fit-curve/demo/ > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > Would seem to be a useful library to have available in native LC? > > 📆 Schedule a call with me > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: >> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? >> >> 📆 Schedule a call with me >> On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: >>> Pointlist to Bezier >>> >>> Hi there >>> >>> I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. >>> >>> There are explanations around the net for C-code but it is very hard to understand. >>> >>> (one here said to be good but misses the graphics:) >>> http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html >>> >>> What could this code be used for. >>> >>> — Tracing an image >>> >>> — Smoothing the lines drawn by a user >>> >>> plus a lot more Im sure >>> >>> Thanks >>> Michael >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Wed Jun 15 05:46:50 2022 From: david.bovill at gmail.com (David Bovill) Date: Wed, 15 Jun 2022 10:46:50 +0100 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> Message-ID: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: Python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js Here is the core python function: > quote_type > def fitCubic(points, leftTangent, rightTangent, error): >  # Use heuristic if region only has two points in it >  if (len(points) == 2): >  dist = linalg.norm(points[0] - points[1]) / 3.0 >  bezCurve = [points[0], points[0] + leftTangent * dist, points[1] + rightTangent * dist, points[1]] >  return [bezCurve] > >  # Parameterize points, and attempt to fit curve >  u = chordLengthParameterize(points) >  bezCurve = generateBezier(points, u, leftTangent, rightTangent) >  # Find max deviation of points to fitted curve >  maxError, splitPoint = computeMaxError(points, bezCurve, u) >  if maxError < error: >  return [bezCurve] > >  # If error not too large, try some reparameterization and iteration >  if maxError < error**2: >  for i in range(20): >  uPrime = reparameterize(bezCurve, points, u) >  bezCurve = generateBezier(points, uPrime, leftTangent, rightTangent) >  maxError, splitPoint = computeMaxError(points, bezCurve, uPrime) >  if maxError < error: >  return [bezCurve] >  u = uPrime > >  # Fitting failed -- split at max error point and fit recursively >  beziers = [] >  centerTangent = normalize(points[splitPoint-1] - points[splitPoint+1]) >  beziers += fitCubic(points[:splitPoint+1], leftTangent, centerTangent, error) >  beziers += fitCubic(points[splitPoint:], -centerTangent, rightTangent, error) > >  return beziers > The maths code for the Newton Raphson method is: > quote_type > def newtonRaphsonRootFind(bez, point, u): >  """ >  Newton's root finding algorithm calculates f(x)=0 by reiterating >  x_n+1 = x_n - f(x_n)/f'(x_n) > >  We are trying to find curve parameter u for some point p that minimizes >  the distance from that point to the curve. Distance point to curve is d=q(u)-p. >  At minimum distance the point is perpendicular to the curve. >  We are solving >  f = q(u)-p * q'(u) = 0 >  with >  f' = q'(u) * q'(u) + q(u)-p * q''(u) > >  gives >  u_n+1 = u_n - |q(u_n)-p * q'(u_n)| / |q'(u_n)**2 + q(u_n)-p * q''(u_n)| >  """ >  d = bezier.q(bez, u)-point >  numerator = (d * bezier.qprime(bez, u)).sum() >  denominator = (bezier.qprime(bez, u)**2 + d * bezier.qprimeprime(bez, u)).sum() > > >  if denominator == 0.0: >  return u >  else: >  return u - numerator/denominator > Seems a useful little challenge for the list? 📆    Schedule a call with me On 14 Jun 2022, 14:43 +0100, Craig Newman via use-livecode , wrote: > There is a similar thread on the forum: > > https://forums.livecode.com/viewtopic.php?f=8&t=34550 > > Craig > > > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > > > I found some well documented python code: > > > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > > > And some Javascript code: > > > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > > > • http://soswow.github.io/fit-curve/demo/ > > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > > > Would seem to be a useful library to have available in native LC? > > > > 📆 Schedule a call with me > > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > > > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > > > > > 📆 Schedule a call with me > > > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > > > Pointlist to Bezier > > > > > > > > Hi there > > > > > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > > > > > (one here said to be good but misses the graphics:) > > > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > > > > > What could this code be used for. > > > > > > > > — Tracing an image > > > > > > > > — Smoothing the lines drawn by a user > > > > > > > > plus a lot more Im sure > > > > > > > > Thanks > > > > Michael > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 15 11:50:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 15 Jun 2022 15:50:17 +0000 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: For extra credit, try writing a handler in LC to convert the python/js code to LC script. Bob S > On Jun 15, 2022, at 02:46 , David Bovill via use-livecode wrote: > > Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: > > Python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js From rabit at revigniter.com Wed Jun 15 15:16:19 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Wed, 15 Jun 2022 21:16:19 +0200 Subject: [ANN] Universal Button version 1.1.0 Message-ID: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> There is a new version of the "universal button" widget which can be used as a replacement for the segmented control widget. The widget icon can now be placed independently of the label and the size of the icon can be customized. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From MikeKerner at roadrunner.com Wed Jun 15 17:17:31 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:17:31 -0400 Subject: seconds on mobile Message-ID: this is strange: on mobile (ios) seconds seems to be in local time on desktop, it seems to be in zulu time, regardless of timezone -- 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." From MikeKerner at roadrunner.com Wed Jun 15 17:20:38 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:20:38 -0400 Subject: seconds on mobile In-Reply-To: References: Message-ID: never mind, i've got something else going on, i think. On Wed, Jun 15, 2022 at 5:17 PM Mike Kerner wrote: > this is strange: > on mobile (ios) seconds seems to be in local time > on desktop, it seems to be in zulu time, regardless of timezone > > -- > 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." > -- 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." From tom at makeshyft.com Thu Jun 16 01:43:11 2022 From: tom at makeshyft.com (Tom Glod) Date: Thu, 16 Jun 2022 01:43:11 -0400 Subject: [ANN] Universal Button version 1.1.0 In-Reply-To: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> References: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> Message-ID: Hey Ralf, thanks for this, I don't know how I'm only coming across this now. :) On Wed, Jun 15, 2022 at 3:16 PM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > There is a new version of the "universal button" widget > which can be used as a replacement for the > segmented control widget. > > The widget icon can now be placed independently of the > label and the size of the icon can be customized. > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 16 09:31:20 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 16 Jun 2022 14:31:20 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Hi Folks, I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode Any alternative suggestions? David Glasgow PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. // String "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" "str" ends with "g" // Chunks char 5 of "str" is "n" From panos.merakos at livecode.com Thu Jun 16 10:12:42 2022 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 16 Jun 2022 17:12:42 +0300 Subject: [ANN] Release 9.6.8 RC-2 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.8 RC-2. Getting the Release =================== You can find the release in your LiveCode account area or get it via the automatic updater. To find the 9.6.8 RC-2 test release in your LiveCode account, please scroll down to below the list of stable releases, to find your available test releases. Release Contents ================ LiveCode 9.6.8 RC-2 comes with 4 regression bugfixes: - Using export when the source is an image object of a closed stack will no longer cause an error to be thrown - The property inspector geometry pane icons have been reinstated - LiveCode will no longer crash on startup on versions of macOS El Capitan (10.11) and below - Building a macOS standalone on macOS Sierra (10.12) and earlier 9.6.8- will not include an Apple architecture slice, even if selected For the full list of all fixes, updates and enhancements please see the release notes: http://downloads.livecode.com/livecode/9_6_8/LiveCodeNotes-9_6_8_rc_2.pdf Known issues ============ - The Browser widget's native layer is not shown in some Linux distros with Cinnamon window manager. - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit LTS yet. Required Software ================= To build iOS apps with LiveCode you must have the appropriate versions of Xcode as follows: - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS 12.1 SDK - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS 13.2 SDK - macOS 10.15.4: Xcode 12.4.x - LiveCode builds iOS apps using the iOS 14.4 SDK - macOS 11+ : Xcode 13.2.x - LiveCode builds iOS apps using the iOS 15.2 SDK There is a full list of working LiveCode/macOS/Xcode combinations here: https://livecode.com/faq Note: Whilst we endeavour to release updated versions of LiveCode supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly recommend disabling automatic update of Xcode or downloading the specific version of Xcode required directly from the Apple developer portal and installing it separately. Important: From the start of April 2022, Apple is only accepting apps built using iOS15.x SDKs. This means that, if you wish to submit apps to the AppStore you will have to be running at least macOS 11 in order to be able to install the necessary version of Xcode. To build macOS apps with an Apple architecture slice requires macOS High Sierra (10.13) or higher. Feedback ======== Please report any bugs encountered on our quality center at http://quality.livecode.com/ We have a forum available for discussing LiveCode at http://forums.livecode.com Have fun! The LiveCode Team -- From rabit at revigniter.com Thu Jun 16 12:00:57 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 16 Jun 2022 18:00:57 +0200 Subject: [ANN] Universal Button version 1.1.1 Message-ID: <7b6b5782-823e-061e-acf5-78f6f41cc98a@revigniter.com> There is a new version of the "universal button" widget. Fixed the compatibility loss with buttons created with previous widget versions. Sorry if this caused problems. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From jacque at hyperactivesw.com Thu Jun 16 16:08:41 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 16 Jun 2022 15:08:41 -0500 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 16, 2022 8:33:45 AM David V Glasgow via use-livecode wrote: > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of > internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL > for doing this. If not I am inclined to use > https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the Cheat > Sheets page and PDFs, and stumbled on a couple of errors in the just LC > one not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Fri Jun 17 04:46:11 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 09:46:11 +0100 Subject: Referencing Livecode In-Reply-To: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: > > Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It’s a commercial site. Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. > -- They do, don’t they. From memory, that wasn’t the context though. Cheers David G From richmondmathewson at gmail.com Fri Jun 17 04:57:15 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 11:57:15 +0300 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: >From what I know (my wife is a senior academic at a university) references to Wikipedia pages are academic suicide, fail, go straight to jail, do not pass GO, do not collect 200 smackers, and you get the picture. On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < use-livecode at lists.runrev.com> wrote: > > > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Is there a reason not to use the LC site URL, either alone or in > addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on > drawing customers in rather than conveying anything about text processing, > or obvious links to information on text processing. No criticism of that > at all. It’s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the > advantage of lots of information presented in a more academic and neutral > style. > > > > > > Re: the errors, they look like examples of functions that would return > "false" but I haven't seen them in context. > > -- > > They do, don’t they. From memory, that wasn’t the context though. > > Cheers > > David G > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Fri Jun 17 05:09:16 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 10:09:16 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Of course that is completely true for academic content! This ain’t that. In the paper I simply state that all text searching, manipulation and aggregation was achieved using Livecode scripts, with a footnote to a brief description and link to … Go on. Ask your wife. That is how it’s done. (unless you used R, or Python, which are celebrities needing no explanation or external link) Best Wishes, David Glasgow > On 17 Jun 2022, at 9:57 am, Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. > > On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in >> addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on >> drawing customers in rather than conveying anything about text processing, >> or obvious links to information on text processing. No criticism of that >> at all. It’s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the >> advantage of lots of information presented in a more academic and neutral >> style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return >> "false" but I haven't seen them in context. >>> -- >> >> They do, don’t they. From memory, that wasn’t the context though. >> >> Cheers >> >> David G >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From marksmithhfx at gmail.com Fri Jun 17 06:37:38 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Fri, 17 Jun 2022 11:37:38 +0100 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: I think in this instance, probably asking support would be the best bet. > On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: > > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Fri Jun 17 07:47:11 2022 From: brian at milby7.com (Brian Milby) Date: Fri, 17 Jun 2022 07:47:11 -0400 Subject: Referencing Livecode In-Reply-To: References: Message-ID: <54AD7477-1155-4F7E-B5BA-3E0E25162244@milby7.com> Maybe a direct link here would be better: https://livecode.com/resources/ Sent from my iPhone > On Jun 17, 2022, at 6:39 AM, Mark Smith via use-livecode wrote: > > I think in this instance, probably asking support would be the best bet. > >> On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: >> >> Hi Folks, >> >> I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. >> >> I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode >> >> Any alternative suggestions? >> >> David Glasgow >> >> PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. >> >> // String >> >> "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" >> "str" ends with "g" >> >> // Chunks >> >> char 5 of "str" is "n" >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Fri Jun 17 08:42:38 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Fri, 17 Jun 2022 14:42:38 +0200 Subject: [ANN] Universal Button 1.2.0 Message-ID: At the risk of getting on your nerves, but there is another new version of the "universal button" widget. Added text alignment controls and a horizontal margin ratio slider in the "Text" section. You have now better control over text and icon placement in case icon gravity is set to "left" or "right". This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From matthias_livecode_150811 at m-r-d.de Fri Jun 17 09:11:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 15:11:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? Message-ID: Hi, is there anyone who can use the new PolyGrid widget without any error? I am running into errors when i delete all default columns and add for example 2 new ones and filling adding content to it using the PI The error is similar to this one: executing at 2:55:48 PM LCB Error Value is not of correct type for assignment to variable - expected type for assigning to variable tWidth in com.livecode.widget.polygrid.drawHeader Object PolyGrid LCB File D:/PROYECTOS/Proyectos GitGub/Ferruslogic/addons-mega-bundle/Polygrid/com.livecode.widget.polygrid.lcb LCB Line 2555 Matthias From steven.crighton at livecode.com Fri Jun 17 11:05:52 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:05:52 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: References: Message-ID: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Hi Matthias We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. Thanks Steven From matthias_livecode_150811 at m-r-d.de Fri Jun 17 11:35:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 17:35:38 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: Hi Steven, thanks, but now after applying a template to the PG and then deleting all columns, i have after i deleted the last column again 5 columns. 4 columns with the name Col 4 and one column Col 5. And those columns could not be deleted. Shall i submit this also to the QC? Matthias > Am 17.06.2022 um 17:05 schrieb Steven Crighton via use-livecode : > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From steven.crighton at livecode.com Fri Jun 17 11:46:19 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:46:19 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Yes please. if you first empty the text data and then delete the column it should work as expected. But if you can submit it to QC we can look into further. Thanks Steven > On 17 Jun 2022, at 16:05, Steven Crighton wrote: > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > From bobsneidar at iotecdigital.com Fri Jun 17 12:09:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 16:09:05 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> I wonder why that is? While you may find inaccurate information on Wikipedia, the vastly overwhelming information there is absolutely accurate. But isn't that true of EVERY source? In my life experience I have found that settled science is very unsettled indeed. Salt causes high blood pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to live. A nuclear blast will render an area unlivable for 10,000 years. I could go on and on. Mankind is constantly revising "settled" science, and well we should, but what I object to is being told that what academia is now telling us is the new absolute, and I am expected to just accept that. Bob S > On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. From jacque at hyperactivesw.com Fri Jun 17 12:48:05 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 17 Jun 2022 11:48:05 -0500 Subject: Referencing Livecode In-Reply-To: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> Message-ID: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode wrote: > I wonder why that is? While you may find inaccurate information on > Wikipedia, the vastly overwhelming information there is absolutely > accurate. But isn't that true of EVERY source? In my life experience I have > found that settled science is very unsettled indeed. Salt causes high blood > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > live. A nuclear blast will render an area unlivable for 10,000 years. I > could go on and on. > > Mankind is constantly revising "settled" science, and well we should, but > what I object to is being told that what academia is now telling us is the > new absolute, and I am expected to just accept that. > > Bob S > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >> wrote: >> >> From what I know (my wife is a senior academic at a university) references >> to Wikipedia pages are academic suicide, fail, go straight to jail, do not >> pass GO, do not collect 200 smackers, and you get the picture. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From richmondmathewson at gmail.com Fri Jun 17 13:26:41 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 20:26:41 +0300 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: As I, or anyone else could write on Wikipedia about Hamlet being Shakespeare's coded love notes to a camel he met in Oxford, I really wonder why anyone, 'academic' or not, would stick their neck under that guillotine's fairly jittery blade escapes me completely. I often look up things on Wikipedia, THEN check them elsewhere. On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < use-livecode at lists.runrev.com> wrote: > The same rules apply to US schools. It may be similar to doing a critique > of Hamlet after reading only the Cliff Notes summary. No actual research > or > thought required. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode > wrote: > > > I wonder why that is? While you may find inaccurate information on > > Wikipedia, the vastly overwhelming information there is absolutely > > accurate. But isn't that true of EVERY source? In my life experience I > have > > found that settled science is very unsettled indeed. Salt causes high > blood > > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. > Eggs > > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > > live. A nuclear blast will render an area unlivable for 10,000 years. I > > could go on and on. > > > > Mankind is constantly revising "settled" science, and well we should, > but > > what I object to is being told that what academia is now telling us is > the > > new absolute, and I am expected to just accept that. > > > > Bob S > > > > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode > >> wrote: > >> > >> From what I know (my wife is a senior academic at a university) > references > >> to Wikipedia pages are academic suicide, fail, go straight to jail, do > not > >> pass GO, do not collect 200 smackers, and you get the picture. > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 17 13:49:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:49:17 +0000 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <98C870D5-00BF-4235-BB21-A88058E37688@iotecdigital.com> I think no matter what you go to, inevitably you are looking for what other people have said in critiquing hamlet or anything else. We call some people experts because other people called experts certified them as such. It can’t be any other way. But I often wonder who the first expert in any field was, and who certified them. :-) Sent from my iPhone > On Jun 17, 2022, at 09:49, J. Landman Gay via use-livecode wrote: > > The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. From bobsneidar at iotecdigital.com Fri Jun 17 13:50:49 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:50:49 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <88ABC7BE-6B04-4A1E-9086-AF2A1B2BB636@iotecdigital.com> That’s absurd. Everyone knows it was a Sherland pony. Sent from my iPhone > On Jun 17, 2022, at 10:28, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. From mkoob at rogers.com Fri Jun 17 13:55:21 2022 From: mkoob at rogers.com (Martin Koob) Date: Fri, 17 Jun 2022 13:55:21 -0400 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: What about this link from the LiveCode.com site? https://livecode.com/core-benefits-of-livecode/ It summarizes what LiveCode is and gives a comparison of LiveCode script to code in JavaScript, PHP and Java. It even mentions an academic article: "A 2016 peer reviewed study conducted at Southern Cross University Australia and University of Newcastle”. Unfortunately it does not include a reference to the study. I looked around and found a conference paper in 2015 that probably what they are referring to. Using Cognitive Load Theory to select an Environment for Teaching Mobile Apps Development January 2015 Conference: Australasian Computing Education Conference 2015 (ACE2015) At: Sydney, Australia Volume: 160. Here is a link to that conference paper where you can download it. https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. Martin > On Jun 17, 2022, at 1:26 PM, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. > > I often look up things on Wikipedia, THEN check them elsewhere. > > On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> The same rules apply to US schools. It may be similar to doing a critique >> of Hamlet after reading only the Cliff Notes summary. No actual research >> or >> thought required. >> >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode >> wrote: >> >>> I wonder why that is? While you may find inaccurate information on >>> Wikipedia, the vastly overwhelming information there is absolutely >>> accurate. But isn't that true of EVERY source? In my life experience I >> have >>> found that settled science is very unsettled indeed. Salt causes high >> blood >>> pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. >> Eggs >>> are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to >>> live. A nuclear blast will render an area unlivable for 10,000 years. I >>> could go on and on. >>> >>> Mankind is constantly revising "settled" science, and well we should, >> but >>> what I object to is being told that what academia is now telling us is >> the >>> new absolute, and I am expected to just accept that. >>> >>> Bob S >>> >>> >>>> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >>>> wrote: >>>> >>>> From what I know (my wife is a senior academic at a university) >> references >>>> to Wikipedia pages are academic suicide, fail, go straight to jail, do >> not >>>> pass GO, do not collect 200 smackers, and you get the picture. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Sat Jun 18 04:40:52 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Sat, 18 Jun 2022 09:40:52 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <47EE8E22-CF55-4BA3-BC20-97AF3A8ED518@gmail.com> > On 17 Jun 2022, at 6:55 pm, Martin Koob via use-livecode wrote: > > > Here is a link to that conference paper where you can download it. > https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development > > Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. That’s an interesting read! I might completely drop the footnote and just cite this. If I can find out exactly what it is…. Cheers David G From matthias_livecode_150811 at m-r-d.de Sat Jun 18 05:35:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 11:35:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Message-ID: <8B9A04B8-7B95-495F-A8B2-525B728CF611@m-r-d.de> Done. https://quality.livecode.com/show_bug.cgi?id=23752 As it's possible to delete columns in a Datagrid which still has content, i would say this is a bug in Polygrid. > Am 17.06.2022 um 17:46 schrieb Steven Crighton via use-livecode >: > > Yes please. if you first empty the text data and then delete the column it should work as expected. > > But if you can submit it to QC we can look into further. > > Thanks > Steven > >> On 17 Jun 2022, at 16:05, Steven Crighton > wrote: >> >> Hi Matthias >> >> We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. >> >> Thanks >> Steven >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 13:33:54 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 17:33:54 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: Sorry if this has been discussed before but I could not find it. Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. After some testing I finally read the release notes and it states: Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" >From then on LC uses arm64. I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. Kind regards Bernd From harrison at all-auctions.com Sat Jun 18 14:06:46 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Sat, 18 Jun 2022 14:06:46 -0400 Subject: LC Server & Monterey In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <38032FA7-3DE9-4E3C-BBCA-771D619BFA5D@all-auctions.com> I’m trying to upgrade my web-server from Catalina to Monterey, and I’m running into Error 403 Forbidden You don't have permission to access this resource. I’m using LiveCode Server 9.6.7 Everything worked great under Catalina. What extra thing do I need to do for Monterey? Anyone else worked through this problem? Thanks, Rick From matthias_livecode_150811 at m-r-d.de Sat Jun 18 14:24:17 2022 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Sat, 18 Jun 2022 20:24:17 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: Message-ID: Bernd, May be a dumb question, but how did you verify that LC was running in Rosetta mode although it was not checked. Regards, Matthias Von meinem iPhone gesendet > Am 18.06.2022 um 19:35 schrieb Niggemann, Bernd via use-livecode : > > Sorry if this has been discussed before but I could not find it. > > Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. > > After some testing I finally read the release notes and it states: > Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. > > For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. > Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" > From then on LC uses arm64. > > I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 14:36:27 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 18:36:27 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Hi Matthias, I should have added that to my previous post: If you put "put the processor" into the message box it says Rosetta: x86_64 Native: arm64 Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB Kind regards Bernd From dochawk at gmail.com Sat Jun 18 14:54:28 2022 From: dochawk at gmail.com (doc hawk) Date: Sat, 18 Jun 2022 11:54:28 -0700 Subject: Can't activate indy license on 10.0 Message-ID: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> I finally dropped my business subscription that I never used, but I have a lifetime indy license. The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. Am I missing something here? From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:22:31 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:22:31 +0200 Subject: Can't activate indy license on 10.0 In-Reply-To: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> References: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> Message-ID: <27C7B37A-CC7C-4108-8ADE-8AEFEF3B5DA2@m-r-d.de> Maybe there is already a license for LC 10 DP4 or so. If you are on Maybe you could check the folder ~/Library/Application Support/RunRev/Licenses and see if there is already a license file for that version and delete it. I am not completely sure there that folder is on Windows, but i think under ~/Appdata/Roaming Matthias > Am 18.06.2022 um 20:54 schrieb doc hawk via use-livecode : > > > I finally dropped my business subscription that I never used, but I have a lifetime indy license. > > The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. > > Am I missing something here? > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:27:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:27:38 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Message-ID: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Thanks Bernd, ....the processor... should have know that. it seems i got to much sun today. ;) I was also wondering why the check box for rosetta was already unchecked after installation, but did not had the idea to check. I just trusted macOS. ;) So, the question now is, is this a macOS problem or is it possible that a standalone could show the wrong setting due to a wrong configuration or so when it is created. Anyway, thanks for pointing this out. Matthias > Am 18.06.2022 um 20:36 schrieb Niggemann, Bernd via use-livecode : > > Hi Matthias, > > I should have added that to my previous post: > > If you put "put the processor" into the message box it says > > Rosetta: x86_64 > Native: arm64 > > Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From hechris at ziggo.nl Sun Jun 19 04:01:16 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 10:01:16 +0200 Subject: folders() does not return aliases to folders? Message-ID: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Hi, Aliases to foiders are missing in "the folders" function In the Dictionary for folders: Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. Is it a bug or could it be my mistake? This is on OSX 12.4 and LC 9.6.7 regards, Chris Heidecker From hechris at ziggo.nl Sun Jun 19 06:19:14 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 12:19:14 +0200 Subject: folders() does not return aliases to folders? In-Reply-To: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> References: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Message-ID: <13BD3E36-8B5F-499C-8111-FAEBB0B60E31@ziggo.nl> A workaround to get the alias folders into the folderlist. Maybe there is a more elegant approach? function theFolders targetFolder put the defaultFolder into oldDef set the defaultFolder to targetFolder put the folders into folderList put the files into fileList repeat for each line theFile in fileList put the aliasReference of theFile into theAlias if theAlias is not empty then if there is a folder theAlias then --answer "the path to: " & theAlias put return & theFile after folderList end if end if end repeat set the defaultFolder to oldDef return folderList end theFolders on mouseUp answer folder "Choose a folder with aliases to folders in it" put theFolders(it) into folderList filter folderList without ".." sort lines of folderList international answer folderList end mouseUp -- I set the defaultfolder and did not use folders(targetFolder) because -- otherwise i would have to construct the filepath for the aliasreference -- put the aliasReference of (targetFolder&"/"& theFile) into theAlias Regards, Chris Heidecker > Op 19 jun. 2022, om 10:01 heeft Chris Heidecker via use-livecode het volgende geschreven: > > Hi, > > Aliases to foiders are missing in "the folders" function > > In the Dictionary for folders: > Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. > > Is it a bug or could it be my mistake? > This is on OSX 12.4 and LC 9.6.7 > > > regards, > Chris Heidecker > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Sun Jun 19 09:17:00 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sun, 19 Jun 2022 09:17:00 -0400 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: I, for one, appreciate these sorts of messages. On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > > At the risk of getting on your nerves, but there is another > new version of the "universal button" widget. > > Added text alignment controls and a horizontal margin > ratio slider in the "Text" section. > You have now better control over text and icon placement > in case icon gravity is set to "left" or "right". > > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Sun Jun 19 10:54:07 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Sun, 19 Jun 2022 16:54:07 +0200 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Thank you, Mike. On 19.06.22 15:17, Mike Kerner via use-livecode wrote: > I, for one, appreciate these sorts of messages. > > On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> >> At the risk of getting on your nerves, but there is another >> new version of the "universal button" widget. >> >> Added text alignment controls and a horizontal margin >> ratio slider in the "Text" section. >> You have now better control over text and icon placement >> in case icon gravity is set to "left" or "right". >> >> >> This release can be downloaded here: >> https://github.com/revig/universal-button-widget/releases >> >> >> Ralf >> From prothero at earthlearningsolutions.org Sun Jun 19 11:35:48 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Sun, 19 Jun 2022 08:35:48 -0700 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> References: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Message-ID: <8FEF6AE1-AD72-469C-A2A6-146F564EEBD2@earthlearningsolutions.org> This looks really useful. Thanks! Bill William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 19, 2022, at 7:54 AM, Ralf Bitter via use-livecode wrote: > > Thank you, Mike. > > >> On 19.06.22 15:17, Mike Kerner via use-livecode wrote: >> I, for one, appreciate these sorts of messages. >>> On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>> At the risk of getting on your nerves, but there is another >>> new version of the "universal button" widget. >>> >>> Added text alignment controls and a horizontal margin >>> ratio slider in the "Text" section. >>> You have now better control over text and icon placement >>> in case icon gravity is set to "left" or "right". >>> >>> >>> This release can be downloaded here: >>> https://github.com/revig/universal-button-widget/releases >>> >>> >>> Ralf >>> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 16:32:46 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 19 Jun 2022 21:32:46 +0100 Subject: Stylistic question. Message-ID: I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. In the card script, there will be code like on mouseUp   switch the short name of the target     case "first"         doCommandFirst         break     case "another"         doCommandAnother         break     case "lastnotleast"         doCommandlastnotleast         break   end switch end mouseUp I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. Thanks for any opinions, Alex. From brian at milby7.com Sun Jun 19 17:06:37 2022 From: brian at milby7.com (Brian Milby) Date: Sun, 19 Jun 2022 17:06:37 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. Sent from my iPhone > On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: > > I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Sun Jun 19 19:19:54 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 19 Jun 2022 23:19:54 +0000 Subject: Stylistic question. In-Reply-To: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> Message-ID: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. Sent from my iPhone > On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: > > One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. > > Sent from my iPhone > >> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >> >> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 19:36:00 2022 From: alex at tweedly.net (Alex Tweedly) Date: Mon, 20 Jun 2022 00:36:00 +0100 Subject: Stylistic question. In-Reply-To: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Message-ID: <2ed0b611-a13c-ba6b-7bff-ffa474b0cce3@tweedly.net> On 20/06/2022 00:19, Bob Sneidar via use-livecode wrote: > Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. Absolutely. And the converse - code that is not shared should be as low in the hierarchy as possible. In this case, there is really no shared code. If it's button "first" you call one handler. If it's button "whatever I called the second", you call a different handler. etc.  Nothing shared at all. As to Brian's point about behaviours and Git, I can see that. I admit to being slightly "slack" about what code needs to go into behaviour scripts so it can be Gitted. If it's code that is very brief, and will "never" change, I put that in the regular stack. So in this case, I'd have the script of button "first" be on mouseUp    doCommandFirst end mouseUp and I'm willing to bet that will ever change :-) > For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. Sounds cool. If I ever use a Datagrid, I'll do that. Alex. > If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. > > Sent from my iPhone > >> On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: >> >> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stacks behavior script. >> >> Sent from my iPhone >> >>> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >>> >>> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >>> >>> In the card script, there will be code like >>> >>> on mouseUp >>> switch the short name of the target >>> case "first" >>> doCommandFirst >>> break >>> case "another" >>> doCommandAnother >>> break >>> case "lastnotleast" >>> doCommandlastnotleast >>> break >>> end switch >>> end mouseUp >>> >>> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >>> >>> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >>> >>> Thanks for any opinions, >>> >>> Alex. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 20 10:50:32 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 20 Jun 2022 15:50:32 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Message-ID: <0f06595048462558e4ea94965d8ebb81@livecode.com> On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: > So, the question now is, is this a macOS problem or is it possible > that a standalone could show the wrong setting due to a wrong > configuration or so when it is created. It is a macOS (Finder) bug - I think it was the same when they added 32-bit vs 64-bit, and probably Intel vs PowerPC. There's a plist entry 'LSArchitecturePriority' which is the order in which the different slices should be used - currently we have x86-64 then arm64 and it seems the Finder doesn't use this to determine whether to show the Rosetta box as checked or not when the user hasn't explicitly prodded it in the past (which obviously they won't have done for new apps / those which didn't have the option before!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Mon Jun 20 14:29:10 2022 From: richmondmathewson at gmail.com (Richmond) Date: Mon, 20 Jun 2022 21:29:10 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <0f06595048462558e4ea94965d8ebb81@livecode.com> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> <0f06595048462558e4ea94965d8ebb81@livecode.com> Message-ID: <068d4b2a-3120-fce8-88a3-edae3de3bb9d@gmail.com> In the standalone builder you have always separated Linux 32-bit and 64-bit builds, and the same with Windows: could you alter the MacOS standalones so we end up with one INTEL 64-bit standalone, and one ARM standalone, rather than a awkward sandwich? Best, Richmond. On 20.06.22 17:50, Mark Waddingham via use-livecode wrote: > On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: >> So, the question now is, is this a macOS problem or is it possible >> that a standalone could show the wrong setting due to a wrong >> configuration or so when it is created. > > It is a macOS (Finder) bug - I think it was the same when they added > 32-bit vs 64-bit, and probably Intel vs PowerPC. > > There's a plist entry 'LSArchitecturePriority' which is the order in > which the different slices should be used - currently we have x86-64 > then arm64 and it seems the Finder doesn't use this to determine > whether to show the Rosetta box as checked or not when the user hasn't > explicitly prodded it in the past (which obviously they won't have > done for new apps / those which didn't have the option before!). > > Warmest Regards, > > Mark. > From Bernd.Niggemann at uni-wh.de Mon Jun 20 14:54:48 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Mon, 20 Jun 2022 18:54:48 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Richmond wrote: > In the standalone builder you have always separated > Linux 32-bit and 64-bit builds, and the same with > Windows: could you alter the MacOS standalones so we > end up with one INTEL 64-bit standalone, and one ARM > standalone, rather than a awkward sandwich? In the current (see subject) versions the standalone builder for Mac lets you build: either Intel or Arm or both Kind regards Bernd From richmondmathewson at gmail.com Mon Jun 20 15:45:39 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Mon, 20 Jun 2022 22:45:39 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: Indeed, but 'both' results in an app package containing 2 'slices', rather than 2 distinct apps. On Mon, 20 Jun 2022, 21:56 Niggemann, Bernd via use-livecode, < use-livecode at lists.runrev.com> wrote: > Richmond wrote: > > > In the standalone builder you have always separated > > Linux 32-bit and 64-bit builds, and the same with > > Windows: could you alter the MacOS standalones so we > > end up with one INTEL 64-bit standalone, and one ARM > > standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 20 15:55:01 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 20 Jun 2022 21:55:01 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Hm, here in LC 9.6.8 RC2 and 10DP4 i see only 'macOS Intel' and 'macOS Apple (experimental)'. When i select both, then a universal standalone is created. So to have separate Intel and M1 versions, I have to run the standalone building 2 times. Once with only Intel selected and then once with only Apple selected Better would be a third option which would say Universal. So one could select all 3 options to get a universal and also versions for each cpu platform. Anyway, the macOS Apple support is currently experimental, i am pretty sure there will be such an option in future. At least i hope so. ;) Matthias > Am 20.06.2022 um 20:54 schrieb Niggemann, Bernd via use-livecode : > > Richmond wrote: > >> In the standalone builder you have always separated >> Linux 32-bit and 64-bit builds, and the same with >> Windows: could you alter the MacOS standalones so we >> end up with one INTEL 64-bit standalone, and one ARM >> standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alanstenhouse at hotmail.com Mon Jun 20 19:46:58 2022 From: alanstenhouse at hotmail.com (Alan Stenhouse) Date: Tue, 21 Jun 2022 09:16:58 +0930 Subject: Referencing Livecode In-Reply-To: References: Message-ID: Hi David In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 and https://www.sciencedirect.com/science/article/pii/S2351989421001761 HTH cheers Alan > On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: > >> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >> >> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > >> >> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >> -- > > They do, don?t they. From memory, that wasn?t the context though. > > Cheers > > David G From Bernd.Niggemann at uni-wh.de Tue Jun 21 05:51:18 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Tue, 21 Jun 2022 09:51:18 +0000 Subject: Referencing Livecode Message-ID: Alan Stenhouse via use-livecode wrote > In a couple of my publications, I described developing apps with Livecode and > referred to www.livecode.org and www.livecode.com, but didn't include anything > in the references as there was nothing (AFAICS at that time) that would satisfy > scientific publication standards. > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 Alan, that is really cool. Congratulations. Kind regards Bernd From mark at livecode.com Tue Jun 21 05:56:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 10:56:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: > Anyway, the macOS Apple support is currently experimental, i am pretty > sure there will be such an option in future. At least i hope so. ;) Why? The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. Warmest Regards, Mark. P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 21 06:42:01 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 21 Jun 2022 11:42:01 +0100 Subject: OT Re: Referencing Livecode In-Reply-To: References: Message-ID: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> That is really helpful Alan. A pair of fine papers! I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. Cheers, David G > On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: > > Hi David > > In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. > > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 > > HTH > > cheers > > Alan > > >> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>> -- >> >> They do, don?t they. From memory, that wasn?t the context though. >> >> Cheers >> >> David G > From matthias_livecode_150811 at m-r-d.de Tue Jun 21 07:18:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 13:18:25 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> > Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : > > On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: >> Anyway, the macOS Apple support is currently experimental, i am pretty >> sure there will be such an option in future. At least i hope so. ;) > > Why? > First, it's more convenient for the developer. The Intel only and Apple only builds are smaller ins size than the universal build. So if i want to build those single platform apps to offer the smaller sized apps i have to run the standalone building process twice, right? And before i run the 2nd build process i even have to switch the settings, right? That's not very convenient. And for those who want to build an universal app an "universal" option in the standalone settings would be great. And btw why did this option exist in previous LC versions for an Universal app with PPC and Intel support? Regards, Matthias > The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. > > Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. > > Warmest Regards, > > Mark. > > P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. > > P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Tue Jun 21 08:28:48 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 08:28:48 -0400 Subject: OT Re: Referencing Livecode In-Reply-To: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> References: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> Message-ID: Hi. These are great examples of use cases for LiveCode and it is great how you explain the app design. It especially cool that the apps are used for citizen science. It complements LiveCode's “anyone can code” tag line with the “any one can do science" ethic of citizen science. Thanks Alan. Martin Koob > On Jun 21, 2022, at 6:42 AM, David V Glasgow via use-livecode wrote: > > > That is really helpful Alan. A pair of fine papers! > > I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. > > Cheers, > > David G > >> On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: >> >> Hi David >> >> In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. >> >> See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 >> and >> https://www.sciencedirect.com/science/article/pii/S2351989421001761 >> >> HTH >> >> cheers >> >> Alan >> >> >>> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >>> >>>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>>> >>>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >>> >>> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >>> >>> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >>> >>> >>>> >>>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>>> -- >>> >>> They do, don?t they. From memory, that wasn?t the context though. >>> >>> Cheers >>> >>> David G >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 21 09:19:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 14:19:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> Message-ID: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode >> : >> Why? >> > > First, it's more convenient for the developer. I think the end user is more important (in this case) ;) > The Intel only and Apple only builds are smaller ins size than the > universal build. True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. > So if i want to build those single platform apps to offer the smaller > sized apps i have to run the standalone building process twice, > right? And before i run the 2nd build process i even have to switch > the settings, right? > That's not very convenient. Offering two separate downloads to users is not very convenient to them ;) > And btw why did this option exist in previous LC versions for an > Universal app with PPC and Intel support? Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From matthias_livecode_150811 at m-r-d.de Tue Jun 21 10:08:48 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 16:08:48 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> <2daab8720c379e6b70faf42ce23f29cf@livecode.com> Message-ID: <2AA3A6FD-E032-4B56-828E-9BCF11B99922@m-r-d.de> > Am 21.06.2022 um 15:19 schrieb Mark Waddingham via use-livecode : > > On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >>> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : >>> Why? >> First, it's more convenient for the developer. > > I think the end user is more important (in this case) ;) > >> The Intel only and Apple only builds are smaller ins size than the >> universal build. > > True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? In my vocational training in the mid 80's the mantra of my instructors was "SAVE resources!". Okay, at that time computers did not have many ram and hard disk space. But anyway, i still keep this mantra in mind when programing or doing other things. Just because computers nowadays have plenty of ram and hard disk space does not mean we have to completely fill up it. ;) > > There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. > Therefore the Universal build would be. That's the reason why i argue for 3 options for macOS. When i switched to my new Mac Studio there were several 3rd party programs which were only available as single Apple Chips version and not as an universal build. But there might be special reasons for it. > Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. Is it so much work to reimplement that routine? It already existed for PPC. > >> So if i want to build those single platform apps to offer the smaller >> sized apps i have to run the standalone building process twice, >> right? And before i run the 2nd build process i even have to switch >> the settings, right? >> That's not very convenient. > > Offering two separate downloads to users is not very convenient to them ;) Don't think so. Offering 3 separate downloads 1 x Intel, 1 x Apple, 1 x Universal is very convenient. The user can decide what to download and in case of a doubt the user can download the Universal build. > >> And btw why did this option exist in previous LC versions for an >> Universal app with PPC and Intel support? > > Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still Don't exaggerate, it was just 8 years ago. ;) > had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. > > These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. > But with the current problem that a Universal app by default runs in Rosetta although the Rosetta switch is not enabled that is also not very convenient for the customer. Anyway, i understand your points and can live with the decision. Regards, Matthias > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Tue Jun 21 13:44:10 2022 From: tom at makeshyft.com (Tom Glod) Date: Tue, 21 Jun 2022 13:44:10 -0400 Subject: arrayencode Message-ID: Hi Folks, I am wondering if anyone here knows the encoding algorithm that arrayencode() uses? Is it one that can be implemented in another language or is it proprietary? Thanks, Tom From craig at starfirelighting.com Tue Jun 21 14:16:28 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 14:16:28 -0400 Subject: my keyUp message has disappeared Message-ID: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> This is summarized from a couple of threads in the forum: ------------------------------------------------- The "keyUp"message has disappeared. This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. So a new stack in a new session has this in its card script: on keyUp x answer x end keyUp Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. ————————————— Just trashed the prefs file, which worked last time. Nope Just tried with another version of LC (9.6.6). Nope Just restarted. Nope. I have never seen anything quite like this, the complete loss of a message. I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. ——————————— This works from msg: send "keyUp" && "x" to this cd I can set a breakpoint and trap the message, or not. I get something like "x56”. —————————————————————————— Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. Craig From craig at starfirelighting.com Tue Jun 21 15:22:59 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 15:22:59 -0400 Subject: my keyUp message has disappeared In-Reply-To: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> References: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> Message-ID: I neglected to write the modified “keyUp” handler I am now using when I posted. it should read: > on keyUp x > answer x & random(99) > end keyUp in order to get that “x56” I mentioned. Craig > On Jun 21, 2022, at 2:16 PM, Craig Newman via use-livecode wrote: > > This is summarized from a couple of threads in the forum: > ------------------------------------------------- > > The "keyUp"message has disappeared. > > This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. > > So a new stack in a new session has this in its card script: > > on keyUp x > answer x > end keyUp > > Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. > > ————————————— > > Just trashed the prefs file, which worked last time. Nope > Just tried with another version of LC (9.6.6). Nope > Just restarted. Nope. > > I have never seen anything quite like this, the complete loss of a message. > > I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. > > Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. > > ——————————— > > This works from msg: > > send "keyUp" && "x" to this cd > > I can set a breakpoint and trap the message, or not. I get something like "x56”. > > —————————————————————————— > > Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. > > Craig > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 21 22:43:30 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 19:43:30 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> l oTom Glod wrote: > I am wondering if anyone here knows the encoding algorithm > that arrayencode() uses? Yes. > Is it one that can be implemented in another language or is > it proprietary? It should be technically possible to implement any algo in any sufficiently-complete language. Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). https://bsonspec.org/ BSON parsers are available for a great many languages: https://bsonspec.org/implementations.html -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Tue Jun 21 23:31:19 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 23:31:19 -0400 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: What is LSON? A web search doesn’t turn up anything. A shot in the dark here but Is it something internal to LiveCode i.e. Livecode Script Object Notation that is the basis for LiveCode arrays? Thanks for the references on BSON Martin > On Jun 21, 2022, at 10:43 PM, Richard Gaskin via use-livecode wrote: > > l oTom Glod wrote: > > > I am wondering if anyone here knows the encoding algorithm > > that arrayencode() uses? > > Yes. > > > > Is it one that can be implemented in another language or is > > it proprietary? > > It should be technically possible to implement any algo in any sufficiently-complete language. > > Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. > > > I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. > > But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. > > If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. > > But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. > > I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. > > If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). > > https://bsonspec.org/ > > BSON parsers are available for a great many languages: > https://bsonspec.org/implementations.html > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 22 00:55:43 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 21:55:43 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Martin Koob wrote: > What is LSON? A web search doesnt turn up anything. A shot > in the dark here but Is it something internal to LiveCode i.e. > Livecode Script Object Notation that is the basis for LiveCode > arrays? Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. > Thanks for the references on BSON Glad someone found them interesting. I was especially impressed with variable integers for the length specifier. Nice format, would be cool if it were more widely used outside of MongoDB circles. -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Wed Jun 22 08:26:44 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 22 Jun 2022 08:26:44 -0400 Subject: arrayencode In-Reply-To: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> References: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Message-ID: Hi Richard Thanks for the explanation. I think it is a helpful term or distinction to have. I think it would be good to actually have that term with a formal definition published by LiveCode or the community with references to BSON so it will show up in web searches for either term to lead people to LiveCode. Maybe a start would be to introduce it in the forums. Just a question though how is what you define as LSON different from JSON. Is it a different way of serializing LiveCode native arrays? Is there a way that LiveCode developers can have access to it directly through LCB or is it accessible in the realm of the engine only. Thanks Martin Koob > On Jun 22, 2022, at 12:55 AM, Richard Gaskin via use-livecode wrote: > > > What is LSON? A web search doesn’t turn up anything. A shot > > in the dark here but Is it something internal to LiveCode i.e. > > Livecode Script Object Notation that is the basis for LiveCode > > arrays? > > Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) > > So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. From MikeKerner at roadrunner.com Wed Jun 22 09:46:54 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:46:54 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: For an example like a session during LCG, throwing everything into a single script can make it easier to see everything, together, however, I absolutely, always, without exception, do this: 1) Every object that needs to do something gets its own handler, unless there is some reason to allow the behavior to pass up the chain. This situation is not one of them. 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. 3) I don't ever use switch. I can't stand it. If I had to write something like the above, I would do something like put the short name of the target into snot if snot is "first" then doCommandFirst else if snot is "another" doCommandAnother else if snot is "lastnotleast" doCommandLastNotLeast else # uh oh answer "ruh roh." end if # snot is "first" this assumes that the names of the handlers I would be calling are not named like the ones in the example, because if they were, you could also put the short name of the target into snot put "doCommand" & snot into toDo try do toDo catch e answer "ruh roh." end try On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > I've noticed that in a lot of the example code I've seen recently, > there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example > from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) > directly, and I'm wondering whether there are advantages or preferences > for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From MikeKerner at roadrunner.com Wed Jun 22 09:50:50 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:50:50 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: wupz. - i forgot the THEN's after each of the ELSE IF's too many languages on the same project swimming in my brain On Wed, Jun 22, 2022 at 9:46 AM Mike Kerner wrote: > For an example like a session during LCG, throwing everything into a > single script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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." > -- 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." From ambassador at fourthworld.com Wed Jun 22 10:09:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 07:09:09 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Martin Koob wrote: > Hi Richard > > Thanks for the explanation. I think it is a helpful term or > distinction to have. I think it would be good to actually have > that term with a formal definition published by LiveCode or > the community with references to BSON so it will show up in > web searches for either term to lead people to LiveCode. Maybe > a start would be to introduce it in the forums. I've been using the term for years whenever I discuss LC encoded arrays. A few others have as well, tho not many. If LC Ltd finds it useful for orienting newcomers to LC they could include it in the Dictionary's glossary, and perhaps sprinkle use of it in places where "LSON" can serve as a shorthand for "encoded associative array". > Just a question though how is what you define as LSON different > from JSON. Is it a different way of serializing LiveCode native > arrays? LSON is the LC-engine-native way to serialize LC arrays. JSON is the JavaScript-engine-native way to serialize JS objects. BSON is the MongoDB-engine-native way to serialize document objects. They're similar only in that each is purpose-built for its respective scripting engine. LSON is to LC what JSON is to JavaScript. But they're structurally very different, as different as LC associative arrays are from JavaScript's objects. > Is there a way that LiveCode developers can have access to it directly > through LCB or is it accessible in the realm of the engine only. I haven't yet had occasion to use LC Builder in production, so I'm not sure if that language also offers some form of LC Script's arrayEncode/arrayDecode. Given how central arrays are to working in LC I'd be surprised if LCB doesn't include support for array serialization. -- Richard Gaskin Fourth World Systems From tom at makeshyft.com Wed Jun 22 11:01:05 2022 From: tom at makeshyft.com (Tom Glod) Date: Wed, 22 Jun 2022 11:01:05 -0400 Subject: arrayencode In-Reply-To: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> References: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Message-ID: Hello Richard, thanks for the detailed answer. There are 2 reasons why I am considering this. 1. I can skip the encoding and decoding from and to json. 2. it supports binary, and does not require base encoding and its 33% inflation. For interoperability for the users, JSON is the way to go for sure. But for throughput between the UI Layer and "background service" I would love a way to just skip all the extra steps and send the serialized array to be unserialized into an array or map directly. I was hoping this was easy. I may ask you for your notes in the future, after I have a chat with Kevin and Mark about it. Thanks again, Tom On Wed, Jun 22, 2022 at 10:10 AM Richard Gaskin via use-livecode < use-livecode at lists.runrev.com> wrote: > Martin Koob wrote: > > > Hi Richard > > > > Thanks for the explanation. I think it is a helpful term or > > distinction to have. I think it would be good to actually have > > that term with a formal definition published by LiveCode or > > the community with references to BSON so it will show up in > > web searches for either term to lead people to LiveCode. Maybe > > a start would be to introduce it in the forums. > > I've been using the term for years whenever I discuss LC encoded arrays. > A few others have as well, tho not many. If LC Ltd finds it useful for > orienting newcomers to LC they could include it in the Dictionary's > glossary, and perhaps sprinkle use of it in places where "LSON" can > serve as a shorthand for "encoded associative array". > > > > Just a question though how is what you define as LSON different > > from JSON. Is it a different way of serializing LiveCode native > > arrays? > > LSON is the LC-engine-native way to serialize LC arrays. > > JSON is the JavaScript-engine-native way to serialize JS objects. > > BSON is the MongoDB-engine-native way to serialize document objects. > > They're similar only in that each is purpose-built for its respective > scripting engine. LSON is to LC what JSON is to JavaScript. > > But they're structurally very different, as different as LC associative > arrays are from JavaScript's objects. > > > > Is there a way that LiveCode developers can have access to it directly > > through LCB or is it accessible in the realm of the engine only. > > I haven't yet had occasion to use LC Builder in production, so I'm not > sure if that language also offers some form of LC Script's > arrayEncode/arrayDecode. Given how central arrays are to working in LC > I'd be surprised if LCB doesn't include support for array serialization. > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:10:57 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:10:57 +0200 Subject: Error message that vector icon widget missing when building iOS standalone Message-ID: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Hi, I have here an stack from which i created a standalone from in January. Today i needed to build a new version to get it running on iOS 15.5 When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Anyway, I checked my stack if that widget is somewhere, but cannot find it. I've reinstallled the Vectore Icon widget again and the build process was successful. Then i've unloaded the widget and rebuild the standalone again and the build was also successful. But as soon as i uninstall that widget i get that error. Does anyone have an idea where i can search the complete stack and its substacks for that widget? Btw.: For what exactly is that widget. To be honest i don't have a clue. Regards, Matthias From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:14:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:14:34 +0200 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: > Am 22.06.2022 um 17:10 schrieb matthias rebbe via use-livecode : > > Hi, > > I have here an stack from which i created a standalone from in January. > > Today i needed to build a new version to get it running on iOS 15.5 > > > When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". > > I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Of course the Vector Icon widget was not installed anymore > Anyway, I checked my stack if that widget is somewhere, but cannot find it. > > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 11:18:07 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 15:18:07 +0000 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Richard I think I hear you say that JSON is an alternative to arrayEncode? What about storing to SQL blob and binary files? Will it suffice? I'd consider converting all my arrayEncoding to JSON if so. Bob S > On Jun 21, 2022, at 19:43 , Richard Gaskin via use-livecode wrote: > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. From ambassador at fourthworld.com Wed Jun 22 12:02:10 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:02:10 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Tom Glod wrote: > Hello Richard, thanks for the detailed answer. > There are 2 reasons why I am considering this. > > 1. I can skip the encoding and decoding from and to json. > 2. it supports binary, and does not require base encoding and its > 33% inflation. > > For interoperability for the users, JSON is the way to go for sure. > But for throughput between the UI Layer and "background service" I > would love a way to just skip all the extra steps and send the > serialized array to be unserialized into an array or map directly. > > I was hoping this was easy. If you don't need interoperability with non-LiveCode systems, the choice couldn't be easier: LSON is the LC way. But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. What did I miss? > I may ask you for your notes in the future, after I have a chat with > Kevin and Mark about it. If you're talking with Mark you won't need my notes. He knows a thing or two about LC's array formats. :) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 12:13:02 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:13:02 -0700 Subject: arrayencode In-Reply-To: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Message-ID: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Bob Sneidar wrote: > Richard I think I hear you say that JSON is an alternative to > arrayEncode? I'm apparently writing so badly maybe I should skip the shorthand "LSON" and just write the full form: "output from LC's built-in arrayEncode". I'd adopted "LSON" to help position its role as the LC-native way to transport and store array data, similar to the role of JSON in JavaScript workflows or BSON within MongoDB systems. When you need interoperability, there's no longer much of a choice: JSON is the de facto standard. Though highly specific to how JavaScript works, browsers are so ubiquitous that most languages other than JavaScript now have some means of transforming JSON into a format that can be used internally, as LC does with its JSONtoArray and ArrayToJSON functions. But when all producers and consumers of data in a system use the LC engine, LSON (output from LC's built-in arrayEncode) is the with-the-grain choice. > What about storing to SQL blob and binary files? Will it suffice? I'd > consider converting all my arrayEncoding to JSON if so. LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. -- Richard Gaskin Fourth World Systems From bobsneidar at iotecdigital.com Wed Jun 22 12:30:55 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 16:30:55 +0000 Subject: arrayencode In-Reply-To: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Message-ID: Okay I looked up JSON and can see these are two different animals. JSON looks like an xml-ish sort of format or a bit like the PDF fdf format for data files. (In fact, now that I think about it Adobe may be using JSON as their format. Bob S > On Jun 22, 2022, at 09:13 , Richard Gaskin via use-livecode wrote: > > > What about storing to SQL blob and binary files? Will it suffice? I'd > > consider converting all my arrayEncoding to JSON if so. > > LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. > > -- > Richard Gaskin > Fourth World Systems From jacque at hyperactivesw.com Wed Jun 22 15:41:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 22 Jun 2022 14:41:02 -0500 Subject: Stylistic question. In-Reply-To: References: Message-ID: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:49:51 AM Mike Kerner via use-livecode wrote: > For an example like a session during LCG, throwing everything into a single > script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 16:24:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 20:24:40 +0000 Subject: Stylistic question. In-Reply-To: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Well then Navigator is for you! If an object has a behavior and no script of it's own, it's color in the list is green. If it has a script but no behavior, it's color is blue. If it has both, it's purple. Simply double clicking an object opens it's behavior script if it has one, and it's native script if it doesn't. You don't have to keep track of anything anymore. Bob S > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode wrote: > > I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. > > The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From alex at tweedly.net Wed Jun 22 19:31:38 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:31:38 +0100 Subject: arrayencode In-Reply-To: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: > [ ... about using JSON ... ] > But if you don't need interoperability, you wouldn't need to write a > parser, since LC includes a good one built into the engine. > > What did I miss? > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? The parser "built-in" seems to work fine in the IDE, but not on the server : > set the errormode to inline > put the version > > put "{'name':'asdf'}" into t > replace "'" with quote in t > put JSONtoarray(t) into tA > put the keys of tA > fails with - file "/home/alextwee/public_html/rampuk/tJSON.lc" row 7, col 5: Function: error in function handler (JSONtoarray) row 7, col 5: put: error in expression (there's no mention of any platform restricitons in the dictionary). I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, which then fails with "error in function handler mergJSONDecode. (I must admit I encountered this a while ago, figured it was probably a temporary issue so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. I can't believe this problem isn't causing widespread problems, so it's probably something specific about me, or my on-rev account. If anyone has suggestions, I'll try them; if not, I'll put it as a bug report into QCC see what happens. Alex. From ambassador at fourthworld.com Wed Jun 22 19:38:27 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 16:38:27 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: Alex Tweedly wrote: > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? > > The fact that Livecode's support for JSON is, hmmm, mediocre at > best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server Interesting take. Thanks. I'd read Tom's post as being about LSON, with LC in both producer and consumer roles, which would make a JavaScript-optimized format unnecessary. Perhaps I'd misunderstood. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Wed Jun 22 19:50:05 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:50:05 +0100 Subject: arrayencode In-Reply-To: References: Message-ID: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> On 23/06/2022 00:38, Richard Gaskin via use-livecode wrote: > > Interesting take. Thanks. I'd read Tom's post as being about LSON, > with LC in both producer and consumer roles, which would make a > JavaScript-optimized format unnecessary.  Perhaps I'd misunderstood. > No, you didn't misunderstand. I misread your earlier post.  Your reference to  "built-in parser" was indeed about LSON, and obviously so;  I just misread it as being about JSON. Nevertheless, my central point remains (afact) valid - the support for JSON in Livecode seems incomplete, and in particular it seems flaky/missing on LCServer. Alex. From ambassador at fourthworld.com Wed Jun 22 20:00:41 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:00:41 -0700 Subject: arrayencode In-Reply-To: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> References: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> Message-ID: <7facfb24-94c8-865a-7832-59966128bd8e@fourthworld.com> Alex Tweedly wrote: > Nevertheless, my central point remains (afact) valid - the support > for JSON in Livecode seems incomplete, and in particular it seems > flaky/missing on LCServer. Making externals easily findable by the LC Server engine should be a quick fix for them, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 20:11:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:11:09 -0700 Subject: How to color a "cell"? Message-ID: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> I need to set the backgroundColor of a complete "cell", where "cell" is defined as the portion of a row in a table field between tabs when the vGrid is set. I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From MikeKerner at roadrunner.com Wed Jun 22 21:11:44 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 21:11:44 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: J.: Not true on the remote debugging. Everything I write is for mobes. Literally everything. Except for the server code for the mobes, but comparatively speaking, there are many, many, many more lines in the mobe code than there is in the server code. All of these behaviors are in script-only-stacks. I have zero difficulty debugging them with the remote debugger. I have not found that I have too many files, but I also organize them into folders, as needed, and I do just about all of my editing in Sublime, which makes keeping the project straight very easy. The dislike I have for switch is a personal thing. I get that it's very similar to the way switch is used in other tongues. Maybe it's the way it looks. Maybe it's the break at the end of each segment. I don't know. It always feels clunky to write and it feels clunky to read. On Wed, Jun 22, 2022 at 4:25 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Well then Navigator is for you! If an object has a behavior and no script > of it's own, it's color in the list is green. If it has a script but no > behavior, it's color is blue. If it has both, it's purple. Simply double > clicking an object opens it's behavior script if it has one, and it's > native script if it doesn't. > > You don't have to keep track of anything anymore. > > Bob S > > > > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > I find that too many behavior stacks make it difficult to keep track of > where things are. But the primary downside is that script-only stacks don't > work with remote debugging. That's a big drawback for me since most of my > apps these days are for mobile. I do use behaviors quite a bit, but I put > the scripts into buttons so they can be debugged remotely. Or maybe you > mean you use regular stacks for behaviors? Those would work. > > > > The switch construct is way more flexible than if/then and much cleaner > to read and track. I use them all the time. They're especially useful when > you want to group several conditionals. What don't you like about them? > Just curious. > > > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Thu Jun 23 05:31:01 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 11:31:01 +0200 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows: > This external has been implemented to encode/decode UTF8 JSON to a LiveCode array as quickly as possible. Currently externals can not work with multi-dimensional LiveCode arrays so the intention is it is used with two functions like this: > > -- pArray - array to be encoded > -- pForceRootType - can force the root to be an object if it looks like an array > -- pPretty - include whitespace > function ArrayToJSON pArray,pForceRootType,pPretty > repeat for each key tKey in pArray > if pArray[tKey] is an array then > put "}"&ArrayToJSON(pArray[tKey]) into pArray[tKey] > end if > end repeat > return(mergJSONEncode("pArray",pForceRootType,pPretty)) > end ArrayToJSON > > function JSONToArray pJSON > local tArray,tKeys > repeat for each line tKey in mergJSONDecode(pJSON,"tArray") > put JSONToArray(tArray[tKey]) into tArray[tKey] > end repeat > return tArray > end JSONToArray > > For most cases the above is all the documentaion you will need. There are however some quirks to the external you might need to know about. Another option would be to load the JSON extension and to use the JsonImport() function. Ralf On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: > > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? >> > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server : > >> > set the errormode to inline >> put the version >> >> put "{'name':'asdf'}" into t >> replace "'" with quote in t >> put JSONtoarray(t) into tA >> put the keys of tA >> > fails with - > > file "/home/alextwee/public_html/rampuk/tJSON.lc" >   row 7, col 5: Function: error in function handler (JSONtoarray) >   row 7, col 5: put: error in expression > > (there's no mention of any platform restricitons in the dictionary). > > I tried copying in the sample ode for wrapping JSONToArray around > mergJSONDecode, > which then fails with "error in function handler mergJSONDecode. > > > (I must admit I encountered this a while ago, figured it was probably a > temporary issue > so I replaced JSON by LSON, and forgot all about it.) This discussion > prompted me to re-try it. > > I can't believe this problem isn't causing widespread problems, so it's > probably > something specific about me, or my on-rev account. If anyone has > suggestions, I'll > try them; if not, I'll put it as a bug report into QCC see what happens. > > Alex. From alex at tweedly.net Thu Jun 23 08:23:04 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 13:23:04 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: > Hi Alex, > > the JSONtoArray() function is part of the mergJSON external. > The README of this external describes how to use this function > and it's counterpart JSONtoArray as follows: > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > Another option would be to load the JSON extension and to use > the JsonImport() function. > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). I can't find anything about loading extensions other than what to do in the IDE. How do you load extensions to LC Server ?  On a shared web provider ?  (on-rev) Thanks, Alex > > Ralf > > > > On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >> >> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>> [ ... about using JSON ... ] >>> But if you don't need interoperability, you wouldn't need to write a >>> parser, since LC includes a good one built into the engine. >>> >>> What did I miss? >>> >> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >> >> The parser "built-in" seems to work fine in the IDE, but not on the >> server : >> >>> >> set the errormode to inline >>> put the version >>> >>> put "{'name':'asdf'}" into t >>> replace "'" with quote in t >>> put JSONtoarray(t) into tA >>> put the keys of tA >>> >> fails with - >> >> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>    row 7, col 5: Function: error in function handler (JSONtoarray) >>    row 7, col 5: put: error in expression >> >> (there's no mention of any platform restricitons in the dictionary). >> >> I tried copying in the sample ode for wrapping JSONToArray around >> mergJSONDecode, >> which then fails with "error in function handler mergJSONDecode. >> >> >> (I must admit I encountered this a while ago, figured it was probably >> a temporary issue >> so I replaced JSON by LSON, and forgot all about it.) This discussion >> prompted me to re-try it. >> >> I can't believe this problem isn't causing widespread problems, so >> it's probably >> something specific about me, or my on-rev account. If anyone has >> suggestions, I'll >> try them; if not, I'll put it as a bug report into QCC see what happens. >> >> Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 23 08:41:38 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 23 Jun 2022 08:41:38 -0400 Subject: How to color a "cell"? In-Reply-To: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> References: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> Message-ID: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Richard. I think this was discussed on the forum a while back. I do not believe you can do what you want without another control overlying the “rect” of the “cell”. Craig > On Jun 22, 2022, at 8:11 PM, Richard Gaskin via use-livecode wrote: > > I need to set the backgroundColor of a complete "cell", where "cell" is > defined as the portion of a row in a table field between tabs when the > vGrid is set. > > I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. > > Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? > > (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 23 12:08:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 23 Jun 2022 12:08:20 -0400 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <60FF3160-6D3C-40B7-9785-F34E439A4CA6@rogers.com> Hi There is a confirmed bug in bugzilla regarding loading of the mergJSON library. https://quality.livecode.com/show_bug.cgi?id=21223 I ran into it when building a standalone. I didn’t cause a problem in the IDE. In the standalone settings ‘Inclusions’ tab if I chose 'Search for required inclusions when saving the standalone application’ The app would not work properly when those commands were called. The work around is in the Inclusions tab choose 'Select inclusions for the standalone application' And then manually select the inclusion for mergJSON I reported the bug but it was marked a duplicate. I describe my workaround there. https://quality.livecode.com/show_bug.cgi?id=23736 I also have a demo stack showing the problem there. Also check if you have a 32 or 64 bit version of mergJSON. I have had mergJSON installed for a long time and while I was trying to trouble shoot this issue I found I had a few copies of mergJSON in the My LiveCode folder in different locations. I found one was created in 2013 which I think was 32 bit so I removed that and replaced it with one in another location created in 2019. Martin > On Jun 23, 2022, at 8:23 AM, Alex Tweedly via use-livecode wrote: > > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). > > I can't find anything about loading extensions other than what to do in the IDE. > > How do you load extensions to LC Server ? On a shared web provider ? (on-rev) > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>> row 7, col 5: Function: error in function handler (JSONtoarray) >>> row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so it's probably >>> something specific about me, or my on-rev account. If anyone has suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Thu Jun 23 12:48:05 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 18:48:05 +0200 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: On 23.06.22 14:23, Alex Tweedly via use-livecode wrote: > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says > that those functions are provided in > thews.goulding.script-library.mergjson library, so (I think) I shouldn't > need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to > "handler not found: mergJSONDecode" Hi Alex, have you added the mergJSON External to your server installation? I have just tested this again, actually it should work. My LC Server version is 9.6.6. > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but > I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON > extension ...". I wasn't aware I had to load those extensions which are > already part of the standard package (maybe I did that years ago and > have had time to forget :-). > > I can't find anything about loading extensions other than what to do in > the IDE. > > How do you load extensions to LC Server ?  On a shared web provider ? > (on-rev) You guessed it, use "load extension", example (tested on on-rev): load extension from file "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" Ralf > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a >>>> parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the >>> server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>>    row 7, col 5: Function: error in function handler (JSONtoarray) >>>    row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around >>> mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably >>> a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion >>> prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so >>> it's probably >>> something specific about me, or my on-rev account. If anyone has >>> suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. From jacque at hyperactivesw.com Thu Jun 23 12:59:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 11:59:02 -0500 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:14:45 PM Mike Kerner via use-livecode wrote: > All of these behaviors are in script-only-stacks. I have zero difficulty > debugging them with the remote debugger. From bobsneidar at iotecdigital.com Thu Jun 23 13:03:32 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:03:32 +0000 Subject: Stylistic question. In-Reply-To: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints are working for me. Try Clear All Breakpoints from the SE Debug menu (I think it will only clear breakpoints from open scripts though.) Also in the SE under the Breakpoints tab, you can uncheck all the existing breakpoints. Bob S > On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode wrote: > > Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From jacque at hyperactivesw.com Thu Jun 23 13:25:15 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 12:25:15 -0500 Subject: Stylistic question. In-Reply-To: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Message-ID: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 23, 2022 12:05:27 PM Bob Sneidar via use-livecode wrote: > Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints > are working for me. Try Clear All Breakpoints from the SE Debug menu (I > think it will only clear breakpoints from open scripts though.) Also in the > SE under the Breakpoints tab, you can uncheck all the existing breakpoints. > > Bob S > > >> On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode >> wrote: >> >> Something must have changed or you use a debugging method different from >> mine. Red dot breakpoints do not work in script only stacks because those >> stacks have no custom properties, which is where breakpoints are kept. I >> couldn't get scripted breakpoints to work either but I may have forgotten >> to save correctly. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 23 13:33:48 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:33:48 +0000 Subject: Stylistic question. In-Reply-To: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: OIC I didn't grok you were talking about standalone apps. Bob S > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode wrote: > > Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Thu Jun 23 13:56:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:56:42 +0000 Subject: Using card with the long id in a variable Message-ID: <7818011F-8B59-4A15-8A19-9FEB80150E3C@iotecdigital.com> Hi all. I just ran across an interesting "bug". In the IDE I had erroneously used the keyword "card" with a reference to the long id of the card as in card pParentCard. Since the long id already contains the keyword card it resolved to card "card ID 12345 of stack x of stacks". The strange thing is that in the IDE this worked and did not throw an error. But in a standalone it did. Of course, the proper retort would be, "Well that don't do that." Bob S From ambassador at fourthworld.com Thu Jun 23 14:28:29 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 11:28:29 -0700 Subject: How to color a "cell"? In-Reply-To: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Message-ID: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Craig wrote: > Richard wrote: >> I had hoped the paragraph-level formatting options introduced in >> v5.x would help, but alas as far as I can tell I can only set the >> backgroundColor of a run of text, not the full cell. > > I think this was discussed on the forum a while back. I do not believe > you can do what you want without another control overlying the rect > of the cell. Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. From the v5.5.4 Release Notes: - The backgroundColor property allows the color of the content area (inside any paragraph border) to be filled (note that strictly speaking this property is not inherited, but the effect is the same as if it was as the background of the field is rendered before the paragraphs are so the background color at the field level will show through to the paragraph if the paragraph has no background color). - The borderWidth property determines the width of the border to draw around the paragraph. Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. I was hoping I was just using it wrong. Here's how I set it in my tests: set the backgroundcolor of paragraph 2 of fld 1 to yellow Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From jacque at hyperactivesw.com Thu Jun 23 14:57:45 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 13:57:45 -0500 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: On 6/22/22 10:10 AM, matthias rebbe via use-livecode wrote: > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. I think that's the SVG widget that allows you to use SVG as button icons, or any other image. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From alex at tweedly.net Thu Jun 23 15:26:11 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:26:11 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: <411f4bc7-f62f-b844-0653-438476acd6e9@tweedly.net> On 23/06/2022 19:28, Richard Gaskin via use-livecode wrote: > > Thanks. I could get away with setting the backgroundColor of the whole > line, but that does the same as setting the backgroundColor of a > "cell": it draws the color only beneath the portion of the line that > contains text, leaving the rest blank. > Hmmmm - is there a non-visible character that would count as text ? then you could replace all spaces by it, and adjust back later. Alex From alex at tweedly.net Thu Jun 23 15:53:57 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:53:57 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <19c90254-7a32-bae1-f6bc-e5830d41b1b3@tweedly.net> On 23/06/2022 17:48, Ralf Bitter via use-livecode wrote: > > Hi Alex, have you added the mergJSON External to your server installation? No. In fact, I didn't realize I needed to, or even could :-) > You guessed it, use "load extension", example (tested on on-rev): > > load extension from file > "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" > Well, I finally found that file, buried inside the Livecode Application bundle (inside Tools of all places). I don't know how anyone not familiar with command line tools would ever get there. And having uploaded it and then loaded it, JSONImport works !! Thank you Ralf for sticking with me patiently, and everyone else for their help. Now - back to that quick 5-minute test I was going to do 1-1/2 days ago :-( Alex. From mark at livecode.com Thu Jun 23 15:54:55 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 23 Jun 2022 20:54:55 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: IIRC you need to use ‘line’ to set ‘paragraph‘ properties of fields… Sent from my iPhone > On 23 Jun 2022, at 19:29, Richard Gaskin via use-livecode wrote: > > Craig wrote: > > > Richard wrote: > >> I had hoped the paragraph-level formatting options introduced in > >> v5.x would help, but alas as far as I can tell I can only set the > >> backgroundColor of a run of text, not the full cell. > > > > I think this was discussed on the forum a while back. I do not believe > > you can do what you want without another control overlying the “rect” > > of the “cell”. > > Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. > > The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. > > But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. > > From the v5.5.4 Release Notes: > > - The backgroundColor property allows the color of the content area > (inside any paragraph border) to be filled (note that strictly > speaking this property is not inherited, but the effect is the same > as if it was as the background of the field is rendered before the > paragraphs are so the background color at the field level will > ‘show through’ to the paragraph if the paragraph has no background > color). > > - The borderWidth property determines the width of the border to draw > around the paragraph. > > Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. > > So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. > > I was hoping I was just using it wrong. > > Here's how I set it in my tests: > > set the backgroundcolor of paragraph 2 of fld 1 to yellow > > Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? > > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Thu Jun 23 18:54:52 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 15:54:52 -0700 Subject: How to color a "cell"? In-Reply-To: References: Message-ID: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Thanks Mark - works. I could have sworn I'd tried "line" earlier when attempting to set the backgroundColor, and when it failed was when I switched to trying "paragraph". But it works now so I don't mind being mistaken. Oddly, "paragraph" appears to be synonymous with "line" for the borderWidth, borderColor, firstIndent, leftIndent, textAlign, spaceAbove, hGrid, vGrid, and tabs paragraph properties. Near as I can tell backgroundColor is the only paragraph properties where the "paragraph" chunk type isn't synonymous. Should it be? I'm good either way now that I have a solution, but if it would be helpful I could file a bug report/enhancement request. -- Richard Gaskin Fourth World Systems Mark Waddingham wrote: > IIRC you need to use line to set paragraph properties of fields > > On 23 Jun 2022, at 19:29, Richard Gaskin wrote: >> I could get away with setting the backgroundColor of the whole line, >> but that does the same as setting the backgroundColor of a "cell": it >> draws the color only beneath the portion of the line that contains >> text, leaving the rest blank. >> >> The borderWidth and borderColor paragraph properties work as >> expected, affecting the full line whether it's filled with text >> or has no text at all. From MikeKerner at roadrunner.com Thu Jun 23 19:59:58 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 23 Jun 2022 19:59:58 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Red-dotting: A couple of things: 1) I don't use the SE very often, so I have not tried red-dotting before building. However, "BREAKPOINT" works. 2) Once you have the remote debugger up, you can red-dot all you like, and they will stick until the app closes 3) When I'm debugging (like I am, tonight), I have a group of debugging buttons that I have show in the app. One of those is just on mouseUp global lastCommand ask "What" with lastCommand if it is not empty then put it into lastCommand do it end if end mouseUp When the dialog pops up, I type something like breakpoint; send "mouseUp" to someControl and I'm in the debugger, in that control On Thu, Jun 23, 2022 at 1:34 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > OIC I didn't grok you were talking about standalone apps. > > Bob S > > > > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Breakpoints work fine in the IDE. But script only stacks do not retain > them when remote debugging, or at least they didn't for me. Are you talking > about mobile apps? > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > HyperActive Software | http://www.hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From ambassador at fourthworld.com Thu Jun 23 23:40:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 20:40:26 -0700 Subject: Stylistic question. In-Reply-To: References: Message-ID: <6914ec36-b1aa-9a4b-07b8-ffd94924c932@fourthworld.com> J. Landman Gay wrote: > Breakpoints work fine in the IDE. But script only stacks do not > retain them when remote debugging Breakpoints are a runtime-settable property, so those who enjoy C-flavored workflows with lots of tiny text files could save their breakpoints out to text files and have a module load them in again at runtime. Maybe that could be added to any of the tools that turn normal stackfiles into script-only stack files and back again so they can be worked on. Then we could add a tool to handle custom props, turning those into JSON files and back again. Then the UI stuff could still be binary like it is with Apple's tools, and as long as we don't call them stackfiles but call them NIBs instead then it's cool again. :) ::ducking:: #FaFaFaFashion -- Richard Gaskin Fourth World Systems From mark at livecode.com Fri Jun 24 01:24:39 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 06:24:39 +0100 Subject: How to color a "cell"? In-Reply-To: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> References: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Message-ID: <7d81320c68d6cb9c4d54323aa381c6d0@livecode.com> On 2022-06-23 23:54, Richard Gaskin via use-livecode wrote: > Thanks Mark - works. I could have sworn I'd tried "line" earlier when > attempting to set the backgroundColor, and when it failed was when I > switched to trying "paragraph". But it works now so I don't mind being > mistaken. > > Oddly, "paragraph" appears to be synonymous with "line" for the > borderWidth, borderColor, firstIndent, leftIndent, textAlign, > spaceAbove, hGrid, vGrid, and tabs paragraph properties. I suspect you have dontWrap set and possibly 'table-mode'. > Near as I can tell backgroundColor is the only paragraph properties > where the "paragraph" chunk type isn't synonymous. If you check the htmlText you can easily see the difference between using 'paragraph' and 'line' to set the aforementioned properties. When set on 'line' - the properties appear on the 'p' tags, and they have an effect on a per (wrapped) paragraph basis. When set on *all other string chunks* (which reduce to char chunks) - the properties appear as runs in the 'p' tags, and they have an effect on runs of text. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From paul at researchware.com Fri Jun 24 11:07:19 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 11:07:19 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? Message-ID: I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? If interested, please email me directly. From merakosp at gmail.com Fri Jun 24 11:27:19 2022 From: merakosp at gmail.com (panagiotis m) Date: Fri, 24 Jun 2022 18:27:19 +0300 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Hello Paul Not a ffmpeg expert, but have you seen the mediaFoundation library? See the dictionary entry for "mediaFoundationTranscode" - it has a detailed example for concatenating 2 media files. Hope this helps Kind regards, Panos -- On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < use-livecode at lists.runrev.com> wrote: > I am doing some work with Livecode script constructing calls (via > shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there > are any people proficient with ffmpeg wh might be interesting in a small > bit of paid consulting to help with ffmpeg command line syntax for > various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Fri Jun 24 11:36:32 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 24 Jun 2022 17:36:32 +0200 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: <49123771-6CD7-43CE-8B2E-38DE13F90A67@m-r-d.de> In one of my projects i do use ffmpeg for some audio conversion and id3 tag handling. For me the tool ff-Works (https://ffworks.net) helped me a lot. Normally its a GUI for ffmpeg, but the good thing is the user is also able to see the command line that was used for a task. So in case no one other jumps in and if you are on Mac maybe this tool is also of help for you, i Regards, Matthias > Am 24.06.2022 um 17:07 schrieb Paul Dupuis via use-livecode : > > I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 24 12:05:44 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 12:05:44 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Panos, Thank you! I was unaware of the mediaFoundation library - I had thought that we'd not see support under LiveCode 10 switches from DirectShow to MediaFoundation. That said, our application is macOS and Windows and the appeal of ffmpeg via shell is that the same code will work across platforms for us. Still, for other projects, I'm very happy to have been made aware of the mediaFoundation library! On 6/24/2022 11:27 AM, panagiotis m via use-livecode wrote: > Hello Paul > > Not a ffmpeg expert, but have you seen the mediaFoundation library? See the > dictionary entry for "mediaFoundationTranscode" - it has a detailed example > for concatenating 2 media files. > > Hope this helps > > Kind regards, > Panos > -- > > On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I am doing some work with Livecode script constructing calls (via >> shell()) to ffmpeg to perform some video/audio concatenation. >> >> I have barely learned a tiny bit of ffmpeg and and wondering if there >> are any people proficient with ffmpeg wh might be interesting in a small >> bit of paid consulting to help with ffmpeg command line syntax for >> various operations? >> >> If interested, please email me directly. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Fri Jun 24 12:23:02 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 17:23:02 +0100 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: On 2022-06-24 17:05, Paul Dupuis via use-livecode wrote: > I was unaware of the mediaFoundation library - I had thought that we'd > not see support under LiveCode 10 switches from DirectShow to > MediaFoundation. Its actually been buried in the product (business/pro features) for a long time - I had forgotten about it until relatively recently... > That said, our application is macOS and Windows and the appeal of > ffmpeg via shell is that the same code will work across platforms for > us. FWIW, I *think* mergAV can do similar things on macOS* to the mediafoundation external on Windows - although the APIs, while similar, do require different code. However, if you are using ffmpeg for things other than concatenating tracks/movies (i.e. the features those libraries provide) then the separate code needed wouldn't be worth it to save inclusion of ffmpeg. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Fri Jun 24 13:04:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 18:04:06 +0100 Subject: On API keys... Message-ID: <37140621287f3c6183bbebf49e4da698@livecode.com> So this is mainly aimed at Tom Glod due to a question he asked in this afternoon's Feature Focus session which I perhaps did not answer particularly well (and given that it is security related, I figured I should expand on what I said). The question was whether putting an API Key as a LiveCode 'constant', rather than anything else, made it 'more secure' - the answer is 'no more than putting it anywhere else in a password protected script'. However, what I should have probably expanded on is what my understanding on the best practice for API keys in general is... I have come across three kinds of API key in practice: 1) API keys intended to be used from web pages (in client-side code) 2) API keys intended to be used in deployed apps 3) API keys intended to be used for doing secure things How I would advise using them (based on my current understanding, at least) is: TYPE 1 In (1) above you have things like Google Analytics 'product ids' (which aren't strictly API keys I guess, but are similar enough to warrant inclusion) and Google Maps JS keys. As these are intended to be used in client side JavaScript - there is very little, if anything, you can do to protect them directly. For Analytics, since the worse that can happen is that someone can generate fake analytics it doesn't really matter - and the data can be relatively easily filtered and processed to eliminate any dodgy looking submissions. For Maps, it can cost you money if someone else tries to use yours - however, you can restrict the key by the referring website and IP addresses, as well as what the key can do. TYPE 2 In (2) you have things like Google Maps App keys (for Android/iOS) - and all manner of other 'cloud type' services which have (native) app bindings for mobile (and desktop). Many services offer restrictions for these keys too - for example Google Services API keys can be restricted by Android app signing hashes and ids, and iOS app bundle ids. However, in general, these services generally suggest that you ensure that the API key is not extractable directly from the app bundle (after decompressing in general) - i.e. that the key be obfuscated in some fashion and does not appear in plaintext. It is important to note that they do not require any more than this because, at the end of the day, any API key has to be in memory at some point, and indeed has to be transmitted 'over the wire'. If someone has enough access to access memory, then they have enough access to intercept the HTTP requests (even if encrypted - if they really know what they are doing) so obfuscating in the on-disk files of the app is as good as you can get. If these keys are compromised then it is a pain - it might cost you money (as all these services which have them tend to charge by use) - and, if embedded in an app, will require an app update to replace. TYPE 3 Certain services require (sometimes in the TOS!) that their API keys *never* leave a secure bubble which you control - this means they must never appear in deployed apps or in files transmitted to the browser. Payment gateway API keys will pretty much always fall into this category - Stripe is a good example. The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. Indeed, services which require this tend to design their APIs for the intention of being used on a server. WHAT TO DO IN LIVECODE If you are dealing with a type 1 key then you really don't have to worry - they are designed to be used in a context which offers zero ability to protect them, so including them in a deployed app (in particular) is more secure out of the gate than in their intended use in a webpage. [ Of course, whether you are actually *allowed* to use their services from anything other than websites is another matter - and entirely defined by their TOS - but I digress! ] If you are dealing with a type 2 key then the requirements put on their use in deployed (native) apps is more than catered for by having the key in script, in a password protected stack - for example, as a constant return value of a function, or indeed as a constant defined in the script which is talking to the API. With this, the key will not appear in plaintext in any of the files included in the built app (even after the container is unzipped). [ I should note here that custom properties values also do not appear in plaintext in any of the files of a built app - however, having them in a password protected script offers an extra level of protection ]. If you are dealing with a type 3 key then you must only use that key via a server - this means you need to set up server side scripts which your app then talks to via a suitable protocol (e.g. HTTP / REST) to perform the operations which use it. The key must never be sent over the wire between your app and the server as this could be intercepted by someone who is using your app locally. BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN Of course, the most secure way to use API keys of all types is to have them only ever on a server - however, this is only really suitable if your app is 'always online' and you can do all operations on the server - many services this doesn't work, e.g. Google Maps. However, there is a reasonable middle ground which offers a little more security (and convenience, in the case of compromise!). If your app can only be used by a user *after* they login locally then the best practice for type 1 and type 2 keys (as mentioned previously type 3 keys must NEVER leave your server!) is to not store the keys in the deployed app at all. Instead, once the user has successfully authenticated have the server send the API keys the app needs to use. You can either do this once per session, or if your app allows 'offline' use as long as they have signed in before (on mobile) you can use something like the 'secureKey' library to store them in the mobile devices 'trusted' store. This approach has two main benefits: 1) The API keys are never actually in a file someone can sit and dissect at will (even obfuscated, there are some very persistent bad actors out there!) 2) If your API key is compromised (or you do need to change it, for whatever reason) you can do so without having to have everyone install an app update with the new one in. Anyway, that's probably more than Tom probably needed to know (or perhaps knew already), but hopefully it is helpful (at least for those who have to deal with API keys and such things!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From tom at makeshyft.com Fri Jun 24 13:40:22 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 13:40:22 -0400 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: Mark, thanks for taking the time to give this in-depth answer. This will come in handy for others as well I am sure. Have a great weekend. Tom On Fri, Jun 24, 2022 at 1:04 PM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > So this is mainly aimed at Tom Glod due to a question he asked in this > afternoon's Feature Focus session which I perhaps did not answer > particularly well (and given that it is security related, I figured I > should expand on what I said). > > The question was whether putting an API Key as a LiveCode 'constant', > rather than anything else, made it 'more secure' - the answer is 'no > more than putting it anywhere else in a password protected script'. > > However, what I should have probably expanded on is what my > understanding on the best practice for API keys in general is... > > I have come across three kinds of API key in practice: > > 1) API keys intended to be used from web pages (in client-side code) > > 2) API keys intended to be used in deployed apps > > 3) API keys intended to be used for doing secure things > > How I would advise using them (based on my current understanding, at > least) is: > > TYPE 1 > > In (1) above you have things like Google Analytics 'product ids' (which > aren't strictly API keys I guess, but are similar enough to warrant > inclusion) and Google Maps JS keys. > > As these are intended to be used in client side JavaScript - there is > very little, if anything, you can do to protect them directly. > > For Analytics, since the worse that can happen is that someone can > generate fake analytics it doesn't really matter - and the data can be > relatively easily filtered and processed to eliminate any dodgy looking > submissions. > > For Maps, it can cost you money if someone else tries to use yours - > however, you can restrict the key by the referring website and IP > addresses, as well as what the key can do. > > TYPE 2 > > In (2) you have things like Google Maps App keys (for Android/iOS) - and > all manner of other 'cloud type' services which have (native) app > bindings for mobile (and desktop). > > Many services offer restrictions for these keys too - for example Google > Services API keys can be restricted by Android app signing hashes and > ids, and iOS app bundle ids. > > However, in general, these services generally suggest that you ensure > that the API key is not extractable directly from the app bundle (after > decompressing in general) - i.e. that the key be obfuscated in some > fashion and does not appear in plaintext. > > It is important to note that they do not require any more than this > because, at the end of the day, any API key has to be in memory at some > point, and indeed has to be transmitted 'over the wire'. If someone has > enough access to access memory, then they have enough access to > intercept the HTTP requests (even if encrypted - if they really know > what they are doing) so obfuscating in the on-disk files of the app is > as good as you can get. > > If these keys are compromised then it is a pain - it might cost you > money (as all these services which have them tend to charge by use) - > and, if embedded in an app, will require an app update to replace. > > TYPE 3 > > Certain services require (sometimes in the TOS!) that their API keys > *never* leave a secure bubble which you control - this means they must > never appear in deployed apps or in files transmitted to the browser. > Payment gateway API keys will pretty much always fall into this category > - Stripe is a good example. > > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. > > Indeed, services which require this tend to design their APIs for the > intention of being used on a server. > > WHAT TO DO IN LIVECODE > > If you are dealing with a type 1 key then you really don't have to worry > - they are designed to be used in a context which offers zero ability to > protect them, so including them in a deployed app (in particular) is > more secure out of the gate than in their intended use in a webpage. > > [ Of course, whether you are actually *allowed* to use their services > from anything other than websites is another matter - and entirely > defined by their TOS - but I digress! ] > > If you are dealing with a type 2 key then the requirements put on their > use in deployed (native) apps is more than catered for by having the key > in script, in a password protected stack - for example, as a constant > return value of a function, or indeed as a constant defined in the > script which is talking to the API. With this, the key will not appear > in plaintext in any of the files included in the built app (even after > the container is unzipped). > > [ I should note here that custom properties values also do not appear in > plaintext in any of the files of a built app - however, having them in a > password protected script offers an extra level of protection ]. > > If you are dealing with a type 3 key then you must only use that key via > a server - this means you need to set up server side scripts which your > app then talks to via a suitable protocol (e.g. HTTP / REST) to perform > the operations which use it. The key must never be sent over the wire > between your app and the server as this could be intercepted by someone > who is using your app locally. > > BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN > > Of course, the most secure way to use API keys of all types is to have > them only ever on a server - however, this is only really suitable if > your app is 'always online' and you can do all operations on the server > - many services this doesn't work, e.g. Google Maps. However, there is a > reasonable middle ground which offers a little more security (and > convenience, in the case of compromise!). > > If your app can only be used by a user *after* they login locally then > the best practice for type 1 and type 2 keys (as mentioned previously > type 3 keys must NEVER leave your server!) is to not store the keys in > the deployed app at all. > > Instead, once the user has successfully authenticated have the server > send the API keys the app needs to use. You can either do this once per > session, or if your app allows 'offline' use as long as they have signed > in before (on mobile) you can use something like the 'secureKey' library > to store them in the mobile devices 'trusted' store. > > This approach has two main benefits: > > 1) The API keys are never actually in a file someone can sit and > dissect at will (even obfuscated, there are some very persistent bad > actors out there!) > > 2) If your API key is compromised (or you do need to change it, for > whatever reason) you can do so without having to have everyone install > an app update with the new one in. > > Anyway, that's probably more than Tom probably needed to know (or > perhaps knew already), but hopefully it is helpful (at least for those > who have to deal with API keys and such things!). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ahsoftware at sonic.net Fri Jun 24 16:21:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 24 Jun 2022 13:21:10 -0700 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. Or as server environment variables retrieved only by server scripts which are not user-accessible. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Fri Jun 24 18:23:04 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 24 Jun 2022 22:23:04 +0000 Subject: On API keys... In-Reply-To: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> Message-ID: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay on the risk, benefits and rewards in multiple scenarios concerning the storage of keys. I’ve mentioned before that I came up with the idea of “poisoning” the encrypted data before the data was transmitted. If intercepted in transit, the data itself could never be decrypted without knowing how it was poisoned and what was needed to “cleanse” it. And that would require access to either the API of the device doing the corruption or the cleansing, or else someone who knew the method. By using this method, all but physical and social vectors are nullified. And control of those vectors is an illusion. Bob S Sent from my iPhone > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode wrote: > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > >> The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. > > Or as server environment variables retrieved only by server scripts which are not user-accessible. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Fri Jun 24 23:34:25 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 23:34:25 -0400 Subject: On API keys... In-Reply-To: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: This is a great best-practice explanation. Perhaps someone can turn it into a blog post and put it on the site. Thanks again On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay > on the risk, benefits and rewards in multiple scenarios concerning the > storage of keys. I’ve mentioned before that I came up with the idea of > “poisoning” the encrypted data before the data was transmitted. If > intercepted in transit, the data itself could never be decrypted without > knowing how it was poisoned and what was needed to “cleanse” it. And that > would require access to either the API of the device doing the corruption > or the cleansing, or else someone who knew the method. > > By using this method, all but physical and social vectors are nullified. > And control of those vectors is an illusion. > > Bob S > > Sent from my iPhone > > > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > > > >> The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users - > usually the web-server user which is running the backend scripts which > needs to make the requests. > > > > Or as server environment variables retrieved only by server scripts > which are not user-accessible. > > > > -- > > Mark Wieder > > ahsoftware at gmail.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 27 08:26:49 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 14:26:49 +0200 Subject: Is Anyone on the list still using macOS 10.11? Message-ID: Hi, is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. The apps are just with one answer dialog. There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). The results of the testing would me help to enhance my LC Notarizing lesson. Regards, Matthias From harrison at all-auctions.com Mon Jun 27 09:55:07 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 09:55:07 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Hi Matthias, macOS 10.11 El Capitan? You shouldn’t be testing with that at all. It’s 6-7 years out of date now. What kind of testing do you need? Good luck! Rick > On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 10:14:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 16:14:38 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Message-ID: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Hi Rick, it's even older. I meant 10.10 (Yosemite). ;) I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. And i just need a confirmation, if that's the case Regards, Matthias > Am 27.06.2022 um 15:55 schrieb Rick Harrison via use-livecode : > > Hi Matthias, > > macOS 10.11 El Capitan? > > You shouldn’t be testing with that at all. It’s 6-7 years out of date now. > > What kind of testing do you need? > > Good luck! > > Rick > >> On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Mon Jun 27 10:15:08 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 27 Jun 2022 10:15:08 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> I still have a system running High Sierra and one running El Capatan. I can test on either of those. On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From heather at livecode.com Mon Jun 27 11:03:46 2022 From: heather at livecode.com (Heather Laine) Date: Mon, 27 Jun 2022 16:03:46 +0100 Subject: On API keys... In-Reply-To: References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: Yes indeed. See Blog. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 25 Jun 2022, at 04:34, Tom Glod via use-livecode wrote: > > This is a great best-practice explanation. Perhaps someone can turn it into > a blog post and put it on the site. > Thanks again > > > > On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay >> on the risk, benefits and rewards in multiple scenarios concerning the >> storage of keys. I’ve mentioned before that I came up with the idea of >> “poisoning” the encrypted data before the data was transmitted. If >> intercepted in transit, the data itself could never be decrypted without >> knowing how it was poisoned and what was needed to “cleanse” it. And that >> would require access to either the API of the device doing the corruption >> or the cleansing, or else someone who knew the method. >> >> By using this method, all but physical and social vectors are nullified. >> And control of those vectors is an illusion. >> >> Bob S >> >> Sent from my iPhone >> >>> On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: >>> >>>> The only way to use these keys is from server scripts running on a >> server which you do your best to maintain the security of. Ideally these >> keys should be stored in files which are only readable by specific users - >> usually the web-server user which is running the backend scripts which >> needs to make the requests. >>> >>> Or as server environment variables retrieved only by server scripts >> which are not user-accessible. >>> >>> -- >>> Mark Wieder >>> ahsoftware at gmail.com >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 11:28:07 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 15:28:07 +0000 Subject: Audio in Background Message-ID: Happy Monday! I am using the native player control (on both iOS and Android). It's working quite well! The only problem I have is that the background audio doesn't seem to honor this control. If I play audio in a native browser, it works. Is there something I need to set or do to get it to work? I have "Android Background Audio" selected in application settings and "Background Audio" checked in the "Requirements" panel. Thanks in advance! -Dan From merakosp at gmail.com Mon Jun 27 11:47:52 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:47:52 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From merakosp at gmail.com Mon Jun 27 11:50:30 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:50:30 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, And probably you need to check "Background Audio" in the iOS standalone settings (in Requirements tab) Cheers, Panos -- On Mon, 27 Jun 2022 at 18:47, panagiotis m wrote: > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Happy Monday! I am using the native player control (on both iOS and >> Android). It's working quite well! The only problem I have is that the >> background audio doesn't seem to honor this control. If I play audio in a >> native browser, it works. Is there something I need to set or do to get >> it to work? I have "Android Background Audio" selected in application >> settings and "Background Audio" checked in the "Requirements" panel. >> >> Thanks in advance! >> -Dan >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From dan at clearvisiontech.com Mon Jun 27 12:25:27 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 16:25:27 +0000 Subject: Audio in Background In-Reply-To: References: Message-ID: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From merakosp at gmail.com Mon Jun 27 13:25:43 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 20:25:43 +0300 Subject: Audio in Background In-Reply-To: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman wrote: > Panos, > > Thank you... That fixed it! The audio continues when the app is sent to > the background. However, the application's audio does not appear in the > Control Center: > > > https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg > > Is this possible? > > > -Dan > > > On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via > use-livecode" use-livecode at lists.runrev.com> wrote: > > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Happy Monday! I am using the native player control (on both iOS and > > Android). It's working quite well! The only problem I have is > that the > > background audio doesn't seem to honor this control. If I play > audio in a > > native browser, it works. Is there something I need to set or do > to get > > it to work? I have "Android Background Audio" selected in > application > > settings and "Background Audio" checked in the "Requirements" panel. > > > > Thanks in advance! > > -Dan > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > From harrison at all-auctions.com Mon Jun 27 14:57:39 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 14:57:39 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Message-ID: Hi Matthias, Sorry, but I am no longer have Yosemite on any of my older Macs. Thanks for the clarification though. Hopefully someone can help you out with this. Cheers, Rick > On Jun 27, 2022, at 10:14 AM, matthias rebbe via use-livecode wrote: > > Hi Rick, > > it's even older. I meant 10.10 (Yosemite). ;) > > I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. > > There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. > There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. > > And i just need a confirmation, if that's the case > > > Regards, > Matthias From ambassador at fourthworld.com Mon Jun 27 15:00:47 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 27 Jun 2022 12:00:47 -0700 Subject: On API keys... In-Reply-To: References: Message-ID: <978d1d63-2eeb-db2a-5ab4-4850339b8f26@fourthworld.com> Heather Laine wrote: > Tom Glod wrote: >> This is a great best-practice explanation. Perhaps someone can turn >> it into a blog post and put it on the site. > > Yes indeed. See Blog. https://livecode.com/best-practice-for-api-keys-and-security/ Tip: Dropping in-bound links to relevant content is a useful organization habit, making it easy for customers, prospects, and searchbots alike to discover the roads that lead to the site where the store lives. -- Richard Gaskin Fourth World Systems From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:09:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:09:04 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: Hi Paul, thanks for your offer. I have sent you a private email with the D/L link. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:15:00 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:15:00 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: I just noticed that High Sierra and El Capitan are higher then 10.10.... I need some one who can test with 10.10. thanks anyway. Regards, Matthias > Am 27.06.2022 um 21:09 schrieb matthias rebbe via use-livecode : > > Hi Paul, thanks for your offer. > > I have sent you a private email with the D/L link. > > Regards, > Matthias > > >> Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : >> >> I still have a system running High Sierra and one running El Capatan. I can test on either of those. >> >> >> On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >>> Hi, >>> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >>> The apps are just with one answer dialog. >>> >>> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >>> >>> The results of the testing would me help to enhance my LC Notarizing lesson. >>> >>> >>> Regards, >>> Matthias >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:18:14 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:18:14 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: No worries, Rick, if i cannot find some one then i just need to setup a VM with Yosemite. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From phil at pdslabs.net Mon Jun 27 15:30:10 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 27 Jun 2022 12:30:10 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: Hi Matthias, If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. Phil Davis On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:49:29 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:49:29 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <5577AD36-D74B-4497-BAEA-720770934A41@m-r-d.de> Phil, thank you very much for your offer. I've sent you the D/L links in a private email. Regards, Matthias > Am 27.06.2022 um 21:30 schrieb Phil Davis via use-livecode : > > Hi Matthias, > > If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. > > Phil Davis > > > On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From scott at elementarysoftware.com Mon Jun 27 15:54:54 2022 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Mon, 27 Jun 2022 12:54:54 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Hello Matthias, I have machines running 10.10.5 and a 10.7.5 if these would be of help. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ > On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:09:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:09:34 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <89675024-0EB4-49BF-A7C6-C058DB857F09@m-r-d.de> Hello Scott, thanks for your offer. I've sent you a private email with the D/L links and a short explanation. Regards, Matthias > Am 27.06.2022 um 21:54 schrieb scott--- via use-livecode : > > Hello Matthias, > I have machines running 10.10.5 and a 10.7.5 if these would be of help. > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email scott at elementarysoftware.com > booth 1-360-734-4701 > ------------------------------------------------------ > >> On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:11:41 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:11:41 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <0EC1B5B2-79B7-4456-A9A9-BE88DFBA2240@m-r-d.de> Thanks to all for your offer to help. I would say 2 testers are enough. ;) So i do not need anymore testers. Regards, Matthias > Am 27.06.2022 um 14:26 schrieb matthias rebbe via use-livecode : > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 17:51:47 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 21:51:47 +0000 Subject: Audio in Background In-Reply-To: References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: <2C9AAE2E-516B-4299-935C-23A7E5CB5B8C@clearvisiontech.com> Panos, Just wanted you to know that adding “iphoneEnableRemoteControl” did the trick! The app received the “remoteControlReceived” message and was able to act on that message even in the background. Sweet! Thank you! Dan Friedman CEO, ClearVision Technologies, LLC Voice: 909/484-2052 http://www.clearvisiontech.com From: panagiotis m Date: Monday, June 27, 2022 at 10:25 AM To: How to use LiveCode Cc: Dan Friedman Subject: Re: Audio in Background Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman > wrote: Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" on behalf of use-livecode at lists.runrev.com> wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Mon Jun 27 23:27:04 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 28 Jun 2022 13:27:04 +1000 Subject: long id trap for the unwary Message-ID: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> If I write put the long id of field 1 of card 1 into tObject; put the text of tObject I get the text of field 1 of card 1, right ? Not necessarily. If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. Sigh, a new version of nsScriptDatabase coming up. Neville From bobsneidar at iotecdigital.com Tue Jun 28 11:34:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 15:34:05 +0000 Subject: long id trap for the unwary In-Reply-To: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> Message-ID: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: function returnTheText pFieldName return the text of field pFieldName of me end returnTheText If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: function extract tParentCard return the text of field 1 of tParentCard end extract Bob S > On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: > > If I write > > put the long id of field 1 of card 1 into tObject; put the text of tObject > > I get the text of field 1 of card 1, right ? Not necessarily. > > If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. > > This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. > > The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. > > Sigh, a new version of nsScriptDatabase coming up. > > Neville > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From harrison at all-auctions.com Tue Jun 28 13:46:23 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Tue, 28 Jun 2022 13:46:23 -0400 Subject: LC Screen Recording? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <883969E2-6C30-45BE-9215-141FBF9613F8@all-auctions.com> I’m wondering if there is a way from within LC to make a video recording of what is going on within a rect in a macOS LC app. Recording audio at the same time would also be a big plus. Anyone with good ideas or suggestions for what I might be able to do? Thanks, Rick From bogdanoff at me.com Tue Jun 28 14:04:48 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 11:04:48 -0700 Subject: long id trap for the unwary In-Reply-To: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: Bob, This makes sense. I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. send … ? Peter Bogdanoff > On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: > > Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. > > If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: > > function returnTheText pFieldName > return the text of field pFieldName of me > end returnTheText > > If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. > > For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: > > function extract tParentCard > return the text of field 1 of tParentCard > end extract > > Bob S > > >> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >> >> If I write >> >> put the long id of field 1 of card 1 into tObject; put the text of tObject >> >> I get the text of field 1 of card 1, right ? Not necessarily. >> >> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >> >> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >> >> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >> >> Sigh, a new version of nsScriptDatabase coming up. >> >> Neville >> >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:07:35 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:07:35 +0000 Subject: long id trap for the unwary In-Reply-To: References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. Sent from my iPhone > On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: > > Bob, > > This makes sense. > > I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. > > send … ? > > Peter Bogdanoff > >> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >> >> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >> >> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >> >> function returnTheText pFieldName >> return the text of field pFieldName of me >> end returnTheText >> >> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >> >> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >> >> function extract tParentCard >> return the text of field 1 of tParentCard >> end extract >> >> Bob S >> >> >>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>> >>> If I write >>> >>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>> >>> I get the text of field 1 of card 1, right ? Not necessarily. >>> >>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>> >>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>> >>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>> >>> Sigh, a new version of nsScriptDatabase coming up. >>> >>> Neville >>> >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:12:10 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:12:10 +0000 Subject: long id trap for the unwary In-Reply-To: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Message-ID: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. Sent from my iPhone > On Jun 28, 2022, at 12:08, Bob Sneidar wrote: > > Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. > > Sent from my iPhone > >> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >> >> Bob, >> >> This makes sense. >> >> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >> >> send … ? >> >> Peter Bogdanoff >> >>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>> >>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>> >>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>> >>> function returnTheText pFieldName >>> return the text of field pFieldName of me >>> end returnTheText >>> >>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>> >>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>> >>> function extract tParentCard >>> return the text of field 1 of tParentCard >>> end extract >>> >>> Bob S >>> >>> >>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>> >>>> If I write >>>> >>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>> >>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>> >>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>> >>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>> >>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>> >>>> Sigh, a new version of nsScriptDatabase coming up. >>>> >>>> Neville >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Tue Jun 28 15:49:22 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 12:49:22 -0700 Subject: long id trap for the unwary In-Reply-To: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Message-ID: <59965883-1445-4B08-A9F1-681537F714F4@me.com> Hi Bob, I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: > > Send IF you need in time. Stupid spell correct. It cannot be me mistyping. > > Sent from my iPhone > >> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >> >> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>> >>> Bob, >>> >>> This makes sense. >>> >>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>> >>> send … ? >>> >>> Peter Bogdanoff >>> >>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>> >>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>> >>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>> >>>> function returnTheText pFieldName >>>> return the text of field pFieldName of me >>>> end returnTheText >>>> >>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>> >>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>> >>>> function extract tParentCard >>>> return the text of field 1 of tParentCard >>>> end extract >>>> >>>> Bob S >>>> >>>> >>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>> >>>>> If I write >>>>> >>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>> >>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>> >>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>> >>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>> >>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>> >>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>> >>>>> Neville >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 28 16:27:25 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 16:27:25 -0400 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? Craig > On Jun 28, 2022, at 3:49 PM, Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > >> On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: >> >> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >>> >>> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >>> >>> Sent from my iPhone >>> >>>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>>> >>>> Bob, >>>> >>>> This makes sense. >>>> >>>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>>> >>>> send … ? >>>> >>>> Peter Bogdanoff >>>> >>>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>>> >>>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>>> >>>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>>> >>>>> function returnTheText pFieldName >>>>> return the text of field pFieldName of me >>>>> end returnTheText >>>>> >>>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>>> >>>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>>> >>>>> function extract tParentCard >>>>> return the text of field 1 of tParentCard >>>>> end extract >>>>> >>>>> Bob S >>>>> >>>>> >>>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>>> >>>>>> If I write >>>>>> >>>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>>> >>>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>>> >>>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>>> >>>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>>> >>>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>>> >>>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>>> >>>>>> Neville >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> use-livecode mailing list >>>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From klaus at major-k.de Tue Jun 28 16:35:13 2022 From: klaus at major-k.de (Klaus major-k) Date: Tue, 28 Jun 2022 22:35:13 +0200 Subject: long id trap for the unwary In-Reply-To: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> Message-ID: <8F2CA68F-EF34-4232-905E-699B0392E041@major-k.de> Hi Craig, > Am 28.06.2022 um 22:27 schrieb Craig Newman via use-livecode : > > I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? no, if the variable contains a valid description of a field control. This works as advertized: ... put the long ID of fld 1 into tField put the text of tField ... Hope I understood you correctly. > Craig Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bobsneidar at iotecdigital.com Tue Jun 28 17:38:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 21:38:59 +0000 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> You can find the definition of both send and dispatch in the dictionary. So an example of Dispatch being called from a card of a substack would be: put the long id of me into tParentCard dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed -- but there's nothing wrong with using it extract tRecordA, tParentCard, tExclusions -- aRecordData is an array you want to populate with the field contents of pParentCard -- pParentCard is the long id of the target card containing field, button and menu objects -- pExclusions is a comma delimited list of object names you want to pass over on extract @aRecordData, pParentCard, pExclusions -- store object values in aRecordData put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] ... -- no need to return anything in this example because aRecordData is passed by reference end extract Bob S > On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > From craig at starfirelighting.com Tue Jun 28 18:05:41 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 18:05:41 -0400 Subject: long id trap for the unwary In-Reply-To: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> Message-ID: <6D3998B2-5780-4594-8280-A98E87E5BD87@starfirelighting.com> Klaus. You are correct; I missed that the “long iD” was used, and that expression includes the work “field”. LC can then use that as a valid reference. Craig > On Jun 28, 2022, at 5:38 PM, Bob Sneidar via use-livecode wrote: > > You can find the definition of both send and dispatch in the dictionary. > > So an example of Dispatch being called from a card of a substack would be: > > put the long id of me into tParentCard > dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions > > > -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed > -- but there's nothing wrong with using it > extract tRecordA, tParentCard, tExclusions > > > -- aRecordData is an array you want to populate with the field contents of pParentCard > -- pParentCard is the long id of the target card containing field, button and menu objects > -- pExclusions is a comma delimited list of object names you want to pass over > > on extract @aRecordData, pParentCard, pExclusions > -- store object values in aRecordData > put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] > put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] > put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] > ... > -- no need to return anything in this example because aRecordData is passed by reference > end extract > > Bob S > > >> On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: >> >> Hi Bob, >> >> I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 28 21:38:54 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 29 Jun 2022 11:38:54 +1000 Subject: long id trap for the unwary In-Reply-To: References: Message-ID: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> No crashes or errors, I just didn’t get back the data I expected. Does it really have anything to do with message paths? I just expected the long id of field1 of card 1 to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) Neville From craig at starfirelighting.com Wed Jun 29 09:33:39 2022 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 29 Jun 2022 09:33:39 -0400 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <9D1EA6FF-DEA2-4FF0-AF44-75D0F0B7D686@starfirelighting.com> Neville. I know this thread has been broken into parts, but what exactly is your question? I made two stacks, The first with a button on it, and this in its script: on mouseup put the long id of field 1 of card 1 of stack "untitled 3" into fieldID put the long ID of the owner of fieldID into groupID put the owner of groupID into ownerID end mouseup The second stack (untitled 3) has a field that has been grouped. You get, in the SE, three pieces of information in those three variables. What does this do for you? Craig > On Jun 28, 2022, at 9:38 PM, Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 29 11:32:33 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 29 Jun 2022 15:32:33 +0000 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <887A07C8-8D59-40B6-B8D3-AA8A23373505@iotecdigital.com> So the *actual* long id reference to any object looks something like: field id 1388156 of group id 1388155 of group id 1388175 of card id 1002 of stack "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms Generator 8.livecode" If you don't provide all of that as a reference, then it's up to the engine to "fill in the blanks." That means you can say something like "field 1 of card 1" or "field 1 of stack myStack" or "field 1 of group 1" and you get what you expect. But when working with multiple stacks THAT depends on what is the topStack and currentCard, which can vary depending on whether or not you are actually opening the substacks and what they are opened as (modal, pallette, drawer etc.) Relative References are a great feature, making coding much simpler, but as you have seen it can also be a "trap" when working with multiple cards or stacks. To ensure you don't fall into it, it may be better for you to not leave it up to the engine, but to provide the full path to your objects. Bob S > On Jun 28, 2022, at 18:38 , Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville From hershelflc at gmail.com Thu Jun 30 18:59:55 2022 From: hershelflc at gmail.com (Hershel F) Date: Thu, 30 Jun 2022 18:59:55 -0400 Subject: sorting datagrids Message-ID: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Hi all, is there any way of sorting a data grid horizontally? thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:21:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:21:17 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <95CB8B88-CDB9-46E5-A54C-124B6759B84D@iotecdigital.com> Sure there is! put the dgProp ["columns"] of group myDatagrid into tGridColumns sort tGridColumns ascending set the dgProp ["columns"] of group myDataGrid to tGridColumns I would store the original sort order first though so you can recover. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:26:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:26:59 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <240E44BA-75A1-4E14-8226-0C874FFFA8CD@iotecdigital.com> Or are you talking about sorting the DATA of a datagrid? put the dgText of group "myDataGrid" into tText set the itemDelimiter to tab repeat with i = 1 to the number of lines of tText put item i of tText into tLine sort items of tLine ascending put tLine into line i of tText end repeat set the dgText of group "myDataGrid" to tText Nothing else would make any sense. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 30 21:44:02 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 1 Jul 2022 11:44:02 +1000 Subject: nsScriptDatabase (and long id's) Message-ID: I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? Neville From bobsneidar at iotecdigital.com Thu Jun 30 22:03:51 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 1 Jul 2022 02:03:51 +0000 Subject: nsScriptDatabase (and long id's) In-Reply-To: References: Message-ID: <3AE641A7-DC69-443B-A4D4-EE47E010F075@iotecdigital.com> OIC this is for your library. I didn’t realize that your need was to access objects in projects you didn’t have control of. 😟 Sent from my iPhone > On Jun 30, 2022, at 18:45, Neville Smythe via use-livecode wrote: > > I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at > > https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 > > This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. > > Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Wed Jun 1 10:20:07 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 10:20:07 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: Since this is now in the wild, and has a very different layout, y'all should probably have a look at it and comment on it, before it gets too far down the road. LC has stated that this is the future. On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < use-livecode at lists.runrev.com> wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > You can find more details on the new features and the bug fixes of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From heather at livecode.com Wed Jun 1 10:35:40 2022 From: heather at livecode.com (Heather Laine) Date: Wed, 1 Jun 2022 15:35:40 +0100 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. In case anyone is confused. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: > > Since this is now in the wild, and has a very different layout, y'all > should probably have a look at it and comment on it, before it gets too far > down the road. LC has stated that this is the future. > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Dear list members, >> >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >> >> You can find more details on the new features and the bug fixes of this new >> release here: >> >> https://livecode.com/m1-native-latest-livecode-releases/ >> >> You can find the release in your LiveCode account area or get it via the >> automatic updater. >> >> Enjoy! >> >> Kind regards >> The LiveCode Team >> >> -- >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 1 12:44:25 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 17:44:25 +0100 Subject: Case sensitivity in Livecode ?? Message-ID: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> I was surprised to find that    constant K = TRUE produces an error, though   constant K = true is fine. In other contexts, you can say    put TRUE into myVar    put true into hisVar    etc. but in a constant statement, it seems to be case sensitive. Anyone got an interesting story (or theory) on why ?   :-) Thanks Alex. From bobsneidar at iotecdigital.com Wed Jun 1 12:51:14 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 16:51:14 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <5A4D8DBA-06E9-43D5-85FB-B0AD150FB104@iotecdigital.com> Not only that, but revOpenDatabase("sqlite", ":MEMORY:") will not work on Windows, but DOES on Mac. revOpenDatabase("sqlite", ":memory:") works on both platforms. Do you know why?? No you do not. No one knows, and will likely NEVER know. LOL! I suppose :memory: is a kind of system constant?!? But why it is case sensitive on Windows but not on Mac is beyond me. I put it into the bin labeled, "Things that make you go hmmm..." Bob S > On Jun 1, 2022, at 09:44 , Alex Tweedly via use-livecode wrote: > > I was surprised to find that > > constant K = TRUE > > produces an error, though > > constant K = true > > is fine. In other contexts, you can say > > put TRUE into myVar > put true into hisVar > etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ? :-) > > Thanks > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Wed Jun 1 13:05:42 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 01 Jun 2022 18:05:42 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <96b62f068eb95b27e8badeae5661cb43@livecode.com> On 2022-06-01 17:44, Alex Tweedly via use-livecode wrote: > I was surprised to find that > >    constant K = TRUE > > produces an error, though > >   constant K = true > > is fine. In other contexts, you can say > >    put TRUE into myVar >    put true into hisVar >    etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ?   :-) Its a small mitigation of https://quality.livecode.com/show_bug.cgi?id=19413 - i.e. where the initializer of constants (and locals) is currently treated as a single literal. In explicitVariables mode, unquoted literals are allowed on the RHS only if the literal is a (builtin) constant *and* the constants value is identical to the token you have provided. That extra check is there to ensure that the constants (and initializers) you have used are actually what you intended. Currently - the following does not do what you think: constant kEmptyString = empty Indeed, this isn't allowed in explicitVariables mode, as the constant empty's value is "" and not "empty" - which is what kEmptyString will actually be with explicitVariables turned off. Anyway, this rather odd and obscure facet of the language will disappear in 10 as we've made it so that initializers for constants and locals can be constant expressions. Thus: constant kTrue = TRUE local sEmptyString = empty Will do precisely what they look like they should do... Also, you'll be able to do things like: constant kPiBy2 = pi / 2 constant kPiBy2Squared = kPiBy2 * kPiBy2 constant kPiBy2String = format("%f", kPiBy2) local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } Warmest Regards, Mark. P.S. Amusingly, your question came up on exactly the same day I 'finished' my patch for the above - it now awaits review which may result in it not being quite finished ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Wed Jun 1 14:14:42 2022 From: richmondmathewson at gmail.com (Richmond) Date: Wed, 1 Jun 2022 21:14:42 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Certainly not round these parts: the IDE "we know and love" is still in place. Best, Richmond. On 1.06.22 17:35, Heather Laine via use-livecode wrote: > I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > >> On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: >> >> Since this is now in the wild, and has a very different layout, y'all >> should probably have a look at it and comment on it, before it gets too far >> down the road. LC has stated that this is the future. >> >> On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Dear list members, >>> >>> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >>> >>> You can find more details on the new features and the bug fixes of this new >>> release here: >>> >>> https://livecode.com/m1-native-latest-livecode-releases/ >>> >>> You can find the release in your LiveCode account area or get it via the >>> automatic updater. >>> >>> Enjoy! >>> >>> Kind regards >>> The LiveCode Team >>> >>> -- >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Wed Jun 1 14:34:47 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 11:34:47 -0700 Subject: Right click in field for menu Message-ID: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Hi, I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. How would I do this? Is the menu that would show Livecode, or from the OS? Thanks, Peter Bogdanoff From klaus at major-k.de Wed Jun 1 14:40:41 2022 From: klaus at major-k.de (Klaus major-k) Date: Wed, 1 Jun 2022 20:40:41 +0200 Subject: Right click in field for menu In-Reply-To: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Message-ID: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Hi Peter, > Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : > > Hi, > > I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. > How would I do this? on mousedown tNumber ## mousebutton 3 = right-click if tNumber = 3 then popup btn "your popup here..." at the mouseloc end if end mousedown > Is the menu that would show Livecode, or from the OS? That will popup a LC popup menu button. > Thanks, > > Peter Bogdanoff Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From alex at tweedly.net Wed Jun 1 14:54:18 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 19:54:18 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <96b62f068eb95b27e8badeae5661cb43@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> Message-ID: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> On 01/06/2022 18:05, Mark Waddingham via use-livecode wrote: > > Anyway, this rather odd and obscure facet of the language will > disappear in 10 as we've made it so that initializers for constants > and locals can be constant expressions. Thus: > >     constant kTrue = TRUE >     local sEmptyString = empty > > Will do precisely what they look like they should do... > Good. > Also, you'll be able to do things like: > >     constant kPiBy2 = pi / 2 >     constant kPiBy2Squared = kPiBy2 * kPiBy2 >     constant kPiBy2String = format("%f", kPiBy2) >     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } > Very good. In fact, great !! Thank you! Would you be ale to do something like constant kPiMap = { ... as above ... } And now I'll push my luck and ponder the possibility of 'global' constants. OK - 'global constant' is likely counter to the scope concepts. But perhaps they could be done as "write-once" variables, or as a more general "write-protected' variable. e.g. (somewhere in a start-up script ...)    put 17 into gkMyMagicValue    writeprotect "gkMyMagicValue" and any *subsequent* attempt to change the value would fail. > P.S. Amusingly, your question came up on exactly the same day I > 'finished' my patch for the above - it now awaits review which may > result in it not being quite finished ;) Yes, coincidences do happen :-) Thanks for the explanation Mark. Alex. From bogdanoff at me.com Wed Jun 1 16:53:20 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 13:53:20 -0700 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. Is there a better way to edit a selection in a field using a menu popup? Peter > On Jun 1, 2022, at 11:40 AM, Klaus major-k via use-livecode > wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode >: >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 1 16:54:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 20:54:47 +0000 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <0F93D036-0716-4567-BB4B-E2F858654AF6@iotecdigital.com> I didn't know mouse events were handled in an unlocked field! Nice to know. Curiously however, in that handler I substituted a put statement for the popup command using send "put " & quote & "this worked" & quote to me in 2 seconds In two seconds I get "worked" not "this worked" in the message box. Bob S > On Jun 1, 2022, at 11:40 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Wed Jun 1 17:10:52 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 17:10:52 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Then my bad, I presumed that the DP4 release was the DP4 release. On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < use-livecode at lists.runrev.com> wrote: > I think you are probably referring to the special prototype dp-4 with the > single window IDE in testing. This is not as yet "in the wild". This has > only so far been made available to the attendees for LCG 22/23 Feature > Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Since this is now in the wild, and has a very different layout, y'all > > should probably have a look at it and comment on it, before it gets too > far > > down the road. LC has stated that this is the future. > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> Dear list members, > >> > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > >> > >> You can find more details on the new features and the bug fixes of this > new > >> release here: > >> > >> https://livecode.com/m1-native-latest-livecode-releases/ > >> > >> You can find the release in your LiveCode account area or get it via the > >> automatic updater. > >> > >> Enjoy! > >> > >> Kind regards > >> The LiveCode Team > >> > >> -- > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at 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 at 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." From richmondmathewson at gmail.com Thu Jun 2 01:26:45 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Thu, 2 Jun 2022 08:26:45 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Well, obviously not. I hope LC will release a public beta shortly. Listen to feedback. Allow the new IDE not to be 'the' IDE, but one of 2 possible choices. On Thu, 2 Jun 2022, 00:12 Mike Kerner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Then my bad, I presumed that the DP4 release was the DP4 release. > > On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > I think you are probably referring to the special prototype dp-4 with the > > single window IDE in testing. This is not as yet "in the wild". This has > > only so far been made available to the attendees for LCG 22/23 Feature > > Focus sessions. > > > > In case anyone is confused. > > > > Best Regards, > > > > Heather > > > > Heather Laine > > Customer Services Manager > > LiveCode Ltd > > www.livecode.com > > > > > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > > Since this is now in the wild, and has a very different layout, y'all > > > should probably have a look at it and comment on it, before it gets too > > far > > > down the road. LC has stated that this is the future. > > > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > > use-livecode at lists.runrev.com> wrote: > > > > > >> Dear list members, > > >> > > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > >> > > >> You can find more details on the new features and the bug fixes of > this > > new > > >> release here: > > >> > > >> https://livecode.com/m1-native-latest-livecode-releases/ > > >> > > >> You can find the release in your LiveCode account area or get it via > the > > >> automatic updater. > > >> > > >> Enjoy! > > >> > > >> Kind regards > > >> The LiveCode Team > > >> > > >> -- > > >> _______________________________________________ > > >> use-livecode mailing list > > >> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 2 05:48:35 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 2 Jun 2022 10:48:35 +0100 Subject: OT Re: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: <8D1A5EF6-22B4-4420-A6F9-7E85AEAA5E25@gmail.com> > On 2 Jun 2022, at 6:26 am, Richmond Mathewson via use-livecode wrote: > > 2 possible choices. That’s 4 alternatives. Cheers David G Pedant extraordinaire From klaus at major-k.de Thu Jun 2 06:07:02 2022 From: klaus at major-k.de (Klaus major-k) Date: Thu, 2 Jun 2022 12:07:02 +0200 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi Peter, > Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : > > Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. > I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. > Is there a better way to edit a selection in a field using a menu popup? unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. This will "steal" the focus! :-/ Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. ... set the traversalon of btn "your popup here..." to FALSE ... > Peter Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bogdanoff at me.com Thu Jun 2 14:48:23 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Thu, 2 Jun 2022 11:48:23 -0700 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <4A06E2C5-B3A5-4BBD-81FA-7EDEA7E151B6@me.com> Klaus, thank you. Such a simple fix! > On Jun 2, 2022, at 3:07 AM, Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 2 18:14:29 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 2 Jun 2022 22:14:29 +0000 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <1CEE9304-6F51-4E0F-AF49-66B6AB5CD9D9@iotecdigital.com> More gems of LC wisdom from Klaus! Bob S > On Jun 2, 2022, at 03:07 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Fri Jun 3 09:56:17 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Fri, 3 Jun 2022 15:56:17 +0200 Subject: char as word boundary Message-ID: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Hi, Version 6.7 word boudary are char number 09,10,11,12,13,32 version 9.67 word boudary are char number 09,10,11,12,13,32,202 Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) Sincerely, Jean-Jacques Wagner. From iangmcknight at gmail.com Fri Jun 3 10:26:14 2022 From: iangmcknight at gmail.com (Ian McKnight) Date: Fri, 3 Jun 2022 15:26:14 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: Hi Look up numToChar in the dictionary. It's been deprecated since v7 0 because of unicode. This might explain things. Hope that helps Ian McKnight On Fri, 3 Jun 2022, 14:57 Jean-Jacques Wagner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, > as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 3 12:25:56 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 16:25:56 +0000 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: I get a compile error when using your syntax. If I insert the word "of" after "chars" I get 5 for version 9.6.8 as you would expect. Do you have the *actual* syntax that is causing you the problem? . Bob S > On Jun 3, 2022, at 06:56 , Jean-Jacques Wagner via use-livecode wrote: > > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 13:01:55 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 10:01:55 -0700 Subject: MrSign'n'Notarize In-Reply-To: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: Mark Smith wrote: > Hey Matthias, I just wanted to drop you a quick note to thank you for > the amazing utility you put together to sign and staple macOS apps. I > tried it for the first time the other day and it was a real joy to use > very well organised. Thanks for that. Definitely a life-saver (or at > least a life-enhancer!!). A life-saver indeed. Why isn't a tool like that included in the product? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From bobsneidar at iotecdigital.com Fri Jun 3 13:11:52 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 17:11:52 +0000 Subject: MrSign'n'Notarize In-Reply-To: References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: <4AA9A799-E7F4-4972-A055-EDB98470C7F9@iotecdigital.com> If I were Matthias, I would charge cash money for that. But then having LC release it in the distribution would kill the sales of it. Bob S > On Jun 3, 2022, at 10:01 , Richard Gaskin via use-livecode wrote: > > Mark Smith wrote: > > > Hey Matthias, I just wanted to drop you a quick note to thank you for > > the amazing utility you put together to sign and staple macOS apps. I > > tried it for the first time the other day and it was a real joy to use > > — very well organised. Thanks for that. Definitely a life-saver (or at > > least a life-enhancer!!). > > A life-saver indeed. > > Why isn't a tool like that included in the product? > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 3 17:29:28 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:29:28 +0000 Subject: storing binary data in a "memory" database Message-ID: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Hi all. I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. Bob S From bobsneidar at iotecdigital.com Fri Jun 3 17:41:21 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:41:21 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Right now I am querying for the hash directly from the source database when I need it. Just curious why sqLite cannot handle storing an encrypted string. Bob S > On Jun 3, 2022, at 14:29 , Bob Sneidar via use-livecode wrote: > > Hi all. > > I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. > > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dochawk at gmail.com Fri Jun 3 17:41:31 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 14:41:31 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <87E14DC8-7232-4C40-B4D2-DA72FB89BC7C@gmail.com> bob bobbled, > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. You shouldn’t need a BLOB for a hash. Either CHAR(), VARCHAR(), or TEXT. With the first two, you need to specify a long enough length. From dochawk at gmail.com Fri Jun 3 18:04:21 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 15:04:21 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: A couple of lines of code with declarations, storing, and retrieving would probably help. There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. From neville.smythe at optusnet.com.au Fri Jun 3 18:49:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 4 Jun 2022 08:49:08 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: Jean-Jacques In 9.6.8 the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 As it should be. Did you mean the number of words? But then the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) As it should be. Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. Neville > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > From bobsneidar at iotecdigital.com Fri Jun 3 18:55:09 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 22:55:09 +0000 Subject: storing binary data in a "memory" database In-Reply-To: References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. I suppose what I need is a statement to change the encoding of the database before I create it. put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID put the keys of pArrayDataA into tArrayKeys sort tArrayKeys numeric ascending IF pDBFile is empty THEN put ":memory:" into pDBFile IF pDBName is empty THEN put "arraydata" into pDBName TRY if pDBID is empty then \ put revOpenDatabase("sqlite", pDBFile) into pDBID IF "Error" is in pDBID THEN return empty END IF put "drop table " & pDBName into tDropSQL revExecuteSQL pDBID, tDropSQL put the result into tResult CATCH tError answer tError IF the environment is "development" THEN exit to top ELSE quit END TRY -- create the table put "create table" && quote & pDBName & quote \ & cr into tCreateCommand put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ & cr AFTER tCreateCommand put the keys of pArrayDataA [1] into tRecordKeyList REPEAT for each line tRecordKey in tRecordKeyList if pArrayDataA [1] [tRecordKey] is an array or \ pArrayDataA [1] [tRecordKey] begins with "Salted__" then put "BLOB" into tColumnType else put VARCHAR into tColumnType end if put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand END REPEAT delete char -3 to -1 of tCreateCommand put ")" AFTER tCreateCommand TRY revExecuteSQL pDBID, tCreateCommand put the result into tResult IF tResult is not 0 THEN breakpoint CATCH tError breakpoint END TRY put 1 into tRecordCounter put "recordid" & cr & tRecordKeyList into tColumns repeat with i = 1 to the number of lines of tColumns put ":" & i into item i of tColumnList end repeat put "(" & tColumnList & ")" into tColumnList -- insert data REPEAT for each line tKey in tArrayKeys put 1 into tColumnCounter put pArrayDataA [tKey] into tRecordDataA put tRecordCounter into tQueryDataA [1] REPEAT for each line tRecordKey in tRecordKeyList add 1 to tColumnCounter if tRecordDataA [tRecordKey] is an array then put arrayEncode(tRecordDataA [tRecordKey]) into tValue else put tRecordDataA [tRecordKey] into tValue end if put tValue into tQueryDataA [tColumnCounter] END REPEAT put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL TRY revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" put the result into tResult if the result is not a number then breakpoint CATCH tError breakpoint END TRY add 1 to tRecordCounter END REPEAT return pDBID END arrayToSQLite > On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: > > A couple of lines of code with declarations, storing, and retrieving would probably help. > > > There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 22:18:04 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 19:18:04 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. From irog at mac.com Fri Jun 3 22:53:15 2022 From: irog at mac.com (Roger Guay) Date: Fri, 3 Jun 2022 19:53:15 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: This is very cool, Richard! I truly appreciate all you do for us. Thanks and cheers, Roger > On Jun 3, 2022, at 7:18 PM, Richard Gaskin via use-livecode wrote: > > Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. > > Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. > > LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. > > So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. > > It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. > > -- > Richard Gaskin > Fourth World Systems > > > > Klaus wrote: > > unfortunately the "traversalon" property of popup menu buttons is set > > to TRUE by default. > > This will "steal" the focus! :-/ > > > > Use the message box (prop is also missing in the inspector) to set it > > to FALSE and it will work as advertised. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Sat Jun 4 09:29:44 2022 From: brian at milby7.com (Brian Milby) Date: Sat, 4 Jun 2022 09:29:44 -0400 Subject: storing binary data in a "memory" database In-Reply-To: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Message-ID: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Is this the issue? To pass binary data in an array element, prepend "*b" to the element's key. Sent from my iPhone > On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: > > Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. > > I suppose what I need is a statement to change the encoding of the database before I create it. > > put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB > > FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID > put the keys of pArrayDataA into tArrayKeys > sort tArrayKeys numeric ascending > IF pDBFile is empty THEN put ":memory:" into pDBFile > IF pDBName is empty THEN put "arraydata" into pDBName > > TRY > if pDBID is empty then \ > put revOpenDatabase("sqlite", pDBFile) into pDBID > > IF "Error" is in pDBID THEN > return empty > END IF > > put "drop table " & pDBName into tDropSQL > revExecuteSQL pDBID, tDropSQL > put the result into tResult > CATCH tError > answer tError > IF the environment is "development" THEN exit to top ELSE quit > END TRY > > -- create the table > put "create table" && quote & pDBName & quote \ > & cr into tCreateCommand > put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ > & cr AFTER tCreateCommand > > put the keys of pArrayDataA [1] into tRecordKeyList > > REPEAT for each line tRecordKey in tRecordKeyList > if pArrayDataA [1] [tRecordKey] is an array or \ > pArrayDataA [1] [tRecordKey] begins with "Salted__" then > put "BLOB" into tColumnType > else > put VARCHAR into tColumnType > end if > > put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand > END REPEAT > > delete char -3 to -1 of tCreateCommand > put ")" AFTER tCreateCommand > > TRY > revExecuteSQL pDBID, tCreateCommand > put the result into tResult > IF tResult is not 0 THEN breakpoint > CATCH tError > breakpoint > END TRY > > put 1 into tRecordCounter > put "recordid" & cr & tRecordKeyList into tColumns > > repeat with i = 1 to the number of lines of tColumns > put ":" & i into item i of tColumnList > end repeat > > put "(" & tColumnList & ")" into tColumnList > > -- insert data > REPEAT for each line tKey in tArrayKeys > put 1 into tColumnCounter > put pArrayDataA [tKey] into tRecordDataA > put tRecordCounter into tQueryDataA [1] > > REPEAT for each line tRecordKey in tRecordKeyList > add 1 to tColumnCounter > > if tRecordDataA [tRecordKey] is an array then > put arrayEncode(tRecordDataA [tRecordKey]) into tValue > else > put tRecordDataA [tRecordKey] into tValue > end if > > put tValue into tQueryDataA [tColumnCounter] > END REPEAT > > put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL > > TRY > revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" > put the result into tResult > if the result is not a number then breakpoint > CATCH tError > breakpoint > END TRY > > add 1 to tRecordCounter > END REPEAT > > return pDBID > END arrayToSQLite > > >> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >> >> A couple of lines of code with declarations, storing, and retrieving would probably help. >> >> >> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sat Jun 4 10:49:01 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sat, 4 Jun 2022 07:49:01 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Looks like a very nice utility ... *BUT*, I get an error when trying to run it, either directly from the GoLiveNet app or by installing it and letting it run: "There was an error executing a script in the stack 4WProps. No more information is available because the stack is password protected" Although the pop-up does appear. The drop-down field at the top of the pop-up references: stack "libConcord". The other "options" from the drop-down list are: "card id 1002" and "Global Properties". Choosing either of these two choices also produces the error described above. I am running Livecode v 9.6.1 on Windows 10 Pro Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Friday, June 3, 2022 7:18 PM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Property Sheet for LC (was Re: Right click in field for menu) Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sat Jun 4 14:10:07 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:10:07 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <881619d7-a834-5333-8518-ef863aa18417@fourthworld.com> Kind of you to say, Roger. Thank you. Roger Guay wrote: > This is very cool, Richard! I truly appreciate all you do for us. > Richard wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. -- Richard Gaskin Fourth World Systems From ambassador at fourthworld.com Sat Jun 4 14:38:49 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:38:49 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Message-ID: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Sun Jun 5 07:57:24 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 5 Jun 2022 12:57:24 +0100 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: I'll add my thanks for such a usefull tool. On 04/06/2022 19:38, Richard Gaskin via use-livecode wrote: > > Thanks for the report. Please keep me posted if you find any other > anomalies. > I don't know if it's an anomaly or another failing in widget support :-) The NavBar widget has a number of properties (itemNames, itemStyle, hilitedItem, itemArray, ..) which are visible in the Object Inspector, but not in 4WProps. Alex. From General.2018 at outlook.com Sun Jun 5 08:51:39 2022 From: General.2018 at outlook.com (General 2018) Date: Sun, 5 Jun 2022 12:51:39 +0000 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Hi, So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. Just found some odd behaviour :- The mainstack and substacks have items in PreOpenStack. The substack has for example, On preopenstack Set the foregroundcolor of fld “xyz” to red End preopenstack This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld “xyz” is not found. To get round this I added the cd in the substack - fld “xyz” of cd “123” . Two questions :- 1. Is this the expected behaviour ? 2. Why does it work on the first pass without using - of cd “123” Regards Camm > On 29 May 2022, at 20:32, General 2018 wrote: > > Hi Jacquline, > > Think your question lead me to the issue. > > For some reason on the stack that did not work I added the substack by opening the mainstack and substack and saving the substack into the mainstack somehow. > > I started from new and added the substack by using the add stack file button within standalone settings and it worked fine. > > > Regards > Camm > >> On 29 May 2022, at 17:27, J. Landman Gay via use-livecode wrote: >> >> Just to clarify, are they real substacks or do you mean they are separate stacks that you include in the build? Also, double check that standalone settings isn't set up to move substacks into separate files. I think that option is in the general pane but I'm not at my computer to check. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >>>> On May 29, 2022 6:05:08 AM General 2018 via use-livecode wrote: >>> >>> Still no luck, no closestack handler in “main stack” , tried the other suggestions with hide/show etc. But still “mainstack” quits on closing the “substack xyz” >>> >>> Will keep looking…….. >>> >>> Regards >>> >>>>> On 29 May 2022, at 00:12, Mark Wieder via use-livecode wrote: >>>> >>>> On 5/28/22 07:15, General 2018 via use-livecode wrote: >>>>> Hi , >>>>> New to substacks - I have a “mainstack” used as a menu page for 2x “substacks” >>>>> When “substacks” opened from “mainstack” they open fine using — go to stack “xyz” >>>>> The problem is closing of the “substacks” using - close stack, go to “mainstack” or close this stack it always closes (quit) everything. Need “mainstack” to reappear/remain ? >>>>> Looked at docs and other posts. But stuck no doubt I have missed something. >>>> >>>> Do you have a closeStack handler in the script of the mainstack? >>>> >>>> >>>> -- >>>> Mark Wieder >>>> ahsoftware at gmail.com >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sun Jun 5 13:02:47 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sun, 5 Jun 2022 10:02:47 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: <017b01d878fe$1593be60$40bb3b20$@telus.net> The link provided works perfectly! ... Thanks very much! Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Saturday, June 4, 2022 11:39 AM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Re: Property Sheet for LC (was Re: Right click in field for menu) Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sun Jun 5 14:01:13 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:01:13 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <70e7b5d3-48de-4206-a068-de43cc3179f5@fourthworld.com> Alex Tweedly wrote: > I'll add my thanks for such a useful tool. Thank you for the kind words. > I don't know if it's an anomaly or another failing in widget support > :-) > > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. (Pardon my verbosity, but leisurely Sunday mornings find me erring on the side of completeness; at least for readability I've included section headings ). The Question: Seeking Unified Introspection ------------------------------------------- Ah yes, the perennial question of the difference in accessing complete properties for LC-native objects and widgets... Neville asked about this here in April: http://lists.runrev.com/pipermail/use-livecode/2022-April/267711.html It resulted in a thread of healthy length that IMO is worth reading. You can see it all sorting by topic in the archives - scroll down to Neville's "Widget properties" post as the entry point: http://lists.runrev.com/pipermail/use-livecode/2022-April/thread.html#start IIRC Monte was the only team member to chime in on that thread, the first of his posts sharing his uniquely valuable perspective is here: http://lists.runrev.com/pipermail/use-livecode/2022-April/267732.html Along the way Neville submitted an enhancement request, currently flagged for "Expert Review": https://quality.livecode.com/show_bug.cgi?id=23670 The implications for my lil' Property Sheet tool was among my contributions to that thread. That we currently have no unified introspection mechanism results in threads like that every now and then, in one form or another, every few months among the various LC discussion venues. The true scope of the challenge isn't limited to just adding widgets: compound objects like the DataGrid should arguably be included as well, and there's been talk of revisiting that model in an extended form for LC v10 or later, which might then potentially be a fourth object model. In short, "the properties" has been the primary introspection method used by scripters as far back as I can recall, and I've been using this engine since '97. The addition of new object paradigms multiplies the range of things scripters need to know, and which toolmakers need to account for. This is apparently known to the company, and while there is indication of interest in providing a unified introspection mechanism it's unclear to me what form it might take, and when or even if it might become at least a convention (like the old RIP community standards once attempted) if not an engine feature. The Challenge: Finding net-positive ROI in LC Tools --------------------------------------------------- So that's the scope of the issue. The question you asked is how I'll address it in 4W Props. I've spent a good portion of the last two decades trying to find a break-even for LC aftermarket stuff. So very tempting to me, having launched my business as a provider of SuperCard add-ons back in the day. It's a business model I know well and enjoy. I miss my monthly train rides to the SuperCard headquarters where we'd outline co-marketing plans, product strategy, IDE features, and the like. And my partnership with Hiezer to add Fourth World pages in their catalog was great fun; I learned much from Heizer manager Brian Molyneaux. The effort was reasonably satisfying: even before the execs at SuperCard invited me into an advisory role, revenue from my SC tools paid most of my bills. (Allegiant's eventual demise is another story best told round a campfire, but the cause wasn't a lack of money; their four-space booth at MacWorld Expo every six months had brisk traffic). Given my business history, it's probably not surprising that I have a few GBs of LC tools, books, interactive training materials, etc. in various stages on my hard drive, all waiting for me to discover the magic formula for break-even in the LC universe. Despite the success I'd found almost accidentally in the SC world, I know of no third-party add-on for LC that has hit a true break-even. So in this universe I've had to adjust my expectations. Like most tools providers here, any tools I take the time to tidy up enough to publish are things I built to support my own work, effectively subsidized by what would otherwise be net income. I very much appreciate the occasional donations that come in now and then; they keep me motivated to keep this published subset of tools current with new LC versions, and occasionally add new features. But still the need to subsidize them remains. And all the while my internal business needs for LC-specific tools has leveled off, as an ever-larger percentage of the systems I deliver are not in LC. The Answer: Anticipating Revelation of Unknowns ----------------------------------------------- All this combines to a needlessly-lengthy way of just saying: My tools are currently only what I need them to be, and I'd be more than happy (thrilled, actually) to make them into what others want them to be if I can find a way to afford to do so. Toolmaking is my roots, and I enjoy it. With 4W Props, the prospect of at last having a unified introspection mechanism is enticing enough to encourage me to hold off on further expense until I see where things go with that in v10. Support for widget-specific properties is only one set of enhancements. A wider range of GUI value pickers has been spec'd, along with options for grouping the settings so rather than just alphabetical they can also be arranged topically, perhaps with a set of favorites at the top (each of us has our own needs, and the rich scope of LC object properties is enjoyed by all of us sooner or later). So much that can be done, the moment I can find the cost justification for doing it... -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 14:04:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:04:26 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <017b01d878fe$1593be60$40bb3b20$@telus.net> References: <017b01d878fe$1593be60$40bb3b20$@telus.net> Message-ID: <9732663f-4bfc-3cde-7db7-db5b8795eae9@fourthworld.com> Thank you for the confirmation, Douglas. Please keep me posted if you see any other anomalies. -- Richard Gaskin Fourth World Systems Douglas A. Ruisaard wrote: > The link provided works perfectly! ... Thanks very much! > > Douglas Ruisaard > > Trilogy Software > (250) 573-3935 > > -----Original Message----- > From: use-livecode On Behalf Of > Richard Gaskin via use-livecode > > Douglas A. Ruisaard wrote: > > > Richard Gaskin wrote: > >> So I made a Property Sheet for LC some time ago, accessible right >> > from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and > you'll find "4W Props" in the Stacks section. > > > > Looks like a very nice utility ... *BUT*, I get an error when trying > > to run it, either directly from the GoLiveNet app or by installing it > and > letting it run: > > "There was an error executing a script in the stack 4WProps. No more > > information is available because the stack is password protected" > > > My apologies. The locked script was a holdover from another time. When the > audience for a software is other scripters, leaving source accessible is > mutually beneficial. > > I've now removed the password protection, and in addition to fixing that > issue I also updated the UI to be a little more modernly spacious, making > its list of properties a but easier to read. > > The latest version of 4W Props is now available through LiveNet, or can be > directly downloaded here: > https://fourthworld.com/rev/channel/4W_Props.rev > > Thanks for the report. Please keep me posted if you find any other > anomalies. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 15:36:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 12:36:28 -0700 Subject: Calling all Grognards Message-ID: <3ef8d1e5-d59e-71d6-dcce-5e607f72e0bb@fourthworld.com> One of the unexpected personal upsides to the pandemic has been a discovery of tabletop games, at last recognizing them as forms of systems design. Of the many types of board games I've developed a particular interest in hex-and-counter wargaming. While mostly used to model historical battles, the format is both simple and extensible enough that I've seen it employed for modeling encounters as varied as pre-European conflict among Tahitian tribes all the way to the protester-vs-police conflicts of Seattle during the WTO "Occupy" movement. I've even seen it used in modeling non-combat encounters like those related to supply chains and other logistics challenges. The classic counter format is so flexible I find myself daydreaming about using it to model peacetime activities for possible learning systems. I have some work obligations to fulfill so this is definitely back-burner and non-urgent, but while it was one my mind this morning it occurs to me that given the demographic intersection of some of our members and many fans of old-school wargaming there's a likelihood some of our members may have already done some work in this area. If you've ever built anything that delivers a hex-and-counter format game, or tooling for print-and-play options for enjoying such things, please feel free to drop me a note. I'd love to learn what you've been working on, and see if there are ways we might share bits and pieces to move such systems forward more easily. -- Richard Gaskin Fourth World Systems From ahsoftware at sonic.net Sun Jun 5 18:21:04 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 5 Jun 2022 15:21:04 -0700 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: On 6/5/22 05:51, General 2018 via use-livecode wrote: > Hi, > > So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. > > Just found some odd behaviour :- > > The mainstack and substacks have items in PreOpenStack. > > The substack has for example, > > On preopenstack > Set the foregroundcolor of fld xyz to red > End preopenstack > > This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld xyz is not found. > > To get round this I added the cd in the substack - fld xyz of cd 123 . > > Two questions :- > 1. Is this the expected behaviour ? > 2. Why does it work on the first pass without using - of cd 123 A little hard to diagnose from a distance but here are some thoughts: First of all, per the docs, the preOpenStack handlers should be in the first card of the stacks, not in the scripts of the stacks themselves. Then it sounds like maybe you have multiple cards in your substack and the currently selected card is not card "123" at the time you invoke the goto command the second time. If the (badly-named) destroyStack property of the substack is set to false (the default) then the substack will still be in memory and your preOpenStack handler will be triggered at its current card setting. -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Sun Jun 5 18:58:58 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Mon, 6 Jun 2022 08:58:58 +1000 Subject: Property Sheet for LC In-Reply-To: References: Message-ID: Alex wrote > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. As discussed in a post a while ago, the problem is that requesting the properties of a widget object returns nothing [it is supposed to return enough property settings to be able to completely reproduce the object]. I guess Richard has assumed a list of basic properties and reported those, unless he has more information about widgets than I know. I do the same in nsScriptDatabase, the current version of which will report what I am calling the extrinsic properties of the object such as its rect, visibility etc. It’s a slightly different list from Richards, but achieves much the same result. It just displays the values, it does not allow setting them as does Richard's excellent tool, because the objective of my app is as an archive not an IDE tool so it doesn’t alter the inspected stack. However nsScriptDatabase will also expose the intrinsic properties of the widget reported by exporting the widget, such as the itemNames of the navBar widget etc. It turns out there are sometimes other internal properties of a widget which are only discoverable through the manifest for the widget, which is held by the IDE. An example is the scaledHeight of an SVG Icon widget. The next version of nsScriptDatabase will display the values of these properties, together with their default and expected values. Further, it it will also expose the public handlers for the widget with their input and output parameters. I expect to finish coding nsScriptDatabase 2.2 in the next few days. Neville From bobsneidar at iotecdigital.com Sun Jun 5 19:58:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 5 Jun 2022 23:58:42 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Message-ID: Oooh that may do it. I’ll try when I get the chance. Sent from my iPhone > On Jun 4, 2022, at 06:31, Brian Milby via use-livecode wrote: > > Is this the issue? > > To pass binary data in an array element, prepend "*b" to the element's key. > > Sent from my iPhone > >> On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: >> >> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. >> >> I suppose what I need is a statement to change the encoding of the database before I create it. >> >> put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB >> >> FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID >> put the keys of pArrayDataA into tArrayKeys >> sort tArrayKeys numeric ascending >> IF pDBFile is empty THEN put ":memory:" into pDBFile >> IF pDBName is empty THEN put "arraydata" into pDBName >> >> TRY >> if pDBID is empty then \ >> put revOpenDatabase("sqlite", pDBFile) into pDBID >> >> IF "Error" is in pDBID THEN >> return empty >> END IF >> >> put "drop table " & pDBName into tDropSQL >> revExecuteSQL pDBID, tDropSQL >> put the result into tResult >> CATCH tError >> answer tError >> IF the environment is "development" THEN exit to top ELSE quit >> END TRY >> >> -- create the table >> put "create table" && quote & pDBName & quote \ >> & cr into tCreateCommand >> put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ >> & cr AFTER tCreateCommand >> >> put the keys of pArrayDataA [1] into tRecordKeyList >> >> REPEAT for each line tRecordKey in tRecordKeyList >> if pArrayDataA [1] [tRecordKey] is an array or \ >> pArrayDataA [1] [tRecordKey] begins with "Salted__" then >> put "BLOB" into tColumnType >> else >> put VARCHAR into tColumnType >> end if >> >> put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand >> END REPEAT >> >> delete char -3 to -1 of tCreateCommand >> put ")" AFTER tCreateCommand >> >> TRY >> revExecuteSQL pDBID, tCreateCommand >> put the result into tResult >> IF tResult is not 0 THEN breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> put 1 into tRecordCounter >> put "recordid" & cr & tRecordKeyList into tColumns >> >> repeat with i = 1 to the number of lines of tColumns >> put ":" & i into item i of tColumnList >> end repeat >> >> put "(" & tColumnList & ")" into tColumnList >> >> -- insert data >> REPEAT for each line tKey in tArrayKeys >> put 1 into tColumnCounter >> put pArrayDataA [tKey] into tRecordDataA >> put tRecordCounter into tQueryDataA [1] >> >> REPEAT for each line tRecordKey in tRecordKeyList >> add 1 to tColumnCounter >> >> if tRecordDataA [tRecordKey] is an array then >> put arrayEncode(tRecordDataA [tRecordKey]) into tValue >> else >> put tRecordDataA [tRecordKey] into tValue >> end if >> >> put tValue into tQueryDataA [tColumnCounter] >> END REPEAT >> >> put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL >> >> TRY >> revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" >> put the result into tResult >> if the result is not a number then breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> add 1 to tRecordCounter >> END REPEAT >> >> return pDBID >> END arrayToSQLite >> >> >>>> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >>> >>> A couple of lines of code with declarations, storing, and retrieving would probably help. >>> >>> >>> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Mon Jun 6 09:52:51 2022 From: craig at starfirelighting.com (Craig Newman) Date: Mon, 6 Jun 2022 09:52:51 -0400 Subject: char as word boundary In-Reply-To: References: Message-ID: Apart from omitting the “of” in any of your posted lines of code, I am confused.. The number of chars of any string of concatenated “numToChar” functions will be the number of those functions, that is, 5, since each returns a single character. How did you get any of the other results? Craig > On Jun 3, 2022, at 6:49 PM, Neville Smythe via use-livecode wrote: > >> the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) From benr_mc at cogapp.com Mon Jun 6 10:50:41 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 15:50:41 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: References: Message-ID: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Hi Panos, This is very exciting, thank you. If we find anomalies in the Apple Silicon side, should we raise them in the first instance - to you directly? - on this list? - straight into LQCC? thanks, Ben On 31/05/2022 16:27, panagiotis merakos via use-livecode wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 9.6.8 RC-1. > > You can find more details on the bug fixes and improvements of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 6 11:19:17 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 06 Jun 2022 16:19:17 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> References: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Message-ID: <14aee2b7bc991451829aa45c04eb4939@livecode.com> On 2022-06-06 15:50, Ben Rubinstein via use-livecode wrote: > This is very exciting, thank you. If we find anomalies in the Apple > Silicon side, should we raise them in the first instance > - to you directly? > - on this list? > - straight into LQCC? Just file a bug in the LQCC - indicating that the discrepancy is between Apple and Intel architectures :) Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 6 14:45:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 18:45:17 +0000 Subject: Limit on the number of parameters? Message-ID: Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. Bob S From phil at pdslabs.net Mon Jun 6 16:00:39 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 6 Jun 2022 13:00:39 -0700 Subject: Limit on the number of parameters? In-Reply-To: References: Message-ID: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> In LC 9.6.7, this works in a button script: on mouseUp     tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" end mouseUp command tryThis     put the params -- the handler name and all 10 params are there end tryThis I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. Phil Davis On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: > Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From bobsneidar at iotecdigital.com Mon Jun 6 16:08:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 20:08:40 +0000 Subject: Limit on the number of parameters? In-Reply-To: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> Message-ID: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. Bob S > On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: > > In LC 9.6.7, this works in a button script: > > on mouseUp > tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" > end mouseUp > > > command tryThis > put the params -- the handler name and all 10 params are there > end tryThis > > > I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. > > Phil Davis > > > On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >> >> Bob S >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Mon Jun 6 18:01:20 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 23:01:20 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? Message-ID: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Not strictly speaking a LiveCode question, but... I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. Is there a way to run the intel code from a universal binary under Rosetta from the command line? TIA, Ben From matthias_livecode_150811 at m-r-d.de Mon Jun 6 18:13:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 7 Jun 2022 00:13:25 +0200 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Maybe this is of help for you. https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 Regards, Matthias > Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : > > Not strictly speaking a LiveCode question, but... > > I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. > > Is there a way to run the intel code from a universal binary under Rosetta from the command line? > > TIA, > > Ben > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 7 03:18:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 08:18:06 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> Message-ID: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >> Also, you'll be able to do things like: >> >>     constant kPiBy2 = pi / 2 >>     constant kPiBy2Squared = kPiBy2 * kPiBy2 >>     constant kPiBy2String = format("%f", kPiBy2) >>     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> > Very good. In fact, great !! Thank you! > > Would you be ale to do something like > > constant kPiMap = { ... as above ... } Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > And now I'll push my luck and ponder the possibility of 'global' > constants. Haha... > OK - 'global constant' is likely counter to the scope concepts. But > perhaps they could be done as "write-once" variables, or as a more > general "write-protected' variable. > >    put 17 into gkMyMagicValue >    writeprotect "gkMyMagicValue" > > and any *subsequent* attempt to change the value would fail. How is that any better than putting something like this in a library or back script: function gkMyMagicValue return 17 end gkMyMagicValue Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From benr_mc at cogapp.com Tue Jun 7 05:10:17 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 7 Jun 2022 10:10:17 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Thanks Matthias, that's exactly what I need. My googling was inadequate! Ben On 06/06/2022 23:13, matthias rebbe via use-livecode wrote: > Maybe this is of help for you. > https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 > > Regards, > Matthias > > >> Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : >> >> Not strictly speaking a LiveCode question, but... >> >> I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. >> >> Is there a way to run the intel code from a universal binary under Rosetta from the command line? >> >> TIA, >> >> Ben From craig at starfirelighting.com Tue Jun 7 08:49:09 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 08:49:09 -0400 Subject: Limit on the number of parameters? In-Reply-To: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Message-ID: <091A9628-504E-4DB0-98D7-3AAA6D67EA6A@starfirelighting.com> I have never had any issues with the number of parameters that can be passed to a custom handler. Nor any issue with “seeing” them all in the debugger. I would say that the largest number of params I ever sent was about 15. Craig > On Jun 6, 2022, at 4:08 PM, Bob Sneidar via use-livecode wrote: > > Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. > > Bob S > > >> On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: >> >> In LC 9.6.7, this works in a button script: >> >> on mouseUp >> tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" >> end mouseUp >> >> >> command tryThis >> put the params -- the handler name and all 10 params are there >> end tryThis >> >> >> I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. >> >> Phil Davis >> >> >> On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >>> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >>> >>> Bob S >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >> >> -- >> Phil Davis >> (503) 307-4363 >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Tue Jun 7 09:01:57 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Tue, 7 Jun 2022 15:01:57 +0200 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: Hi Sorry, I ment the number of words. Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). Sincerely, Jean-Jacques Wagner. > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtonativer(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: > > Jean-Jacques > > In 9.6.8 > > the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 > > As it should be. > > Did you mean the number of words? > > But then > > the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) > > As it should be. > > Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. > > > Neville > >> >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >> >> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >> > From craig at starfirelighting.com Tue Jun 7 10:22:11 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 10:22:11 -0400 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: <02997394-A42F-493D-B7C5-C5C96011466C@starfirelighting.com> Though it is true that “numToChar” and “charToNum” are deprecated, they still live and work the same as always. Old habits die hard, andI still use them. One day I will move on., but the original issue has not changed. Craig > On Jun 7, 2022, at 9:01 AM, Jean-Jacques Wagner via use-livecode wrote: > > Hi > Sorry, I ment the number of words. > > Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. > However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. > > Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, > eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for > the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). > > Sincerely, > > Jean-Jacques Wagner. > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtonativer(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > >> Version 6.7 word boudary are char number 09,10,11,12,13,32 >> version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > > > >> Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: >> >> Jean-Jacques >> >> In 9.6.8 >> >> the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 >> >> As it should be. >> >> Did you mean the number of words? >> >> But then >> >> the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) >> >> As it should be. >> >> Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. >> >> >> Neville >> >>> >>> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >>> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >>> >>> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >>> >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 7 11:27:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 7 Jun 2022 15:27:59 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <81FCCF4C-A169-4164-8B4B-42B7B0FFEA44@iotecdigital.com> I thought we already had global constants?? I think they are called, "Literals." ;-) Bob S > On Jun 7, 2022, at 24:18 , Mark Waddingham via use-livecode wrote: > > On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >>> Also, you'll be able to do things like: >>> constant kPiBy2 = pi / 2 >>> constant kPiBy2Squared = kPiBy2 * kPiBy2 >>> constant kPiBy2String = format("%f", kPiBy2) >>> local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> Very good. In fact, great !! Thank you! >> Would you be ale to do something like >> constant kPiMap = { ... as above ... } > > Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > >> And now I'll push my luck and ponder the possibility of 'global' constants. > > Haha... > >> OK - 'global constant' is likely counter to the scope concepts. But >> perhaps they could be done as "write-once" variables, or as a more >> general "write-protected' variable. >> put 17 into gkMyMagicValue >> writeprotect "gkMyMagicValue" >> and any *subsequent* attempt to change the value would fail. > > How is that any better than putting something like this in a library or back script: > > function gkMyMagicValue > return 17 > end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ahsoftware at sonic.net Tue Jun 7 12:16:21 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 09:16:21 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> On 6/7/22 00:18, Mark Waddingham via use-livecode wrote: > How is that any better than putting something like this in a library or > back script: > >     function gkMyMagicValue >         return 17 >     end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed > less, as you'd need to put a global declaration in every script which > wanted to use said global constant...). 1. Because it's a function, not a constant. put gkMyMagicValue() into tVar is cognitively different from put gkMyMagicValue into tVar Something like 17 is a trivial case. Something more like real world usage would be constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" 2. Because the server already build supports the "include" keyword which would neatly solve the issue, but none of the other platforms do. Why? 3. Because every other language I've used has global constants and makes this easy. It's only xtalk that makes this hard. If an LC goal is to provide a tool for learning coding then multiple definitions of the same constant is a paradigm that is not transportable to other languages, and indeed will probably result in a compiler error. 4. Because it gets tiresome having to explain to new developers that you have to declare constants in multiple scripts even though it's the same constant you already declared and the workaround is to use a getter function as you described. -- Mark Wieder ahsoftware at gmail.com From mark at livecode.com Tue Jun 7 13:55:52 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 18:55:52 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: > 1. Because it's a function, not a constant. > put gkMyMagicValue() into tVar > is cognitively different from > put gkMyMagicValue into tVar > > Something like 17 is a trivial case. Something more like real world > usage would be > > constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" I see and what is kRootURL the Url for? If I were writing a library for a web-service and needed (for some reason) to expose the underlying URL to callers of the library, then I'd have simply define a function as part of its public API: function myRestLibraryGetRootUrl return "http://example.com/aUrlThatMightChange/api/v2" end myRestLibraryGetRootUrl I don't buy the 'cognitively different' argument - different languages have different patterns. I really don't see that getting into the habit of using 'constant functions' instead of 'constant variables' is any different from getting into the habit of doing assignment as 'source into target', rather than 'target = source'; or getting your head around the message path. It is definitely *not* unusual for libraries in any language to expose *all* that they do via functions - whilst you can use enums and preprocessor defines in C/C++ for global constants - they make your library unwrappable easily by higher-level languages. Indeed, you tend to find that as published low-level (C/C++) libraries have evolved they have changed to ensure their interfaces are entirely function based ones (indeed, oftentimes C++-based libraries gain a C function wrapper to make this easier - as C++ is a nightmare to wrap stuff from due to the immensely complicated semantics, these days, of C++ classes). > 2. Because the server already build supports the "include" keyword > which would neatly solve the issue, but none of the other platforms > do. Why? You can't really compare the features of the PHP (C preprocessor) style operation of the server engine with the object-based scripting of the normal LiveCode engine. In that PHP-likeness, 'include' makes sense as the server engine is essentially doing a continuous 'merge' - emitting interleaved blocks of content (text) with content generated from code. The include which is present there makes sense for that form of coding - i.e. for generating text documents from a mixture of prewritten text, and evaluated script. I don't think it makes sense when scripts are attached to objects where more structure is needed and they exist in a dynamic environment. Critically, the server engine loads and parses files in a linear fashion - emitting the text, and executing the interleaved script. Everything is completely transient - when the document has finished being emitted, the engine terminates. It raises too many edge-cases and questions as to what should happen in various different scenarios (as well as being a very large noose with which people could hang themselves) when you try to add its 'include' operation to the normal LiveCode environment. Remember that in the server engine include operates on a file so what would you expect to happen if you change the file? Does the engine have to track changes and recompile any object scripts including it when they change? (Remember that object scripts are compiled on being set, or when first tickled by a handler lookup if already set and loaded from disk). > 3. Because every other language I've used has global constants and > makes this easy. It's only xtalk that makes this hard. If an LC goal > is to provide a tool for learning coding then multiple definitions of > the same constant is a paradigm that is not transportable to other > languages, and indeed will probably result in a compiler error. xTalk does not make it hard - see above - its just different because of its model. Of the languages you've used how many are object-based, where objects have scripts which can be dynamically (re-)attached continuously throughout the lifetime of a programs execution and, moreover, can be dynamically created at runtime; and more specifically, where a script is a defined set of handlers and other definitions which are completely independent (from the point of view of compiling) of any other script? For those which you have found which fit that pattern, do any of them have global constants? > 4. Because it gets tiresome having to explain to new developers that > you have to declare constants in multiple scripts even though it's the > same constant you already declared and the workaround is to use a > getter function as you described. Then tell new developers that the xTalk way to do global constants is constant functions in the message path! Saying that is a workaround is akin to telling them that: "The workaround for not being able use the syntax 'X := Y' is to use the syntax 'put X into Y'" Or telling someone learning Java that: "The workaround for defining a global function is to make it a static method of some class" The point being that how you do things in different languages is different... xTalks don't have a concept of 'global constant' because the language and runtime model isn't one which really supports such a thing (as it stands) - however if you need a constant available globally then leverage a function in the message path to do so. Java doesn't have the concept of a 'global function' because it is a pure class-based language - however if you do need a global function, then you can just make a static method in a class. Neither of these things are 'workarounds' - they are how you do things in that language! FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... In that vein, what would be helpful is, instead of just going 'can we have global constants', propose problems you need to solve / would like to solve and use-cases you have encountered where the existing xTalky feature set is not sufficient to solve it in some reasonably elegant fashion without 'global constants'.* Warmest Regards, Mark. * I potentially have use-cases for non-script-local constants, but I don't have any for 'global variable'-like 'global constants' which aren't expressible with existing xTalk notions - hence why my request to 'put up or shut up' ;) --- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 7 16:51:12 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 7 Jun 2022 21:51:12 +0100 Subject: Generating Random numbers to conform a distribution Message-ID: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) Any hints from the stats gurus? Cheers David Glasgow From alex at tweedly.net Tue Jun 7 20:55:01 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 8 Jun 2022 01:55:01 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: { Aside: any discussion where both Mark Weider and Mark Waddingham take part is all the better because of that; two very knowledgeable people with two very different viewpoints (in some areas) is a good thing. BUT it makes it hard to refer to what each of them said - "MarkW" is still ambiguous. So I'm adopting the "English public school" solution - refer to everyone by their surname. ] On 07/06/2022 18:55, Mark Waddingham via use-livecode wrote: > On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: >> 1. Because it's a function, not a constant. > function myRestLibraryGetRootUrl >     return "http://example.com/aUrlThatMightChange/api/v2" >   end myRestLibraryGetRootUrl Here I agree with Waddingham. *IF* it's a library, then it feels right to have a function api. The cases where it doesn't, to me, are those where the constants are intrinsic to a (widespread) part of an app or subsystem ... more below. >> 2. Because the server already build supports the "include" keyword >> which would neatly solve the issue, but none of the other platforms >> do. Why? > I don't see that 'include' does what you expect in the context of lcserver. From the dictionary: > If you place the *constant* statement in a handler, you can use the > constant anywhere in the handler. If you place the* > constant* statement in a script outside any handler, you can use > the constant anywhere in the handlers of that > script. > The crucial phrase is the last one - "of that script". That script seems to be define such that the included text file is considered to be a different script from the main script. So you cannot put "constant k = 17" in an included file (outside of a handler) and have it take effect anywhere except within the included file !?! And obviously if you put it inside a handle then it can only be used within that handler. i.e. include "a.txt"     -- where a.txt contains     -- >> 4. Because it gets tiresome having to explain to new developers that >> you have to declare constants in multiple scripts even though it's the >> same constant you already declared and the workaround is to use a >> getter function as you described. > > Then tell new developers that the xTalk way to do global constants is > constant functions in the message path! > or perhaps as custom props  ? FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... I'm not sure Tweedly knows properly what he wants from 'global constants'  :-)     Maybe what I actually want would be better called "stack-local constants" ? > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would > like to solve and use-cases you have encountered where the existing > xTalky feature set is not sufficient to solve it in some reasonably > elegant fashion without 'global constants'.* > "global variables" in LC have a particular meaning - they are *NOT* usable globally, they are only available in any script in which the developer has chosen to declare them. That's a very different granularity of scope than 'available where the function is in the message path', and I think that higher level of granularity could/should/might-be-able-to-be provided for constants. As well as being more granular, it's also more consistent (I think) with 'global variables'. In my earlier email I tried to avoid the problems of dynamic re-setting of 'global constants' by describing them as "write-protected variables" or "write-once" variables - but I'm not sure if that really works. Case :  I have a CSV or TSV file, no headers, that I read in, and process various ways at various times. I'd like to use (in many places throughout the app) snippets like  put item kTitleColumn of tLine into myTitle  put the text of fld "Last Name" into item kLastName of myNewLine But I have a sneaking suspicion that at some point in the future additional columns will appear, or be re-arranged, or .... so I won't use literal constant values (NOT put item 3 of ...), however some form of 'global constant' seems like it should work here. There are (of course) a million ways that could be done - but none that I can think of provide the simplicity of usage as above, combined with the safety of the 'variables' being write-protected, as well as some form of pan-stack constants; variables which can be used (read) in the scope where the developer wants (by declaring as global variables), but are protected from inadvertent over-writing by somehow limiting when/where they can be written (e.g. maybe only in preOpenStack and librarystack). Kind regards, Alex. > Warmest Regards, > > Mark. > > * I potentially have use-cases for non-script-local constants, but I > don't have any for 'global variable'-like 'global constants' which > aren't expressible with existing xTalk notions - hence why my request > to 'put up or shut up' ;) > > --- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 7 21:03:42 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:03:42 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <39B82256-BC1F-4404-9A44-654B0E9BE1B8@optusnet.com.au> Hmm. I jumped without thinking…I was thinking if unicode char 2029 which is the paragraph separator. Unicode Char 202 is supposed to be Latin Capital Letter E With Circumflex. But 202 is beyond the standard ascii range so the deprecated numtochar(202) will return an extended ascii character depending on the platform. On a Mac, 202 is a non-breaking space which should be a word boundary (or maybe shouldn’t be? Looks like the LC team changed it’s collective mind). On Windows it is capital E circumflex, the same as unicode— I now understand your concern, Jean-Jacques. So it is a bug but as numtochar() is deprecated not one that is going to be fixed. Neville From neville.smythe at optusnet.com.au Tue Jun 7 21:48:50 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:48:50 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <4140B7FC-58E1-4D51-86B0-427D995C34D4@optusnet.com.au> Still jumping without thinking… If native char 202 or unicode char 202 is a word boundary in Windows it is a real bug — but is that the case? Native char 202, a non-breaking space, should (or maybe shouldn’t) be a word boundary in Mac - the docs say word boundaries are space, tab and return. Whether the change between versions of LC is bug or not is questionable, but not one which will be addressed in current versions (a deprecated bug?). One of course should not be using chars at all. NumtoCodepoint(202) is circumflex E on the Mac, and is not a word boundary, and surely that is also the situation on Windows. Neville From ahsoftware at sonic.net Tue Jun 7 22:18:27 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:18:27 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 6/7/22 10:55, Mark Waddingham via use-livecode wrote: > I don't buy the 'cognitively different' argument Mark- Thanks for the longish explanations there. I think we'll just have to disagree on the cognitive thing then - I normally would expect functions to return the result of some action, not just hand me back a constant. No worries though. Ruby deals with this very neatly: even though everything is an object the syntactic sugar allows you to code them like "normal" constants, the same way we can refer to xtalk global functions as "the capsLockKey" instead of "capsLockKey()". > FWIW, I'm not entirely sure whether what you (Mark) want from 'global > constants' is quite the same as what Alex wants from 'global constants', > and I'm not entirely sure whether what I *think* you both mean when you > ask for 'global constants' is what you are actually thinking of when you > ask for 'global constants'... Hah! Well, whatever anyone else means, I'd like constants to obey the inheritance of the message path. An 'effective' constant if you will. But *PLEASE* don't implement that particular syntax. > > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would like > to solve and use-cases you have encountered where the existing xTalky > feature set is not sufficient to solve it in some reasonably elegant > fashion without 'global constants'.* Thankfully I think there is nothing in this regard that is not expressible in the existing xtalk syntax. I use getter functions in my stack scripts (I don't think I've ever done that for a constant in a backscript) and sometimes I also just copy and paste constant declarations. -- Mark Wieder ahsoftware at gmail.com From ahsoftware at sonic.net Tue Jun 7 22:25:15 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:25:15 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: <230214cf-ce6c-73b4-0fc8-9057de449ab2@sonic.net> On 6/7/22 17:55, Alex Tweedly via use-livecode wrote: > So you cannot put "constant k = 17" in an included file (outside of a > handler) and have it take effect anywhere except within the included > file !?! Ah. I see I must be projecting my desired expansion of the "include" command onto what I expect that command to do in the server context. -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Tue Jun 7 23:24:43 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Tue, 07 Jun 2022 22:24:43 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 7, 2022 3:53:37 PM David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, the > Mean and the SD are variables specified by the user, and N random numbers > are then generated with the required mean and SD. ... > In general terms, how do they do this? From ahsoftware at sonic.net Tue Jun 7 23:50:43 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 20:50:43 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > > https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com From harrison at all-auctions.com Wed Jun 8 00:46:33 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Wed, 8 Jun 2022 00:46:33 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: Try rolling 2 six-sided dice. 7 is the number that appears the most so it’s at the middle of the curve, while 2 and 12 are at the ends of the distribution. Roll the dice multiple times to generate a distribution. Now simulate rolling the dice with random numbers in LC the same way. Now conduct your own experiments, and graph your results. Have fun! Rick > On Jun 7, 2022, at 4:51 PM, David V Glasgow via use-livecode wrote: > > > Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. > > In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. > > Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge > > Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) > > Any hints from the stats gurus? > > Cheers > > David Glasgow > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 8 01:50:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 22:50:28 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> David V Glasgow wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > In general terms, how do they do this? Mark Waddingham would be able to answer that rather excellently, if he has the time. My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? https://www.davidmlane.com/hyperstat/index.html -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 8 02:05:21 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 23:05:21 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: References: Message-ID: <75602b26-def7-ba32-99ed-02fb4d4be51a@fourthworld.com> Rick Harrison wrote: > Try rolling 2 six-sided dice. 7 is the number that appears the > most so its at the middle of the curve, while 2 and 12 are at > the ends of the distribution. Roll the dice multiple times to > generate a distribution. > > Now simulate rolling the dice with random numbers in LC the same way. > > Now conduct your own experiments, and graph your results. I've been poking at some of that now and then for prototyping board games in software (an ironic moment after all these years of making paper prototypes of what later becomes software ). For my needs I found the simplest way to get the same results in LC as with dice was to do what dice do: use "any" in a range of six, iterated by the number of virtual dice. There's probably a more clever mathy solution, but for my modest prototypes it helps me to keep the virtual implementation as close to the physical tabletop result as close as possible anyway, so I have a justification for making software that behaves no smarter than cardboard. :) When I was making a game for a friend last summer I fell in love with the Royal Game of Ur (RGoU)- good history with an online version here for those interested: https://royalur.net/ The dice used in RGoU are binary in range, tetrahedra with the faces blank and two of the four points painted. The game is played with four of those, delivering a range of 0 through 4 on a probability distribution of: Dice Result Likelihood 0 1 1 4 2 6 3 4 4 1 Or more graphy: + + + + + + + + + + + + + + + + 0 1 2 3 4 If you ever need to plot dice probabilities, this tool handles nearly any number of any type of dice you can think of (except Ur dice, it turns out, but oh well): https://anydice.com/ -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From mark at livecode.com Wed Jun 8 02:07:49 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 08 Jun 2022 07:07:49 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <233e971efb4d75eea47954eda6541383@livecode.com> On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > Or is there an elegant formula? I have Googled about and cant see > one, but maybe I dont know the magic words. And if someone wanted to > script this in LC what would be the best approach? (just general > guidance here, wouldnt want anyone to invest their valuable time in > what is at present just vague musings) > > Any hints from the stats gurus? I'm not a stats guru but... I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. Lets say you have a collection X of numbers then the following things are always true: P1: Mean(c * X) = c * Mean(X) P2: Mean(X + k) = k + Mean(X) P3: SD(c * X) = abs(c) * SD(X) P4: SD(X + k) = SD(X) In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). So with this in mind, let TMean and TSD be the target mean and target SD. Then: 1. Generate N random numbers in the range [0, 1] - S0, ..., SN 2. Compute SMean := Mean(S0, ..., SN) 3. Compute SSD := SD(S0, ..., SN) Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". The amount we need to scale by is mandated by the SD, specifically: c := TSD/SSD If we scale our source numbers by c and apply SD then we see: SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] = c * SSD = TSD / SSD * SSD = TSD i.e. Our scaled input numbers give us the desired SD! So now we just need to play the same 'game' with the Mean. We have: Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) = c * SMean However we really want a mean of TMean so define: k := TMean - c * SMean Then if we translate our (scaled!) source numbers by k and apply Mean then we see: Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] = c * SMean + k = c * SMean + TMean - c * SMean = TMean i.e. Our scaled and offset input numbers give us the desired Mean! Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! We can now return to our sequence of steps: 4. Compute c := TSD/SSD 5. Compute k := TMean - c * SMean 6. Compute the target random numbers, Tn := c * Sn + k So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. In LiveCode Script, the above is something like: function randomNumbers pN, pTMean, pTSD local tSource repeat pN times put random(2^31) & comma after tSource end repeat local tSMean, tSSD put average(tSource) into tSMean put stdDev(tSource) into tSSD local tC, tK put pTSD / pSSD into tC put pTMean - tC * tSMean into tK local tTarget repeat for each item tS in tSource put tC * tS + tK & comma after tTarget end repeat return tTarget end randomNumbers Hope this helps! Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Wed Jun 8 09:02:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:02:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> Message-ID: <27ACB6AD-29FF-45F1-808E-66836E93B8E0@gmail.com> > On 8 Jun 2022, at 6:50 am, Richard Gaskin via use-livecode wrote: > > My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? In the 1990s as a happy HyperStat user, I exchanged occasional mails with him. When I later discovered Metacard, I mailed him in some excitement hoping he would port HyperStat to it, but he was already committed to web. I will certainly have a further nose around… Cheers David G From dvglasgow at gmail.com Wed Jun 8 09:16:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:16:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: <89080C0C-291E-46A0-BEEA-10ABDA7B066A@gmail.com> > On 8 Jun 2022, at 7:07 am, Mark Waddingham via use-livecode wrote: > > I'm not a stats guru but... Pants SO on fire! That is fascinating. I really don’t think this has been made explicit anywhere else, including Stackoverflow - despite the fact that the question has been posed several times. I will enjoy working through it, although it will take a while Thanks, David G From ludovic.thebault at laposte.net Wed Jun 8 09:43:25 2022 From: ludovic.thebault at laposte.net (Ludovic THEBAULT) Date: Wed, 8 Jun 2022 15:43:25 +0200 Subject: Sqlite and Monterey on M1 In-Reply-To: <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> References: <1035540836.1342971.1652375436147@wlpnf0205> <7E16ABF6-B8E7-4DAE-92D5-312259D3F79E@iotecdigital.com> <24143D79-2908-4C19-BBC5-BD2424D59338@major-k.de> <1450985276.32571.1652379820671@wlpnf0217> <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> Message-ID: <377484DF-835A-4498-8214-B005E300C32E@laposte.net> Hello, These were file's attributes that were blocking the writing (noticed by an @ with an ‘ls’). They had to be removed with a "sudo xattr -c ..." (deleting only the com.apple.quarantine was not enough) HTH ! > Le 15 mai 2022 à 17:30, Ludovic THEBAULT a écrit : > > > >> Le 12 mai 2022 à 20:23, ludovic.thebault at laposte.net a écrit : >> >> >> >> Bonsoir Ludovic, >> >> on the Mac we have write permissions here -> specialFolderPath("preferences") >> Works on Monterey as well and is "out of sight" of the user. ;-) >> >> >> > > > Hello, Thanks > > But it seems is don’t work for my app. > > The sqlite file was copied from an Time Machine backup (but manually). > But i tested it on my Mac (Big Sur) and all work fine… > > there must be something else that blocks the writing in the database. The processor (M1) ? the user id ? > > I'll dig and test more deeply! > Ludovic Ludovic From prothero at earthlearningsolutions.org Wed Jun 8 11:18:43 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Wed, 8 Jun 2022 09:18:43 -0600 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: Mark W has it. The random number generator creates a "uniform" distribution. The distribution of the means of collection of randomly generated uniform number sequences will be gaussian in the limit of infinite numbers in the uniformly distributed sequences (but you don't need an infinite number to get a good approximation of a gaussian distribution). Mark has also demonstrated how to do the scaling. Good luck, Bill P William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 8, 2022, at 12:08 AM, Mark Waddingham via use-livecode wrote: > > On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: >> Quite a lot of stats and maths packages offer a feature whereby the N, >> the Mean and the SD are variables specified by the user, and N random >> numbers are then generated with the required mean and SD. I remember >> the venerable and excellent Hypercard HyperStat >> (1993) >> by David M Lane doing exactly that. >> Or is there an elegant formula? I have Googled about and can’t see >> one, but maybe I don’t know the magic words. And if someone wanted to >> script this in LC what would be the best approach? (just general >> guidance here, wouldn’t want anyone to invest their valuable time in >> what is at present just vague musings) >> Any hints from the stats gurus? > > I'm not a stats guru but... > > I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. > > Lets say you have a collection X of numbers then the following things are always true: > > P1: Mean(c * X) = c * Mean(X) > P2: Mean(X + k) = k + Mean(X) > P3: SD(c * X) = abs(c) * SD(X) > P4: SD(X + k) = SD(X) > > In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). > > Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). > > So with this in mind, let TMean and TSD be the target mean and target SD. Then: > > 1. Generate N random numbers in the range [0, 1] - S0, ..., SN > > 2. Compute SMean := Mean(S0, ..., SN) > > 3. Compute SSD := SD(S0, ..., SN) > > Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". > > The amount we need to scale by is mandated by the SD, specifically: > > c := TSD/SSD > > If we scale our source numbers by c and apply SD then we see: > > SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] > = c * SSD > = TSD / SSD * SSD > = TSD > > i.e. Our scaled input numbers give us the desired SD! > > So now we just need to play the same 'game' with the Mean. We have: > > Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) > = c * SMean > > However we really want a mean of TMean so define: > > k := TMean - c * SMean > > Then if we translate our (scaled!) source numbers by k and apply Mean then we see: > > Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] > = c * SMean + k > = c * SMean + TMean - c * SMean > = TMean > > i.e. Our scaled and offset input numbers give us the desired Mean! > > Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! > > We can now return to our sequence of steps: > > 4. Compute c := TSD/SSD > > 5. Compute k := TMean - c * SMean > > 6. Compute the target random numbers, Tn := c * Sn + k > > So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. > > In LiveCode Script, the above is something like: > > function randomNumbers pN, pTMean, pTSD > local tSource > repeat pN times > put random(2^31) & comma after tSource > end repeat > > local tSMean, tSSD > put average(tSource) into tSMean > put stdDev(tSource) into tSSD > > local tC, tK > put pTSD / pSSD into tC > put pTMean - tC * tSMean into tK > > local tTarget > repeat for each item tS in tSource > put tC * tS + tK & comma after tTarget > end repeat > > return tTarget > end randomNumbers > > Hope this helps! > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Wed Jun 8 11:49:28 2022 From: devin_asay at byu.edu (Devin Asay) Date: Wed, 8 Jun 2022 15:49:28 +0000 Subject: Generating Random numbers to conform a distribution In-Reply-To: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> Message-ID: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> I think Jacque has germaniums in her garden! On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mail at richard-hillen.de Wed Jun 8 12:54:29 2022 From: mail at richard-hillen.de (Hillen Richard) Date: Wed, 8 Jun 2022 18:54:29 +0200 Subject: Generating Random numbers to conform a distribution (David V Glasgow) Message-ID: <83ACE6BC-F84D-4760-8531-8CA3A4E41731@richard-hillen.de> Perhaps this helps: I needed lists of samples that obeyed a certain distribution for a few random experiments. I created these with help of built-in Excel-functions and then imported them into Livecode. Richard. From jacque at hyperactivesw.com Wed Jun 8 13:19:07 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 08 Jun 2022 12:19:07 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> Message-ID: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Eeww. But you're safe, I didn't plant any tomatoes. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: > I think Jacque has germaniums in her garden! > > > > On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > > wrote: > > On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > https://xkcd.com/2626/ > > Chortle. > > Back in the day I would generate a random number by back-biasing a > germanium diode and hook it up to an analog-to-digital converter. Great > white noise generator too. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > Devin Asay > Office of Digital Humanities > Brigham Young University > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Wed Jun 8 14:48:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 8 Jun 2022 14:48:20 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: A maths & stats explanation from the company CTO along with the code to implement it, a back in the day approach that the young makers can try, a HyperCard reference to warm the hearts of the xtalk vets and then a dad joke that unites all with a grin or a groan all in one thread! What a great list. Martin Koob Sent from my iPhone > On Jun 8, 2022, at 1:20 PM, J. Landman Gay via use-livecode wrote: > > Eeww. But you're safe, I didn't plant any tomatoes. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: >> >> I think Jacque has germaniums in her garden! >> >> >> >> On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: >> >> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: >> I don't have an answer. But apparently it's a common problem: >> https://xkcd.com/2626/ >> >> Chortle. >> >> Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. >> >> -- >> Mark Wieder >> ahsoftware at gmail.com >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> Devin Asay >> Office of Digital Humanities >> Brigham Young University >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From cubist at aol.com Wed Jun 8 18:06:10 2022 From: cubist at aol.com (Quentin Long) Date: Wed, 8 Jun 2022 22:06:10 +0000 (UTC) Subject: Funky dice (was Re: Generating Random numbers to conform a distribution) References: <2115663184.690405.1654725970264.ref@mail.yahoo.com> Message-ID: <2115663184.690405.1654725970264@mail.yahoo.com> From: Richard Gaskin > When I was making a game for a friend last summer I fell in love with  > the Royal Game of Ur (RGoU)…> The dice used in RGoU are binary in range, tetrahedra with the faces  > blank and two of the four points painted. > …> If you ever need to plot dice probabilities, this tool handles nearly  > any number of any type of dice you can think of (except Ur dice, it  > turns out, but oh well): >> https://anydice.com/ Ur dice are functionally synonymous with coin-flips—basically, D2s with nonstandard markings. Rather than a 2-sided die marked "1" and "2", an Ur die is effectively a 2-sided die marked "0" and "1". So if you want to implement Ur dice in LiveCode, you have a couple of options: any char of "01" (the random of 2) - 1 Or, if you want to play with Ur dice in anydice.com: output 1d2 - 1output 4d2 - 4 There are various nonstandard uses of dice in the roleplaying game hobby. Example: The FATE rolegame uses six-sided dice, but they aren't marked with the first six integers. Instead, two faces are marked with minus signs; two faces are blank; and the final two faces, with plus signs. When you roll FATE dice, any die that comes up with a minus sign is counted as negative one, any die that came up blank is counted as zero; and any die that came up with a plus sign is counted as positive one. The standard FATE die-roll uses four FATE dice, hence has a range of -4 (if all four dice came up minus) to +4 (if all four dice came up plus). To implement FATE dice in LiveCode, this will do the trick: (the random of 3) - 2 Or the anydice.com equivalent: output 1d3 - 2output 4d3 - 8 Example: The Shadowrun rolegame (basically a mashup between cyberpunk and high fantasy) uses normal six-sided dice, but rather than adding up all the dice, you instead count the quantity of dice which came up either 5 or 6. That is, you have a 1/3 chance of getting a 1, and a 2/3 chance of getting 0. To implement Shadowrun dice in LiveCode, the following one-liner will do: any char of "001" I *think* anydice.com *ought to* be able to handle Shadowrun dice, but at present, I don't know what sort of syntax is required to make that happen. "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ]. From jbv at souslelogo.com Thu Jun 9 03:37:14 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 03:37:14 -0400 Subject: LC 9.6.7 and Applescript Message-ID: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Hi list, I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. Now I am with LC 9.6.7 on OSX 10.15. The stack features some AppleScript commands such as : tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor utility. I am not really familiar with the relationship between LC and AppleScript. Where should I look to fix this issue ? Thank you in advance. jbv From merakosp at gmail.com Thu Jun 9 04:17:39 2022 From: merakosp at gmail.com (panagiotis m) Date: Thu, 9 Jun 2022 11:17:39 +0300 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: Hello jbv, This sounds like bug https://quality.livecode.com/show_bug.cgi?id=23576, which is fixed in LiveCode 9.6.8 rc1. Cheers, Panos -- On Thu, 9 Jun 2022 at 10:38, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to > work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 > to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run > fine in the script editor > utility. > I am not really familiar with the relationship between LC and > AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Thu Jun 9 04:20:26 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 9 Jun 2022 10:20:26 +0200 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <87949D2A-8B20-4B45-91B8-F825C622AF95@m-r-d.de> This was fixed in 9.6.8 RC1 see bug report https://quality.livecode.com/show_bug.cgi?id=23576 > Am 09.06.2022 um 09:37 schrieb jbv via use-livecode : > > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor > utility. > I am not really familiar with the relationship between LC and AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jbv at souslelogo.com Thu Jun 9 05:38:54 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 05:38:54 -0400 Subject: LC 9.6.7 and Applescript In-Reply-To: References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <954ff359efacd15648d50ce4125408a2@souslelogo.com> Hello Panos, I just installed LC 9.6.8 and everything works perfect. Thank you for your reply. I guess I should check https://quality.livecode.com more often :) Best, jbv Le 2022-06-09 04:17, panagiotis m via use-livecode a crit : > Hello jbv, > > This sounds like bug > https://quality.livecode.com/show_bug.cgi?id=23576, > which is fixed in LiveCode 9.6.8 rc1. > > Cheers, > Panos > -- From mark at livecode.com Thu Jun 9 08:44:46 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 13:44:46 +0100 Subject: Would anyone miss convertOctals? Message-ID: <86fc7306896b18dd8a63348049204d4a@livecode.com> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? 2) If you do, have you ever actually used it in any scripts which are actually still in use? 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From marksmithhfx at gmail.com Thu Jun 9 09:06:07 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Thu, 9 Jun 2022 14:06:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3C5A17D9-7A2C-4D6D-9FAF-45574B3CF7EE@gmail.com> > On 9 Jun 2022, at 1:44 pm, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > So three questions: > > 1) Do you know what convertOctals is, and what it does? No (I guessed it might be converting Octals to Decimals but a quick dictionary check indicated nope!) > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! Thanks for the section in the Release Notes called Breaking Changes. Very useful. > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 9 09:13:06 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 9 Jun 2022 09:13:06 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Hi Mark > On Jun 9, 2022, at 8:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing > (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? Without cheating and checking out the dictionary I have a general idea — my guess is… OH if I give my guess and it is right (or wrong) then it ruins your poll for everyone after ;-) You should run this as a web poll of some kind with no peeking at the dictionary allowed. :-) > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? No > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? No > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? No If convertOctals does go away maybe we can add an ode to the LiveCode poetry collection. I remember there were some haiku’s made several years ago. Martin From paul at researchware.com Thu Jun 9 10:37:31 2022 From: paul at researchware.com (Paul Dupuis) Date: Thu, 9 Jun 2022 10:37:31 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the > final thing to sort out before being able to merge my constant > expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) > - however, I would really like to make convertOctals have no effect at > all in 10.0+ as it adds a disproportionate amount of complexity > compared to (what I think, at least) its utility is (particularly in > the context of things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which > are actually still in use? > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be > to expand the numeric literal syntax to add both explicit octal and > binary number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > From rabit at revigniter.com Thu Jun 9 11:25:45 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 9 Jun 2022 17:25:45 +0200 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: On 09.06.22 14:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) - > however, I would really like to make convertOctals have no effect at all > in 10.0+ as it adds a disproportionate amount of complexity compared to > (what I think, at least) its utility is (particularly in the context of > things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? Yes > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? Yes, revIgniter uses "convertOctals" and "umask" dealing with access permissions of files and folders. > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? Sure, I would exchange them with carrots. > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? I have to admit, no. > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be to > expand the numeric literal syntax to add both explicit octal and binary > number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > Ralf From craig at starfirelighting.com Thu Jun 9 11:31:00 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 11:31:00 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Message-ID: <09E6BB0B-59FA-40AE-982B-B7ED9FE37652@starfirelighting.com> I have never used an octal. But it well might break legacy handlers of others, however simple it is to write a custom function to replicate. Craig > On Jun 9, 2022, at 10:37 AM, Paul Dupuis via use-livecode wrote: > > Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare > > > On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> >> So three questions: >> >> 1) Do you know what convertOctals is, and what it does? >> >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> >> Please let me know your thoughts :) >> >> Warmest Regards, >> >> Mark. >> >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Thu Jun 9 11:33:43 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 15:33:43 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> On Jun 9, 2022, at 6:44 AM, Mark Waddingham via use-livecode > wrote: So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? Nope 2) If you do, have you ever actually used it in any scripts which are actually still in use? Nyet 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? N/A 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Wait, you said three questions. But no. Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mark at livecode.com Thu Jun 9 11:53:07 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 16:53:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> Message-ID: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> On 2022-06-09 16:33, Devin Asay via use-livecode wrote: > Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From devin_asay at byu.edu Thu Jun 9 12:06:57 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 16:06:57 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> Message-ID: On Jun 9, 2022, at 9:53 AM, Mark Waddingham via use-livecode > wrote: On 2022-06-09 16:33, Devin Asay via use-livecode wrote: Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) I forget, but I’ve encountered all six of them. :D -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From ahsoftware at sonic.net Thu Jun 9 12:15:44 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Thu, 9 Jun 2022 09:15:44 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <10911935-89a8-2e93-53d9-6bd4781b0f6e@sonic.net> On 6/9/22 05:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. Wow... we have a convertOctals feature. I obviously need to spend more time with the dictionary. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Thu Jun 9 12:19:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 9 Jun 2022 16:19:17 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <2DAEBD57-EDBB-447E-8EAC-1F02A51A8D6F@iotecdigital.com> Does it have something to do with eye surgery? Bob S > On Jun 9, 2022, at 05:44 , Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Thu Jun 9 12:23:54 2022 From: brian at milby7.com (Brian Milby) Date: Thu, 9 Jun 2022 12:23:54 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Had to look it up, never used it. Sent from my iPhone > On Jun 9, 2022, at 8:45 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Thu Jun 9 13:03:56 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 18:03:56 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: 1) No (or didn't until I looked just now) 2) N/A 3) N/A 4) N/A On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final thing > to sort out before being able to merge my constant expression patch) and I was > reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature > (even those we have deprecated, unless we absolutely have to!) - however, I > would really like to make convertOctals have no effect at all in 10.0+ as it > adds a disproportionate amount of complexity compared to (what I think, at > least) its utility is (particularly in the context of things 'coming next' > like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? > >   3) If you do use it in any scripts which are still in use, would you be > willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this > case, an axe) being wielded and the carrot in this case would be to expand the > numeric literal syntax to add both explicit octal and binary number literals > alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is > that the former is not ambiguous at parse time, it doesn't require a runtime > property set to true in order for the engine to convert the string to a number > correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them > for 10 already, and my gut tells me removing convertOctals is likely to cause > less consternation than those we already have - but I could be wrong! > From craig at starfirelighting.com Thu Jun 9 15:54:42 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 15:54:42 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Mark. Gong the other way, is your task made much simpler by losing “converOctals”? I assume so, or the issue would never have come up. Are there other similar language elements that also are on the block? Craig > On Jun 9, 2022, at 1:03 PM, Ben Rubinstein via use-livecode wrote: > > 1) No (or didn't until I looked just now) > 2) N/A > 3) N/A > 4) N/A > > > On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> So three questions: >> 1) Do you know what convertOctals is, and what it does? >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> Please let me know your thoughts :) >> Warmest Regards, >> Mark. >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jerry at jhjensen.com Thu Jun 9 16:14:24 2022 From: jerry at jhjensen.com (Jerry Jensen) Date: Thu, 9 Jun 2022 13:14:24 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3AA83C11-6B11-45C0-BF08-77A3D640CB58@jhjensen.com> Wait, I like octal! I admit I have not used it since writing a disassembler for the HP-85, which nobody but me ever used. I agree with Ralf - carrots would be just fine. .Jerry > On Jun 9, 2022, at 5:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From benr_mc at cogapp.com Thu Jun 9 16:31:46 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 21:31:46 +0100 Subject: Have we lost the Oracle driver? In-Reply-To: <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> References: <7CFA6CE8-CB12-4233-A179-85A54E44A94D@m-r-d.de> <30ba104925924fe988d911669ecc60c0@livecode.com> <2a93b9dc-78ea-0196-5f74-eaa8b394bc03@cogapp.com> <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> Message-ID: <1495f9ef-f26a-29ea-dfd7-c131b732a71e@cogapp.com> I'm attempting to re-up this. I've been distracted by other issues, but now trying again to use the direct Oracle driver, rather than the ODBC one. I have confirmed that LiveCode is appropriately licensed ("professional" rather than "commercial"); and the standalone package contains "dboracle.bundle"(on Mac); on Windows the "dboracle.dll" is in the Externals folder. The current situation is that when I attempt this on Mac, I get the error message: 'revdberr,invalid database type' (30) On Windows, the standalone crashes. Where next...? TIA, Ben On 03/03/2022 17:14, Ben Rubinstein via use-livecode wrote: > Hi Panos, > > Alas, that's made no difference. > > Does this error message "revdberr,invalid database type" actually indicate a > failure to load the driver, or can it also occur if the driver was loaded but > there were issues initialising it, or some other issues connecting to the > given server and database? > > Is there any other detail of errors available anywhere (I looked at the > Console but there is just a continual tide of reports in that, so I couldn't > spot anything)? > > Thanks again, > > Ben > > On 03/03/2022 16:23, panagiotis m via use-livecode wrote: >> Hello Ben, >> >> I _think_ you just have to create a symlink to this version of the >> libclntsh: >> >> 1. Open a Terminal >> 2. Navigate to the instant client directory, e.g. suppose it is in your >> Downloads: >> >> cd ~/Downloads/instantclient_11_2 >> >> 3. Create the symlink: >> >> ln -s libclntsh.dylib.11.1 libclntsh.dylib >> >> Kind regards, >> Panos >> -- >> >> On Thu, 3 Mar 2022 at 15:25, Ben Rubinstein via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Hi Panos, >>> >>> LiveCode 9.6.6 on macOS 10.15.7 (Catalina). >>> >>> I've downloaded the Oracle stuff but it doesn't seem to have an install >>> script >>> - where should I put "libclntsh.dylib.11.1"? >>> >>> thanks for your help, >>> >>> Ben >>> >>> On 02/03/2022 12:58, panagiotis m via use-livecode wrote: >>>> Hello Ben, >>>> >>>> I take it you are on MacOS? Which MacOS version, and which LiveCode >>> version >>>> are you using? >>>> >>>> Could it be the case you haven't got the right version of Oracle Instant >>>> Client installed? You need libclntsh.dylib.11.1, found here: >>>> >>>> >>> https://download.oracle.com/otn/mac/instantclient/11204/instantclient-basic-macos.x64-11.2.0.4.0.zip >>> >>>> >>>> Kind regards, >>>> Panos >>>> -- >>>> >>>> On Tue, 1 Mar 2022 at 19:46, Ben Rubinstein via use-livecode < >>>> use-livecode at lists.runrev.com> wrote: >>>> >>>>> Hi Mark, >>>>> >>>>> Thanks for responding. Indeed 'the revLicenseInfo` returned >>>>> "...commercial". >>>>> After re-licensing, it now says "...professional" - however, I still >>> can't >>>>> open a connection to an Oracle database. >>>>> >>>>> Re-licensing *did* make a difference: whereas previously it broke into >>> the >>>>> debugger, and (sometimes) displayed the error >>>>>    > execution error at line n/a (External handler execution error: >>>>> revdberr,driver not licensed for this edition) >>>>> >>>>> now revOpenDatabase simply returns >>>>>    > revdberr,invalid database type >>>>> >>>>> So I guess it's not a licensing issue any more, which is good; but I >>> still >>>>> can't get at the database! Can you suggest where my next issue might be? >>>>> >>>>> Many thanks, >>>>> >>>>> Ben >>>>> >>>>> On 01/03/2022 16:08, Mark Waddingham via use-livecode wrote: >>>>>> On 2022-03-01 15:51, Ben Rubinstein via use-livecode wrote: >>>>>>> Hi Matthias, >>>>>>> >>>>>>> Good spot! Thanks for checking. >>>>>>> >>>>>>> I wonder whether this is an accidental omission, in that Oracle was at >>>>>>> one time only available at a certain higher level of license; maybe >>>>>>> now that there is only level, perhaps someone forgot to tweak whatever >>>>>>> bit of code checked that the 'correct' license was in place? >>>>>> >>>>>> All business-only features were moved to be part of the pro features >>>>> pack - >>>>>> the oracle driver included. >>>>>> >>>>>> If it isn't working in your current version of LC, check that the >>>>> license you >>>>>> have licensed LC with does have the pro features pack in it... >>>>>> >>>>>> If you do `put the revLicenseInfo` it should say professional, rather >>>>> than >>>>>> commercial. >>>>>> >>>>>> If it doesn't say professional, Relicense your IDE using the menu item >>>>> in Help >>>>>> and flick through the licenses you have available until one says 'pro' >>>>> in the >>>>>> title. >>>>>> >>>>>> If the revLicenseInfo does say professional then something odd has >>>>> happened >>>>>> somewhere which will need to look into more deeply! >>>>>> >>>>>> Warmest Regards, >>>>>> >>>>>> Mark. >>>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 9 20:51:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 10:51:08 +1000 Subject: Property sheets In-Reply-To: References: Message-ID: I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. Neville From neville.smythe at optusnet.com.au Thu Jun 9 23:26:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 13:26:35 +1000 Subject: Multiple revCursors substacks added to standalone In-Reply-To: References: Message-ID: <7F01C3B2-BF71-4FEA-90F2-6A2D9E715A89@optusnet.com.au> For a while now (LC 9.x) I have been finding that making a standalone sometimes adds multiple copies of revCursors to the standalone. One copy as a substack of the mainstack is expected, but under some unknown circumstances I get 3 more copies of the stack added (not as substacks). This on a Mac. I first thought this occurred when the standalone builder reported errors about the ask dialog, but my last build included the extra copies without any warnings occurring during the build process. The source file stack after the build has finished also has these copies of revCursors. I discovered this when I added the source stack to nsScriptDatabase. But it can also be seen in the Project Browser - a number of blank lines occur in the stack list tree, presumably because PB doesn’t like the duplicate stack names. A difficult bug to report to Quality Control without a recipe. Neville From mark at livecode.com Fri Jun 10 03:45:13 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 10 Jun 2022 08:45:13 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Message-ID: <20239d6bbd1a802ab9eb686762583396@livecode.com> On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > converOctals? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Fri Jun 10 11:16:24 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:16:24 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. Bob S > On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: > > Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). From bobsneidar at iotecdigital.com Fri Jun 10 11:18:38 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:18:38 +0000 Subject: Property sheets In-Reply-To: References: Message-ID: Hi Neville. A direct link, or where to go to get it would be helpful. Thanks. Bob S > On Jun 9, 2022, at 17:51 , Neville Smythe via use-livecode wrote: > > I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. > > There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. > > Neville > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rdimola at evergreeninfo.net Fri Jun 10 11:40:02 2022 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Fri, 10 Jun 2022 11:40:02 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <001401d87ce0$5cd91a00$168b4e00$@net> Same as many others on the octal question. Did not know/don’t use. (can see how it would be useful) On this one... don’t use it for msg or envs. I rarely use by ref to change calling parameters, but do it now and again. I mostly use by ref for performance in loops or extraordinary large data sets. Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net -----Original Message----- From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Mark Waddingham via use-livecode Sent: Friday, June 10, 2022 3:45 AM To: How to use LiveCode Cc: Mark Waddingham Subject: Re: Would anyone miss convertOctals? On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > “converOctals”? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From jacque at hyperactivesw.com Fri Jun 10 13:06:48 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 10 Jun 2022 12:06:48 -0500 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <1814e952c40.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I may be dreaming, but didn't you mention that using "the" before a property name would be required? That will throw a lot of people who've become used to omitting that. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 10, 2022 2:46:46 AM Mark Waddingham via use-livecode wrote: > > In terms of other things which are 'on the block' - then no explicit > features per-se but there are a couple of extreme 'edge cases' which > will likely be removed. From phil at pdslabs.net Fri Jun 10 13:12:17 2022 From: phil at pdslabs.net (Phil Davis) Date: Fri, 10 Jun 2022 10:12:17 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> I was thinking along those lines as well. Heck, I just saw my octalmologist last week. Phil Davis On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: > So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. > > Bob S > > >> On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: >> >> Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From ahsoftware at sonic.net Fri Jun 10 13:20:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 10 Jun 2022 10:20:10 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> Message-ID: On 6/10/22 10:12, Phil Davis via use-livecode wrote: "saw"... heh > I was thinking along those lines as well. Heck, I just saw my > octalmologist last week. > > Phil Davis > > > On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: >> So it has nothing to do with eye surgery?? Dang. I thought I was going >> to get a prize or something. >> >> Bob S -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Fri Jun 10 19:22:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 11 Jun 2022 09:22:35 +1000 Subject: nsScriptDatabase (was property sheets) In-Reply-To: References: Message-ID: <3CC942F3-B4FE-4022-BB92-AAD144002556@optusnet.com.au> Bob S wrote > On 11 Jun 2022, at 2:00 am, use-livecode-request at lists.runrev.com wrote: > > A direct link, or where to go to get it would be helpful. The stack is in the Development section of Sample Stacks, though it seems to help the extraordinarily slow search engine to click All before Go. There are only 542 stacks listed, why does it take so long to find one? Bob and I know a better way, eh? You can also download the stack and pre-build standalones from https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 I didn’t give the direct link in this list because I was interested in the number of downloads from Sample Stacks, but evidentlyI can track the number of accesses from my Dropbox folder. Neville Smythe neville.smythe at optusnet.com.au 0414517719 From jbv at souslelogo.com Mon Jun 13 04:30:34 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Mon, 13 Jun 2022 04:30:34 -0400 Subject: Best way to update a large DB ? Message-ID: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Hi list, I have a mySQL DB with about 400000 entries, and I need to update 190000 of them in the following way : update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 I have a file with all the requests that weights almost 200 Mb. I can't upload it via phpMyadmin, because it's too big and running all the requests in one go will end up with a server timeout. I was thinking of a cron job that would trigger every minute or so, and run a short script that would read successive portions of 100 requests and feed them so mySQL. Any better idea ? Thanks in advance. jbv From MikeKerner at roadrunner.com Mon Jun 13 09:58:59 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 13 Jun 2022 09:58:59 -0400 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: and you can't do it locally? that isn't that many records. it shouldn't take long at all. On Mon, Jun 13, 2022 at 4:31 AM jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all > the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and > run a short > script that would read successive portions of 100 requests and feed them > so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From mark at livecode.com Mon Jun 13 12:13:37 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 13 Jun 2022 17:13:37 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Hi Jean-Jacques, On 2022-06-03 14:56, Jean-Jacques Wagner via use-livecode wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word > boundary, as it is with numtochar(32) This is something we will need to consider - please do file a bug about it at quality.livecode.com (so you can track any further discussion about it). I can see how this change occurred, and it is perhaps more a 'side-effect of implementation' rather than an intended change. Prior to 7.0 - the word chunk used the C library 'ctype' isspace function - which returns true if a character is 'whitespace'. However, the engine *also* tweaked the C library character tables to make it so that NBSP (202 on MacRoman - something else on Windows/Linux - 160 maybe?) was *not* a space character. This was primarily a very dirty hack (which was done before my time!) to allow non-breaking spaces to prevent word breaks in fields (I strongly suspect the effect on the word chunk was never considered!). When we moved to Unicode - we changed the word-breaking detection in fields to use a simplified version of the Unicode algorithm and Unicode character properties (NBSP has the, unsurprisingly, no-break property!). Similarly, we changed the word chunk to use the Unicode 'whitespace' property. In the unicode world - being whitespace, and non-breaking are two separate properties... Hence the difference in behavior since 7. The reason this is 'of interest' is that the word chunk has had quite a hefty performance regression since 7.0 due to the switch to Unicode, so re-looking at what it should *actually* do (taking into account what it would be most useful in the widest possible circumstances) is definitely on the cards. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 13 12:15:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:15:47 +0000 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: <021CD806-1D77-44E5-B760-B54A8950F08F@iotecdigital.com> If ID is a unique identifier, you should not need the limit. I agree with Mike, you shouldn't need to do anything fancy. A button and a loop should do it. If the data is critical, you may want to step through a few loops to verify, or backup the database first, always a good idea. Nothing worse than discovering you have bad input data halfway through an update like this. Bob S > On Jun 13, 2022, at 01:30 , jbv via use-livecode wrote: > > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and run a short > script that would read successive portions of 100 requests and feed them so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Mon Jun 13 12:18:44 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:18:44 +0000 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: <60931B58-EF3F-404E-9EF4-BFF18C4B1F6F@iotecdigital.com> "dirty hack" is my middle name! :-) Bob S > On Jun 13, 2022, at 09:13 , Mark Waddingham via use-livecode wrote: > > This was primarily a very dirty hack (which was done before my time!) From paul at researchware.com Mon Jun 13 13:41:15 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 13 Jun 2022 13:41:15 -0400 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: On 6/13/2022 12:13 PM, Mark Waddingham via use-livecode wrote: > Hypercard and livecode 6.7:  the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67                      :   the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 LC 9.6.7 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 LC 6.7.11 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> ALSO results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 Or. at least those are the results I am getting, and I think that may be because numToChar(202) is a different character on macOS vs Windows. From neville.smythe at optusnet.com.au Mon Jun 13 19:19:01 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:19:01 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <456A7575-8628-42C4-8938-3F1663C7F263@optusnet.com.au> > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > I have a file with all the requests that weights almost 200 Mb. Unless your "blah blah”s are very large indeed shouldn’t your change data be packable into a much smaller file to transmit? Eg if they were integers (or could be made to be integer, ie indexes into string tables) 3 integers per line could be packed into 13 bytes, file length 2MB. If they are short strings and you needed say 100 bytes per line that’s still only 20MB. Then use php - if you have the luxury lcserver -to unpack at the server, wrapping the long list of requests with BEGIN and END TRANSACTION of course. Neville From neville.smythe at optusnet.com.au Mon Jun 13 19:22:49 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:22:49 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <7F274337-0C9C-47ED-A369-B2E8C6F8511D@optusnet.com.au> Oh and you can prevent a file transfer from timing out… look up libURLSetExpect10 Neville From david.bovill at gmail.com Tue Jun 14 07:30:43 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 12:30:43 +0100 Subject: Pointlist to Bezier? In-Reply-To: References: Message-ID: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? 📆    Schedule a call with me On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > Pointlist to Bezier > > Hi there > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > There are explanations around the net for C-code but it is very hard to understand. > > (one here said to be good but misses the graphics:) > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > What could this code be used for. > > — Tracing an image > > — Smoothing the lines drawn by a user > > plus a lot more Im sure > > Thanks > Michael > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Tue Jun 14 08:54:49 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 13:54:49 +0100 Subject: Pointlist to Bezier? In-Reply-To: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: I found some well documented python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py And some Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js The javascript code could be called from Livecode. To see the demo of how this would work in the browser: • http://soswow.github.io/fit-curve/demo/ • https://codepen.io/Sphinxxxx/pen/jrLxvQ Would seem to be a useful library to have available in native LC? 📆    Schedule a call with me On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > 📆    Schedule a call with me > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > Pointlist to Bezier > > > > Hi there > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > (one here said to be good but misses the graphics:) > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > What could this code be used for. > > > > — Tracing an image > > > > — Smoothing the lines drawn by a user > > > > plus a lot more Im sure > > > > Thanks > > Michael > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 14 09:42:01 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 14 Jun 2022 09:42:01 -0400 Subject: Pointlist to Bezier? In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> There is a similar thread on the forum: https://forums.livecode.com/viewtopic.php?f=8&t=34550 Craig > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > I found some well documented python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > And some Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > • http://soswow.github.io/fit-curve/demo/ > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > Would seem to be a useful library to have available in native LC? > > 📆 Schedule a call with me > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: >> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? >> >> 📆 Schedule a call with me >> On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: >>> Pointlist to Bezier >>> >>> Hi there >>> >>> I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. >>> >>> There are explanations around the net for C-code but it is very hard to understand. >>> >>> (one here said to be good but misses the graphics:) >>> http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html >>> >>> What could this code be used for. >>> >>> — Tracing an image >>> >>> — Smoothing the lines drawn by a user >>> >>> plus a lot more Im sure >>> >>> Thanks >>> Michael >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Wed Jun 15 05:46:50 2022 From: david.bovill at gmail.com (David Bovill) Date: Wed, 15 Jun 2022 10:46:50 +0100 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> Message-ID: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: Python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js Here is the core python function: > quote_type > def fitCubic(points, leftTangent, rightTangent, error): >  # Use heuristic if region only has two points in it >  if (len(points) == 2): >  dist = linalg.norm(points[0] - points[1]) / 3.0 >  bezCurve = [points[0], points[0] + leftTangent * dist, points[1] + rightTangent * dist, points[1]] >  return [bezCurve] > >  # Parameterize points, and attempt to fit curve >  u = chordLengthParameterize(points) >  bezCurve = generateBezier(points, u, leftTangent, rightTangent) >  # Find max deviation of points to fitted curve >  maxError, splitPoint = computeMaxError(points, bezCurve, u) >  if maxError < error: >  return [bezCurve] > >  # If error not too large, try some reparameterization and iteration >  if maxError < error**2: >  for i in range(20): >  uPrime = reparameterize(bezCurve, points, u) >  bezCurve = generateBezier(points, uPrime, leftTangent, rightTangent) >  maxError, splitPoint = computeMaxError(points, bezCurve, uPrime) >  if maxError < error: >  return [bezCurve] >  u = uPrime > >  # Fitting failed -- split at max error point and fit recursively >  beziers = [] >  centerTangent = normalize(points[splitPoint-1] - points[splitPoint+1]) >  beziers += fitCubic(points[:splitPoint+1], leftTangent, centerTangent, error) >  beziers += fitCubic(points[splitPoint:], -centerTangent, rightTangent, error) > >  return beziers > The maths code for the Newton Raphson method is: > quote_type > def newtonRaphsonRootFind(bez, point, u): >  """ >  Newton's root finding algorithm calculates f(x)=0 by reiterating >  x_n+1 = x_n - f(x_n)/f'(x_n) > >  We are trying to find curve parameter u for some point p that minimizes >  the distance from that point to the curve. Distance point to curve is d=q(u)-p. >  At minimum distance the point is perpendicular to the curve. >  We are solving >  f = q(u)-p * q'(u) = 0 >  with >  f' = q'(u) * q'(u) + q(u)-p * q''(u) > >  gives >  u_n+1 = u_n - |q(u_n)-p * q'(u_n)| / |q'(u_n)**2 + q(u_n)-p * q''(u_n)| >  """ >  d = bezier.q(bez, u)-point >  numerator = (d * bezier.qprime(bez, u)).sum() >  denominator = (bezier.qprime(bez, u)**2 + d * bezier.qprimeprime(bez, u)).sum() > > >  if denominator == 0.0: >  return u >  else: >  return u - numerator/denominator > Seems a useful little challenge for the list? 📆    Schedule a call with me On 14 Jun 2022, 14:43 +0100, Craig Newman via use-livecode , wrote: > There is a similar thread on the forum: > > https://forums.livecode.com/viewtopic.php?f=8&t=34550 > > Craig > > > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > > > I found some well documented python code: > > > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > > > And some Javascript code: > > > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > > > • http://soswow.github.io/fit-curve/demo/ > > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > > > Would seem to be a useful library to have available in native LC? > > > > 📆 Schedule a call with me > > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > > > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > > > > > 📆 Schedule a call with me > > > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > > > Pointlist to Bezier > > > > > > > > Hi there > > > > > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > > > > > (one here said to be good but misses the graphics:) > > > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > > > > > What could this code be used for. > > > > > > > > — Tracing an image > > > > > > > > — Smoothing the lines drawn by a user > > > > > > > > plus a lot more Im sure > > > > > > > > Thanks > > > > Michael > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 15 11:50:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 15 Jun 2022 15:50:17 +0000 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: For extra credit, try writing a handler in LC to convert the python/js code to LC script. Bob S > On Jun 15, 2022, at 02:46 , David Bovill via use-livecode wrote: > > Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: > > Python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js From rabit at revigniter.com Wed Jun 15 15:16:19 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Wed, 15 Jun 2022 21:16:19 +0200 Subject: [ANN] Universal Button version 1.1.0 Message-ID: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> There is a new version of the "universal button" widget which can be used as a replacement for the segmented control widget. The widget icon can now be placed independently of the label and the size of the icon can be customized. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From MikeKerner at roadrunner.com Wed Jun 15 17:17:31 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:17:31 -0400 Subject: seconds on mobile Message-ID: this is strange: on mobile (ios) seconds seems to be in local time on desktop, it seems to be in zulu time, regardless of timezone -- 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." From MikeKerner at roadrunner.com Wed Jun 15 17:20:38 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:20:38 -0400 Subject: seconds on mobile In-Reply-To: References: Message-ID: never mind, i've got something else going on, i think. On Wed, Jun 15, 2022 at 5:17 PM Mike Kerner wrote: > this is strange: > on mobile (ios) seconds seems to be in local time > on desktop, it seems to be in zulu time, regardless of timezone > > -- > 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." > -- 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." From tom at makeshyft.com Thu Jun 16 01:43:11 2022 From: tom at makeshyft.com (Tom Glod) Date: Thu, 16 Jun 2022 01:43:11 -0400 Subject: [ANN] Universal Button version 1.1.0 In-Reply-To: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> References: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> Message-ID: Hey Ralf, thanks for this, I don't know how I'm only coming across this now. :) On Wed, Jun 15, 2022 at 3:16 PM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > There is a new version of the "universal button" widget > which can be used as a replacement for the > segmented control widget. > > The widget icon can now be placed independently of the > label and the size of the icon can be customized. > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 16 09:31:20 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 16 Jun 2022 14:31:20 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Hi Folks, I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode Any alternative suggestions? David Glasgow PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. // String "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" "str" ends with "g" // Chunks char 5 of "str" is "n" From panos.merakos at livecode.com Thu Jun 16 10:12:42 2022 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 16 Jun 2022 17:12:42 +0300 Subject: [ANN] Release 9.6.8 RC-2 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.8 RC-2. Getting the Release =================== You can find the release in your LiveCode account area or get it via the automatic updater. To find the 9.6.8 RC-2 test release in your LiveCode account, please scroll down to below the list of stable releases, to find your available test releases. Release Contents ================ LiveCode 9.6.8 RC-2 comes with 4 regression bugfixes: - Using export when the source is an image object of a closed stack will no longer cause an error to be thrown - The property inspector geometry pane icons have been reinstated - LiveCode will no longer crash on startup on versions of macOS El Capitan (10.11) and below - Building a macOS standalone on macOS Sierra (10.12) and earlier 9.6.8- will not include an Apple architecture slice, even if selected For the full list of all fixes, updates and enhancements please see the release notes: http://downloads.livecode.com/livecode/9_6_8/LiveCodeNotes-9_6_8_rc_2.pdf Known issues ============ - The Browser widget's native layer is not shown in some Linux distros with Cinnamon window manager. - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit LTS yet. Required Software ================= To build iOS apps with LiveCode you must have the appropriate versions of Xcode as follows: - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS 12.1 SDK - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS 13.2 SDK - macOS 10.15.4: Xcode 12.4.x - LiveCode builds iOS apps using the iOS 14.4 SDK - macOS 11+ : Xcode 13.2.x - LiveCode builds iOS apps using the iOS 15.2 SDK There is a full list of working LiveCode/macOS/Xcode combinations here: https://livecode.com/faq Note: Whilst we endeavour to release updated versions of LiveCode supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly recommend disabling automatic update of Xcode or downloading the specific version of Xcode required directly from the Apple developer portal and installing it separately. Important: From the start of April 2022, Apple is only accepting apps built using iOS15.x SDKs. This means that, if you wish to submit apps to the AppStore you will have to be running at least macOS 11 in order to be able to install the necessary version of Xcode. To build macOS apps with an Apple architecture slice requires macOS High Sierra (10.13) or higher. Feedback ======== Please report any bugs encountered on our quality center at http://quality.livecode.com/ We have a forum available for discussing LiveCode at http://forums.livecode.com Have fun! The LiveCode Team -- From rabit at revigniter.com Thu Jun 16 12:00:57 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 16 Jun 2022 18:00:57 +0200 Subject: [ANN] Universal Button version 1.1.1 Message-ID: <7b6b5782-823e-061e-acf5-78f6f41cc98a@revigniter.com> There is a new version of the "universal button" widget. Fixed the compatibility loss with buttons created with previous widget versions. Sorry if this caused problems. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From jacque at hyperactivesw.com Thu Jun 16 16:08:41 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 16 Jun 2022 15:08:41 -0500 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 16, 2022 8:33:45 AM David V Glasgow via use-livecode wrote: > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of > internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL > for doing this. If not I am inclined to use > https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the Cheat > Sheets page and PDFs, and stumbled on a couple of errors in the just LC > one not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Fri Jun 17 04:46:11 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 09:46:11 +0100 Subject: Referencing Livecode In-Reply-To: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: > > Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It’s a commercial site. Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. > -- They do, don’t they. From memory, that wasn’t the context though. Cheers David G From richmondmathewson at gmail.com Fri Jun 17 04:57:15 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 11:57:15 +0300 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: >From what I know (my wife is a senior academic at a university) references to Wikipedia pages are academic suicide, fail, go straight to jail, do not pass GO, do not collect 200 smackers, and you get the picture. On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < use-livecode at lists.runrev.com> wrote: > > > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Is there a reason not to use the LC site URL, either alone or in > addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on > drawing customers in rather than conveying anything about text processing, > or obvious links to information on text processing. No criticism of that > at all. It’s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the > advantage of lots of information presented in a more academic and neutral > style. > > > > > > Re: the errors, they look like examples of functions that would return > "false" but I haven't seen them in context. > > -- > > They do, don’t they. From memory, that wasn’t the context though. > > Cheers > > David G > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Fri Jun 17 05:09:16 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 10:09:16 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Of course that is completely true for academic content! This ain’t that. In the paper I simply state that all text searching, manipulation and aggregation was achieved using Livecode scripts, with a footnote to a brief description and link to … Go on. Ask your wife. That is how it’s done. (unless you used R, or Python, which are celebrities needing no explanation or external link) Best Wishes, David Glasgow > On 17 Jun 2022, at 9:57 am, Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. > > On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in >> addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on >> drawing customers in rather than conveying anything about text processing, >> or obvious links to information on text processing. No criticism of that >> at all. It’s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the >> advantage of lots of information presented in a more academic and neutral >> style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return >> "false" but I haven't seen them in context. >>> -- >> >> They do, don’t they. From memory, that wasn’t the context though. >> >> Cheers >> >> David G >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From marksmithhfx at gmail.com Fri Jun 17 06:37:38 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Fri, 17 Jun 2022 11:37:38 +0100 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: I think in this instance, probably asking support would be the best bet. > On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: > > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Fri Jun 17 07:47:11 2022 From: brian at milby7.com (Brian Milby) Date: Fri, 17 Jun 2022 07:47:11 -0400 Subject: Referencing Livecode In-Reply-To: References: Message-ID: <54AD7477-1155-4F7E-B5BA-3E0E25162244@milby7.com> Maybe a direct link here would be better: https://livecode.com/resources/ Sent from my iPhone > On Jun 17, 2022, at 6:39 AM, Mark Smith via use-livecode wrote: > > I think in this instance, probably asking support would be the best bet. > >> On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: >> >> Hi Folks, >> >> I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. >> >> I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode >> >> Any alternative suggestions? >> >> David Glasgow >> >> PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. >> >> // String >> >> "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" >> "str" ends with "g" >> >> // Chunks >> >> char 5 of "str" is "n" >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Fri Jun 17 08:42:38 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Fri, 17 Jun 2022 14:42:38 +0200 Subject: [ANN] Universal Button 1.2.0 Message-ID: At the risk of getting on your nerves, but there is another new version of the "universal button" widget. Added text alignment controls and a horizontal margin ratio slider in the "Text" section. You have now better control over text and icon placement in case icon gravity is set to "left" or "right". This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From matthias_livecode_150811 at m-r-d.de Fri Jun 17 09:11:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 15:11:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? Message-ID: Hi, is there anyone who can use the new PolyGrid widget without any error? I am running into errors when i delete all default columns and add for example 2 new ones and filling adding content to it using the PI The error is similar to this one: executing at 2:55:48 PM LCB Error Value is not of correct type for assignment to variable - expected type for assigning to variable tWidth in com.livecode.widget.polygrid.drawHeader Object PolyGrid LCB File D:/PROYECTOS/Proyectos GitGub/Ferruslogic/addons-mega-bundle/Polygrid/com.livecode.widget.polygrid.lcb LCB Line 2555 Matthias From steven.crighton at livecode.com Fri Jun 17 11:05:52 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:05:52 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: References: Message-ID: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Hi Matthias We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. Thanks Steven From matthias_livecode_150811 at m-r-d.de Fri Jun 17 11:35:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 17:35:38 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: Hi Steven, thanks, but now after applying a template to the PG and then deleting all columns, i have after i deleted the last column again 5 columns. 4 columns with the name Col 4 and one column Col 5. And those columns could not be deleted. Shall i submit this also to the QC? Matthias > Am 17.06.2022 um 17:05 schrieb Steven Crighton via use-livecode : > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From steven.crighton at livecode.com Fri Jun 17 11:46:19 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:46:19 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Yes please. if you first empty the text data and then delete the column it should work as expected. But if you can submit it to QC we can look into further. Thanks Steven > On 17 Jun 2022, at 16:05, Steven Crighton wrote: > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > From bobsneidar at iotecdigital.com Fri Jun 17 12:09:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 16:09:05 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> I wonder why that is? While you may find inaccurate information on Wikipedia, the vastly overwhelming information there is absolutely accurate. But isn't that true of EVERY source? In my life experience I have found that settled science is very unsettled indeed. Salt causes high blood pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to live. A nuclear blast will render an area unlivable for 10,000 years. I could go on and on. Mankind is constantly revising "settled" science, and well we should, but what I object to is being told that what academia is now telling us is the new absolute, and I am expected to just accept that. Bob S > On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. From jacque at hyperactivesw.com Fri Jun 17 12:48:05 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 17 Jun 2022 11:48:05 -0500 Subject: Referencing Livecode In-Reply-To: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> Message-ID: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode wrote: > I wonder why that is? While you may find inaccurate information on > Wikipedia, the vastly overwhelming information there is absolutely > accurate. But isn't that true of EVERY source? In my life experience I have > found that settled science is very unsettled indeed. Salt causes high blood > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > live. A nuclear blast will render an area unlivable for 10,000 years. I > could go on and on. > > Mankind is constantly revising "settled" science, and well we should, but > what I object to is being told that what academia is now telling us is the > new absolute, and I am expected to just accept that. > > Bob S > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >> wrote: >> >> From what I know (my wife is a senior academic at a university) references >> to Wikipedia pages are academic suicide, fail, go straight to jail, do not >> pass GO, do not collect 200 smackers, and you get the picture. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From richmondmathewson at gmail.com Fri Jun 17 13:26:41 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 20:26:41 +0300 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: As I, or anyone else could write on Wikipedia about Hamlet being Shakespeare's coded love notes to a camel he met in Oxford, I really wonder why anyone, 'academic' or not, would stick their neck under that guillotine's fairly jittery blade escapes me completely. I often look up things on Wikipedia, THEN check them elsewhere. On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < use-livecode at lists.runrev.com> wrote: > The same rules apply to US schools. It may be similar to doing a critique > of Hamlet after reading only the Cliff Notes summary. No actual research > or > thought required. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode > wrote: > > > I wonder why that is? While you may find inaccurate information on > > Wikipedia, the vastly overwhelming information there is absolutely > > accurate. But isn't that true of EVERY source? In my life experience I > have > > found that settled science is very unsettled indeed. Salt causes high > blood > > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. > Eggs > > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > > live. A nuclear blast will render an area unlivable for 10,000 years. I > > could go on and on. > > > > Mankind is constantly revising "settled" science, and well we should, > but > > what I object to is being told that what academia is now telling us is > the > > new absolute, and I am expected to just accept that. > > > > Bob S > > > > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode > >> wrote: > >> > >> From what I know (my wife is a senior academic at a university) > references > >> to Wikipedia pages are academic suicide, fail, go straight to jail, do > not > >> pass GO, do not collect 200 smackers, and you get the picture. > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 17 13:49:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:49:17 +0000 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <98C870D5-00BF-4235-BB21-A88058E37688@iotecdigital.com> I think no matter what you go to, inevitably you are looking for what other people have said in critiquing hamlet or anything else. We call some people experts because other people called experts certified them as such. It can’t be any other way. But I often wonder who the first expert in any field was, and who certified them. :-) Sent from my iPhone > On Jun 17, 2022, at 09:49, J. Landman Gay via use-livecode wrote: > > The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. From bobsneidar at iotecdigital.com Fri Jun 17 13:50:49 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:50:49 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <88ABC7BE-6B04-4A1E-9086-AF2A1B2BB636@iotecdigital.com> That’s absurd. Everyone knows it was a Sherland pony. Sent from my iPhone > On Jun 17, 2022, at 10:28, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. From mkoob at rogers.com Fri Jun 17 13:55:21 2022 From: mkoob at rogers.com (Martin Koob) Date: Fri, 17 Jun 2022 13:55:21 -0400 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: What about this link from the LiveCode.com site? https://livecode.com/core-benefits-of-livecode/ It summarizes what LiveCode is and gives a comparison of LiveCode script to code in JavaScript, PHP and Java. It even mentions an academic article: "A 2016 peer reviewed study conducted at Southern Cross University Australia and University of Newcastle”. Unfortunately it does not include a reference to the study. I looked around and found a conference paper in 2015 that probably what they are referring to. Using Cognitive Load Theory to select an Environment for Teaching Mobile Apps Development January 2015 Conference: Australasian Computing Education Conference 2015 (ACE2015) At: Sydney, Australia Volume: 160. Here is a link to that conference paper where you can download it. https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. Martin > On Jun 17, 2022, at 1:26 PM, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. > > I often look up things on Wikipedia, THEN check them elsewhere. > > On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> The same rules apply to US schools. It may be similar to doing a critique >> of Hamlet after reading only the Cliff Notes summary. No actual research >> or >> thought required. >> >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode >> wrote: >> >>> I wonder why that is? While you may find inaccurate information on >>> Wikipedia, the vastly overwhelming information there is absolutely >>> accurate. But isn't that true of EVERY source? In my life experience I >> have >>> found that settled science is very unsettled indeed. Salt causes high >> blood >>> pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. >> Eggs >>> are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to >>> live. A nuclear blast will render an area unlivable for 10,000 years. I >>> could go on and on. >>> >>> Mankind is constantly revising "settled" science, and well we should, >> but >>> what I object to is being told that what academia is now telling us is >> the >>> new absolute, and I am expected to just accept that. >>> >>> Bob S >>> >>> >>>> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >>>> wrote: >>>> >>>> From what I know (my wife is a senior academic at a university) >> references >>>> to Wikipedia pages are academic suicide, fail, go straight to jail, do >> not >>>> pass GO, do not collect 200 smackers, and you get the picture. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Sat Jun 18 04:40:52 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Sat, 18 Jun 2022 09:40:52 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <47EE8E22-CF55-4BA3-BC20-97AF3A8ED518@gmail.com> > On 17 Jun 2022, at 6:55 pm, Martin Koob via use-livecode wrote: > > > Here is a link to that conference paper where you can download it. > https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development > > Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. That’s an interesting read! I might completely drop the footnote and just cite this. If I can find out exactly what it is…. Cheers David G From matthias_livecode_150811 at m-r-d.de Sat Jun 18 05:35:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 11:35:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Message-ID: <8B9A04B8-7B95-495F-A8B2-525B728CF611@m-r-d.de> Done. https://quality.livecode.com/show_bug.cgi?id=23752 As it's possible to delete columns in a Datagrid which still has content, i would say this is a bug in Polygrid. > Am 17.06.2022 um 17:46 schrieb Steven Crighton via use-livecode >: > > Yes please. if you first empty the text data and then delete the column it should work as expected. > > But if you can submit it to QC we can look into further. > > Thanks > Steven > >> On 17 Jun 2022, at 16:05, Steven Crighton > wrote: >> >> Hi Matthias >> >> We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. >> >> Thanks >> Steven >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 13:33:54 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 17:33:54 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: Sorry if this has been discussed before but I could not find it. Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. After some testing I finally read the release notes and it states: Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" >From then on LC uses arm64. I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. Kind regards Bernd From harrison at all-auctions.com Sat Jun 18 14:06:46 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Sat, 18 Jun 2022 14:06:46 -0400 Subject: LC Server & Monterey In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <38032FA7-3DE9-4E3C-BBCA-771D619BFA5D@all-auctions.com> I’m trying to upgrade my web-server from Catalina to Monterey, and I’m running into Error 403 Forbidden You don't have permission to access this resource. I’m using LiveCode Server 9.6.7 Everything worked great under Catalina. What extra thing do I need to do for Monterey? Anyone else worked through this problem? Thanks, Rick From matthias_livecode_150811 at m-r-d.de Sat Jun 18 14:24:17 2022 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Sat, 18 Jun 2022 20:24:17 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: Message-ID: Bernd, May be a dumb question, but how did you verify that LC was running in Rosetta mode although it was not checked. Regards, Matthias Von meinem iPhone gesendet > Am 18.06.2022 um 19:35 schrieb Niggemann, Bernd via use-livecode : > > Sorry if this has been discussed before but I could not find it. > > Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. > > After some testing I finally read the release notes and it states: > Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. > > For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. > Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" > From then on LC uses arm64. > > I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 14:36:27 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 18:36:27 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Hi Matthias, I should have added that to my previous post: If you put "put the processor" into the message box it says Rosetta: x86_64 Native: arm64 Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB Kind regards Bernd From dochawk at gmail.com Sat Jun 18 14:54:28 2022 From: dochawk at gmail.com (doc hawk) Date: Sat, 18 Jun 2022 11:54:28 -0700 Subject: Can't activate indy license on 10.0 Message-ID: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> I finally dropped my business subscription that I never used, but I have a lifetime indy license. The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. Am I missing something here? From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:22:31 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:22:31 +0200 Subject: Can't activate indy license on 10.0 In-Reply-To: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> References: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> Message-ID: <27C7B37A-CC7C-4108-8ADE-8AEFEF3B5DA2@m-r-d.de> Maybe there is already a license for LC 10 DP4 or so. If you are on Maybe you could check the folder ~/Library/Application Support/RunRev/Licenses and see if there is already a license file for that version and delete it. I am not completely sure there that folder is on Windows, but i think under ~/Appdata/Roaming Matthias > Am 18.06.2022 um 20:54 schrieb doc hawk via use-livecode : > > > I finally dropped my business subscription that I never used, but I have a lifetime indy license. > > The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. > > Am I missing something here? > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:27:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:27:38 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Message-ID: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Thanks Bernd, ....the processor... should have know that. it seems i got to much sun today. ;) I was also wondering why the check box for rosetta was already unchecked after installation, but did not had the idea to check. I just trusted macOS. ;) So, the question now is, is this a macOS problem or is it possible that a standalone could show the wrong setting due to a wrong configuration or so when it is created. Anyway, thanks for pointing this out. Matthias > Am 18.06.2022 um 20:36 schrieb Niggemann, Bernd via use-livecode : > > Hi Matthias, > > I should have added that to my previous post: > > If you put "put the processor" into the message box it says > > Rosetta: x86_64 > Native: arm64 > > Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From hechris at ziggo.nl Sun Jun 19 04:01:16 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 10:01:16 +0200 Subject: folders() does not return aliases to folders? Message-ID: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Hi, Aliases to foiders are missing in "the folders" function In the Dictionary for folders: Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. Is it a bug or could it be my mistake? This is on OSX 12.4 and LC 9.6.7 regards, Chris Heidecker From hechris at ziggo.nl Sun Jun 19 06:19:14 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 12:19:14 +0200 Subject: folders() does not return aliases to folders? In-Reply-To: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> References: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Message-ID: <13BD3E36-8B5F-499C-8111-FAEBB0B60E31@ziggo.nl> A workaround to get the alias folders into the folderlist. Maybe there is a more elegant approach? function theFolders targetFolder put the defaultFolder into oldDef set the defaultFolder to targetFolder put the folders into folderList put the files into fileList repeat for each line theFile in fileList put the aliasReference of theFile into theAlias if theAlias is not empty then if there is a folder theAlias then --answer "the path to: " & theAlias put return & theFile after folderList end if end if end repeat set the defaultFolder to oldDef return folderList end theFolders on mouseUp answer folder "Choose a folder with aliases to folders in it" put theFolders(it) into folderList filter folderList without ".." sort lines of folderList international answer folderList end mouseUp -- I set the defaultfolder and did not use folders(targetFolder) because -- otherwise i would have to construct the filepath for the aliasreference -- put the aliasReference of (targetFolder&"/"& theFile) into theAlias Regards, Chris Heidecker > Op 19 jun. 2022, om 10:01 heeft Chris Heidecker via use-livecode het volgende geschreven: > > Hi, > > Aliases to foiders are missing in "the folders" function > > In the Dictionary for folders: > Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. > > Is it a bug or could it be my mistake? > This is on OSX 12.4 and LC 9.6.7 > > > regards, > Chris Heidecker > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Sun Jun 19 09:17:00 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sun, 19 Jun 2022 09:17:00 -0400 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: I, for one, appreciate these sorts of messages. On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > > At the risk of getting on your nerves, but there is another > new version of the "universal button" widget. > > Added text alignment controls and a horizontal margin > ratio slider in the "Text" section. > You have now better control over text and icon placement > in case icon gravity is set to "left" or "right". > > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Sun Jun 19 10:54:07 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Sun, 19 Jun 2022 16:54:07 +0200 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Thank you, Mike. On 19.06.22 15:17, Mike Kerner via use-livecode wrote: > I, for one, appreciate these sorts of messages. > > On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> >> At the risk of getting on your nerves, but there is another >> new version of the "universal button" widget. >> >> Added text alignment controls and a horizontal margin >> ratio slider in the "Text" section. >> You have now better control over text and icon placement >> in case icon gravity is set to "left" or "right". >> >> >> This release can be downloaded here: >> https://github.com/revig/universal-button-widget/releases >> >> >> Ralf >> From prothero at earthlearningsolutions.org Sun Jun 19 11:35:48 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Sun, 19 Jun 2022 08:35:48 -0700 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> References: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Message-ID: <8FEF6AE1-AD72-469C-A2A6-146F564EEBD2@earthlearningsolutions.org> This looks really useful. Thanks! Bill William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 19, 2022, at 7:54 AM, Ralf Bitter via use-livecode wrote: > > Thank you, Mike. > > >> On 19.06.22 15:17, Mike Kerner via use-livecode wrote: >> I, for one, appreciate these sorts of messages. >>> On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>> At the risk of getting on your nerves, but there is another >>> new version of the "universal button" widget. >>> >>> Added text alignment controls and a horizontal margin >>> ratio slider in the "Text" section. >>> You have now better control over text and icon placement >>> in case icon gravity is set to "left" or "right". >>> >>> >>> This release can be downloaded here: >>> https://github.com/revig/universal-button-widget/releases >>> >>> >>> Ralf >>> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 16:32:46 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 19 Jun 2022 21:32:46 +0100 Subject: Stylistic question. Message-ID: I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. In the card script, there will be code like on mouseUp   switch the short name of the target     case "first"         doCommandFirst         break     case "another"         doCommandAnother         break     case "lastnotleast"         doCommandlastnotleast         break   end switch end mouseUp I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. Thanks for any opinions, Alex. From brian at milby7.com Sun Jun 19 17:06:37 2022 From: brian at milby7.com (Brian Milby) Date: Sun, 19 Jun 2022 17:06:37 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. Sent from my iPhone > On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: > > I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Sun Jun 19 19:19:54 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 19 Jun 2022 23:19:54 +0000 Subject: Stylistic question. In-Reply-To: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> Message-ID: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. Sent from my iPhone > On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: > > One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. > > Sent from my iPhone > >> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >> >> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 19:36:00 2022 From: alex at tweedly.net (Alex Tweedly) Date: Mon, 20 Jun 2022 00:36:00 +0100 Subject: Stylistic question. In-Reply-To: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Message-ID: <2ed0b611-a13c-ba6b-7bff-ffa474b0cce3@tweedly.net> On 20/06/2022 00:19, Bob Sneidar via use-livecode wrote: > Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. Absolutely. And the converse - code that is not shared should be as low in the hierarchy as possible. In this case, there is really no shared code. If it's button "first" you call one handler. If it's button "whatever I called the second", you call a different handler. etc.  Nothing shared at all. As to Brian's point about behaviours and Git, I can see that. I admit to being slightly "slack" about what code needs to go into behaviour scripts so it can be Gitted. If it's code that is very brief, and will "never" change, I put that in the regular stack. So in this case, I'd have the script of button "first" be on mouseUp    doCommandFirst end mouseUp and I'm willing to bet that will ever change :-) > For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. Sounds cool. If I ever use a Datagrid, I'll do that. Alex. > If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. > > Sent from my iPhone > >> On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: >> >> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stacks behavior script. >> >> Sent from my iPhone >> >>> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >>> >>> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >>> >>> In the card script, there will be code like >>> >>> on mouseUp >>> switch the short name of the target >>> case "first" >>> doCommandFirst >>> break >>> case "another" >>> doCommandAnother >>> break >>> case "lastnotleast" >>> doCommandlastnotleast >>> break >>> end switch >>> end mouseUp >>> >>> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >>> >>> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >>> >>> Thanks for any opinions, >>> >>> Alex. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 20 10:50:32 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 20 Jun 2022 15:50:32 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Message-ID: <0f06595048462558e4ea94965d8ebb81@livecode.com> On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: > So, the question now is, is this a macOS problem or is it possible > that a standalone could show the wrong setting due to a wrong > configuration or so when it is created. It is a macOS (Finder) bug - I think it was the same when they added 32-bit vs 64-bit, and probably Intel vs PowerPC. There's a plist entry 'LSArchitecturePriority' which is the order in which the different slices should be used - currently we have x86-64 then arm64 and it seems the Finder doesn't use this to determine whether to show the Rosetta box as checked or not when the user hasn't explicitly prodded it in the past (which obviously they won't have done for new apps / those which didn't have the option before!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Mon Jun 20 14:29:10 2022 From: richmondmathewson at gmail.com (Richmond) Date: Mon, 20 Jun 2022 21:29:10 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <0f06595048462558e4ea94965d8ebb81@livecode.com> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> <0f06595048462558e4ea94965d8ebb81@livecode.com> Message-ID: <068d4b2a-3120-fce8-88a3-edae3de3bb9d@gmail.com> In the standalone builder you have always separated Linux 32-bit and 64-bit builds, and the same with Windows: could you alter the MacOS standalones so we end up with one INTEL 64-bit standalone, and one ARM standalone, rather than a awkward sandwich? Best, Richmond. On 20.06.22 17:50, Mark Waddingham via use-livecode wrote: > On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: >> So, the question now is, is this a macOS problem or is it possible >> that a standalone could show the wrong setting due to a wrong >> configuration or so when it is created. > > It is a macOS (Finder) bug - I think it was the same when they added > 32-bit vs 64-bit, and probably Intel vs PowerPC. > > There's a plist entry 'LSArchitecturePriority' which is the order in > which the different slices should be used - currently we have x86-64 > then arm64 and it seems the Finder doesn't use this to determine > whether to show the Rosetta box as checked or not when the user hasn't > explicitly prodded it in the past (which obviously they won't have > done for new apps / those which didn't have the option before!). > > Warmest Regards, > > Mark. > From Bernd.Niggemann at uni-wh.de Mon Jun 20 14:54:48 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Mon, 20 Jun 2022 18:54:48 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Richmond wrote: > In the standalone builder you have always separated > Linux 32-bit and 64-bit builds, and the same with > Windows: could you alter the MacOS standalones so we > end up with one INTEL 64-bit standalone, and one ARM > standalone, rather than a awkward sandwich? In the current (see subject) versions the standalone builder for Mac lets you build: either Intel or Arm or both Kind regards Bernd From richmondmathewson at gmail.com Mon Jun 20 15:45:39 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Mon, 20 Jun 2022 22:45:39 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: Indeed, but 'both' results in an app package containing 2 'slices', rather than 2 distinct apps. On Mon, 20 Jun 2022, 21:56 Niggemann, Bernd via use-livecode, < use-livecode at lists.runrev.com> wrote: > Richmond wrote: > > > In the standalone builder you have always separated > > Linux 32-bit and 64-bit builds, and the same with > > Windows: could you alter the MacOS standalones so we > > end up with one INTEL 64-bit standalone, and one ARM > > standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 20 15:55:01 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 20 Jun 2022 21:55:01 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Hm, here in LC 9.6.8 RC2 and 10DP4 i see only 'macOS Intel' and 'macOS Apple (experimental)'. When i select both, then a universal standalone is created. So to have separate Intel and M1 versions, I have to run the standalone building 2 times. Once with only Intel selected and then once with only Apple selected Better would be a third option which would say Universal. So one could select all 3 options to get a universal and also versions for each cpu platform. Anyway, the macOS Apple support is currently experimental, i am pretty sure there will be such an option in future. At least i hope so. ;) Matthias > Am 20.06.2022 um 20:54 schrieb Niggemann, Bernd via use-livecode : > > Richmond wrote: > >> In the standalone builder you have always separated >> Linux 32-bit and 64-bit builds, and the same with >> Windows: could you alter the MacOS standalones so we >> end up with one INTEL 64-bit standalone, and one ARM >> standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alanstenhouse at hotmail.com Mon Jun 20 19:46:58 2022 From: alanstenhouse at hotmail.com (Alan Stenhouse) Date: Tue, 21 Jun 2022 09:16:58 +0930 Subject: Referencing Livecode In-Reply-To: References: Message-ID: Hi David In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 and https://www.sciencedirect.com/science/article/pii/S2351989421001761 HTH cheers Alan > On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: > >> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >> >> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > >> >> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >> -- > > They do, don?t they. From memory, that wasn?t the context though. > > Cheers > > David G From Bernd.Niggemann at uni-wh.de Tue Jun 21 05:51:18 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Tue, 21 Jun 2022 09:51:18 +0000 Subject: Referencing Livecode Message-ID: Alan Stenhouse via use-livecode wrote > In a couple of my publications, I described developing apps with Livecode and > referred to www.livecode.org and www.livecode.com, but didn't include anything > in the references as there was nothing (AFAICS at that time) that would satisfy > scientific publication standards. > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 Alan, that is really cool. Congratulations. Kind regards Bernd From mark at livecode.com Tue Jun 21 05:56:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 10:56:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: > Anyway, the macOS Apple support is currently experimental, i am pretty > sure there will be such an option in future. At least i hope so. ;) Why? The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. Warmest Regards, Mark. P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 21 06:42:01 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 21 Jun 2022 11:42:01 +0100 Subject: OT Re: Referencing Livecode In-Reply-To: References: Message-ID: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> That is really helpful Alan. A pair of fine papers! I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. Cheers, David G > On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: > > Hi David > > In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. > > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 > > HTH > > cheers > > Alan > > >> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>> -- >> >> They do, don?t they. From memory, that wasn?t the context though. >> >> Cheers >> >> David G > From matthias_livecode_150811 at m-r-d.de Tue Jun 21 07:18:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 13:18:25 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> > Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : > > On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: >> Anyway, the macOS Apple support is currently experimental, i am pretty >> sure there will be such an option in future. At least i hope so. ;) > > Why? > First, it's more convenient for the developer. The Intel only and Apple only builds are smaller ins size than the universal build. So if i want to build those single platform apps to offer the smaller sized apps i have to run the standalone building process twice, right? And before i run the 2nd build process i even have to switch the settings, right? That's not very convenient. And for those who want to build an universal app an "universal" option in the standalone settings would be great. And btw why did this option exist in previous LC versions for an Universal app with PPC and Intel support? Regards, Matthias > The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. > > Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. > > Warmest Regards, > > Mark. > > P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. > > P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Tue Jun 21 08:28:48 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 08:28:48 -0400 Subject: OT Re: Referencing Livecode In-Reply-To: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> References: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> Message-ID: Hi. These are great examples of use cases for LiveCode and it is great how you explain the app design. It especially cool that the apps are used for citizen science. It complements LiveCode's “anyone can code” tag line with the “any one can do science" ethic of citizen science. Thanks Alan. Martin Koob > On Jun 21, 2022, at 6:42 AM, David V Glasgow via use-livecode wrote: > > > That is really helpful Alan. A pair of fine papers! > > I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. > > Cheers, > > David G > >> On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: >> >> Hi David >> >> In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. >> >> See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 >> and >> https://www.sciencedirect.com/science/article/pii/S2351989421001761 >> >> HTH >> >> cheers >> >> Alan >> >> >>> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >>> >>>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>>> >>>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >>> >>> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >>> >>> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >>> >>> >>>> >>>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>>> -- >>> >>> They do, don?t they. From memory, that wasn?t the context though. >>> >>> Cheers >>> >>> David G >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 21 09:19:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 14:19:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> Message-ID: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode >> : >> Why? >> > > First, it's more convenient for the developer. I think the end user is more important (in this case) ;) > The Intel only and Apple only builds are smaller ins size than the > universal build. True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. > So if i want to build those single platform apps to offer the smaller > sized apps i have to run the standalone building process twice, > right? And before i run the 2nd build process i even have to switch > the settings, right? > That's not very convenient. Offering two separate downloads to users is not very convenient to them ;) > And btw why did this option exist in previous LC versions for an > Universal app with PPC and Intel support? Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From matthias_livecode_150811 at m-r-d.de Tue Jun 21 10:08:48 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 16:08:48 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> <2daab8720c379e6b70faf42ce23f29cf@livecode.com> Message-ID: <2AA3A6FD-E032-4B56-828E-9BCF11B99922@m-r-d.de> > Am 21.06.2022 um 15:19 schrieb Mark Waddingham via use-livecode : > > On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >>> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : >>> Why? >> First, it's more convenient for the developer. > > I think the end user is more important (in this case) ;) > >> The Intel only and Apple only builds are smaller ins size than the >> universal build. > > True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? In my vocational training in the mid 80's the mantra of my instructors was "SAVE resources!". Okay, at that time computers did not have many ram and hard disk space. But anyway, i still keep this mantra in mind when programing or doing other things. Just because computers nowadays have plenty of ram and hard disk space does not mean we have to completely fill up it. ;) > > There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. > Therefore the Universal build would be. That's the reason why i argue for 3 options for macOS. When i switched to my new Mac Studio there were several 3rd party programs which were only available as single Apple Chips version and not as an universal build. But there might be special reasons for it. > Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. Is it so much work to reimplement that routine? It already existed for PPC. > >> So if i want to build those single platform apps to offer the smaller >> sized apps i have to run the standalone building process twice, >> right? And before i run the 2nd build process i even have to switch >> the settings, right? >> That's not very convenient. > > Offering two separate downloads to users is not very convenient to them ;) Don't think so. Offering 3 separate downloads 1 x Intel, 1 x Apple, 1 x Universal is very convenient. The user can decide what to download and in case of a doubt the user can download the Universal build. > >> And btw why did this option exist in previous LC versions for an >> Universal app with PPC and Intel support? > > Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still Don't exaggerate, it was just 8 years ago. ;) > had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. > > These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. > But with the current problem that a Universal app by default runs in Rosetta although the Rosetta switch is not enabled that is also not very convenient for the customer. Anyway, i understand your points and can live with the decision. Regards, Matthias > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Tue Jun 21 13:44:10 2022 From: tom at makeshyft.com (Tom Glod) Date: Tue, 21 Jun 2022 13:44:10 -0400 Subject: arrayencode Message-ID: Hi Folks, I am wondering if anyone here knows the encoding algorithm that arrayencode() uses? Is it one that can be implemented in another language or is it proprietary? Thanks, Tom From craig at starfirelighting.com Tue Jun 21 14:16:28 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 14:16:28 -0400 Subject: my keyUp message has disappeared Message-ID: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> This is summarized from a couple of threads in the forum: ------------------------------------------------- The "keyUp"message has disappeared. This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. So a new stack in a new session has this in its card script: on keyUp x answer x end keyUp Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. ————————————— Just trashed the prefs file, which worked last time. Nope Just tried with another version of LC (9.6.6). Nope Just restarted. Nope. I have never seen anything quite like this, the complete loss of a message. I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. ——————————— This works from msg: send "keyUp" && "x" to this cd I can set a breakpoint and trap the message, or not. I get something like "x56”. —————————————————————————— Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. Craig From craig at starfirelighting.com Tue Jun 21 15:22:59 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 15:22:59 -0400 Subject: my keyUp message has disappeared In-Reply-To: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> References: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> Message-ID: I neglected to write the modified “keyUp” handler I am now using when I posted. it should read: > on keyUp x > answer x & random(99) > end keyUp in order to get that “x56” I mentioned. Craig > On Jun 21, 2022, at 2:16 PM, Craig Newman via use-livecode wrote: > > This is summarized from a couple of threads in the forum: > ------------------------------------------------- > > The "keyUp"message has disappeared. > > This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. > > So a new stack in a new session has this in its card script: > > on keyUp x > answer x > end keyUp > > Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. > > ————————————— > > Just trashed the prefs file, which worked last time. Nope > Just tried with another version of LC (9.6.6). Nope > Just restarted. Nope. > > I have never seen anything quite like this, the complete loss of a message. > > I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. > > Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. > > ——————————— > > This works from msg: > > send "keyUp" && "x" to this cd > > I can set a breakpoint and trap the message, or not. I get something like "x56”. > > —————————————————————————— > > Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. > > Craig > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 21 22:43:30 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 19:43:30 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> l oTom Glod wrote: > I am wondering if anyone here knows the encoding algorithm > that arrayencode() uses? Yes. > Is it one that can be implemented in another language or is > it proprietary? It should be technically possible to implement any algo in any sufficiently-complete language. Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). https://bsonspec.org/ BSON parsers are available for a great many languages: https://bsonspec.org/implementations.html -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Tue Jun 21 23:31:19 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 23:31:19 -0400 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: What is LSON? A web search doesn’t turn up anything. A shot in the dark here but Is it something internal to LiveCode i.e. Livecode Script Object Notation that is the basis for LiveCode arrays? Thanks for the references on BSON Martin > On Jun 21, 2022, at 10:43 PM, Richard Gaskin via use-livecode wrote: > > l oTom Glod wrote: > > > I am wondering if anyone here knows the encoding algorithm > > that arrayencode() uses? > > Yes. > > > > Is it one that can be implemented in another language or is > > it proprietary? > > It should be technically possible to implement any algo in any sufficiently-complete language. > > Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. > > > I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. > > But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. > > If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. > > But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. > > I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. > > If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). > > https://bsonspec.org/ > > BSON parsers are available for a great many languages: > https://bsonspec.org/implementations.html > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 22 00:55:43 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 21:55:43 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Martin Koob wrote: > What is LSON? A web search doesnt turn up anything. A shot > in the dark here but Is it something internal to LiveCode i.e. > Livecode Script Object Notation that is the basis for LiveCode > arrays? Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. > Thanks for the references on BSON Glad someone found them interesting. I was especially impressed with variable integers for the length specifier. Nice format, would be cool if it were more widely used outside of MongoDB circles. -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Wed Jun 22 08:26:44 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 22 Jun 2022 08:26:44 -0400 Subject: arrayencode In-Reply-To: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> References: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Message-ID: Hi Richard Thanks for the explanation. I think it is a helpful term or distinction to have. I think it would be good to actually have that term with a formal definition published by LiveCode or the community with references to BSON so it will show up in web searches for either term to lead people to LiveCode. Maybe a start would be to introduce it in the forums. Just a question though how is what you define as LSON different from JSON. Is it a different way of serializing LiveCode native arrays? Is there a way that LiveCode developers can have access to it directly through LCB or is it accessible in the realm of the engine only. Thanks Martin Koob > On Jun 22, 2022, at 12:55 AM, Richard Gaskin via use-livecode wrote: > > > What is LSON? A web search doesn’t turn up anything. A shot > > in the dark here but Is it something internal to LiveCode i.e. > > Livecode Script Object Notation that is the basis for LiveCode > > arrays? > > Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) > > So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. From MikeKerner at roadrunner.com Wed Jun 22 09:46:54 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:46:54 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: For an example like a session during LCG, throwing everything into a single script can make it easier to see everything, together, however, I absolutely, always, without exception, do this: 1) Every object that needs to do something gets its own handler, unless there is some reason to allow the behavior to pass up the chain. This situation is not one of them. 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. 3) I don't ever use switch. I can't stand it. If I had to write something like the above, I would do something like put the short name of the target into snot if snot is "first" then doCommandFirst else if snot is "another" doCommandAnother else if snot is "lastnotleast" doCommandLastNotLeast else # uh oh answer "ruh roh." end if # snot is "first" this assumes that the names of the handlers I would be calling are not named like the ones in the example, because if they were, you could also put the short name of the target into snot put "doCommand" & snot into toDo try do toDo catch e answer "ruh roh." end try On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > I've noticed that in a lot of the example code I've seen recently, > there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example > from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) > directly, and I'm wondering whether there are advantages or preferences > for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From MikeKerner at roadrunner.com Wed Jun 22 09:50:50 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:50:50 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: wupz. - i forgot the THEN's after each of the ELSE IF's too many languages on the same project swimming in my brain On Wed, Jun 22, 2022 at 9:46 AM Mike Kerner wrote: > For an example like a session during LCG, throwing everything into a > single script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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." > -- 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." From ambassador at fourthworld.com Wed Jun 22 10:09:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 07:09:09 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Martin Koob wrote: > Hi Richard > > Thanks for the explanation. I think it is a helpful term or > distinction to have. I think it would be good to actually have > that term with a formal definition published by LiveCode or > the community with references to BSON so it will show up in > web searches for either term to lead people to LiveCode. Maybe > a start would be to introduce it in the forums. I've been using the term for years whenever I discuss LC encoded arrays. A few others have as well, tho not many. If LC Ltd finds it useful for orienting newcomers to LC they could include it in the Dictionary's glossary, and perhaps sprinkle use of it in places where "LSON" can serve as a shorthand for "encoded associative array". > Just a question though how is what you define as LSON different > from JSON. Is it a different way of serializing LiveCode native > arrays? LSON is the LC-engine-native way to serialize LC arrays. JSON is the JavaScript-engine-native way to serialize JS objects. BSON is the MongoDB-engine-native way to serialize document objects. They're similar only in that each is purpose-built for its respective scripting engine. LSON is to LC what JSON is to JavaScript. But they're structurally very different, as different as LC associative arrays are from JavaScript's objects. > Is there a way that LiveCode developers can have access to it directly > through LCB or is it accessible in the realm of the engine only. I haven't yet had occasion to use LC Builder in production, so I'm not sure if that language also offers some form of LC Script's arrayEncode/arrayDecode. Given how central arrays are to working in LC I'd be surprised if LCB doesn't include support for array serialization. -- Richard Gaskin Fourth World Systems From tom at makeshyft.com Wed Jun 22 11:01:05 2022 From: tom at makeshyft.com (Tom Glod) Date: Wed, 22 Jun 2022 11:01:05 -0400 Subject: arrayencode In-Reply-To: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> References: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Message-ID: Hello Richard, thanks for the detailed answer. There are 2 reasons why I am considering this. 1. I can skip the encoding and decoding from and to json. 2. it supports binary, and does not require base encoding and its 33% inflation. For interoperability for the users, JSON is the way to go for sure. But for throughput between the UI Layer and "background service" I would love a way to just skip all the extra steps and send the serialized array to be unserialized into an array or map directly. I was hoping this was easy. I may ask you for your notes in the future, after I have a chat with Kevin and Mark about it. Thanks again, Tom On Wed, Jun 22, 2022 at 10:10 AM Richard Gaskin via use-livecode < use-livecode at lists.runrev.com> wrote: > Martin Koob wrote: > > > Hi Richard > > > > Thanks for the explanation. I think it is a helpful term or > > distinction to have. I think it would be good to actually have > > that term with a formal definition published by LiveCode or > > the community with references to BSON so it will show up in > > web searches for either term to lead people to LiveCode. Maybe > > a start would be to introduce it in the forums. > > I've been using the term for years whenever I discuss LC encoded arrays. > A few others have as well, tho not many. If LC Ltd finds it useful for > orienting newcomers to LC they could include it in the Dictionary's > glossary, and perhaps sprinkle use of it in places where "LSON" can > serve as a shorthand for "encoded associative array". > > > > Just a question though how is what you define as LSON different > > from JSON. Is it a different way of serializing LiveCode native > > arrays? > > LSON is the LC-engine-native way to serialize LC arrays. > > JSON is the JavaScript-engine-native way to serialize JS objects. > > BSON is the MongoDB-engine-native way to serialize document objects. > > They're similar only in that each is purpose-built for its respective > scripting engine. LSON is to LC what JSON is to JavaScript. > > But they're structurally very different, as different as LC associative > arrays are from JavaScript's objects. > > > > Is there a way that LiveCode developers can have access to it directly > > through LCB or is it accessible in the realm of the engine only. > > I haven't yet had occasion to use LC Builder in production, so I'm not > sure if that language also offers some form of LC Script's > arrayEncode/arrayDecode. Given how central arrays are to working in LC > I'd be surprised if LCB doesn't include support for array serialization. > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:10:57 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:10:57 +0200 Subject: Error message that vector icon widget missing when building iOS standalone Message-ID: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Hi, I have here an stack from which i created a standalone from in January. Today i needed to build a new version to get it running on iOS 15.5 When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Anyway, I checked my stack if that widget is somewhere, but cannot find it. I've reinstallled the Vectore Icon widget again and the build process was successful. Then i've unloaded the widget and rebuild the standalone again and the build was also successful. But as soon as i uninstall that widget i get that error. Does anyone have an idea where i can search the complete stack and its substacks for that widget? Btw.: For what exactly is that widget. To be honest i don't have a clue. Regards, Matthias From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:14:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:14:34 +0200 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: > Am 22.06.2022 um 17:10 schrieb matthias rebbe via use-livecode : > > Hi, > > I have here an stack from which i created a standalone from in January. > > Today i needed to build a new version to get it running on iOS 15.5 > > > When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". > > I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Of course the Vector Icon widget was not installed anymore > Anyway, I checked my stack if that widget is somewhere, but cannot find it. > > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 11:18:07 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 15:18:07 +0000 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Richard I think I hear you say that JSON is an alternative to arrayEncode? What about storing to SQL blob and binary files? Will it suffice? I'd consider converting all my arrayEncoding to JSON if so. Bob S > On Jun 21, 2022, at 19:43 , Richard Gaskin via use-livecode wrote: > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. From ambassador at fourthworld.com Wed Jun 22 12:02:10 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:02:10 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Tom Glod wrote: > Hello Richard, thanks for the detailed answer. > There are 2 reasons why I am considering this. > > 1. I can skip the encoding and decoding from and to json. > 2. it supports binary, and does not require base encoding and its > 33% inflation. > > For interoperability for the users, JSON is the way to go for sure. > But for throughput between the UI Layer and "background service" I > would love a way to just skip all the extra steps and send the > serialized array to be unserialized into an array or map directly. > > I was hoping this was easy. If you don't need interoperability with non-LiveCode systems, the choice couldn't be easier: LSON is the LC way. But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. What did I miss? > I may ask you for your notes in the future, after I have a chat with > Kevin and Mark about it. If you're talking with Mark you won't need my notes. He knows a thing or two about LC's array formats. :) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 12:13:02 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:13:02 -0700 Subject: arrayencode In-Reply-To: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Message-ID: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Bob Sneidar wrote: > Richard I think I hear you say that JSON is an alternative to > arrayEncode? I'm apparently writing so badly maybe I should skip the shorthand "LSON" and just write the full form: "output from LC's built-in arrayEncode". I'd adopted "LSON" to help position its role as the LC-native way to transport and store array data, similar to the role of JSON in JavaScript workflows or BSON within MongoDB systems. When you need interoperability, there's no longer much of a choice: JSON is the de facto standard. Though highly specific to how JavaScript works, browsers are so ubiquitous that most languages other than JavaScript now have some means of transforming JSON into a format that can be used internally, as LC does with its JSONtoArray and ArrayToJSON functions. But when all producers and consumers of data in a system use the LC engine, LSON (output from LC's built-in arrayEncode) is the with-the-grain choice. > What about storing to SQL blob and binary files? Will it suffice? I'd > consider converting all my arrayEncoding to JSON if so. LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. -- Richard Gaskin Fourth World Systems From bobsneidar at iotecdigital.com Wed Jun 22 12:30:55 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 16:30:55 +0000 Subject: arrayencode In-Reply-To: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Message-ID: Okay I looked up JSON and can see these are two different animals. JSON looks like an xml-ish sort of format or a bit like the PDF fdf format for data files. (In fact, now that I think about it Adobe may be using JSON as their format. Bob S > On Jun 22, 2022, at 09:13 , Richard Gaskin via use-livecode wrote: > > > What about storing to SQL blob and binary files? Will it suffice? I'd > > consider converting all my arrayEncoding to JSON if so. > > LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. > > -- > Richard Gaskin > Fourth World Systems From jacque at hyperactivesw.com Wed Jun 22 15:41:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 22 Jun 2022 14:41:02 -0500 Subject: Stylistic question. In-Reply-To: References: Message-ID: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:49:51 AM Mike Kerner via use-livecode wrote: > For an example like a session during LCG, throwing everything into a single > script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 16:24:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 20:24:40 +0000 Subject: Stylistic question. In-Reply-To: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Well then Navigator is for you! If an object has a behavior and no script of it's own, it's color in the list is green. If it has a script but no behavior, it's color is blue. If it has both, it's purple. Simply double clicking an object opens it's behavior script if it has one, and it's native script if it doesn't. You don't have to keep track of anything anymore. Bob S > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode wrote: > > I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. > > The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From alex at tweedly.net Wed Jun 22 19:31:38 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:31:38 +0100 Subject: arrayencode In-Reply-To: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: > [ ... about using JSON ... ] > But if you don't need interoperability, you wouldn't need to write a > parser, since LC includes a good one built into the engine. > > What did I miss? > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? The parser "built-in" seems to work fine in the IDE, but not on the server : > set the errormode to inline > put the version > > put "{'name':'asdf'}" into t > replace "'" with quote in t > put JSONtoarray(t) into tA > put the keys of tA > fails with - file "/home/alextwee/public_html/rampuk/tJSON.lc" row 7, col 5: Function: error in function handler (JSONtoarray) row 7, col 5: put: error in expression (there's no mention of any platform restricitons in the dictionary). I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, which then fails with "error in function handler mergJSONDecode. (I must admit I encountered this a while ago, figured it was probably a temporary issue so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. I can't believe this problem isn't causing widespread problems, so it's probably something specific about me, or my on-rev account. If anyone has suggestions, I'll try them; if not, I'll put it as a bug report into QCC see what happens. Alex. From ambassador at fourthworld.com Wed Jun 22 19:38:27 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 16:38:27 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: Alex Tweedly wrote: > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? > > The fact that Livecode's support for JSON is, hmmm, mediocre at > best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server Interesting take. Thanks. I'd read Tom's post as being about LSON, with LC in both producer and consumer roles, which would make a JavaScript-optimized format unnecessary. Perhaps I'd misunderstood. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Wed Jun 22 19:50:05 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:50:05 +0100 Subject: arrayencode In-Reply-To: References: Message-ID: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> On 23/06/2022 00:38, Richard Gaskin via use-livecode wrote: > > Interesting take. Thanks. I'd read Tom's post as being about LSON, > with LC in both producer and consumer roles, which would make a > JavaScript-optimized format unnecessary.  Perhaps I'd misunderstood. > No, you didn't misunderstand. I misread your earlier post.  Your reference to  "built-in parser" was indeed about LSON, and obviously so;  I just misread it as being about JSON. Nevertheless, my central point remains (afact) valid - the support for JSON in Livecode seems incomplete, and in particular it seems flaky/missing on LCServer. Alex. From ambassador at fourthworld.com Wed Jun 22 20:00:41 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:00:41 -0700 Subject: arrayencode In-Reply-To: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> References: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> Message-ID: <7facfb24-94c8-865a-7832-59966128bd8e@fourthworld.com> Alex Tweedly wrote: > Nevertheless, my central point remains (afact) valid - the support > for JSON in Livecode seems incomplete, and in particular it seems > flaky/missing on LCServer. Making externals easily findable by the LC Server engine should be a quick fix for them, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 20:11:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:11:09 -0700 Subject: How to color a "cell"? Message-ID: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> I need to set the backgroundColor of a complete "cell", where "cell" is defined as the portion of a row in a table field between tabs when the vGrid is set. I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From MikeKerner at roadrunner.com Wed Jun 22 21:11:44 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 21:11:44 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: J.: Not true on the remote debugging. Everything I write is for mobes. Literally everything. Except for the server code for the mobes, but comparatively speaking, there are many, many, many more lines in the mobe code than there is in the server code. All of these behaviors are in script-only-stacks. I have zero difficulty debugging them with the remote debugger. I have not found that I have too many files, but I also organize them into folders, as needed, and I do just about all of my editing in Sublime, which makes keeping the project straight very easy. The dislike I have for switch is a personal thing. I get that it's very similar to the way switch is used in other tongues. Maybe it's the way it looks. Maybe it's the break at the end of each segment. I don't know. It always feels clunky to write and it feels clunky to read. On Wed, Jun 22, 2022 at 4:25 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Well then Navigator is for you! If an object has a behavior and no script > of it's own, it's color in the list is green. If it has a script but no > behavior, it's color is blue. If it has both, it's purple. Simply double > clicking an object opens it's behavior script if it has one, and it's > native script if it doesn't. > > You don't have to keep track of anything anymore. > > Bob S > > > > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > I find that too many behavior stacks make it difficult to keep track of > where things are. But the primary downside is that script-only stacks don't > work with remote debugging. That's a big drawback for me since most of my > apps these days are for mobile. I do use behaviors quite a bit, but I put > the scripts into buttons so they can be debugged remotely. Or maybe you > mean you use regular stacks for behaviors? Those would work. > > > > The switch construct is way more flexible than if/then and much cleaner > to read and track. I use them all the time. They're especially useful when > you want to group several conditionals. What don't you like about them? > Just curious. > > > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Thu Jun 23 05:31:01 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 11:31:01 +0200 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows: > This external has been implemented to encode/decode UTF8 JSON to a LiveCode array as quickly as possible. Currently externals can not work with multi-dimensional LiveCode arrays so the intention is it is used with two functions like this: > > -- pArray - array to be encoded > -- pForceRootType - can force the root to be an object if it looks like an array > -- pPretty - include whitespace > function ArrayToJSON pArray,pForceRootType,pPretty > repeat for each key tKey in pArray > if pArray[tKey] is an array then > put "}"&ArrayToJSON(pArray[tKey]) into pArray[tKey] > end if > end repeat > return(mergJSONEncode("pArray",pForceRootType,pPretty)) > end ArrayToJSON > > function JSONToArray pJSON > local tArray,tKeys > repeat for each line tKey in mergJSONDecode(pJSON,"tArray") > put JSONToArray(tArray[tKey]) into tArray[tKey] > end repeat > return tArray > end JSONToArray > > For most cases the above is all the documentaion you will need. There are however some quirks to the external you might need to know about. Another option would be to load the JSON extension and to use the JsonImport() function. Ralf On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: > > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? >> > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server : > >> > set the errormode to inline >> put the version >> >> put "{'name':'asdf'}" into t >> replace "'" with quote in t >> put JSONtoarray(t) into tA >> put the keys of tA >> > fails with - > > file "/home/alextwee/public_html/rampuk/tJSON.lc" >   row 7, col 5: Function: error in function handler (JSONtoarray) >   row 7, col 5: put: error in expression > > (there's no mention of any platform restricitons in the dictionary). > > I tried copying in the sample ode for wrapping JSONToArray around > mergJSONDecode, > which then fails with "error in function handler mergJSONDecode. > > > (I must admit I encountered this a while ago, figured it was probably a > temporary issue > so I replaced JSON by LSON, and forgot all about it.) This discussion > prompted me to re-try it. > > I can't believe this problem isn't causing widespread problems, so it's > probably > something specific about me, or my on-rev account. If anyone has > suggestions, I'll > try them; if not, I'll put it as a bug report into QCC see what happens. > > Alex. From alex at tweedly.net Thu Jun 23 08:23:04 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 13:23:04 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: > Hi Alex, > > the JSONtoArray() function is part of the mergJSON external. > The README of this external describes how to use this function > and it's counterpart JSONtoArray as follows: > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > Another option would be to load the JSON extension and to use > the JsonImport() function. > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). I can't find anything about loading extensions other than what to do in the IDE. How do you load extensions to LC Server ?  On a shared web provider ?  (on-rev) Thanks, Alex > > Ralf > > > > On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >> >> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>> [ ... about using JSON ... ] >>> But if you don't need interoperability, you wouldn't need to write a >>> parser, since LC includes a good one built into the engine. >>> >>> What did I miss? >>> >> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >> >> The parser "built-in" seems to work fine in the IDE, but not on the >> server : >> >>> >> set the errormode to inline >>> put the version >>> >>> put "{'name':'asdf'}" into t >>> replace "'" with quote in t >>> put JSONtoarray(t) into tA >>> put the keys of tA >>> >> fails with - >> >> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>    row 7, col 5: Function: error in function handler (JSONtoarray) >>    row 7, col 5: put: error in expression >> >> (there's no mention of any platform restricitons in the dictionary). >> >> I tried copying in the sample ode for wrapping JSONToArray around >> mergJSONDecode, >> which then fails with "error in function handler mergJSONDecode. >> >> >> (I must admit I encountered this a while ago, figured it was probably >> a temporary issue >> so I replaced JSON by LSON, and forgot all about it.) This discussion >> prompted me to re-try it. >> >> I can't believe this problem isn't causing widespread problems, so >> it's probably >> something specific about me, or my on-rev account. If anyone has >> suggestions, I'll >> try them; if not, I'll put it as a bug report into QCC see what happens. >> >> Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 23 08:41:38 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 23 Jun 2022 08:41:38 -0400 Subject: How to color a "cell"? In-Reply-To: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> References: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> Message-ID: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Richard. I think this was discussed on the forum a while back. I do not believe you can do what you want without another control overlying the “rect” of the “cell”. Craig > On Jun 22, 2022, at 8:11 PM, Richard Gaskin via use-livecode wrote: > > I need to set the backgroundColor of a complete "cell", where "cell" is > defined as the portion of a row in a table field between tabs when the > vGrid is set. > > I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. > > Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? > > (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 23 12:08:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 23 Jun 2022 12:08:20 -0400 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <60FF3160-6D3C-40B7-9785-F34E439A4CA6@rogers.com> Hi There is a confirmed bug in bugzilla regarding loading of the mergJSON library. https://quality.livecode.com/show_bug.cgi?id=21223 I ran into it when building a standalone. I didn’t cause a problem in the IDE. In the standalone settings ‘Inclusions’ tab if I chose 'Search for required inclusions when saving the standalone application’ The app would not work properly when those commands were called. The work around is in the Inclusions tab choose 'Select inclusions for the standalone application' And then manually select the inclusion for mergJSON I reported the bug but it was marked a duplicate. I describe my workaround there. https://quality.livecode.com/show_bug.cgi?id=23736 I also have a demo stack showing the problem there. Also check if you have a 32 or 64 bit version of mergJSON. I have had mergJSON installed for a long time and while I was trying to trouble shoot this issue I found I had a few copies of mergJSON in the My LiveCode folder in different locations. I found one was created in 2013 which I think was 32 bit so I removed that and replaced it with one in another location created in 2019. Martin > On Jun 23, 2022, at 8:23 AM, Alex Tweedly via use-livecode wrote: > > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). > > I can't find anything about loading extensions other than what to do in the IDE. > > How do you load extensions to LC Server ? On a shared web provider ? (on-rev) > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>> row 7, col 5: Function: error in function handler (JSONtoarray) >>> row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so it's probably >>> something specific about me, or my on-rev account. If anyone has suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Thu Jun 23 12:48:05 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 18:48:05 +0200 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: On 23.06.22 14:23, Alex Tweedly via use-livecode wrote: > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says > that those functions are provided in > thews.goulding.script-library.mergjson library, so (I think) I shouldn't > need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to > "handler not found: mergJSONDecode" Hi Alex, have you added the mergJSON External to your server installation? I have just tested this again, actually it should work. My LC Server version is 9.6.6. > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but > I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON > extension ...". I wasn't aware I had to load those extensions which are > already part of the standard package (maybe I did that years ago and > have had time to forget :-). > > I can't find anything about loading extensions other than what to do in > the IDE. > > How do you load extensions to LC Server ?  On a shared web provider ? > (on-rev) You guessed it, use "load extension", example (tested on on-rev): load extension from file "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" Ralf > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a >>>> parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the >>> server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>>    row 7, col 5: Function: error in function handler (JSONtoarray) >>>    row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around >>> mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably >>> a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion >>> prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so >>> it's probably >>> something specific about me, or my on-rev account. If anyone has >>> suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. From jacque at hyperactivesw.com Thu Jun 23 12:59:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 11:59:02 -0500 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:14:45 PM Mike Kerner via use-livecode wrote: > All of these behaviors are in script-only-stacks. I have zero difficulty > debugging them with the remote debugger. From bobsneidar at iotecdigital.com Thu Jun 23 13:03:32 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:03:32 +0000 Subject: Stylistic question. In-Reply-To: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints are working for me. Try Clear All Breakpoints from the SE Debug menu (I think it will only clear breakpoints from open scripts though.) Also in the SE under the Breakpoints tab, you can uncheck all the existing breakpoints. Bob S > On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode wrote: > > Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From jacque at hyperactivesw.com Thu Jun 23 13:25:15 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 12:25:15 -0500 Subject: Stylistic question. In-Reply-To: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Message-ID: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 23, 2022 12:05:27 PM Bob Sneidar via use-livecode wrote: > Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints > are working for me. Try Clear All Breakpoints from the SE Debug menu (I > think it will only clear breakpoints from open scripts though.) Also in the > SE under the Breakpoints tab, you can uncheck all the existing breakpoints. > > Bob S > > >> On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode >> wrote: >> >> Something must have changed or you use a debugging method different from >> mine. Red dot breakpoints do not work in script only stacks because those >> stacks have no custom properties, which is where breakpoints are kept. I >> couldn't get scripted breakpoints to work either but I may have forgotten >> to save correctly. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 23 13:33:48 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:33:48 +0000 Subject: Stylistic question. In-Reply-To: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: OIC I didn't grok you were talking about standalone apps. Bob S > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode wrote: > > Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Thu Jun 23 13:56:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:56:42 +0000 Subject: Using card with the long id in a variable Message-ID: <7818011F-8B59-4A15-8A19-9FEB80150E3C@iotecdigital.com> Hi all. I just ran across an interesting "bug". In the IDE I had erroneously used the keyword "card" with a reference to the long id of the card as in card pParentCard. Since the long id already contains the keyword card it resolved to card "card ID 12345 of stack x of stacks". The strange thing is that in the IDE this worked and did not throw an error. But in a standalone it did. Of course, the proper retort would be, "Well that don't do that." Bob S From ambassador at fourthworld.com Thu Jun 23 14:28:29 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 11:28:29 -0700 Subject: How to color a "cell"? In-Reply-To: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Message-ID: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Craig wrote: > Richard wrote: >> I had hoped the paragraph-level formatting options introduced in >> v5.x would help, but alas as far as I can tell I can only set the >> backgroundColor of a run of text, not the full cell. > > I think this was discussed on the forum a while back. I do not believe > you can do what you want without another control overlying the rect > of the cell. Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. From the v5.5.4 Release Notes: - The backgroundColor property allows the color of the content area (inside any paragraph border) to be filled (note that strictly speaking this property is not inherited, but the effect is the same as if it was as the background of the field is rendered before the paragraphs are so the background color at the field level will show through to the paragraph if the paragraph has no background color). - The borderWidth property determines the width of the border to draw around the paragraph. Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. I was hoping I was just using it wrong. Here's how I set it in my tests: set the backgroundcolor of paragraph 2 of fld 1 to yellow Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From jacque at hyperactivesw.com Thu Jun 23 14:57:45 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 13:57:45 -0500 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: On 6/22/22 10:10 AM, matthias rebbe via use-livecode wrote: > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. I think that's the SVG widget that allows you to use SVG as button icons, or any other image. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From alex at tweedly.net Thu Jun 23 15:26:11 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:26:11 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: <411f4bc7-f62f-b844-0653-438476acd6e9@tweedly.net> On 23/06/2022 19:28, Richard Gaskin via use-livecode wrote: > > Thanks. I could get away with setting the backgroundColor of the whole > line, but that does the same as setting the backgroundColor of a > "cell": it draws the color only beneath the portion of the line that > contains text, leaving the rest blank. > Hmmmm - is there a non-visible character that would count as text ? then you could replace all spaces by it, and adjust back later. Alex From alex at tweedly.net Thu Jun 23 15:53:57 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:53:57 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <19c90254-7a32-bae1-f6bc-e5830d41b1b3@tweedly.net> On 23/06/2022 17:48, Ralf Bitter via use-livecode wrote: > > Hi Alex, have you added the mergJSON External to your server installation? No. In fact, I didn't realize I needed to, or even could :-) > You guessed it, use "load extension", example (tested on on-rev): > > load extension from file > "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" > Well, I finally found that file, buried inside the Livecode Application bundle (inside Tools of all places). I don't know how anyone not familiar with command line tools would ever get there. And having uploaded it and then loaded it, JSONImport works !! Thank you Ralf for sticking with me patiently, and everyone else for their help. Now - back to that quick 5-minute test I was going to do 1-1/2 days ago :-( Alex. From mark at livecode.com Thu Jun 23 15:54:55 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 23 Jun 2022 20:54:55 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: IIRC you need to use ‘line’ to set ‘paragraph‘ properties of fields… Sent from my iPhone > On 23 Jun 2022, at 19:29, Richard Gaskin via use-livecode wrote: > > Craig wrote: > > > Richard wrote: > >> I had hoped the paragraph-level formatting options introduced in > >> v5.x would help, but alas as far as I can tell I can only set the > >> backgroundColor of a run of text, not the full cell. > > > > I think this was discussed on the forum a while back. I do not believe > > you can do what you want without another control overlying the “rect” > > of the “cell”. > > Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. > > The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. > > But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. > > From the v5.5.4 Release Notes: > > - The backgroundColor property allows the color of the content area > (inside any paragraph border) to be filled (note that strictly > speaking this property is not inherited, but the effect is the same > as if it was as the background of the field is rendered before the > paragraphs are so the background color at the field level will > ‘show through’ to the paragraph if the paragraph has no background > color). > > - The borderWidth property determines the width of the border to draw > around the paragraph. > > Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. > > So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. > > I was hoping I was just using it wrong. > > Here's how I set it in my tests: > > set the backgroundcolor of paragraph 2 of fld 1 to yellow > > Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? > > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Thu Jun 23 18:54:52 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 15:54:52 -0700 Subject: How to color a "cell"? In-Reply-To: References: Message-ID: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Thanks Mark - works. I could have sworn I'd tried "line" earlier when attempting to set the backgroundColor, and when it failed was when I switched to trying "paragraph". But it works now so I don't mind being mistaken. Oddly, "paragraph" appears to be synonymous with "line" for the borderWidth, borderColor, firstIndent, leftIndent, textAlign, spaceAbove, hGrid, vGrid, and tabs paragraph properties. Near as I can tell backgroundColor is the only paragraph properties where the "paragraph" chunk type isn't synonymous. Should it be? I'm good either way now that I have a solution, but if it would be helpful I could file a bug report/enhancement request. -- Richard Gaskin Fourth World Systems Mark Waddingham wrote: > IIRC you need to use line to set paragraph properties of fields > > On 23 Jun 2022, at 19:29, Richard Gaskin wrote: >> I could get away with setting the backgroundColor of the whole line, >> but that does the same as setting the backgroundColor of a "cell": it >> draws the color only beneath the portion of the line that contains >> text, leaving the rest blank. >> >> The borderWidth and borderColor paragraph properties work as >> expected, affecting the full line whether it's filled with text >> or has no text at all. From MikeKerner at roadrunner.com Thu Jun 23 19:59:58 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 23 Jun 2022 19:59:58 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Red-dotting: A couple of things: 1) I don't use the SE very often, so I have not tried red-dotting before building. However, "BREAKPOINT" works. 2) Once you have the remote debugger up, you can red-dot all you like, and they will stick until the app closes 3) When I'm debugging (like I am, tonight), I have a group of debugging buttons that I have show in the app. One of those is just on mouseUp global lastCommand ask "What" with lastCommand if it is not empty then put it into lastCommand do it end if end mouseUp When the dialog pops up, I type something like breakpoint; send "mouseUp" to someControl and I'm in the debugger, in that control On Thu, Jun 23, 2022 at 1:34 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > OIC I didn't grok you were talking about standalone apps. > > Bob S > > > > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Breakpoints work fine in the IDE. But script only stacks do not retain > them when remote debugging, or at least they didn't for me. Are you talking > about mobile apps? > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > HyperActive Software | http://www.hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From ambassador at fourthworld.com Thu Jun 23 23:40:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 20:40:26 -0700 Subject: Stylistic question. In-Reply-To: References: Message-ID: <6914ec36-b1aa-9a4b-07b8-ffd94924c932@fourthworld.com> J. Landman Gay wrote: > Breakpoints work fine in the IDE. But script only stacks do not > retain them when remote debugging Breakpoints are a runtime-settable property, so those who enjoy C-flavored workflows with lots of tiny text files could save their breakpoints out to text files and have a module load them in again at runtime. Maybe that could be added to any of the tools that turn normal stackfiles into script-only stack files and back again so they can be worked on. Then we could add a tool to handle custom props, turning those into JSON files and back again. Then the UI stuff could still be binary like it is with Apple's tools, and as long as we don't call them stackfiles but call them NIBs instead then it's cool again. :) ::ducking:: #FaFaFaFashion -- Richard Gaskin Fourth World Systems From mark at livecode.com Fri Jun 24 01:24:39 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 06:24:39 +0100 Subject: How to color a "cell"? In-Reply-To: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> References: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Message-ID: <7d81320c68d6cb9c4d54323aa381c6d0@livecode.com> On 2022-06-23 23:54, Richard Gaskin via use-livecode wrote: > Thanks Mark - works. I could have sworn I'd tried "line" earlier when > attempting to set the backgroundColor, and when it failed was when I > switched to trying "paragraph". But it works now so I don't mind being > mistaken. > > Oddly, "paragraph" appears to be synonymous with "line" for the > borderWidth, borderColor, firstIndent, leftIndent, textAlign, > spaceAbove, hGrid, vGrid, and tabs paragraph properties. I suspect you have dontWrap set and possibly 'table-mode'. > Near as I can tell backgroundColor is the only paragraph properties > where the "paragraph" chunk type isn't synonymous. If you check the htmlText you can easily see the difference between using 'paragraph' and 'line' to set the aforementioned properties. When set on 'line' - the properties appear on the 'p' tags, and they have an effect on a per (wrapped) paragraph basis. When set on *all other string chunks* (which reduce to char chunks) - the properties appear as runs in the 'p' tags, and they have an effect on runs of text. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From paul at researchware.com Fri Jun 24 11:07:19 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 11:07:19 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? Message-ID: I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? If interested, please email me directly. From merakosp at gmail.com Fri Jun 24 11:27:19 2022 From: merakosp at gmail.com (panagiotis m) Date: Fri, 24 Jun 2022 18:27:19 +0300 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Hello Paul Not a ffmpeg expert, but have you seen the mediaFoundation library? See the dictionary entry for "mediaFoundationTranscode" - it has a detailed example for concatenating 2 media files. Hope this helps Kind regards, Panos -- On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < use-livecode at lists.runrev.com> wrote: > I am doing some work with Livecode script constructing calls (via > shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there > are any people proficient with ffmpeg wh might be interesting in a small > bit of paid consulting to help with ffmpeg command line syntax for > various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Fri Jun 24 11:36:32 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 24 Jun 2022 17:36:32 +0200 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: <49123771-6CD7-43CE-8B2E-38DE13F90A67@m-r-d.de> In one of my projects i do use ffmpeg for some audio conversion and id3 tag handling. For me the tool ff-Works (https://ffworks.net) helped me a lot. Normally its a GUI for ffmpeg, but the good thing is the user is also able to see the command line that was used for a task. So in case no one other jumps in and if you are on Mac maybe this tool is also of help for you, i Regards, Matthias > Am 24.06.2022 um 17:07 schrieb Paul Dupuis via use-livecode : > > I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 24 12:05:44 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 12:05:44 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Panos, Thank you! I was unaware of the mediaFoundation library - I had thought that we'd not see support under LiveCode 10 switches from DirectShow to MediaFoundation. That said, our application is macOS and Windows and the appeal of ffmpeg via shell is that the same code will work across platforms for us. Still, for other projects, I'm very happy to have been made aware of the mediaFoundation library! On 6/24/2022 11:27 AM, panagiotis m via use-livecode wrote: > Hello Paul > > Not a ffmpeg expert, but have you seen the mediaFoundation library? See the > dictionary entry for "mediaFoundationTranscode" - it has a detailed example > for concatenating 2 media files. > > Hope this helps > > Kind regards, > Panos > -- > > On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I am doing some work with Livecode script constructing calls (via >> shell()) to ffmpeg to perform some video/audio concatenation. >> >> I have barely learned a tiny bit of ffmpeg and and wondering if there >> are any people proficient with ffmpeg wh might be interesting in a small >> bit of paid consulting to help with ffmpeg command line syntax for >> various operations? >> >> If interested, please email me directly. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Fri Jun 24 12:23:02 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 17:23:02 +0100 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: On 2022-06-24 17:05, Paul Dupuis via use-livecode wrote: > I was unaware of the mediaFoundation library - I had thought that we'd > not see support under LiveCode 10 switches from DirectShow to > MediaFoundation. Its actually been buried in the product (business/pro features) for a long time - I had forgotten about it until relatively recently... > That said, our application is macOS and Windows and the appeal of > ffmpeg via shell is that the same code will work across platforms for > us. FWIW, I *think* mergAV can do similar things on macOS* to the mediafoundation external on Windows - although the APIs, while similar, do require different code. However, if you are using ffmpeg for things other than concatenating tracks/movies (i.e. the features those libraries provide) then the separate code needed wouldn't be worth it to save inclusion of ffmpeg. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Fri Jun 24 13:04:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 18:04:06 +0100 Subject: On API keys... Message-ID: <37140621287f3c6183bbebf49e4da698@livecode.com> So this is mainly aimed at Tom Glod due to a question he asked in this afternoon's Feature Focus session which I perhaps did not answer particularly well (and given that it is security related, I figured I should expand on what I said). The question was whether putting an API Key as a LiveCode 'constant', rather than anything else, made it 'more secure' - the answer is 'no more than putting it anywhere else in a password protected script'. However, what I should have probably expanded on is what my understanding on the best practice for API keys in general is... I have come across three kinds of API key in practice: 1) API keys intended to be used from web pages (in client-side code) 2) API keys intended to be used in deployed apps 3) API keys intended to be used for doing secure things How I would advise using them (based on my current understanding, at least) is: TYPE 1 In (1) above you have things like Google Analytics 'product ids' (which aren't strictly API keys I guess, but are similar enough to warrant inclusion) and Google Maps JS keys. As these are intended to be used in client side JavaScript - there is very little, if anything, you can do to protect them directly. For Analytics, since the worse that can happen is that someone can generate fake analytics it doesn't really matter - and the data can be relatively easily filtered and processed to eliminate any dodgy looking submissions. For Maps, it can cost you money if someone else tries to use yours - however, you can restrict the key by the referring website and IP addresses, as well as what the key can do. TYPE 2 In (2) you have things like Google Maps App keys (for Android/iOS) - and all manner of other 'cloud type' services which have (native) app bindings for mobile (and desktop). Many services offer restrictions for these keys too - for example Google Services API keys can be restricted by Android app signing hashes and ids, and iOS app bundle ids. However, in general, these services generally suggest that you ensure that the API key is not extractable directly from the app bundle (after decompressing in general) - i.e. that the key be obfuscated in some fashion and does not appear in plaintext. It is important to note that they do not require any more than this because, at the end of the day, any API key has to be in memory at some point, and indeed has to be transmitted 'over the wire'. If someone has enough access to access memory, then they have enough access to intercept the HTTP requests (even if encrypted - if they really know what they are doing) so obfuscating in the on-disk files of the app is as good as you can get. If these keys are compromised then it is a pain - it might cost you money (as all these services which have them tend to charge by use) - and, if embedded in an app, will require an app update to replace. TYPE 3 Certain services require (sometimes in the TOS!) that their API keys *never* leave a secure bubble which you control - this means they must never appear in deployed apps or in files transmitted to the browser. Payment gateway API keys will pretty much always fall into this category - Stripe is a good example. The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. Indeed, services which require this tend to design their APIs for the intention of being used on a server. WHAT TO DO IN LIVECODE If you are dealing with a type 1 key then you really don't have to worry - they are designed to be used in a context which offers zero ability to protect them, so including them in a deployed app (in particular) is more secure out of the gate than in their intended use in a webpage. [ Of course, whether you are actually *allowed* to use their services from anything other than websites is another matter - and entirely defined by their TOS - but I digress! ] If you are dealing with a type 2 key then the requirements put on their use in deployed (native) apps is more than catered for by having the key in script, in a password protected stack - for example, as a constant return value of a function, or indeed as a constant defined in the script which is talking to the API. With this, the key will not appear in plaintext in any of the files included in the built app (even after the container is unzipped). [ I should note here that custom properties values also do not appear in plaintext in any of the files of a built app - however, having them in a password protected script offers an extra level of protection ]. If you are dealing with a type 3 key then you must only use that key via a server - this means you need to set up server side scripts which your app then talks to via a suitable protocol (e.g. HTTP / REST) to perform the operations which use it. The key must never be sent over the wire between your app and the server as this could be intercepted by someone who is using your app locally. BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN Of course, the most secure way to use API keys of all types is to have them only ever on a server - however, this is only really suitable if your app is 'always online' and you can do all operations on the server - many services this doesn't work, e.g. Google Maps. However, there is a reasonable middle ground which offers a little more security (and convenience, in the case of compromise!). If your app can only be used by a user *after* they login locally then the best practice for type 1 and type 2 keys (as mentioned previously type 3 keys must NEVER leave your server!) is to not store the keys in the deployed app at all. Instead, once the user has successfully authenticated have the server send the API keys the app needs to use. You can either do this once per session, or if your app allows 'offline' use as long as they have signed in before (on mobile) you can use something like the 'secureKey' library to store them in the mobile devices 'trusted' store. This approach has two main benefits: 1) The API keys are never actually in a file someone can sit and dissect at will (even obfuscated, there are some very persistent bad actors out there!) 2) If your API key is compromised (or you do need to change it, for whatever reason) you can do so without having to have everyone install an app update with the new one in. Anyway, that's probably more than Tom probably needed to know (or perhaps knew already), but hopefully it is helpful (at least for those who have to deal with API keys and such things!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From tom at makeshyft.com Fri Jun 24 13:40:22 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 13:40:22 -0400 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: Mark, thanks for taking the time to give this in-depth answer. This will come in handy for others as well I am sure. Have a great weekend. Tom On Fri, Jun 24, 2022 at 1:04 PM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > So this is mainly aimed at Tom Glod due to a question he asked in this > afternoon's Feature Focus session which I perhaps did not answer > particularly well (and given that it is security related, I figured I > should expand on what I said). > > The question was whether putting an API Key as a LiveCode 'constant', > rather than anything else, made it 'more secure' - the answer is 'no > more than putting it anywhere else in a password protected script'. > > However, what I should have probably expanded on is what my > understanding on the best practice for API keys in general is... > > I have come across three kinds of API key in practice: > > 1) API keys intended to be used from web pages (in client-side code) > > 2) API keys intended to be used in deployed apps > > 3) API keys intended to be used for doing secure things > > How I would advise using them (based on my current understanding, at > least) is: > > TYPE 1 > > In (1) above you have things like Google Analytics 'product ids' (which > aren't strictly API keys I guess, but are similar enough to warrant > inclusion) and Google Maps JS keys. > > As these are intended to be used in client side JavaScript - there is > very little, if anything, you can do to protect them directly. > > For Analytics, since the worse that can happen is that someone can > generate fake analytics it doesn't really matter - and the data can be > relatively easily filtered and processed to eliminate any dodgy looking > submissions. > > For Maps, it can cost you money if someone else tries to use yours - > however, you can restrict the key by the referring website and IP > addresses, as well as what the key can do. > > TYPE 2 > > In (2) you have things like Google Maps App keys (for Android/iOS) - and > all manner of other 'cloud type' services which have (native) app > bindings for mobile (and desktop). > > Many services offer restrictions for these keys too - for example Google > Services API keys can be restricted by Android app signing hashes and > ids, and iOS app bundle ids. > > However, in general, these services generally suggest that you ensure > that the API key is not extractable directly from the app bundle (after > decompressing in general) - i.e. that the key be obfuscated in some > fashion and does not appear in plaintext. > > It is important to note that they do not require any more than this > because, at the end of the day, any API key has to be in memory at some > point, and indeed has to be transmitted 'over the wire'. If someone has > enough access to access memory, then they have enough access to > intercept the HTTP requests (even if encrypted - if they really know > what they are doing) so obfuscating in the on-disk files of the app is > as good as you can get. > > If these keys are compromised then it is a pain - it might cost you > money (as all these services which have them tend to charge by use) - > and, if embedded in an app, will require an app update to replace. > > TYPE 3 > > Certain services require (sometimes in the TOS!) that their API keys > *never* leave a secure bubble which you control - this means they must > never appear in deployed apps or in files transmitted to the browser. > Payment gateway API keys will pretty much always fall into this category > - Stripe is a good example. > > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. > > Indeed, services which require this tend to design their APIs for the > intention of being used on a server. > > WHAT TO DO IN LIVECODE > > If you are dealing with a type 1 key then you really don't have to worry > - they are designed to be used in a context which offers zero ability to > protect them, so including them in a deployed app (in particular) is > more secure out of the gate than in their intended use in a webpage. > > [ Of course, whether you are actually *allowed* to use their services > from anything other than websites is another matter - and entirely > defined by their TOS - but I digress! ] > > If you are dealing with a type 2 key then the requirements put on their > use in deployed (native) apps is more than catered for by having the key > in script, in a password protected stack - for example, as a constant > return value of a function, or indeed as a constant defined in the > script which is talking to the API. With this, the key will not appear > in plaintext in any of the files included in the built app (even after > the container is unzipped). > > [ I should note here that custom properties values also do not appear in > plaintext in any of the files of a built app - however, having them in a > password protected script offers an extra level of protection ]. > > If you are dealing with a type 3 key then you must only use that key via > a server - this means you need to set up server side scripts which your > app then talks to via a suitable protocol (e.g. HTTP / REST) to perform > the operations which use it. The key must never be sent over the wire > between your app and the server as this could be intercepted by someone > who is using your app locally. > > BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN > > Of course, the most secure way to use API keys of all types is to have > them only ever on a server - however, this is only really suitable if > your app is 'always online' and you can do all operations on the server > - many services this doesn't work, e.g. Google Maps. However, there is a > reasonable middle ground which offers a little more security (and > convenience, in the case of compromise!). > > If your app can only be used by a user *after* they login locally then > the best practice for type 1 and type 2 keys (as mentioned previously > type 3 keys must NEVER leave your server!) is to not store the keys in > the deployed app at all. > > Instead, once the user has successfully authenticated have the server > send the API keys the app needs to use. You can either do this once per > session, or if your app allows 'offline' use as long as they have signed > in before (on mobile) you can use something like the 'secureKey' library > to store them in the mobile devices 'trusted' store. > > This approach has two main benefits: > > 1) The API keys are never actually in a file someone can sit and > dissect at will (even obfuscated, there are some very persistent bad > actors out there!) > > 2) If your API key is compromised (or you do need to change it, for > whatever reason) you can do so without having to have everyone install > an app update with the new one in. > > Anyway, that's probably more than Tom probably needed to know (or > perhaps knew already), but hopefully it is helpful (at least for those > who have to deal with API keys and such things!). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ahsoftware at sonic.net Fri Jun 24 16:21:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 24 Jun 2022 13:21:10 -0700 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. Or as server environment variables retrieved only by server scripts which are not user-accessible. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Fri Jun 24 18:23:04 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 24 Jun 2022 22:23:04 +0000 Subject: On API keys... In-Reply-To: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> Message-ID: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay on the risk, benefits and rewards in multiple scenarios concerning the storage of keys. I’ve mentioned before that I came up with the idea of “poisoning” the encrypted data before the data was transmitted. If intercepted in transit, the data itself could never be decrypted without knowing how it was poisoned and what was needed to “cleanse” it. And that would require access to either the API of the device doing the corruption or the cleansing, or else someone who knew the method. By using this method, all but physical and social vectors are nullified. And control of those vectors is an illusion. Bob S Sent from my iPhone > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode wrote: > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > >> The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. > > Or as server environment variables retrieved only by server scripts which are not user-accessible. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Fri Jun 24 23:34:25 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 23:34:25 -0400 Subject: On API keys... In-Reply-To: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: This is a great best-practice explanation. Perhaps someone can turn it into a blog post and put it on the site. Thanks again On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay > on the risk, benefits and rewards in multiple scenarios concerning the > storage of keys. I’ve mentioned before that I came up with the idea of > “poisoning” the encrypted data before the data was transmitted. If > intercepted in transit, the data itself could never be decrypted without > knowing how it was poisoned and what was needed to “cleanse” it. And that > would require access to either the API of the device doing the corruption > or the cleansing, or else someone who knew the method. > > By using this method, all but physical and social vectors are nullified. > And control of those vectors is an illusion. > > Bob S > > Sent from my iPhone > > > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > > > >> The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users - > usually the web-server user which is running the backend scripts which > needs to make the requests. > > > > Or as server environment variables retrieved only by server scripts > which are not user-accessible. > > > > -- > > Mark Wieder > > ahsoftware at gmail.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 27 08:26:49 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 14:26:49 +0200 Subject: Is Anyone on the list still using macOS 10.11? Message-ID: Hi, is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. The apps are just with one answer dialog. There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). The results of the testing would me help to enhance my LC Notarizing lesson. Regards, Matthias From harrison at all-auctions.com Mon Jun 27 09:55:07 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 09:55:07 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Hi Matthias, macOS 10.11 El Capitan? You shouldn’t be testing with that at all. It’s 6-7 years out of date now. What kind of testing do you need? Good luck! Rick > On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 10:14:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 16:14:38 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Message-ID: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Hi Rick, it's even older. I meant 10.10 (Yosemite). ;) I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. And i just need a confirmation, if that's the case Regards, Matthias > Am 27.06.2022 um 15:55 schrieb Rick Harrison via use-livecode : > > Hi Matthias, > > macOS 10.11 El Capitan? > > You shouldn’t be testing with that at all. It’s 6-7 years out of date now. > > What kind of testing do you need? > > Good luck! > > Rick > >> On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Mon Jun 27 10:15:08 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 27 Jun 2022 10:15:08 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> I still have a system running High Sierra and one running El Capatan. I can test on either of those. On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From heather at livecode.com Mon Jun 27 11:03:46 2022 From: heather at livecode.com (Heather Laine) Date: Mon, 27 Jun 2022 16:03:46 +0100 Subject: On API keys... In-Reply-To: References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: Yes indeed. See Blog. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 25 Jun 2022, at 04:34, Tom Glod via use-livecode wrote: > > This is a great best-practice explanation. Perhaps someone can turn it into > a blog post and put it on the site. > Thanks again > > > > On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay >> on the risk, benefits and rewards in multiple scenarios concerning the >> storage of keys. I’ve mentioned before that I came up with the idea of >> “poisoning” the encrypted data before the data was transmitted. If >> intercepted in transit, the data itself could never be decrypted without >> knowing how it was poisoned and what was needed to “cleanse” it. And that >> would require access to either the API of the device doing the corruption >> or the cleansing, or else someone who knew the method. >> >> By using this method, all but physical and social vectors are nullified. >> And control of those vectors is an illusion. >> >> Bob S >> >> Sent from my iPhone >> >>> On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: >>> >>>> The only way to use these keys is from server scripts running on a >> server which you do your best to maintain the security of. Ideally these >> keys should be stored in files which are only readable by specific users - >> usually the web-server user which is running the backend scripts which >> needs to make the requests. >>> >>> Or as server environment variables retrieved only by server scripts >> which are not user-accessible. >>> >>> -- >>> Mark Wieder >>> ahsoftware at gmail.com >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 11:28:07 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 15:28:07 +0000 Subject: Audio in Background Message-ID: Happy Monday! I am using the native player control (on both iOS and Android). It's working quite well! The only problem I have is that the background audio doesn't seem to honor this control. If I play audio in a native browser, it works. Is there something I need to set or do to get it to work? I have "Android Background Audio" selected in application settings and "Background Audio" checked in the "Requirements" panel. Thanks in advance! -Dan From merakosp at gmail.com Mon Jun 27 11:47:52 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:47:52 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From merakosp at gmail.com Mon Jun 27 11:50:30 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:50:30 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, And probably you need to check "Background Audio" in the iOS standalone settings (in Requirements tab) Cheers, Panos -- On Mon, 27 Jun 2022 at 18:47, panagiotis m wrote: > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Happy Monday! I am using the native player control (on both iOS and >> Android). It's working quite well! The only problem I have is that the >> background audio doesn't seem to honor this control. If I play audio in a >> native browser, it works. Is there something I need to set or do to get >> it to work? I have "Android Background Audio" selected in application >> settings and "Background Audio" checked in the "Requirements" panel. >> >> Thanks in advance! >> -Dan >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From dan at clearvisiontech.com Mon Jun 27 12:25:27 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 16:25:27 +0000 Subject: Audio in Background In-Reply-To: References: Message-ID: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From merakosp at gmail.com Mon Jun 27 13:25:43 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 20:25:43 +0300 Subject: Audio in Background In-Reply-To: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman wrote: > Panos, > > Thank you... That fixed it! The audio continues when the app is sent to > the background. However, the application's audio does not appear in the > Control Center: > > > https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg > > Is this possible? > > > -Dan > > > On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via > use-livecode" use-livecode at lists.runrev.com> wrote: > > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Happy Monday! I am using the native player control (on both iOS and > > Android). It's working quite well! The only problem I have is > that the > > background audio doesn't seem to honor this control. If I play > audio in a > > native browser, it works. Is there something I need to set or do > to get > > it to work? I have "Android Background Audio" selected in > application > > settings and "Background Audio" checked in the "Requirements" panel. > > > > Thanks in advance! > > -Dan > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > From harrison at all-auctions.com Mon Jun 27 14:57:39 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 14:57:39 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Message-ID: Hi Matthias, Sorry, but I am no longer have Yosemite on any of my older Macs. Thanks for the clarification though. Hopefully someone can help you out with this. Cheers, Rick > On Jun 27, 2022, at 10:14 AM, matthias rebbe via use-livecode wrote: > > Hi Rick, > > it's even older. I meant 10.10 (Yosemite). ;) > > I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. > > There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. > There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. > > And i just need a confirmation, if that's the case > > > Regards, > Matthias From ambassador at fourthworld.com Mon Jun 27 15:00:47 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 27 Jun 2022 12:00:47 -0700 Subject: On API keys... In-Reply-To: References: Message-ID: <978d1d63-2eeb-db2a-5ab4-4850339b8f26@fourthworld.com> Heather Laine wrote: > Tom Glod wrote: >> This is a great best-practice explanation. Perhaps someone can turn >> it into a blog post and put it on the site. > > Yes indeed. See Blog. https://livecode.com/best-practice-for-api-keys-and-security/ Tip: Dropping in-bound links to relevant content is a useful organization habit, making it easy for customers, prospects, and searchbots alike to discover the roads that lead to the site where the store lives. -- Richard Gaskin Fourth World Systems From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:09:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:09:04 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: Hi Paul, thanks for your offer. I have sent you a private email with the D/L link. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:15:00 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:15:00 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: I just noticed that High Sierra and El Capitan are higher then 10.10.... I need some one who can test with 10.10. thanks anyway. Regards, Matthias > Am 27.06.2022 um 21:09 schrieb matthias rebbe via use-livecode : > > Hi Paul, thanks for your offer. > > I have sent you a private email with the D/L link. > > Regards, > Matthias > > >> Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : >> >> I still have a system running High Sierra and one running El Capatan. I can test on either of those. >> >> >> On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >>> Hi, >>> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >>> The apps are just with one answer dialog. >>> >>> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >>> >>> The results of the testing would me help to enhance my LC Notarizing lesson. >>> >>> >>> Regards, >>> Matthias >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:18:14 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:18:14 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: No worries, Rick, if i cannot find some one then i just need to setup a VM with Yosemite. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From phil at pdslabs.net Mon Jun 27 15:30:10 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 27 Jun 2022 12:30:10 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: Hi Matthias, If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. Phil Davis On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:49:29 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:49:29 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <5577AD36-D74B-4497-BAEA-720770934A41@m-r-d.de> Phil, thank you very much for your offer. I've sent you the D/L links in a private email. Regards, Matthias > Am 27.06.2022 um 21:30 schrieb Phil Davis via use-livecode : > > Hi Matthias, > > If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. > > Phil Davis > > > On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From scott at elementarysoftware.com Mon Jun 27 15:54:54 2022 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Mon, 27 Jun 2022 12:54:54 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Hello Matthias, I have machines running 10.10.5 and a 10.7.5 if these would be of help. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ > On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:09:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:09:34 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <89675024-0EB4-49BF-A7C6-C058DB857F09@m-r-d.de> Hello Scott, thanks for your offer. I've sent you a private email with the D/L links and a short explanation. Regards, Matthias > Am 27.06.2022 um 21:54 schrieb scott--- via use-livecode : > > Hello Matthias, > I have machines running 10.10.5 and a 10.7.5 if these would be of help. > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email scott at elementarysoftware.com > booth 1-360-734-4701 > ------------------------------------------------------ > >> On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:11:41 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:11:41 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <0EC1B5B2-79B7-4456-A9A9-BE88DFBA2240@m-r-d.de> Thanks to all for your offer to help. I would say 2 testers are enough. ;) So i do not need anymore testers. Regards, Matthias > Am 27.06.2022 um 14:26 schrieb matthias rebbe via use-livecode : > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 17:51:47 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 21:51:47 +0000 Subject: Audio in Background In-Reply-To: References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: <2C9AAE2E-516B-4299-935C-23A7E5CB5B8C@clearvisiontech.com> Panos, Just wanted you to know that adding “iphoneEnableRemoteControl” did the trick! The app received the “remoteControlReceived” message and was able to act on that message even in the background. Sweet! Thank you! Dan Friedman CEO, ClearVision Technologies, LLC Voice: 909/484-2052 http://www.clearvisiontech.com From: panagiotis m Date: Monday, June 27, 2022 at 10:25 AM To: How to use LiveCode Cc: Dan Friedman Subject: Re: Audio in Background Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman > wrote: Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" on behalf of use-livecode at lists.runrev.com> wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Mon Jun 27 23:27:04 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 28 Jun 2022 13:27:04 +1000 Subject: long id trap for the unwary Message-ID: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> If I write put the long id of field 1 of card 1 into tObject; put the text of tObject I get the text of field 1 of card 1, right ? Not necessarily. If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. Sigh, a new version of nsScriptDatabase coming up. Neville From bobsneidar at iotecdigital.com Tue Jun 28 11:34:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 15:34:05 +0000 Subject: long id trap for the unwary In-Reply-To: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> Message-ID: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: function returnTheText pFieldName return the text of field pFieldName of me end returnTheText If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: function extract tParentCard return the text of field 1 of tParentCard end extract Bob S > On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: > > If I write > > put the long id of field 1 of card 1 into tObject; put the text of tObject > > I get the text of field 1 of card 1, right ? Not necessarily. > > If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. > > This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. > > The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. > > Sigh, a new version of nsScriptDatabase coming up. > > Neville > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From harrison at all-auctions.com Tue Jun 28 13:46:23 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Tue, 28 Jun 2022 13:46:23 -0400 Subject: LC Screen Recording? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <883969E2-6C30-45BE-9215-141FBF9613F8@all-auctions.com> I’m wondering if there is a way from within LC to make a video recording of what is going on within a rect in a macOS LC app. Recording audio at the same time would also be a big plus. Anyone with good ideas or suggestions for what I might be able to do? Thanks, Rick From bogdanoff at me.com Tue Jun 28 14:04:48 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 11:04:48 -0700 Subject: long id trap for the unwary In-Reply-To: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: Bob, This makes sense. I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. send … ? Peter Bogdanoff > On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: > > Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. > > If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: > > function returnTheText pFieldName > return the text of field pFieldName of me > end returnTheText > > If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. > > For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: > > function extract tParentCard > return the text of field 1 of tParentCard > end extract > > Bob S > > >> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >> >> If I write >> >> put the long id of field 1 of card 1 into tObject; put the text of tObject >> >> I get the text of field 1 of card 1, right ? Not necessarily. >> >> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >> >> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >> >> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >> >> Sigh, a new version of nsScriptDatabase coming up. >> >> Neville >> >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:07:35 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:07:35 +0000 Subject: long id trap for the unwary In-Reply-To: References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. Sent from my iPhone > On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: > > Bob, > > This makes sense. > > I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. > > send … ? > > Peter Bogdanoff > >> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >> >> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >> >> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >> >> function returnTheText pFieldName >> return the text of field pFieldName of me >> end returnTheText >> >> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >> >> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >> >> function extract tParentCard >> return the text of field 1 of tParentCard >> end extract >> >> Bob S >> >> >>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>> >>> If I write >>> >>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>> >>> I get the text of field 1 of card 1, right ? Not necessarily. >>> >>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>> >>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>> >>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>> >>> Sigh, a new version of nsScriptDatabase coming up. >>> >>> Neville >>> >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:12:10 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:12:10 +0000 Subject: long id trap for the unwary In-Reply-To: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Message-ID: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. Sent from my iPhone > On Jun 28, 2022, at 12:08, Bob Sneidar wrote: > > Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. > > Sent from my iPhone > >> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >> >> Bob, >> >> This makes sense. >> >> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >> >> send … ? >> >> Peter Bogdanoff >> >>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>> >>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>> >>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>> >>> function returnTheText pFieldName >>> return the text of field pFieldName of me >>> end returnTheText >>> >>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>> >>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>> >>> function extract tParentCard >>> return the text of field 1 of tParentCard >>> end extract >>> >>> Bob S >>> >>> >>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>> >>>> If I write >>>> >>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>> >>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>> >>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>> >>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>> >>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>> >>>> Sigh, a new version of nsScriptDatabase coming up. >>>> >>>> Neville >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Tue Jun 28 15:49:22 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 12:49:22 -0700 Subject: long id trap for the unwary In-Reply-To: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Message-ID: <59965883-1445-4B08-A9F1-681537F714F4@me.com> Hi Bob, I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: > > Send IF you need in time. Stupid spell correct. It cannot be me mistyping. > > Sent from my iPhone > >> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >> >> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>> >>> Bob, >>> >>> This makes sense. >>> >>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>> >>> send … ? >>> >>> Peter Bogdanoff >>> >>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>> >>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>> >>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>> >>>> function returnTheText pFieldName >>>> return the text of field pFieldName of me >>>> end returnTheText >>>> >>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>> >>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>> >>>> function extract tParentCard >>>> return the text of field 1 of tParentCard >>>> end extract >>>> >>>> Bob S >>>> >>>> >>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>> >>>>> If I write >>>>> >>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>> >>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>> >>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>> >>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>> >>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>> >>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>> >>>>> Neville >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 28 16:27:25 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 16:27:25 -0400 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? Craig > On Jun 28, 2022, at 3:49 PM, Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > >> On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: >> >> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >>> >>> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >>> >>> Sent from my iPhone >>> >>>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>>> >>>> Bob, >>>> >>>> This makes sense. >>>> >>>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>>> >>>> send … ? >>>> >>>> Peter Bogdanoff >>>> >>>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>>> >>>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>>> >>>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>>> >>>>> function returnTheText pFieldName >>>>> return the text of field pFieldName of me >>>>> end returnTheText >>>>> >>>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>>> >>>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>>> >>>>> function extract tParentCard >>>>> return the text of field 1 of tParentCard >>>>> end extract >>>>> >>>>> Bob S >>>>> >>>>> >>>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>>> >>>>>> If I write >>>>>> >>>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>>> >>>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>>> >>>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>>> >>>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>>> >>>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>>> >>>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>>> >>>>>> Neville >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> use-livecode mailing list >>>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From klaus at major-k.de Tue Jun 28 16:35:13 2022 From: klaus at major-k.de (Klaus major-k) Date: Tue, 28 Jun 2022 22:35:13 +0200 Subject: long id trap for the unwary In-Reply-To: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> Message-ID: <8F2CA68F-EF34-4232-905E-699B0392E041@major-k.de> Hi Craig, > Am 28.06.2022 um 22:27 schrieb Craig Newman via use-livecode : > > I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? no, if the variable contains a valid description of a field control. This works as advertized: ... put the long ID of fld 1 into tField put the text of tField ... Hope I understood you correctly. > Craig Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bobsneidar at iotecdigital.com Tue Jun 28 17:38:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 21:38:59 +0000 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> You can find the definition of both send and dispatch in the dictionary. So an example of Dispatch being called from a card of a substack would be: put the long id of me into tParentCard dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed -- but there's nothing wrong with using it extract tRecordA, tParentCard, tExclusions -- aRecordData is an array you want to populate with the field contents of pParentCard -- pParentCard is the long id of the target card containing field, button and menu objects -- pExclusions is a comma delimited list of object names you want to pass over on extract @aRecordData, pParentCard, pExclusions -- store object values in aRecordData put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] ... -- no need to return anything in this example because aRecordData is passed by reference end extract Bob S > On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > From craig at starfirelighting.com Tue Jun 28 18:05:41 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 18:05:41 -0400 Subject: long id trap for the unwary In-Reply-To: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> Message-ID: <6D3998B2-5780-4594-8280-A98E87E5BD87@starfirelighting.com> Klaus. You are correct; I missed that the “long iD” was used, and that expression includes the work “field”. LC can then use that as a valid reference. Craig > On Jun 28, 2022, at 5:38 PM, Bob Sneidar via use-livecode wrote: > > You can find the definition of both send and dispatch in the dictionary. > > So an example of Dispatch being called from a card of a substack would be: > > put the long id of me into tParentCard > dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions > > > -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed > -- but there's nothing wrong with using it > extract tRecordA, tParentCard, tExclusions > > > -- aRecordData is an array you want to populate with the field contents of pParentCard > -- pParentCard is the long id of the target card containing field, button and menu objects > -- pExclusions is a comma delimited list of object names you want to pass over > > on extract @aRecordData, pParentCard, pExclusions > -- store object values in aRecordData > put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] > put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] > put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] > ... > -- no need to return anything in this example because aRecordData is passed by reference > end extract > > Bob S > > >> On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: >> >> Hi Bob, >> >> I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 28 21:38:54 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 29 Jun 2022 11:38:54 +1000 Subject: long id trap for the unwary In-Reply-To: References: Message-ID: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> No crashes or errors, I just didn’t get back the data I expected. Does it really have anything to do with message paths? I just expected the long id of field1 of card 1 to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) Neville From craig at starfirelighting.com Wed Jun 29 09:33:39 2022 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 29 Jun 2022 09:33:39 -0400 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <9D1EA6FF-DEA2-4FF0-AF44-75D0F0B7D686@starfirelighting.com> Neville. I know this thread has been broken into parts, but what exactly is your question? I made two stacks, The first with a button on it, and this in its script: on mouseup put the long id of field 1 of card 1 of stack "untitled 3" into fieldID put the long ID of the owner of fieldID into groupID put the owner of groupID into ownerID end mouseup The second stack (untitled 3) has a field that has been grouped. You get, in the SE, three pieces of information in those three variables. What does this do for you? Craig > On Jun 28, 2022, at 9:38 PM, Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 29 11:32:33 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 29 Jun 2022 15:32:33 +0000 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <887A07C8-8D59-40B6-B8D3-AA8A23373505@iotecdigital.com> So the *actual* long id reference to any object looks something like: field id 1388156 of group id 1388155 of group id 1388175 of card id 1002 of stack "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms Generator 8.livecode" If you don't provide all of that as a reference, then it's up to the engine to "fill in the blanks." That means you can say something like "field 1 of card 1" or "field 1 of stack myStack" or "field 1 of group 1" and you get what you expect. But when working with multiple stacks THAT depends on what is the topStack and currentCard, which can vary depending on whether or not you are actually opening the substacks and what they are opened as (modal, pallette, drawer etc.) Relative References are a great feature, making coding much simpler, but as you have seen it can also be a "trap" when working with multiple cards or stacks. To ensure you don't fall into it, it may be better for you to not leave it up to the engine, but to provide the full path to your objects. Bob S > On Jun 28, 2022, at 18:38 , Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville From hershelflc at gmail.com Thu Jun 30 18:59:55 2022 From: hershelflc at gmail.com (Hershel F) Date: Thu, 30 Jun 2022 18:59:55 -0400 Subject: sorting datagrids Message-ID: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Hi all, is there any way of sorting a data grid horizontally? thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:21:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:21:17 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <95CB8B88-CDB9-46E5-A54C-124B6759B84D@iotecdigital.com> Sure there is! put the dgProp ["columns"] of group myDatagrid into tGridColumns sort tGridColumns ascending set the dgProp ["columns"] of group myDataGrid to tGridColumns I would store the original sort order first though so you can recover. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:26:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:26:59 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <240E44BA-75A1-4E14-8226-0C874FFFA8CD@iotecdigital.com> Or are you talking about sorting the DATA of a datagrid? put the dgText of group "myDataGrid" into tText set the itemDelimiter to tab repeat with i = 1 to the number of lines of tText put item i of tText into tLine sort items of tLine ascending put tLine into line i of tText end repeat set the dgText of group "myDataGrid" to tText Nothing else would make any sense. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 30 21:44:02 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 1 Jul 2022 11:44:02 +1000 Subject: nsScriptDatabase (and long id's) Message-ID: I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? Neville From bobsneidar at iotecdigital.com Thu Jun 30 22:03:51 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 1 Jul 2022 02:03:51 +0000 Subject: nsScriptDatabase (and long id's) In-Reply-To: References: Message-ID: <3AE641A7-DC69-443B-A4D4-EE47E010F075@iotecdigital.com> OIC this is for your library. I didn’t realize that your need was to access objects in projects you didn’t have control of. 😟 Sent from my iPhone > On Jun 30, 2022, at 18:45, Neville Smythe via use-livecode wrote: > > I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at > > https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 > > This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. > > Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Wed Jun 1 10:20:07 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 10:20:07 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: Since this is now in the wild, and has a very different layout, y'all should probably have a look at it and comment on it, before it gets too far down the road. LC has stated that this is the future. On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < use-livecode at lists.runrev.com> wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > You can find more details on the new features and the bug fixes of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From heather at livecode.com Wed Jun 1 10:35:40 2022 From: heather at livecode.com (Heather Laine) Date: Wed, 1 Jun 2022 15:35:40 +0100 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: Message-ID: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. In case anyone is confused. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: > > Since this is now in the wild, and has a very different layout, y'all > should probably have a look at it and comment on it, before it gets too far > down the road. LC has stated that this is the future. > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Dear list members, >> >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >> >> You can find more details on the new features and the bug fixes of this new >> release here: >> >> https://livecode.com/m1-native-latest-livecode-releases/ >> >> You can find the release in your LiveCode account area or get it via the >> automatic updater. >> >> Enjoy! >> >> Kind regards >> The LiveCode Team >> >> -- >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 1 12:44:25 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 17:44:25 +0100 Subject: Case sensitivity in Livecode ?? Message-ID: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> I was surprised to find that    constant K = TRUE produces an error, though   constant K = true is fine. In other contexts, you can say    put TRUE into myVar    put true into hisVar    etc. but in a constant statement, it seems to be case sensitive. Anyone got an interesting story (or theory) on why ?   :-) Thanks Alex. From bobsneidar at iotecdigital.com Wed Jun 1 12:51:14 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 16:51:14 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <5A4D8DBA-06E9-43D5-85FB-B0AD150FB104@iotecdigital.com> Not only that, but revOpenDatabase("sqlite", ":MEMORY:") will not work on Windows, but DOES on Mac. revOpenDatabase("sqlite", ":memory:") works on both platforms. Do you know why?? No you do not. No one knows, and will likely NEVER know. LOL! I suppose :memory: is a kind of system constant?!? But why it is case sensitive on Windows but not on Mac is beyond me. I put it into the bin labeled, "Things that make you go hmmm..." Bob S > On Jun 1, 2022, at 09:44 , Alex Tweedly via use-livecode wrote: > > I was surprised to find that > > constant K = TRUE > > produces an error, though > > constant K = true > > is fine. In other contexts, you can say > > put TRUE into myVar > put true into hisVar > etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ? :-) > > Thanks > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Wed Jun 1 13:05:42 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 01 Jun 2022 18:05:42 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> Message-ID: <96b62f068eb95b27e8badeae5661cb43@livecode.com> On 2022-06-01 17:44, Alex Tweedly via use-livecode wrote: > I was surprised to find that > >    constant K = TRUE > > produces an error, though > >   constant K = true > > is fine. In other contexts, you can say > >    put TRUE into myVar >    put true into hisVar >    etc. > > but in a constant statement, it seems to be case sensitive. > > Anyone got an interesting story (or theory) on why ?   :-) Its a small mitigation of https://quality.livecode.com/show_bug.cgi?id=19413 - i.e. where the initializer of constants (and locals) is currently treated as a single literal. In explicitVariables mode, unquoted literals are allowed on the RHS only if the literal is a (builtin) constant *and* the constants value is identical to the token you have provided. That extra check is there to ensure that the constants (and initializers) you have used are actually what you intended. Currently - the following does not do what you think: constant kEmptyString = empty Indeed, this isn't allowed in explicitVariables mode, as the constant empty's value is "" and not "empty" - which is what kEmptyString will actually be with explicitVariables turned off. Anyway, this rather odd and obscure facet of the language will disappear in 10 as we've made it so that initializers for constants and locals can be constant expressions. Thus: constant kTrue = TRUE local sEmptyString = empty Will do precisely what they look like they should do... Also, you'll be able to do things like: constant kPiBy2 = pi / 2 constant kPiBy2Squared = kPiBy2 * kPiBy2 constant kPiBy2String = format("%f", kPiBy2) local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } Warmest Regards, Mark. P.S. Amusingly, your question came up on exactly the same day I 'finished' my patch for the above - it now awaits review which may result in it not being quite finished ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Wed Jun 1 14:14:42 2022 From: richmondmathewson at gmail.com (Richmond) Date: Wed, 1 Jun 2022 21:14:42 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Certainly not round these parts: the IDE "we know and love" is still in place. Best, Richmond. On 1.06.22 17:35, Heather Laine via use-livecode wrote: > I think you are probably referring to the special prototype dp-4 with the single window IDE in testing. This is not as yet "in the wild". This has only so far been made available to the attendees for LCG 22/23 Feature Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > >> On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode wrote: >> >> Since this is now in the wild, and has a very different layout, y'all >> should probably have a look at it and comment on it, before it gets too far >> down the road. LC has stated that this is the future. >> >> On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Dear list members, >>> >>> We are pleased to announce the release of LiveCode 10.0.0 DP-4. >>> >>> You can find more details on the new features and the bug fixes of this new >>> release here: >>> >>> https://livecode.com/m1-native-latest-livecode-releases/ >>> >>> You can find the release in your LiveCode account area or get it via the >>> automatic updater. >>> >>> Enjoy! >>> >>> Kind regards >>> The LiveCode Team >>> >>> -- >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Wed Jun 1 14:34:47 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 11:34:47 -0700 Subject: Right click in field for menu Message-ID: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Hi, I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. How would I do this? Is the menu that would show Livecode, or from the OS? Thanks, Peter Bogdanoff From klaus at major-k.de Wed Jun 1 14:40:41 2022 From: klaus at major-k.de (Klaus major-k) Date: Wed, 1 Jun 2022 20:40:41 +0200 Subject: Right click in field for menu In-Reply-To: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> Message-ID: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Hi Peter, > Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : > > Hi, > > I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. > How would I do this? on mousedown tNumber ## mousebutton 3 = right-click if tNumber = 3 then popup btn "your popup here..." at the mouseloc end if end mousedown > Is the menu that would show Livecode, or from the OS? That will popup a LC popup menu button. > Thanks, > > Peter Bogdanoff Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From alex at tweedly.net Wed Jun 1 14:54:18 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 1 Jun 2022 19:54:18 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <96b62f068eb95b27e8badeae5661cb43@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> Message-ID: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> On 01/06/2022 18:05, Mark Waddingham via use-livecode wrote: > > Anyway, this rather odd and obscure facet of the language will > disappear in 10 as we've made it so that initializers for constants > and locals can be constant expressions. Thus: > >     constant kTrue = TRUE >     local sEmptyString = empty > > Will do precisely what they look like they should do... > Good. > Also, you'll be able to do things like: > >     constant kPiBy2 = pi / 2 >     constant kPiBy2Squared = kPiBy2 * kPiBy2 >     constant kPiBy2String = format("%f", kPiBy2) >     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } > Very good. In fact, great !! Thank you! Would you be ale to do something like constant kPiMap = { ... as above ... } And now I'll push my luck and ponder the possibility of 'global' constants. OK - 'global constant' is likely counter to the scope concepts. But perhaps they could be done as "write-once" variables, or as a more general "write-protected' variable. e.g. (somewhere in a start-up script ...)    put 17 into gkMyMagicValue    writeprotect "gkMyMagicValue" and any *subsequent* attempt to change the value would fail. > P.S. Amusingly, your question came up on exactly the same day I > 'finished' my patch for the above - it now awaits review which may > result in it not being quite finished ;) Yes, coincidences do happen :-) Thanks for the explanation Mark. Alex. From bogdanoff at me.com Wed Jun 1 16:53:20 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 1 Jun 2022 13:53:20 -0700 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. Is there a better way to edit a selection in a field using a menu popup? Peter > On Jun 1, 2022, at 11:40 AM, Klaus major-k via use-livecode > wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode >: >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 1 16:54:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 1 Jun 2022 20:54:47 +0000 Subject: Right click in field for menu In-Reply-To: <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <0F93D036-0716-4567-BB4B-E2F858654AF6@iotecdigital.com> I didn't know mouse events were handled in an unlocked field! Nice to know. Curiously however, in that handler I substituted a put statement for the popup command using send "put " & quote & "this worked" & quote to me in 2 seconds In two seconds I get "worked" not "this worked" in the message box. Bob S > On Jun 1, 2022, at 11:40 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, >> >> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu. >> How would I do this? > > on mousedown tNumber > ## mousebutton 3 = right-click > if tNumber = 3 then > popup btn "your popup here..." at the mouseloc > end if > end mousedown > >> Is the menu that would show Livecode, or from the OS? > > That will popup a LC popup menu button. > >> Thanks, >> >> Peter Bogdanoff > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Wed Jun 1 17:10:52 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 1 Jun 2022 17:10:52 -0400 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Then my bad, I presumed that the DP4 release was the DP4 release. On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < use-livecode at lists.runrev.com> wrote: > I think you are probably referring to the special prototype dp-4 with the > single window IDE in testing. This is not as yet "in the wild". This has > only so far been made available to the attendees for LCG 22/23 Feature > Focus sessions. > > In case anyone is confused. > > Best Regards, > > Heather > > Heather Laine > Customer Services Manager > LiveCode Ltd > www.livecode.com > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Since this is now in the wild, and has a very different layout, y'all > > should probably have a look at it and comment on it, before it gets too > far > > down the road. LC has stated that this is the future. > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> Dear list members, > >> > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > >> > >> You can find more details on the new features and the bug fixes of this > new > >> release here: > >> > >> https://livecode.com/m1-native-latest-livecode-releases/ > >> > >> You can find the release in your LiveCode account area or get it via the > >> automatic updater. > >> > >> Enjoy! > >> > >> Kind regards > >> The LiveCode Team > >> > >> -- > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at 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 at 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." From richmondmathewson at gmail.com Thu Jun 2 01:26:45 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Thu, 2 Jun 2022 08:26:45 +0300 Subject: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: Well, obviously not. I hope LC will release a public beta shortly. Listen to feedback. Allow the new IDE not to be 'the' IDE, but one of 2 possible choices. On Thu, 2 Jun 2022, 00:12 Mike Kerner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Then my bad, I presumed that the DP4 release was the DP4 release. > > On Wed, Jun 1, 2022 at 10:36 AM Heather Laine via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > I think you are probably referring to the special prototype dp-4 with the > > single window IDE in testing. This is not as yet "in the wild". This has > > only so far been made available to the attendees for LCG 22/23 Feature > > Focus sessions. > > > > In case anyone is confused. > > > > Best Regards, > > > > Heather > > > > Heather Laine > > Customer Services Manager > > LiveCode Ltd > > www.livecode.com > > > > > > > > > On 1 Jun 2022, at 15:20, Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > > Since this is now in the wild, and has a very different layout, y'all > > > should probably have a look at it and comment on it, before it gets too > > far > > > down the road. LC has stated that this is the future. > > > > > > On Tue, May 31, 2022 at 11:31 AM panagiotis merakos via use-livecode < > > > use-livecode at lists.runrev.com> wrote: > > > > > >> Dear list members, > > >> > > >> We are pleased to announce the release of LiveCode 10.0.0 DP-4. > > >> > > >> You can find more details on the new features and the bug fixes of > this > > new > > >> release here: > > >> > > >> https://livecode.com/m1-native-latest-livecode-releases/ > > >> > > >> You can find the release in your LiveCode account area or get it via > the > > >> automatic updater. > > >> > > >> Enjoy! > > >> > > >> Kind regards > > >> The LiveCode Team > > >> > > >> -- > > >> _______________________________________________ > > >> use-livecode mailing list > > >> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 2 05:48:35 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 2 Jun 2022 10:48:35 +0100 Subject: OT Re: [[ ANN ]] Release 10.0.0 DP-4 In-Reply-To: References: <8BD42B4E-7F4F-405E-932A-6D79A8DA6269@livecode.com> Message-ID: <8D1A5EF6-22B4-4420-A6F9-7E85AEAA5E25@gmail.com> > On 2 Jun 2022, at 6:26 am, Richmond Mathewson via use-livecode wrote: > > 2 possible choices. That’s 4 alternatives. Cheers David G Pedant extraordinaire From klaus at major-k.de Thu Jun 2 06:07:02 2022 From: klaus at major-k.de (Klaus major-k) Date: Thu, 2 Jun 2022 12:07:02 +0200 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: Hi Peter, > Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : > > Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. > I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. > Is there a better way to edit a selection in a field using a menu popup? unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. This will "steal" the focus! :-/ Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. ... set the traversalon of btn "your popup here..." to FALSE ... > Peter Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bogdanoff at me.com Thu Jun 2 14:48:23 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Thu, 2 Jun 2022 11:48:23 -0700 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <4A06E2C5-B3A5-4BBD-81FA-7EDEA7E151B6@me.com> Klaus, thank you. Such a simple fix! > On Jun 2, 2022, at 3:07 AM, Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 2 18:14:29 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 2 Jun 2022 22:14:29 +0000 Subject: Right click in field for menu In-Reply-To: References: <55D68DCB-19D1-49EF-9E2E-D132C66CC24F@me.com> <248DEDCA-3464-44D0-8FF0-4591035FD8B7@major-k.de> Message-ID: <1CEE9304-6F51-4E0F-AF49-66B6AB5CD9D9@iotecdigital.com> More gems of LC wisdom from Klaus! Bob S > On Jun 2, 2022, at 03:07 , Klaus major-k via use-livecode wrote: > > Hi Peter, > >> Am 01.06.2022 um 22:53 schrieb Peter Bogdanoff via use-livecode : >> >> Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted. >> I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge. >> Is there a better way to edit a selection in a field using a menu popup? > > unfortunately the "traversalon" property of popup menu buttons is set to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it to FALSE and it will work as advertised. > ... > set the traversalon of btn "your popup here..." to FALSE > ... > >> Peter > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Fri Jun 3 09:56:17 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Fri, 3 Jun 2022 15:56:17 +0200 Subject: char as word boundary Message-ID: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Hi, Version 6.7 word boudary are char number 09,10,11,12,13,32 version 9.67 word boudary are char number 09,10,11,12,13,32,202 Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) Sincerely, Jean-Jacques Wagner. From iangmcknight at gmail.com Fri Jun 3 10:26:14 2022 From: iangmcknight at gmail.com (Ian McKnight) Date: Fri, 3 Jun 2022 15:26:14 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: Hi Look up numToChar in the dictionary. It's been deprecated since v7 0 because of unicode. This might explain things. Hope that helps Ian McKnight On Fri, 3 Jun 2022, 14:57 Jean-Jacques Wagner via use-livecode, < use-livecode at lists.runrev.com> wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, > as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 3 12:25:56 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 16:25:56 +0000 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: I get a compile error when using your syntax. If I insert the word "of" after "chars" I get 5 for version 9.6.8 as you would expect. Do you have the *actual* syntax that is causing you the problem? . Bob S > On Jun 3, 2022, at 06:56 , Jean-Jacques Wagner via use-livecode wrote: > > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > > Sincerely, > > Jean-Jacques Wagner. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 13:01:55 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 10:01:55 -0700 Subject: MrSign'n'Notarize In-Reply-To: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: Mark Smith wrote: > Hey Matthias, I just wanted to drop you a quick note to thank you for > the amazing utility you put together to sign and staple macOS apps. I > tried it for the first time the other day and it was a real joy to use > very well organised. Thanks for that. Definitely a life-saver (or at > least a life-enhancer!!). A life-saver indeed. Why isn't a tool like that included in the product? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From bobsneidar at iotecdigital.com Fri Jun 3 13:11:52 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 17:11:52 +0000 Subject: MrSign'n'Notarize In-Reply-To: References: <922E24BA-C062-4E46-AB5E-D997A95D8CAA@gmail.com> Message-ID: <4AA9A799-E7F4-4972-A055-EDB98470C7F9@iotecdigital.com> If I were Matthias, I would charge cash money for that. But then having LC release it in the distribution would kill the sales of it. Bob S > On Jun 3, 2022, at 10:01 , Richard Gaskin via use-livecode wrote: > > Mark Smith wrote: > > > Hey Matthias, I just wanted to drop you a quick note to thank you for > > the amazing utility you put together to sign and staple macOS apps. I > > tried it for the first time the other day and it was a real joy to use > > — very well organised. Thanks for that. Definitely a life-saver (or at > > least a life-enhancer!!). > > A life-saver indeed. > > Why isn't a tool like that included in the product? > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 3 17:29:28 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:29:28 +0000 Subject: storing binary data in a "memory" database Message-ID: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Hi all. I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. Bob S From bobsneidar at iotecdigital.com Fri Jun 3 17:41:21 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 21:41:21 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Right now I am querying for the hash directly from the source database when I need it. Just curious why sqLite cannot handle storing an encrypted string. Bob S > On Jun 3, 2022, at 14:29 , Bob Sneidar via use-livecode wrote: > > Hi all. > > I have set up a kind of database caching method where I take currently selected data in my display form and save it in a :memory: database. Everything works EXCEPT that the value for the encrypted hash is getting corrupted. It's not coming back the way it was stored. It looks like it is getting cut off. > > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dochawk at gmail.com Fri Jun 3 17:41:31 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 14:41:31 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> Message-ID: <87E14DC8-7232-4C40-B4D2-DA72FB89BC7C@gmail.com> bob bobbled, > How should I define a column in sqLite that is going to properly store and retrieve a password hash? Simply using a BLOB type doesn't do it. You shouldn’t need a BLOB for a hash. Either CHAR(), VARCHAR(), or TEXT. With the first two, you need to specify a long enough length. From dochawk at gmail.com Fri Jun 3 18:04:21 2022 From: dochawk at gmail.com (doc hawk) Date: Fri, 3 Jun 2022 15:04:21 -0700 Subject: storing binary data in a "memory" database In-Reply-To: <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: A couple of lines of code with declarations, storing, and retrieving would probably help. There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. From neville.smythe at optusnet.com.au Fri Jun 3 18:49:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 4 Jun 2022 08:49:08 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: Jean-Jacques In 9.6.8 the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 As it should be. Did you mean the number of words? But then the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) As it should be. Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. Neville > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) > From bobsneidar at iotecdigital.com Fri Jun 3 18:55:09 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 3 Jun 2022 22:55:09 +0000 Subject: storing binary data in a "memory" database In-Reply-To: References: <2BE66990-2023-4957-9136-B6DCEA5C4FFB@iotecdigital.com> <1FF4E1A7-BE67-45BC-A605-972197978703@iotecdigital.com> Message-ID: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. I suppose what I need is a statement to change the encoding of the database before I create it. put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID put the keys of pArrayDataA into tArrayKeys sort tArrayKeys numeric ascending IF pDBFile is empty THEN put ":memory:" into pDBFile IF pDBName is empty THEN put "arraydata" into pDBName TRY if pDBID is empty then \ put revOpenDatabase("sqlite", pDBFile) into pDBID IF "Error" is in pDBID THEN return empty END IF put "drop table " & pDBName into tDropSQL revExecuteSQL pDBID, tDropSQL put the result into tResult CATCH tError answer tError IF the environment is "development" THEN exit to top ELSE quit END TRY -- create the table put "create table" && quote & pDBName & quote \ & cr into tCreateCommand put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ & cr AFTER tCreateCommand put the keys of pArrayDataA [1] into tRecordKeyList REPEAT for each line tRecordKey in tRecordKeyList if pArrayDataA [1] [tRecordKey] is an array or \ pArrayDataA [1] [tRecordKey] begins with "Salted__" then put "BLOB" into tColumnType else put VARCHAR into tColumnType end if put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand END REPEAT delete char -3 to -1 of tCreateCommand put ")" AFTER tCreateCommand TRY revExecuteSQL pDBID, tCreateCommand put the result into tResult IF tResult is not 0 THEN breakpoint CATCH tError breakpoint END TRY put 1 into tRecordCounter put "recordid" & cr & tRecordKeyList into tColumns repeat with i = 1 to the number of lines of tColumns put ":" & i into item i of tColumnList end repeat put "(" & tColumnList & ")" into tColumnList -- insert data REPEAT for each line tKey in tArrayKeys put 1 into tColumnCounter put pArrayDataA [tKey] into tRecordDataA put tRecordCounter into tQueryDataA [1] REPEAT for each line tRecordKey in tRecordKeyList add 1 to tColumnCounter if tRecordDataA [tRecordKey] is an array then put arrayEncode(tRecordDataA [tRecordKey]) into tValue else put tRecordDataA [tRecordKey] into tValue end if put tValue into tQueryDataA [tColumnCounter] END REPEAT put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL TRY revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" put the result into tResult if the result is not a number then breakpoint CATCH tError breakpoint END TRY add 1 to tRecordCounter END REPEAT return pDBID END arrayToSQLite > On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: > > A couple of lines of code with declarations, storing, and retrieving would probably help. > > > There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 3 22:18:04 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 3 Jun 2022 19:18:04 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. From irog at mac.com Fri Jun 3 22:53:15 2022 From: irog at mac.com (Roger Guay) Date: Fri, 3 Jun 2022 19:53:15 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: This is very cool, Richard! I truly appreciate all you do for us. Thanks and cheers, Roger > On Jun 3, 2022, at 7:18 PM, Richard Gaskin via use-livecode wrote: > > Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. > > Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. > > LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. > > So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. > > It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. > > -- > Richard Gaskin > Fourth World Systems > > > > Klaus wrote: > > unfortunately the "traversalon" property of popup menu buttons is set > > to TRUE by default. > > This will "steal" the focus! :-/ > > > > Use the message box (prop is also missing in the inspector) to set it > > to FALSE and it will work as advertised. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Sat Jun 4 09:29:44 2022 From: brian at milby7.com (Brian Milby) Date: Sat, 4 Jun 2022 09:29:44 -0400 Subject: storing binary data in a "memory" database In-Reply-To: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> Message-ID: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Is this the issue? To pass binary data in an array element, prepend "*b" to the element's key. Sent from my iPhone > On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: > > Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. > > I suppose what I need is a statement to change the encoding of the database before I create it. > > put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB > > FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID > put the keys of pArrayDataA into tArrayKeys > sort tArrayKeys numeric ascending > IF pDBFile is empty THEN put ":memory:" into pDBFile > IF pDBName is empty THEN put "arraydata" into pDBName > > TRY > if pDBID is empty then \ > put revOpenDatabase("sqlite", pDBFile) into pDBID > > IF "Error" is in pDBID THEN > return empty > END IF > > put "drop table " & pDBName into tDropSQL > revExecuteSQL pDBID, tDropSQL > put the result into tResult > CATCH tError > answer tError > IF the environment is "development" THEN exit to top ELSE quit > END TRY > > -- create the table > put "create table" && quote & pDBName & quote \ > & cr into tCreateCommand > put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ > & cr AFTER tCreateCommand > > put the keys of pArrayDataA [1] into tRecordKeyList > > REPEAT for each line tRecordKey in tRecordKeyList > if pArrayDataA [1] [tRecordKey] is an array or \ > pArrayDataA [1] [tRecordKey] begins with "Salted__" then > put "BLOB" into tColumnType > else > put VARCHAR into tColumnType > end if > > put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand > END REPEAT > > delete char -3 to -1 of tCreateCommand > put ")" AFTER tCreateCommand > > TRY > revExecuteSQL pDBID, tCreateCommand > put the result into tResult > IF tResult is not 0 THEN breakpoint > CATCH tError > breakpoint > END TRY > > put 1 into tRecordCounter > put "recordid" & cr & tRecordKeyList into tColumns > > repeat with i = 1 to the number of lines of tColumns > put ":" & i into item i of tColumnList > end repeat > > put "(" & tColumnList & ")" into tColumnList > > -- insert data > REPEAT for each line tKey in tArrayKeys > put 1 into tColumnCounter > put pArrayDataA [tKey] into tRecordDataA > put tRecordCounter into tQueryDataA [1] > > REPEAT for each line tRecordKey in tRecordKeyList > add 1 to tColumnCounter > > if tRecordDataA [tRecordKey] is an array then > put arrayEncode(tRecordDataA [tRecordKey]) into tValue > else > put tRecordDataA [tRecordKey] into tValue > end if > > put tValue into tQueryDataA [tColumnCounter] > END REPEAT > > put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL > > TRY > revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" > put the result into tResult > if the result is not a number then breakpoint > CATCH tError > breakpoint > END TRY > > add 1 to tRecordCounter > END REPEAT > > return pDBID > END arrayToSQLite > > >> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >> >> A couple of lines of code with declarations, storing, and retrieving would probably help. >> >> >> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sat Jun 4 10:49:01 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sat, 4 Jun 2022 07:49:01 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> References: <5e88625a-c7c0-6b24-1c10-ec16f37f275d@fourthworld.com> Message-ID: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Looks like a very nice utility ... *BUT*, I get an error when trying to run it, either directly from the GoLiveNet app or by installing it and letting it run: "There was an error executing a script in the stack 4WProps. No more information is available because the stack is password protected" Although the pop-up does appear. The drop-down field at the top of the pop-up references: stack "libConcord". The other "options" from the drop-down list are: "card id 1002" and "Global Properties". Choosing either of these two choices also produces the error described above. I am running Livecode v 9.6.1 on Windows 10 Pro Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Friday, June 3, 2022 7:18 PM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Property Sheet for LC (was Re: Right click in field for menu) Inspectors are great in consumer tools because they provide a convenient way for less technical types to access the relatively small number of properties needed for the narrow range of tasks most consumer apps provide. Property Sheets are the go-to for most professional development tools because they provide a complete list of all properties supported GUI objects can support. Sooner or later you'll need even the most obscure properties, and by listing them all you can anticipate what's there to help solve problems like the focus issue in this thread. LiveCode doesn't yet have a Property Sheet, so many devs aren't aware of the full rich scope of LC's object properties. And when they are, it means opening the Message Box and typing the setting statement by hand. So I made a Property Sheet for LC some time ago, accessible right from your IDE: in the Development menu see Plugins -> GoLiveNet, and you'll find "4W Props" in the Stacks section. It updates to show the full list of properties for the current selected object, and even provides a custom property editor as well. -- Richard Gaskin Fourth World Systems Klaus wrote: > unfortunately the "traversalon" property of popup menu buttons is set > to TRUE by default. > This will "steal" the focus! :-/ > > Use the message box (prop is also missing in the inspector) to set it > to FALSE and it will work as advertised. _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sat Jun 4 14:10:07 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:10:07 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <881619d7-a834-5333-8518-ef863aa18417@fourthworld.com> Kind of you to say, Roger. Thank you. Roger Guay wrote: > This is very cool, Richard! I truly appreciate all you do for us. > Richard wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. -- Richard Gaskin Fourth World Systems From ambassador at fourthworld.com Sat Jun 4 14:38:49 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 4 Jun 2022 11:38:49 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> Message-ID: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Sun Jun 5 07:57:24 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 5 Jun 2022 12:57:24 +0100 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: I'll add my thanks for such a usefull tool. On 04/06/2022 19:38, Richard Gaskin via use-livecode wrote: > > Thanks for the report. Please keep me posted if you find any other > anomalies. > I don't know if it's an anomaly or another failing in widget support :-) The NavBar widget has a number of properties (itemNames, itemStyle, hilitedItem, itemArray, ..) which are visible in the Object Inspector, but not in 4WProps. Alex. From General.2018 at outlook.com Sun Jun 5 08:51:39 2022 From: General.2018 at outlook.com (General 2018) Date: Sun, 5 Jun 2022 12:51:39 +0000 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Hi, So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. Just found some odd behaviour :- The mainstack and substacks have items in PreOpenStack. The substack has for example, On preopenstack Set the foregroundcolor of fld “xyz” to red End preopenstack This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld “xyz” is not found. To get round this I added the cd in the substack - fld “xyz” of cd “123” . Two questions :- 1. Is this the expected behaviour ? 2. Why does it work on the first pass without using - of cd “123” Regards Camm > On 29 May 2022, at 20:32, General 2018 wrote: > > Hi Jacquline, > > Think your question lead me to the issue. > > For some reason on the stack that did not work I added the substack by opening the mainstack and substack and saving the substack into the mainstack somehow. > > I started from new and added the substack by using the add stack file button within standalone settings and it worked fine. > > > Regards > Camm > >> On 29 May 2022, at 17:27, J. Landman Gay via use-livecode wrote: >> >> Just to clarify, are they real substacks or do you mean they are separate stacks that you include in the build? Also, double check that standalone settings isn't set up to move substacks into separate files. I think that option is in the general pane but I'm not at my computer to check. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >>>> On May 29, 2022 6:05:08 AM General 2018 via use-livecode wrote: >>> >>> Still no luck, no closestack handler in “main stack” , tried the other suggestions with hide/show etc. But still “mainstack” quits on closing the “substack xyz” >>> >>> Will keep looking…….. >>> >>> Regards >>> >>>>> On 29 May 2022, at 00:12, Mark Wieder via use-livecode wrote: >>>> >>>> On 5/28/22 07:15, General 2018 via use-livecode wrote: >>>>> Hi , >>>>> New to substacks - I have a “mainstack” used as a menu page for 2x “substacks” >>>>> When “substacks” opened from “mainstack” they open fine using — go to stack “xyz” >>>>> The problem is closing of the “substacks” using - close stack, go to “mainstack” or close this stack it always closes (quit) everything. Need “mainstack” to reappear/remain ? >>>>> Looked at docs and other posts. But stuck no doubt I have missed something. >>>> >>>> Do you have a closeStack handler in the script of the mainstack? >>>> >>>> >>>> -- >>>> Mark Wieder >>>> ahsoftware at gmail.com >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From dougr at telus.net Sun Jun 5 13:02:47 2022 From: dougr at telus.net (Douglas A. Ruisaard) Date: Sun, 5 Jun 2022 10:02:47 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> References: <0c9b01d87822$3af92fa0$b0eb8ee0$@telus.net> <4c01c661-ccbb-b35f-c4fe-be30d86376e7@fourthworld.com> Message-ID: <017b01d878fe$1593be60$40bb3b20$@telus.net> The link provided works perfectly! ... Thanks very much! Douglas Ruisaard Trilogy Software (250) 573-3935 -----Original Message----- From: use-livecode On Behalf Of Richard Gaskin via use-livecode Sent: Saturday, June 4, 2022 11:39 AM To: use-livecode at lists.runrev.com Cc: Richard Gaskin Subject: Re: Property Sheet for LC (was Re: Right click in field for menu) Douglas A. Ruisaard wrote: > Richard Gaskin wrote: >> So I made a Property Sheet for LC some time ago, accessible right >> from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and you'll find "4W Props" in the Stacks section. > > Looks like a very nice utility ... *BUT*, I get an error when trying > to run it, either directly from the GoLiveNet app or by installing it > and letting it run: > "There was an error executing a script in the stack 4WProps. No more > information is available because the stack is password protected" My apologies. The locked script was a holdover from another time. When the audience for a software is other scripters, leaving source accessible is mutually beneficial. I've now removed the password protection, and in addition to fixing that issue I also updated the UI to be a little more modernly spacious, making its list of properties a but easier to read. The latest version of 4W Props is now available through LiveNet, or can be directly downloaded here: https://fourthworld.com/rev/channel/4W_Props.rev Thanks for the report. Please keep me posted if you find any other anomalies. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sun Jun 5 14:01:13 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:01:13 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: References: Message-ID: <70e7b5d3-48de-4206-a068-de43cc3179f5@fourthworld.com> Alex Tweedly wrote: > I'll add my thanks for such a useful tool. Thank you for the kind words. > I don't know if it's an anomaly or another failing in widget support > :-) > > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. (Pardon my verbosity, but leisurely Sunday mornings find me erring on the side of completeness; at least for readability I've included section headings ). The Question: Seeking Unified Introspection ------------------------------------------- Ah yes, the perennial question of the difference in accessing complete properties for LC-native objects and widgets... Neville asked about this here in April: http://lists.runrev.com/pipermail/use-livecode/2022-April/267711.html It resulted in a thread of healthy length that IMO is worth reading. You can see it all sorting by topic in the archives - scroll down to Neville's "Widget properties" post as the entry point: http://lists.runrev.com/pipermail/use-livecode/2022-April/thread.html#start IIRC Monte was the only team member to chime in on that thread, the first of his posts sharing his uniquely valuable perspective is here: http://lists.runrev.com/pipermail/use-livecode/2022-April/267732.html Along the way Neville submitted an enhancement request, currently flagged for "Expert Review": https://quality.livecode.com/show_bug.cgi?id=23670 The implications for my lil' Property Sheet tool was among my contributions to that thread. That we currently have no unified introspection mechanism results in threads like that every now and then, in one form or another, every few months among the various LC discussion venues. The true scope of the challenge isn't limited to just adding widgets: compound objects like the DataGrid should arguably be included as well, and there's been talk of revisiting that model in an extended form for LC v10 or later, which might then potentially be a fourth object model. In short, "the properties" has been the primary introspection method used by scripters as far back as I can recall, and I've been using this engine since '97. The addition of new object paradigms multiplies the range of things scripters need to know, and which toolmakers need to account for. This is apparently known to the company, and while there is indication of interest in providing a unified introspection mechanism it's unclear to me what form it might take, and when or even if it might become at least a convention (like the old RIP community standards once attempted) if not an engine feature. The Challenge: Finding net-positive ROI in LC Tools --------------------------------------------------- So that's the scope of the issue. The question you asked is how I'll address it in 4W Props. I've spent a good portion of the last two decades trying to find a break-even for LC aftermarket stuff. So very tempting to me, having launched my business as a provider of SuperCard add-ons back in the day. It's a business model I know well and enjoy. I miss my monthly train rides to the SuperCard headquarters where we'd outline co-marketing plans, product strategy, IDE features, and the like. And my partnership with Hiezer to add Fourth World pages in their catalog was great fun; I learned much from Heizer manager Brian Molyneaux. The effort was reasonably satisfying: even before the execs at SuperCard invited me into an advisory role, revenue from my SC tools paid most of my bills. (Allegiant's eventual demise is another story best told round a campfire, but the cause wasn't a lack of money; their four-space booth at MacWorld Expo every six months had brisk traffic). Given my business history, it's probably not surprising that I have a few GBs of LC tools, books, interactive training materials, etc. in various stages on my hard drive, all waiting for me to discover the magic formula for break-even in the LC universe. Despite the success I'd found almost accidentally in the SC world, I know of no third-party add-on for LC that has hit a true break-even. So in this universe I've had to adjust my expectations. Like most tools providers here, any tools I take the time to tidy up enough to publish are things I built to support my own work, effectively subsidized by what would otherwise be net income. I very much appreciate the occasional donations that come in now and then; they keep me motivated to keep this published subset of tools current with new LC versions, and occasionally add new features. But still the need to subsidize them remains. And all the while my internal business needs for LC-specific tools has leveled off, as an ever-larger percentage of the systems I deliver are not in LC. The Answer: Anticipating Revelation of Unknowns ----------------------------------------------- All this combines to a needlessly-lengthy way of just saying: My tools are currently only what I need them to be, and I'd be more than happy (thrilled, actually) to make them into what others want them to be if I can find a way to afford to do so. Toolmaking is my roots, and I enjoy it. With 4W Props, the prospect of at last having a unified introspection mechanism is enticing enough to encourage me to hold off on further expense until I see where things go with that in v10. Support for widget-specific properties is only one set of enhancements. A wider range of GUI value pickers has been spec'd, along with options for grouping the settings so rather than just alphabetical they can also be arranged topically, perhaps with a set of favorites at the top (each of us has our own needs, and the rich scope of LC object properties is enjoyed by all of us sooner or later). So much that can be done, the moment I can find the cost justification for doing it... -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 14:04:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 11:04:26 -0700 Subject: Property Sheet for LC (was Re: Right click in field for menu) In-Reply-To: <017b01d878fe$1593be60$40bb3b20$@telus.net> References: <017b01d878fe$1593be60$40bb3b20$@telus.net> Message-ID: <9732663f-4bfc-3cde-7db7-db5b8795eae9@fourthworld.com> Thank you for the confirmation, Douglas. Please keep me posted if you see any other anomalies. -- Richard Gaskin Fourth World Systems Douglas A. Ruisaard wrote: > The link provided works perfectly! ... Thanks very much! > > Douglas Ruisaard > > Trilogy Software > (250) 573-3935 > > -----Original Message----- > From: use-livecode On Behalf Of > Richard Gaskin via use-livecode > > Douglas A. Ruisaard wrote: > > > Richard Gaskin wrote: > >> So I made a Property Sheet for LC some time ago, accessible right >> > from your IDE: in the Development menu see Plugins -> GoLiveNet, >> and > you'll find "4W Props" in the Stacks section. > > > > Looks like a very nice utility ... *BUT*, I get an error when trying > > to run it, either directly from the GoLiveNet app or by installing it > and > letting it run: > > "There was an error executing a script in the stack 4WProps. No more > > information is available because the stack is password protected" > > > My apologies. The locked script was a holdover from another time. When the > audience for a software is other scripters, leaving source accessible is > mutually beneficial. > > I've now removed the password protection, and in addition to fixing that > issue I also updated the UI to be a little more modernly spacious, making > its list of properties a but easier to read. > > The latest version of 4W Props is now available through LiveNet, or can be > directly downloaded here: > https://fourthworld.com/rev/channel/4W_Props.rev > > Thanks for the report. Please keep me posted if you find any other > anomalies. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Sun Jun 5 15:36:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 5 Jun 2022 12:36:28 -0700 Subject: Calling all Grognards Message-ID: <3ef8d1e5-d59e-71d6-dcce-5e607f72e0bb@fourthworld.com> One of the unexpected personal upsides to the pandemic has been a discovery of tabletop games, at last recognizing them as forms of systems design. Of the many types of board games I've developed a particular interest in hex-and-counter wargaming. While mostly used to model historical battles, the format is both simple and extensible enough that I've seen it employed for modeling encounters as varied as pre-European conflict among Tahitian tribes all the way to the protester-vs-police conflicts of Seattle during the WTO "Occupy" movement. I've even seen it used in modeling non-combat encounters like those related to supply chains and other logistics challenges. The classic counter format is so flexible I find myself daydreaming about using it to model peacetime activities for possible learning systems. I have some work obligations to fulfill so this is definitely back-burner and non-urgent, but while it was one my mind this morning it occurs to me that given the demographic intersection of some of our members and many fans of old-school wargaming there's a likelihood some of our members may have already done some work in this area. If you've ever built anything that delivers a hex-and-counter format game, or tooling for print-and-play options for enjoying such things, please feel free to drop me a note. I'd love to learn what you've been working on, and see if there are ways we might share bits and pieces to move such systems forward more easily. -- Richard Gaskin Fourth World Systems From ahsoftware at sonic.net Sun Jun 5 18:21:04 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 5 Jun 2022 15:21:04 -0700 Subject: Substacks In-Reply-To: References: <7cb39a94-bf9c-8d78-c0d2-7d17f0adbe0a@sonic.net> <18110a35e98.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: On 6/5/22 05:51, General 2018 via use-livecode wrote: > Hi, > > So using real substacks being opened by go to from mainstack and then closing from substack returning to mainstack all working well, thanks for the previous suggestions. > > Just found some odd behaviour :- > > The mainstack and substacks have items in PreOpenStack. > > The substack has for example, > > On preopenstack > Set the foregroundcolor of fld xyz to red > End preopenstack > > This works on the first pass of go to substack from mainstack. But if the substack is closed and go to substack from mainstack is used again the fld xyz is not found. > > To get round this I added the cd in the substack - fld xyz of cd 123 . > > Two questions :- > 1. Is this the expected behaviour ? > 2. Why does it work on the first pass without using - of cd 123 A little hard to diagnose from a distance but here are some thoughts: First of all, per the docs, the preOpenStack handlers should be in the first card of the stacks, not in the scripts of the stacks themselves. Then it sounds like maybe you have multiple cards in your substack and the currently selected card is not card "123" at the time you invoke the goto command the second time. If the (badly-named) destroyStack property of the substack is set to false (the default) then the substack will still be in memory and your preOpenStack handler will be triggered at its current card setting. -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Sun Jun 5 18:58:58 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Mon, 6 Jun 2022 08:58:58 +1000 Subject: Property Sheet for LC In-Reply-To: References: Message-ID: Alex wrote > The NavBar widget has a number of properties (itemNames, itemStyle, > hilitedItem, itemArray, ..) which are visible in the Object Inspector, > but not in 4WProps. As discussed in a post a while ago, the problem is that requesting the properties of a widget object returns nothing [it is supposed to return enough property settings to be able to completely reproduce the object]. I guess Richard has assumed a list of basic properties and reported those, unless he has more information about widgets than I know. I do the same in nsScriptDatabase, the current version of which will report what I am calling the extrinsic properties of the object such as its rect, visibility etc. It’s a slightly different list from Richards, but achieves much the same result. It just displays the values, it does not allow setting them as does Richard's excellent tool, because the objective of my app is as an archive not an IDE tool so it doesn’t alter the inspected stack. However nsScriptDatabase will also expose the intrinsic properties of the widget reported by exporting the widget, such as the itemNames of the navBar widget etc. It turns out there are sometimes other internal properties of a widget which are only discoverable through the manifest for the widget, which is held by the IDE. An example is the scaledHeight of an SVG Icon widget. The next version of nsScriptDatabase will display the values of these properties, together with their default and expected values. Further, it it will also expose the public handlers for the widget with their input and output parameters. I expect to finish coding nsScriptDatabase 2.2 in the next few days. Neville From bobsneidar at iotecdigital.com Sun Jun 5 19:58:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 5 Jun 2022 23:58:42 +0000 Subject: storing binary data in a "memory" database In-Reply-To: <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> References: <9DA2A72E-0A83-4543-A1F8-C7028344CC0D@iotecdigital.com> <92B89D0A-B8AA-473E-B5EA-CF5C6B44A2C1@milby7.com> Message-ID: Oooh that may do it. I’ll try when I get the chance. Sent from my iPhone > On Jun 4, 2022, at 06:31, Brian Milby via use-livecode wrote: > > Is this the issue? > > To pass binary data in an array element, prepend "*b" to the element's key. > > Sent from my iPhone > >> On Jun 3, 2022, at 6:56 PM, Bob Sneidar via use-livecode wrote: >> >> Hi Doc thanks for the response. I am using aes256 encryption so an ascii hash is not viable. If this were a file based sqLite database I could perhaps change the encoding. Maybe I can with a :memory: database too! Here's my code. I have posted this before, it's an incredibly useful handler. If you provide pDBID it will ADD or REPLACE a table in that :memory: database. If you do NOT it will create a NEW :memory: database and return the database ID. The parameter pDBName is misnamed it should probably be pTableName. I'll fix that later. >> >> I suppose what I need is a statement to change the encoding of the database before I create it. >> >> put arrayToSQLite(tPasswordsDataA, ":memory:", "passwords", lMemoryDB) into lMemoryDB >> >> FUNCTION arrayToSQLite pArrayDataA, pDBFile, pDBName, pDBID >> put the keys of pArrayDataA into tArrayKeys >> sort tArrayKeys numeric ascending >> IF pDBFile is empty THEN put ":memory:" into pDBFile >> IF pDBName is empty THEN put "arraydata" into pDBName >> >> TRY >> if pDBID is empty then \ >> put revOpenDatabase("sqlite", pDBFile) into pDBID >> >> IF "Error" is in pDBID THEN >> return empty >> END IF >> >> put "drop table " & pDBName into tDropSQL >> revExecuteSQL pDBID, tDropSQL >> put the result into tResult >> CATCH tError >> answer tError >> IF the environment is "development" THEN exit to top ELSE quit >> END TRY >> >> -- create the table >> put "create table" && quote & pDBName & quote \ >> & cr into tCreateCommand >> put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY UNIQUE, " \ >> & cr AFTER tCreateCommand >> >> put the keys of pArrayDataA [1] into tRecordKeyList >> >> REPEAT for each line tRecordKey in tRecordKeyList >> if pArrayDataA [1] [tRecordKey] is an array or \ >> pArrayDataA [1] [tRecordKey] begins with "Salted__" then >> put "BLOB" into tColumnType >> else >> put VARCHAR into tColumnType >> end if >> >> put quote & tRecordKey & quote && tColumnType & "," && cr AFTER tCreateCommand >> END REPEAT >> >> delete char -3 to -1 of tCreateCommand >> put ")" AFTER tCreateCommand >> >> TRY >> revExecuteSQL pDBID, tCreateCommand >> put the result into tResult >> IF tResult is not 0 THEN breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> put 1 into tRecordCounter >> put "recordid" & cr & tRecordKeyList into tColumns >> >> repeat with i = 1 to the number of lines of tColumns >> put ":" & i into item i of tColumnList >> end repeat >> >> put "(" & tColumnList & ")" into tColumnList >> >> -- insert data >> REPEAT for each line tKey in tArrayKeys >> put 1 into tColumnCounter >> put pArrayDataA [tKey] into tRecordDataA >> put tRecordCounter into tQueryDataA [1] >> >> REPEAT for each line tRecordKey in tRecordKeyList >> add 1 to tColumnCounter >> >> if tRecordDataA [tRecordKey] is an array then >> put arrayEncode(tRecordDataA [tRecordKey]) into tValue >> else >> put tRecordDataA [tRecordKey] into tValue >> end if >> >> put tValue into tQueryDataA [tColumnCounter] >> END REPEAT >> >> put "insert into" && pDBName && "VALUES" && tColumnList into tInsertSQL >> >> TRY >> revExecuteSQL pDBID, tInsertSQL, "tQueryDataA" >> put the result into tResult >> if the result is not a number then breakpoint >> CATCH tError >> breakpoint >> END TRY >> >> add 1 to tRecordCounter >> END REPEAT >> >> return pDBID >> END arrayToSQLite >> >> >>>> On Jun 3, 2022, at 15:04 , doc hawk via use-livecode wrote: >>> >>> A couple of lines of code with declarations, storing, and retrieving would probably help. >>> >>> >>> There also might be a UTF issue (which would be beyond me)—a hash should be in good old 6.5 bit ASCII, not something newfangled with eight or more bits. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Mon Jun 6 09:52:51 2022 From: craig at starfirelighting.com (Craig Newman) Date: Mon, 6 Jun 2022 09:52:51 -0400 Subject: char as word boundary In-Reply-To: References: Message-ID: Apart from omitting the “of” in any of your posted lines of code, I am confused.. The number of chars of any string of concatenated “numToChar” functions will be the number of those functions, that is, 5, since each returns a single character. How did you get any of the other results? Craig > On Jun 3, 2022, at 6:49 PM, Neville Smythe via use-livecode wrote: > >> the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) From benr_mc at cogapp.com Mon Jun 6 10:50:41 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 15:50:41 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: References: Message-ID: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Hi Panos, This is very exciting, thank you. If we find anomalies in the Apple Silicon side, should we raise them in the first instance - to you directly? - on this list? - straight into LQCC? thanks, Ben On 31/05/2022 16:27, panagiotis merakos via use-livecode wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 9.6.8 RC-1. > > You can find more details on the bug fixes and improvements of this new > release here: > > https://livecode.com/m1-native-latest-livecode-releases/ > > You can find the release in your LiveCode account area or get it via the > automatic updater. > > Enjoy! > > Kind regards > The LiveCode Team > > -- > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 6 11:19:17 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 06 Jun 2022 16:19:17 +0100 Subject: Reporting Apple Silicon anomalies (Re: [[ ANN ]] Release 9.6.8 RC-1) In-Reply-To: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> References: <3830d01a-387d-428b-f9f8-dccddc2a17c7@cogapp.com> Message-ID: <14aee2b7bc991451829aa45c04eb4939@livecode.com> On 2022-06-06 15:50, Ben Rubinstein via use-livecode wrote: > This is very exciting, thank you. If we find anomalies in the Apple > Silicon side, should we raise them in the first instance > - to you directly? > - on this list? > - straight into LQCC? Just file a bug in the LQCC - indicating that the discrepancy is between Apple and Intel architectures :) Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 6 14:45:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 18:45:17 +0000 Subject: Limit on the number of parameters? Message-ID: Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. Bob S From phil at pdslabs.net Mon Jun 6 16:00:39 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 6 Jun 2022 13:00:39 -0700 Subject: Limit on the number of parameters? In-Reply-To: References: Message-ID: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> In LC 9.6.7, this works in a button script: on mouseUp     tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" end mouseUp command tryThis     put the params -- the handler name and all 10 params are there end tryThis I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. Phil Davis On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: > Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. > > Bob S > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From bobsneidar at iotecdigital.com Mon Jun 6 16:08:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 6 Jun 2022 20:08:40 +0000 Subject: Limit on the number of parameters? In-Reply-To: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> Message-ID: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. Bob S > On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: > > In LC 9.6.7, this works in a button script: > > on mouseUp > tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" > end mouseUp > > > command tryThis > put the params -- the handler name and all 10 params are there > end tryThis > > > I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. > > Phil Davis > > > On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >> >> Bob S >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Mon Jun 6 18:01:20 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 6 Jun 2022 23:01:20 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? Message-ID: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Not strictly speaking a LiveCode question, but... I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. Is there a way to run the intel code from a universal binary under Rosetta from the command line? TIA, Ben From matthias_livecode_150811 at m-r-d.de Mon Jun 6 18:13:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 7 Jun 2022 00:13:25 +0200 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Maybe this is of help for you. https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 Regards, Matthias > Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : > > Not strictly speaking a LiveCode question, but... > > I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. > > Is there a way to run the intel code from a universal binary under Rosetta from the command line? > > TIA, > > Ben > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 7 03:18:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 08:18:06 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> Message-ID: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >> Also, you'll be able to do things like: >> >>     constant kPiBy2 = pi / 2 >>     constant kPiBy2Squared = kPiBy2 * kPiBy2 >>     constant kPiBy2String = format("%f", kPiBy2) >>     local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> > Very good. In fact, great !! Thank you! > > Would you be ale to do something like > > constant kPiMap = { ... as above ... } Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > And now I'll push my luck and ponder the possibility of 'global' > constants. Haha... > OK - 'global constant' is likely counter to the scope concepts. But > perhaps they could be done as "write-once" variables, or as a more > general "write-protected' variable. > >    put 17 into gkMyMagicValue >    writeprotect "gkMyMagicValue" > > and any *subsequent* attempt to change the value would fail. How is that any better than putting something like this in a library or back script: function gkMyMagicValue return 17 end gkMyMagicValue Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From benr_mc at cogapp.com Tue Jun 7 05:10:17 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 7 Jun 2022 10:10:17 +0100 Subject: MacOS on M1: forcing universal app to open using rosetta from terminal? In-Reply-To: References: <44930b2c-358c-0891-6220-c89146fb99df@cogapp.com> Message-ID: Thanks Matthias, that's exactly what I need. My googling was inadequate! Ben On 06/06/2022 23:13, matthias rebbe via use-livecode wrote: > Maybe this is of help for you. > https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 > > Regards, > Matthias > > >> Am 07.06.2022 um 00:01 schrieb Ben Rubinstein via use-livecode : >> >> Not strictly speaking a LiveCode question, but... >> >> I've resolved what I thought was possibly an LC confusion as my misunderstanding. With a universal app on an M1 Mac, you can set a checkbox in the "Get Info" properties inspector of the app to "Open using Rosetta". But this checkbox only affects launching the app from the Finder. If you check this box on a universal binary, then launch it from the Terminal, it always runs the 'native' code. >> >> Is there a way to run the intel code from a universal binary under Rosetta from the command line? >> >> TIA, >> >> Ben From craig at starfirelighting.com Tue Jun 7 08:49:09 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 08:49:09 -0400 Subject: Limit on the number of parameters? In-Reply-To: <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> References: <015ed561-a1ae-f5c6-0760-9168e30b9126@pdslabs.net> <8BFF1FF7-65E3-4AB6-A602-4F6A9381E43B@iotecdigital.com> Message-ID: <091A9628-504E-4DB0-98D7-3AAA6D67EA6A@starfirelighting.com> I have never had any issues with the number of parameters that can be passed to a custom handler. Nor any issue with “seeing” them all in the debugger. I would say that the largest number of params I ever sent was about 15. Craig > On Jun 6, 2022, at 4:08 PM, Bob Sneidar via use-livecode wrote: > > Thanks Phil. I checked in the debugger both the call to the function where the 5th value was passed as a literal, and in the function itself where the parameter was no defined. It may be something with the SE debugger I'll look into it. > > Bob S > > >> On Jun 6, 2022, at 13:00 , Phil Davis via use-livecode wrote: >> >> In LC 9.6.7, this works in a button script: >> >> on mouseUp >> tryThis "1", "2", "3", "4", "5", "66", "777", "8888", "9", "10" >> end mouseUp >> >> >> command tryThis >> put the params -- the handler name and all 10 params are there >> end tryThis >> >> >> I often stuff lots of data items into an array and use the array as a param. For me, that makes life easier. YMMV. >> >> Phil Davis >> >> >> On 6/6/22 11:45 AM, Bob Sneidar via use-livecode wrote: >>> Is the number of parameters passed to a custom handler limited to 4? I do not seem to be getting a 5th parameter to pass to a function I use. >>> >>> Bob S >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >> >> -- >> Phil Davis >> (503) 307-4363 >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Info at dicod.com Tue Jun 7 09:01:57 2022 From: Info at dicod.com (Jean-Jacques Wagner) Date: Tue, 7 Jun 2022 15:01:57 +0200 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: Hi Sorry, I ment the number of words. Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). Sincerely, Jean-Jacques Wagner. > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars (numtonativer(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: > > Jean-Jacques > > In 9.6.8 > > the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 > > As it should be. > > Did you mean the number of words? > > But then > > the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) > > As it should be. > > Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. > > > Neville > >> >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >> >> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >> > From craig at starfirelighting.com Tue Jun 7 10:22:11 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 7 Jun 2022 10:22:11 -0400 Subject: use-livecode Digest, Vol 225, Issue 4 In-Reply-To: References: Message-ID: <02997394-A42F-493D-B7C5-C5C96011466C@starfirelighting.com> Though it is true that “numToChar” and “charToNum” are deprecated, they still live and work the same as always. Old habits die hard, andI still use them. One day I will move on., but the original issue has not changed. Craig > On Jun 7, 2022, at 9:01 AM, Jean-Jacques Wagner via use-livecode wrote: > > Hi > Sorry, I ment the number of words. > > Since numtochar has been depreciated with version 7.0, the closest would be now numtonativechar. > However with numtonativechar () for the words boundaries the following chars number “09,10,11,12,13,32,202” are used. > > Therefore a feature has been depreciated with introduction of version 7.0, it is a long time ago. Originally it was not so, > eg. (“numtochar(32)&numtochar(202)&numtochar(32)) was a word, which was not visible on the screen, but visible for > the script. Now it makes very little sense to use the special char 202 instead of numtochar(32). > > Sincerely, > > Jean-Jacques Wagner. > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > > >> Hypercard and livecode 6.7: the number of chars (numtochar(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >> livecode 9.67 : the number of chars (numtonativer(32)& >> numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 > > >> Version 6.7 word boudary are char number 09,10,11,12,13,32 >> version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > > > >> Am 04.06.2022 um 18:00 schrieb use-livecode-request at lists.runrev.com: >> >> Jean-Jacques >> >> In 9.6.8 >> >> the number of chars of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 5 >> >> As it should be. >> >> Did you mean the number of words? >> >> But then >> >> the number of words of (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 (in 9.6.8) >> >> As it should be. >> >> Char 202 is unicode for an invisible char marking a paragraph end I believe, I think rarely used until recently. It has been turning up in web sites causing difficulty for old parsers. >> >> >> Neville >> >>> >>> Hypercard and livecode 6.7: the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 >>> livecode 9.67 : the number of chars (numtochar(32)& numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 0 >>> >>> Is it a change or a bug considering now numtochar(202) as word boundary, as it is with numtochar(32) >>> >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 7 11:27:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 7 Jun 2022 15:27:59 +0000 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <81FCCF4C-A169-4164-8B4B-42B7B0FFEA44@iotecdigital.com> I thought we already had global constants?? I think they are called, "Literals." ;-) Bob S > On Jun 7, 2022, at 24:18 , Mark Waddingham via use-livecode wrote: > > On 2022-06-01 19:54, Alex Tweedly via use-livecode wrote: >>> Also, you'll be able to do things like: >>> constant kPiBy2 = pi / 2 >>> constant kPiBy2Squared = kPiBy2 * kPiBy2 >>> constant kPiBy2String = format("%f", kPiBy2) >>> local sPiMap = { "pi-by-2": kPiBy2, "pi-by-2-sq": kPiBy2Squared } >> Very good. In fact, great !! Thank you! >> Would you be ale to do something like >> constant kPiMap = { ... as above ... } > > Yes - the initializers in both constant and local keywords are the same - both can use arbitrary constant expressions (any local properties are assumed to be the default values when evaluating). > >> And now I'll push my luck and ponder the possibility of 'global' constants. > > Haha... > >> OK - 'global constant' is likely counter to the scope concepts. But >> perhaps they could be done as "write-once" variables, or as a more >> general "write-protected' variable. >> put 17 into gkMyMagicValue >> writeprotect "gkMyMagicValue" >> and any *subsequent* attempt to change the value would fail. > > How is that any better than putting something like this in a library or back script: > > function gkMyMagicValue > return 17 > end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed less, as you'd need to put a global declaration in every script which wanted to use said global constant...). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ahsoftware at sonic.net Tue Jun 7 12:16:21 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 09:16:21 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> Message-ID: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> On 6/7/22 00:18, Mark Waddingham via use-livecode wrote: > How is that any better than putting something like this in a library or > back script: > >     function gkMyMagicValue >         return 17 >     end gkMyMagicValue > > Including the global declaration its the same number of lines (indeed > less, as you'd need to put a global declaration in every script which > wanted to use said global constant...). 1. Because it's a function, not a constant. put gkMyMagicValue() into tVar is cognitively different from put gkMyMagicValue into tVar Something like 17 is a trivial case. Something more like real world usage would be constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" 2. Because the server already build supports the "include" keyword which would neatly solve the issue, but none of the other platforms do. Why? 3. Because every other language I've used has global constants and makes this easy. It's only xtalk that makes this hard. If an LC goal is to provide a tool for learning coding then multiple definitions of the same constant is a paradigm that is not transportable to other languages, and indeed will probably result in a compiler error. 4. Because it gets tiresome having to explain to new developers that you have to declare constants in multiple scripts even though it's the same constant you already declared and the workaround is to use a getter function as you described. -- Mark Wieder ahsoftware at gmail.com From mark at livecode.com Tue Jun 7 13:55:52 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 07 Jun 2022 18:55:52 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: > 1. Because it's a function, not a constant. > put gkMyMagicValue() into tVar > is cognitively different from > put gkMyMagicValue into tVar > > Something like 17 is a trivial case. Something more like real world > usage would be > > constant kRootURL="http://example.com/aUrlThatMightChange/api/v2" I see and what is kRootURL the Url for? If I were writing a library for a web-service and needed (for some reason) to expose the underlying URL to callers of the library, then I'd have simply define a function as part of its public API: function myRestLibraryGetRootUrl return "http://example.com/aUrlThatMightChange/api/v2" end myRestLibraryGetRootUrl I don't buy the 'cognitively different' argument - different languages have different patterns. I really don't see that getting into the habit of using 'constant functions' instead of 'constant variables' is any different from getting into the habit of doing assignment as 'source into target', rather than 'target = source'; or getting your head around the message path. It is definitely *not* unusual for libraries in any language to expose *all* that they do via functions - whilst you can use enums and preprocessor defines in C/C++ for global constants - they make your library unwrappable easily by higher-level languages. Indeed, you tend to find that as published low-level (C/C++) libraries have evolved they have changed to ensure their interfaces are entirely function based ones (indeed, oftentimes C++-based libraries gain a C function wrapper to make this easier - as C++ is a nightmare to wrap stuff from due to the immensely complicated semantics, these days, of C++ classes). > 2. Because the server already build supports the "include" keyword > which would neatly solve the issue, but none of the other platforms > do. Why? You can't really compare the features of the PHP (C preprocessor) style operation of the server engine with the object-based scripting of the normal LiveCode engine. In that PHP-likeness, 'include' makes sense as the server engine is essentially doing a continuous 'merge' - emitting interleaved blocks of content (text) with content generated from code. The include which is present there makes sense for that form of coding - i.e. for generating text documents from a mixture of prewritten text, and evaluated script. I don't think it makes sense when scripts are attached to objects where more structure is needed and they exist in a dynamic environment. Critically, the server engine loads and parses files in a linear fashion - emitting the text, and executing the interleaved script. Everything is completely transient - when the document has finished being emitted, the engine terminates. It raises too many edge-cases and questions as to what should happen in various different scenarios (as well as being a very large noose with which people could hang themselves) when you try to add its 'include' operation to the normal LiveCode environment. Remember that in the server engine include operates on a file so what would you expect to happen if you change the file? Does the engine have to track changes and recompile any object scripts including it when they change? (Remember that object scripts are compiled on being set, or when first tickled by a handler lookup if already set and loaded from disk). > 3. Because every other language I've used has global constants and > makes this easy. It's only xtalk that makes this hard. If an LC goal > is to provide a tool for learning coding then multiple definitions of > the same constant is a paradigm that is not transportable to other > languages, and indeed will probably result in a compiler error. xTalk does not make it hard - see above - its just different because of its model. Of the languages you've used how many are object-based, where objects have scripts which can be dynamically (re-)attached continuously throughout the lifetime of a programs execution and, moreover, can be dynamically created at runtime; and more specifically, where a script is a defined set of handlers and other definitions which are completely independent (from the point of view of compiling) of any other script? For those which you have found which fit that pattern, do any of them have global constants? > 4. Because it gets tiresome having to explain to new developers that > you have to declare constants in multiple scripts even though it's the > same constant you already declared and the workaround is to use a > getter function as you described. Then tell new developers that the xTalk way to do global constants is constant functions in the message path! Saying that is a workaround is akin to telling them that: "The workaround for not being able use the syntax 'X := Y' is to use the syntax 'put X into Y'" Or telling someone learning Java that: "The workaround for defining a global function is to make it a static method of some class" The point being that how you do things in different languages is different... xTalks don't have a concept of 'global constant' because the language and runtime model isn't one which really supports such a thing (as it stands) - however if you need a constant available globally then leverage a function in the message path to do so. Java doesn't have the concept of a 'global function' because it is a pure class-based language - however if you do need a global function, then you can just make a static method in a class. Neither of these things are 'workarounds' - they are how you do things in that language! FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... In that vein, what would be helpful is, instead of just going 'can we have global constants', propose problems you need to solve / would like to solve and use-cases you have encountered where the existing xTalky feature set is not sufficient to solve it in some reasonably elegant fashion without 'global constants'.* Warmest Regards, Mark. * I potentially have use-cases for non-script-local constants, but I don't have any for 'global variable'-like 'global constants' which aren't expressible with existing xTalk notions - hence why my request to 'put up or shut up' ;) --- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 7 16:51:12 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 7 Jun 2022 21:51:12 +0100 Subject: Generating Random numbers to conform a distribution Message-ID: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) Any hints from the stats gurus? Cheers David Glasgow From alex at tweedly.net Tue Jun 7 20:55:01 2022 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 8 Jun 2022 01:55:01 +0100 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: { Aside: any discussion where both Mark Weider and Mark Waddingham take part is all the better because of that; two very knowledgeable people with two very different viewpoints (in some areas) is a good thing. BUT it makes it hard to refer to what each of them said - "MarkW" is still ambiguous. So I'm adopting the "English public school" solution - refer to everyone by their surname. ] On 07/06/2022 18:55, Mark Waddingham via use-livecode wrote: > On 2022-06-07 17:16, Mark Wieder via use-livecode wrote: >> 1. Because it's a function, not a constant. > function myRestLibraryGetRootUrl >     return "http://example.com/aUrlThatMightChange/api/v2" >   end myRestLibraryGetRootUrl Here I agree with Waddingham. *IF* it's a library, then it feels right to have a function api. The cases where it doesn't, to me, are those where the constants are intrinsic to a (widespread) part of an app or subsystem ... more below. >> 2. Because the server already build supports the "include" keyword >> which would neatly solve the issue, but none of the other platforms >> do. Why? > I don't see that 'include' does what you expect in the context of lcserver. From the dictionary: > If you place the *constant* statement in a handler, you can use the > constant anywhere in the handler. If you place the* > constant* statement in a script outside any handler, you can use > the constant anywhere in the handlers of that > script. > The crucial phrase is the last one - "of that script". That script seems to be define such that the included text file is considered to be a different script from the main script. So you cannot put "constant k = 17" in an included file (outside of a handler) and have it take effect anywhere except within the included file !?! And obviously if you put it inside a handle then it can only be used within that handler. i.e. include "a.txt"     -- where a.txt contains     -- >> 4. Because it gets tiresome having to explain to new developers that >> you have to declare constants in multiple scripts even though it's the >> same constant you already declared and the workaround is to use a >> getter function as you described. > > Then tell new developers that the xTalk way to do global constants is > constant functions in the message path! > or perhaps as custom props  ? FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'... I'm not sure Tweedly knows properly what he wants from 'global constants'  :-)     Maybe what I actually want would be better called "stack-local constants" ? > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would > like to solve and use-cases you have encountered where the existing > xTalky feature set is not sufficient to solve it in some reasonably > elegant fashion without 'global constants'.* > "global variables" in LC have a particular meaning - they are *NOT* usable globally, they are only available in any script in which the developer has chosen to declare them. That's a very different granularity of scope than 'available where the function is in the message path', and I think that higher level of granularity could/should/might-be-able-to-be provided for constants. As well as being more granular, it's also more consistent (I think) with 'global variables'. In my earlier email I tried to avoid the problems of dynamic re-setting of 'global constants' by describing them as "write-protected variables" or "write-once" variables - but I'm not sure if that really works. Case :  I have a CSV or TSV file, no headers, that I read in, and process various ways at various times. I'd like to use (in many places throughout the app) snippets like  put item kTitleColumn of tLine into myTitle  put the text of fld "Last Name" into item kLastName of myNewLine But I have a sneaking suspicion that at some point in the future additional columns will appear, or be re-arranged, or .... so I won't use literal constant values (NOT put item 3 of ...), however some form of 'global constant' seems like it should work here. There are (of course) a million ways that could be done - but none that I can think of provide the simplicity of usage as above, combined with the safety of the 'variables' being write-protected, as well as some form of pan-stack constants; variables which can be used (read) in the scope where the developer wants (by declaring as global variables), but are protected from inadvertent over-writing by somehow limiting when/where they can be written (e.g. maybe only in preOpenStack and librarystack). Kind regards, Alex. > Warmest Regards, > > Mark. > > * I potentially have use-cases for non-script-local constants, but I > don't have any for 'global variable'-like 'global constants' which > aren't expressible with existing xTalk notions - hence why my request > to 'put up or shut up' ;) > > --- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 7 21:03:42 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:03:42 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <39B82256-BC1F-4404-9A44-654B0E9BE1B8@optusnet.com.au> Hmm. I jumped without thinking…I was thinking if unicode char 2029 which is the paragraph separator. Unicode Char 202 is supposed to be Latin Capital Letter E With Circumflex. But 202 is beyond the standard ascii range so the deprecated numtochar(202) will return an extended ascii character depending on the platform. On a Mac, 202 is a non-breaking space which should be a word boundary (or maybe shouldn’t be? Looks like the LC team changed it’s collective mind). On Windows it is capital E circumflex, the same as unicode— I now understand your concern, Jean-Jacques. So it is a bug but as numtochar() is deprecated not one that is going to be fixed. Neville From neville.smythe at optusnet.com.au Tue Jun 7 21:48:50 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 8 Jun 2022 11:48:50 +1000 Subject: char as word boundary In-Reply-To: References: Message-ID: <4140B7FC-58E1-4D51-86B0-427D995C34D4@optusnet.com.au> Still jumping without thinking… If native char 202 or unicode char 202 is a word boundary in Windows it is a real bug — but is that the case? Native char 202, a non-breaking space, should (or maybe shouldn’t) be a word boundary in Mac - the docs say word boundaries are space, tab and return. Whether the change between versions of LC is bug or not is questionable, but not one which will be addressed in current versions (a deprecated bug?). One of course should not be using chars at all. NumtoCodepoint(202) is circumflex E on the Mac, and is not a word boundary, and surely that is also the situation on Windows. Neville From ahsoftware at sonic.net Tue Jun 7 22:18:27 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:18:27 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: On 6/7/22 10:55, Mark Waddingham via use-livecode wrote: > I don't buy the 'cognitively different' argument Mark- Thanks for the longish explanations there. I think we'll just have to disagree on the cognitive thing then - I normally would expect functions to return the result of some action, not just hand me back a constant. No worries though. Ruby deals with this very neatly: even though everything is an object the syntactic sugar allows you to code them like "normal" constants, the same way we can refer to xtalk global functions as "the capsLockKey" instead of "capsLockKey()". > FWIW, I'm not entirely sure whether what you (Mark) want from 'global > constants' is quite the same as what Alex wants from 'global constants', > and I'm not entirely sure whether what I *think* you both mean when you > ask for 'global constants' is what you are actually thinking of when you > ask for 'global constants'... Hah! Well, whatever anyone else means, I'd like constants to obey the inheritance of the message path. An 'effective' constant if you will. But *PLEASE* don't implement that particular syntax. > > In that vein, what would be helpful is, instead of just going 'can we > have global constants', propose problems you need to solve / would like > to solve and use-cases you have encountered where the existing xTalky > feature set is not sufficient to solve it in some reasonably elegant > fashion without 'global constants'.* Thankfully I think there is nothing in this regard that is not expressible in the existing xtalk syntax. I use getter functions in my stack scripts (I don't think I've ever done that for a constant in a backscript) and sometimes I also just copy and paste constant declarations. -- Mark Wieder ahsoftware at gmail.com From ahsoftware at sonic.net Tue Jun 7 22:25:15 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 19:25:15 -0700 Subject: Case sensitivity in Livecode ?? In-Reply-To: References: <7e1bd787-b2d0-8dd6-65a6-4de1305b8f76@tweedly.net> <96b62f068eb95b27e8badeae5661cb43@livecode.com> <122ceac7-015f-a026-aac7-2cc166b31578@tweedly.net> <0f6c4ea7c1c5fa26bec68853514c97b5@livecode.com> <9499efe4-fa72-fd4a-7823-d1fb3b8afc25@sonic.net> Message-ID: <230214cf-ce6c-73b4-0fc8-9057de449ab2@sonic.net> On 6/7/22 17:55, Alex Tweedly via use-livecode wrote: > So you cannot put "constant k = 17" in an included file (outside of a > handler) and have it take effect anywhere except within the included > file !?! Ah. I see I must be projecting my desired expansion of the "include" command onto what I expect that command to do in the server context. -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Tue Jun 7 23:24:43 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Tue, 07 Jun 2022 22:24:43 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 7, 2022 3:53:37 PM David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, the > Mean and the SD are variables specified by the user, and N random numbers > are then generated with the required mean and SD. ... > In general terms, how do they do this? From ahsoftware at sonic.net Tue Jun 7 23:50:43 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 7 Jun 2022 20:50:43 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > > https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com From harrison at all-auctions.com Wed Jun 8 00:46:33 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Wed, 8 Jun 2022 00:46:33 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: Try rolling 2 six-sided dice. 7 is the number that appears the most so it’s at the middle of the curve, while 2 and 12 are at the ends of the distribution. Roll the dice multiple times to generate a distribution. Now simulate rolling the dice with random numbers in LC the same way. Now conduct your own experiments, and graph your results. Have fun! Rick > On Jun 7, 2022, at 4:51 PM, David V Glasgow via use-livecode wrote: > > > Quite a lot of stats and maths packages offer a feature whereby the N, the Mean and the SD are variables specified by the user, and N random numbers are then generated with the required mean and SD. I remember the venerable and excellent Hypercard HyperStat (1993) by David M Lane doing exactly that. > > In general terms, how do they do this? One option would be to ‘pair’ each random number with its reciprocal around the mean, but that would generate perfectly symmetrical distributions, not to mention is only half random. > > Alternatively you could ‘aim’ at the sum and do a little series of kludges at the end of the RND generation. Ugly and cheaty, and neither addresses the SD challenge > > Or is there an elegant formula? I have Googled about and can’t see one, but maybe I don’t know the magic words. And if someone wanted to script this in LC what would be the best approach? (just general guidance here, wouldn’t want anyone to invest their valuable time in what is at present just vague musings) > > Any hints from the stats gurus? > > Cheers > > David Glasgow > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 8 01:50:28 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 22:50:28 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> David V Glasgow wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > In general terms, how do they do this? Mark Waddingham would be able to answer that rather excellently, if he has the time. My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? https://www.davidmlane.com/hyperstat/index.html -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 8 02:05:21 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 7 Jun 2022 23:05:21 -0700 Subject: Generating Random numbers to conform a distribution In-Reply-To: References: Message-ID: <75602b26-def7-ba32-99ed-02fb4d4be51a@fourthworld.com> Rick Harrison wrote: > Try rolling 2 six-sided dice. 7 is the number that appears the > most so its at the middle of the curve, while 2 and 12 are at > the ends of the distribution. Roll the dice multiple times to > generate a distribution. > > Now simulate rolling the dice with random numbers in LC the same way. > > Now conduct your own experiments, and graph your results. I've been poking at some of that now and then for prototyping board games in software (an ironic moment after all these years of making paper prototypes of what later becomes software ). For my needs I found the simplest way to get the same results in LC as with dice was to do what dice do: use "any" in a range of six, iterated by the number of virtual dice. There's probably a more clever mathy solution, but for my modest prototypes it helps me to keep the virtual implementation as close to the physical tabletop result as close as possible anyway, so I have a justification for making software that behaves no smarter than cardboard. :) When I was making a game for a friend last summer I fell in love with the Royal Game of Ur (RGoU)- good history with an online version here for those interested: https://royalur.net/ The dice used in RGoU are binary in range, tetrahedra with the faces blank and two of the four points painted. The game is played with four of those, delivering a range of 0 through 4 on a probability distribution of: Dice Result Likelihood 0 1 1 4 2 6 3 4 4 1 Or more graphy: + + + + + + + + + + + + + + + + 0 1 2 3 4 If you ever need to plot dice probabilities, this tool handles nearly any number of any type of dice you can think of (except Ur dice, it turns out, but oh well): https://anydice.com/ -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From mark at livecode.com Wed Jun 8 02:07:49 2022 From: mark at livecode.com (Mark Waddingham) Date: Wed, 08 Jun 2022 07:07:49 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> Message-ID: <233e971efb4d75eea47954eda6541383@livecode.com> On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: > Quite a lot of stats and maths packages offer a feature whereby the N, > the Mean and the SD are variables specified by the user, and N random > numbers are then generated with the required mean and SD. I remember > the venerable and excellent Hypercard HyperStat > (1993) > by David M Lane doing exactly that. > > Or is there an elegant formula? I have Googled about and cant see > one, but maybe I dont know the magic words. And if someone wanted to > script this in LC what would be the best approach? (just general > guidance here, wouldnt want anyone to invest their valuable time in > what is at present just vague musings) > > Any hints from the stats gurus? I'm not a stats guru but... I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. Lets say you have a collection X of numbers then the following things are always true: P1: Mean(c * X) = c * Mean(X) P2: Mean(X + k) = k + Mean(X) P3: SD(c * X) = abs(c) * SD(X) P4: SD(X + k) = SD(X) In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). So with this in mind, let TMean and TSD be the target mean and target SD. Then: 1. Generate N random numbers in the range [0, 1] - S0, ..., SN 2. Compute SMean := Mean(S0, ..., SN) 3. Compute SSD := SD(S0, ..., SN) Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". The amount we need to scale by is mandated by the SD, specifically: c := TSD/SSD If we scale our source numbers by c and apply SD then we see: SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] = c * SSD = TSD / SSD * SSD = TSD i.e. Our scaled input numbers give us the desired SD! So now we just need to play the same 'game' with the Mean. We have: Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) = c * SMean However we really want a mean of TMean so define: k := TMean - c * SMean Then if we translate our (scaled!) source numbers by k and apply Mean then we see: Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] = c * SMean + k = c * SMean + TMean - c * SMean = TMean i.e. Our scaled and offset input numbers give us the desired Mean! Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! We can now return to our sequence of steps: 4. Compute c := TSD/SSD 5. Compute k := TMean - c * SMean 6. Compute the target random numbers, Tn := c * Sn + k So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. In LiveCode Script, the above is something like: function randomNumbers pN, pTMean, pTSD local tSource repeat pN times put random(2^31) & comma after tSource end repeat local tSMean, tSSD put average(tSource) into tSMean put stdDev(tSource) into tSSD local tC, tK put pTSD / pSSD into tC put pTMean - tC * tSMean into tK local tTarget repeat for each item tS in tSource put tC * tS + tK & comma after tTarget end repeat return tTarget end randomNumbers Hope this helps! Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Wed Jun 8 09:02:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:02:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <0502bb42-51c4-0a0f-2477-b2534b685e4e@fourthworld.com> Message-ID: <27ACB6AD-29FF-45F1-808E-66836E93B8E0@gmail.com> > On 8 Jun 2022, at 6:50 am, Richard Gaskin via use-livecode wrote: > > My only contribution here is that I found the paper you linked to interesting enough to look up the HyperStat author. Apparently he's grown a rather intriguing collection of fun things of that sort - I wonder if the answer to your question might be found among them? In the 1990s as a happy HyperStat user, I exchanged occasional mails with him. When I later discovered Metacard, I mailed him in some excitement hoping he would port HyperStat to it, but he was already committed to web. I will certainly have a further nose around… Cheers David G From dvglasgow at gmail.com Wed Jun 8 09:16:38 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Wed, 8 Jun 2022 14:16:38 +0100 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: <89080C0C-291E-46A0-BEEA-10ABDA7B066A@gmail.com> > On 8 Jun 2022, at 7:07 am, Mark Waddingham via use-livecode wrote: > > I'm not a stats guru but... Pants SO on fire! That is fascinating. I really don’t think this has been made explicit anywhere else, including Stackoverflow - despite the fact that the question has been posed several times. I will enjoy working through it, although it will take a while Thanks, David G From ludovic.thebault at laposte.net Wed Jun 8 09:43:25 2022 From: ludovic.thebault at laposte.net (Ludovic THEBAULT) Date: Wed, 8 Jun 2022 15:43:25 +0200 Subject: Sqlite and Monterey on M1 In-Reply-To: <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> References: <1035540836.1342971.1652375436147@wlpnf0205> <7E16ABF6-B8E7-4DAE-92D5-312259D3F79E@iotecdigital.com> <24143D79-2908-4C19-BBC5-BD2424D59338@major-k.de> <1450985276.32571.1652379820671@wlpnf0217> <059DE0C0-3C99-44BD-9076-1111A09E49FF@laposte.net> Message-ID: <377484DF-835A-4498-8214-B005E300C32E@laposte.net> Hello, These were file's attributes that were blocking the writing (noticed by an @ with an ‘ls’). They had to be removed with a "sudo xattr -c ..." (deleting only the com.apple.quarantine was not enough) HTH ! > Le 15 mai 2022 à 17:30, Ludovic THEBAULT a écrit : > > > >> Le 12 mai 2022 à 20:23, ludovic.thebault at laposte.net a écrit : >> >> >> >> Bonsoir Ludovic, >> >> on the Mac we have write permissions here -> specialFolderPath("preferences") >> Works on Monterey as well and is "out of sight" of the user. ;-) >> >> >> > > > Hello, Thanks > > But it seems is don’t work for my app. > > The sqlite file was copied from an Time Machine backup (but manually). > But i tested it on my Mac (Big Sur) and all work fine… > > there must be something else that blocks the writing in the database. The processor (M1) ? the user id ? > > I'll dig and test more deeply! > Ludovic Ludovic From prothero at earthlearningsolutions.org Wed Jun 8 11:18:43 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Wed, 8 Jun 2022 09:18:43 -0600 Subject: Generating Random numbers to conform a distribution In-Reply-To: <233e971efb4d75eea47954eda6541383@livecode.com> References: <233e971efb4d75eea47954eda6541383@livecode.com> Message-ID: Mark W has it. The random number generator creates a "uniform" distribution. The distribution of the means of collection of randomly generated uniform number sequences will be gaussian in the limit of infinite numbers in the uniformly distributed sequences (but you don't need an infinite number to get a good approximation of a gaussian distribution). Mark has also demonstrated how to do the scaling. Good luck, Bill P William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 8, 2022, at 12:08 AM, Mark Waddingham via use-livecode wrote: > > On 2022-06-07 21:51, David V Glasgow via use-livecode wrote: >> Quite a lot of stats and maths packages offer a feature whereby the N, >> the Mean and the SD are variables specified by the user, and N random >> numbers are then generated with the required mean and SD. I remember >> the venerable and excellent Hypercard HyperStat >> (1993) >> by David M Lane doing exactly that. >> Or is there an elegant formula? I have Googled about and can’t see >> one, but maybe I don’t know the magic words. And if someone wanted to >> script this in LC what would be the best approach? (just general >> guidance here, wouldn’t want anyone to invest their valuable time in >> what is at present just vague musings) >> Any hints from the stats gurus? > > I'm not a stats guru but... > > I think all you need to do here is to use some of the intrinsic 'properties' of the Mean and SD. > > Lets say you have a collection X of numbers then the following things are always true: > > P1: Mean(c * X) = c * Mean(X) > P2: Mean(X + k) = k + Mean(X) > P3: SD(c * X) = abs(c) * SD(X) > P4: SD(X + k) = SD(X) > > In English, scaling a set of numbers scales their mean by the same amount, and offsetting a set of numbers offsets their mean by the same amount, Similarly, scaling a set of numbers scales their SD by the same amount, and offsetting a set of numbers makes no difference to the SD (as the SD is a relative quantity - it cares about distance from the mean, not magnitude). > > Now, hopefully we can agree that if you generate a set of a random numbers, then scaling and offsetting them still uniformly does not reduce the randomness (randomness means the numbers form a uniform distribution over the range of generation, if you scale and offset then all you are doing is changing the range - not the distribution). > > So with this in mind, let TMean and TSD be the target mean and target SD. Then: > > 1. Generate N random numbers in the range [0, 1] - S0, ..., SN > > 2. Compute SMean := Mean(S0, ..., SN) > > 3. Compute SSD := SD(S0, ..., SN) > > Now we take a small diversion from a sequence of enumerated steps to ask "what offset and scale do we need to apply to the set of numbers so that we get TMean and TSD, rather than SMean and SSD?". > > The amount we need to scale by is mandated by the SD, specifically: > > c := TSD/SSD > > If we scale our source numbers by c and apply SD then we see: > > SD(c * S0, ..., c * SN) = c * SD(S0, ..., SN) [P3 above] > = c * SSD > = TSD / SSD * SSD > = TSD > > i.e. Our scaled input numbers give us the desired SD! > > So now we just need to play the same 'game' with the Mean. We have: > > Mean(c * S0, ..., c * SN) = c * Mean(S0, ..., SN) > = c * SMean > > However we really want a mean of TMean so define: > > k := TMean - c * SMean > > Then if we translate our (scaled!) source numbers by k and apply Mean then we see: > > Mean(c * S0 + k, ..., c * SN + k) = c * Mean(S0, ..., SN) + k [P1 and P2 above] > = c * SMean + k > = c * SMean + TMean - c * SMean > = TMean > > i.e. Our scaled and offset input numbers give us the desired Mean! > > Note that SD is invariant under offsetting (P4) so SD(c * S0 + k, ..., c * SN + k) = SD(c * S0, ... c * SN) = TSD! > > We can now return to our sequence of steps: > > 4. Compute c := TSD/SSD > > 5. Compute k := TMean - c * SMean > > 6. Compute the target random numbers, Tn := c * Sn + k > > So, assuming my maths is correct above T0, ..., TN, will be still be 'random' (for some suitable definition of random), but have Mean of TMean and SD of TSD as desired. > > In LiveCode Script, the above is something like: > > function randomNumbers pN, pTMean, pTSD > local tSource > repeat pN times > put random(2^31) & comma after tSource > end repeat > > local tSMean, tSSD > put average(tSource) into tSMean > put stdDev(tSource) into tSSD > > local tC, tK > put pTSD / pSSD into tC > put pTMean - tC * tSMean into tK > > local tTarget > repeat for each item tS in tSource > put tC * tS + tK & comma after tTarget > end repeat > > return tTarget > end randomNumbers > > Hope this helps! > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Wed Jun 8 11:49:28 2022 From: devin_asay at byu.edu (Devin Asay) Date: Wed, 8 Jun 2022 15:49:28 +0000 Subject: Generating Random numbers to conform a distribution In-Reply-To: <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> Message-ID: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> I think Jacque has germaniums in her garden! On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: I don't have an answer. But apparently it's a common problem: https://xkcd.com/2626/ Chortle. Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. -- Mark Wieder ahsoftware at gmail.com _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mail at richard-hillen.de Wed Jun 8 12:54:29 2022 From: mail at richard-hillen.de (Hillen Richard) Date: Wed, 8 Jun 2022 18:54:29 +0200 Subject: Generating Random numbers to conform a distribution (David V Glasgow) Message-ID: <83ACE6BC-F84D-4760-8531-8CA3A4E41731@richard-hillen.de> Perhaps this helps: I needed lists of samples that obeyed a certain distribution for a few random experiments. I created these with help of built-in Excel-functions and then imported them into Livecode. Richard. From jacque at hyperactivesw.com Wed Jun 8 13:19:07 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 08 Jun 2022 12:19:07 -0500 Subject: Generating Random numbers to conform a distribution In-Reply-To: <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> References: <7105F814-9714-4A36-86F2-785938E9ADE1@gmail.com> <1814157cc90.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <8872a5f7-a0c3-6e23-7506-000d27f95342@sonic.net> <549401BC-8FE8-431C-B101-F04D11D4BBAE@byu.edu> Message-ID: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Eeww. But you're safe, I didn't plant any tomatoes. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: > I think Jacque has germaniums in her garden! > > > > On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > > wrote: > > On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: > I don't have an answer. But apparently it's a common problem: > https://xkcd.com/2626/ > > Chortle. > > Back in the day I would generate a random number by back-biasing a > germanium diode and hook it up to an analog-to-digital converter. Great > white noise generator too. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > Devin Asay > Office of Digital Humanities > Brigham Young University > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Wed Jun 8 14:48:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 8 Jun 2022 14:48:20 -0400 Subject: Generating Random numbers to conform a distribution In-Reply-To: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1814453b710.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: A maths & stats explanation from the company CTO along with the code to implement it, a back in the day approach that the young makers can try, a HyperCard reference to warm the hearts of the xtalk vets and then a dad joke that unites all with a grin or a groan all in one thread! What a great list. Martin Koob Sent from my iPhone > On Jun 8, 2022, at 1:20 PM, J. Landman Gay via use-livecode wrote: > > Eeww. But you're safe, I didn't plant any tomatoes. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On June 8, 2022 10:51:39 AM Devin Asay via use-livecode wrote: >> >> I think Jacque has germaniums in her garden! >> >> >> >> On Jun 7, 2022, at 9:50 PM, Mark Wieder via use-livecode > wrote: >> >> On 6/7/22 20:24, J. Landman Gay via use-livecode wrote: >> I don't have an answer. But apparently it's a common problem: >> https://xkcd.com/2626/ >> >> Chortle. >> >> Back in the day I would generate a random number by back-biasing a germanium diode and hook it up to an analog-to-digital converter. Great white noise generator too. >> >> -- >> Mark Wieder >> ahsoftware at gmail.com >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> Devin Asay >> Office of Digital Humanities >> Brigham Young University >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From cubist at aol.com Wed Jun 8 18:06:10 2022 From: cubist at aol.com (Quentin Long) Date: Wed, 8 Jun 2022 22:06:10 +0000 (UTC) Subject: Funky dice (was Re: Generating Random numbers to conform a distribution) References: <2115663184.690405.1654725970264.ref@mail.yahoo.com> Message-ID: <2115663184.690405.1654725970264@mail.yahoo.com> From: Richard Gaskin > When I was making a game for a friend last summer I fell in love with  > the Royal Game of Ur (RGoU)…> The dice used in RGoU are binary in range, tetrahedra with the faces  > blank and two of the four points painted. > …> If you ever need to plot dice probabilities, this tool handles nearly  > any number of any type of dice you can think of (except Ur dice, it  > turns out, but oh well): >> https://anydice.com/ Ur dice are functionally synonymous with coin-flips—basically, D2s with nonstandard markings. Rather than a 2-sided die marked "1" and "2", an Ur die is effectively a 2-sided die marked "0" and "1". So if you want to implement Ur dice in LiveCode, you have a couple of options: any char of "01" (the random of 2) - 1 Or, if you want to play with Ur dice in anydice.com: output 1d2 - 1output 4d2 - 4 There are various nonstandard uses of dice in the roleplaying game hobby. Example: The FATE rolegame uses six-sided dice, but they aren't marked with the first six integers. Instead, two faces are marked with minus signs; two faces are blank; and the final two faces, with plus signs. When you roll FATE dice, any die that comes up with a minus sign is counted as negative one, any die that came up blank is counted as zero; and any die that came up with a plus sign is counted as positive one. The standard FATE die-roll uses four FATE dice, hence has a range of -4 (if all four dice came up minus) to +4 (if all four dice came up plus). To implement FATE dice in LiveCode, this will do the trick: (the random of 3) - 2 Or the anydice.com equivalent: output 1d3 - 2output 4d3 - 8 Example: The Shadowrun rolegame (basically a mashup between cyberpunk and high fantasy) uses normal six-sided dice, but rather than adding up all the dice, you instead count the quantity of dice which came up either 5 or 6. That is, you have a 1/3 chance of getting a 1, and a 2/3 chance of getting 0. To implement Shadowrun dice in LiveCode, the following one-liner will do: any char of "001" I *think* anydice.com *ought to* be able to handle Shadowrun dice, but at present, I don't know what sort of syntax is required to make that happen. "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ]. From jbv at souslelogo.com Thu Jun 9 03:37:14 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 03:37:14 -0400 Subject: LC 9.6.7 and Applescript Message-ID: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Hi list, I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. Now I am with LC 9.6.7 on OSX 10.15. The stack features some AppleScript commands such as : tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor utility. I am not really familiar with the relationship between LC and AppleScript. Where should I look to fix this issue ? Thank you in advance. jbv From merakosp at gmail.com Thu Jun 9 04:17:39 2022 From: merakosp at gmail.com (panagiotis m) Date: Thu, 9 Jun 2022 11:17:39 +0300 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: Hello jbv, This sounds like bug https://quality.livecode.com/show_bug.cgi?id=23576, which is fixed in LiveCode 9.6.8 rc1. Cheers, Panos -- On Thu, 9 Jun 2022 at 10:38, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to > work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 > to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run > fine in the script editor > utility. > I am not really familiar with the relationship between LC and > AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Thu Jun 9 04:20:26 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 9 Jun 2022 10:20:26 +0200 Subject: LC 9.6.7 and Applescript In-Reply-To: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <87949D2A-8B20-4B45-91B8-F825C622AF95@m-r-d.de> This was fixed in 9.6.8 RC1 see bug report https://quality.livecode.com/show_bug.cgi?id=23576 > Am 09.06.2022 um 09:37 schrieb jbv via use-livecode : > > Hi list, > > I am trying to use an old stack made with LC 8.1 community that used to work fine on Mac OSX 10.11. > Now I am with LC 9.6.7 on OSX 10.15. > The stack features some AppleScript commands such as : > tell application "Google Chrome" to set URL of active tab of window 1 to "https://www.domain.com" > > But now I get an execution error in LC 9.6.7, while those commands run fine in the script editor > utility. > I am not really familiar with the relationship between LC and AppleScript. > Where should I look to fix this issue ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jbv at souslelogo.com Thu Jun 9 05:38:54 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 09 Jun 2022 05:38:54 -0400 Subject: LC 9.6.7 and Applescript In-Reply-To: References: <0846ab5f7a823753603464a4dffe11bd@souslelogo.com> Message-ID: <954ff359efacd15648d50ce4125408a2@souslelogo.com> Hello Panos, I just installed LC 9.6.8 and everything works perfect. Thank you for your reply. I guess I should check https://quality.livecode.com more often :) Best, jbv Le 2022-06-09 04:17, panagiotis m via use-livecode a crit : > Hello jbv, > > This sounds like bug > https://quality.livecode.com/show_bug.cgi?id=23576, > which is fixed in LiveCode 9.6.8 rc1. > > Cheers, > Panos > -- From mark at livecode.com Thu Jun 9 08:44:46 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 13:44:46 +0100 Subject: Would anyone miss convertOctals? Message-ID: <86fc7306896b18dd8a63348049204d4a@livecode.com> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? 2) If you do, have you ever actually used it in any scripts which are actually still in use? 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From marksmithhfx at gmail.com Thu Jun 9 09:06:07 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Thu, 9 Jun 2022 14:06:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3C5A17D9-7A2C-4D6D-9FAF-45574B3CF7EE@gmail.com> > On 9 Jun 2022, at 1:44 pm, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > So three questions: > > 1) Do you know what convertOctals is, and what it does? No (I guessed it might be converting Octals to Decimals but a quick dictionary check indicated nope!) > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! Thanks for the section in the Release Notes called Breaking Changes. Very useful. > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 9 09:13:06 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 9 Jun 2022 09:13:06 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Hi Mark > On Jun 9, 2022, at 8:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing > (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? Without cheating and checking out the dictionary I have a general idea — my guess is… OH if I give my guess and it is right (or wrong) then it ruins your poll for everyone after ;-) You should run this as a web poll of some kind with no peeking at the dictionary allowed. :-) > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? No > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? No > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? No If convertOctals does go away maybe we can add an ode to the LiveCode poetry collection. I remember there were some haiku’s made several years ago. Martin From paul at researchware.com Thu Jun 9 10:37:31 2022 From: paul at researchware.com (Paul Dupuis) Date: Thu, 9 Jun 2022 10:37:31 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the > final thing to sort out before being able to merge my constant > expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) > - however, I would really like to make convertOctals have no effect at > all in 10.0+ as it adds a disproportionate amount of complexity > compared to (what I think, at least) its utility is (particularly in > the context of things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which > are actually still in use? > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be > to expand the numeric literal syntax to add both explicit octal and > binary number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > From rabit at revigniter.com Thu Jun 9 11:25:45 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 9 Jun 2022 17:25:45 +0200 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: On 09.06.22 14:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language > feature (even those we have deprecated, unless we absolutely have to!) - > however, I would really like to make convertOctals have no effect at all > in 10.0+ as it adds a disproportionate amount of complexity compared to > (what I think, at least) its utility is (particularly in the context of > things 'coming next' like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? Yes > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? Yes, revIgniter uses "convertOctals" and "umask" dealing with access permissions of files and folders. > >   3) If you do use it in any scripts which are still in use, would you > be willing to change them to not use it? Sure, I would exchange them with carrots. > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? I have to admit, no. > > Now, its always better to offer a carrot when there is a stick (or in > this case, an axe) being wielded and the carrot in this case would be to > expand the numeric literal syntax to add both explicit octal and binary > number literals alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals > true) is that the former is not ambiguous at parse time, it doesn't > require a runtime property set to true in order for the engine to > convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number > of them for 10 already, and my gut tells me removing convertOctals is > likely to cause less consternation than those we already have - but I > could be wrong! > Ralf From craig at starfirelighting.com Thu Jun 9 11:31:00 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 11:31:00 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <9a5aa01e-aabe-b5ab-0d61-50b6b3450952@researchware.com> Message-ID: <09E6BB0B-59FA-40AE-982B-B7ED9FE37652@starfirelighting.com> I have never used an octal. But it well might break legacy handlers of others, however simple it is to write a custom function to replicate. Craig > On Jun 9, 2022, at 10:37 AM, Paul Dupuis via use-livecode wrote: > > Never use octal. pretty much any entries theses days are decimal or hexadecimal. Even binary (bit shifting or masks) is exceedingly rare > > > On 6/9/2022 8:44 AM, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> >> So three questions: >> >> 1) Do you know what convertOctals is, and what it does? >> >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> >> Please let me know your thoughts :) >> >> Warmest Regards, >> >> Mark. >> >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From devin_asay at byu.edu Thu Jun 9 11:33:43 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 15:33:43 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> On Jun 9, 2022, at 6:44 AM, Mark Waddingham via use-livecode > wrote: So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). So three questions: 1) Do you know what convertOctals is, and what it does? Nope 2) If you do, have you ever actually used it in any scripts which are actually still in use? Nyet 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? N/A 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? Wait, you said three questions. But no. Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: 0xabcdef - hex literal 0o777 - octal literal 0b101110101 The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. Please let me know your thoughts :) Warmest Regards, Mark. P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From mark at livecode.com Thu Jun 9 11:53:07 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 09 Jun 2022 16:53:07 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> Message-ID: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> On 2022-06-09 16:33, Devin Asay via use-livecode wrote: > Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From devin_asay at byu.edu Thu Jun 9 12:06:57 2022 From: devin_asay at byu.edu (Devin Asay) Date: Thu, 9 Jun 2022 16:06:57 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <0D42E090-B774-4593-A57E-F67E856DA79A@byu.edu> <86bc62e2eb83eec3becbb0ed60085c93@livecode.com> Message-ID: On Jun 9, 2022, at 9:53 AM, Mark Waddingham via use-livecode > wrote: On 2022-06-09 16:33, Devin Asay via use-livecode wrote: Wait, you said three questions. But no. What are those two hard problems of computer science again? ;) I forget, but I’ve encountered all six of them. :D -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Office of Digital Humanities Brigham Young University From ahsoftware at sonic.net Thu Jun 9 12:15:44 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Thu, 9 Jun 2022 09:15:44 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <10911935-89a8-2e93-53d9-6bd4781b0f6e@sonic.net> On 6/9/22 05:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final > thing to sort out before being able to merge my constant expression > patch) and I was reminded of 'convertOctals'. Wow... we have a convertOctals feature. I obviously need to spend more time with the dictionary. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Thu Jun 9 12:19:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 9 Jun 2022 16:19:17 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <2DAEBD57-EDBB-447E-8EAC-1F02A51A8D6F@iotecdigital.com> Does it have something to do with eye surgery? Bob S > On Jun 9, 2022, at 05:44 , Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Thu Jun 9 12:23:54 2022 From: brian at milby7.com (Brian Milby) Date: Thu, 9 Jun 2022 12:23:54 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: Had to look it up, never used it. Sent from my iPhone > On Jun 9, 2022, at 8:45 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From benr_mc at cogapp.com Thu Jun 9 13:03:56 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 18:03:56 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: 1) No (or didn't until I looked just now) 2) N/A 3) N/A 4) N/A On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: > So I'm currently sitting here about to embark on fixing > (which is the final thing > to sort out before being able to merge my constant expression patch) and I was > reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature > (even those we have deprecated, unless we absolutely have to!) - however, I > would really like to make convertOctals have no effect at all in 10.0+ as it > adds a disproportionate amount of complexity compared to (what I think, at > least) its utility is (particularly in the context of things 'coming next' > like the script compiler). > > So three questions: > >   1) Do you know what convertOctals is, and what it does? > >   2) If you do, have you ever actually used it in any scripts which are > actually still in use? > >   3) If you do use it in any scripts which are still in use, would you be > willing to change them to not use it? > >   4) If you do use/have used it, had you ever noticed that it has been > slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this > case, an axe) being wielded and the carrot in this case would be to expand the > numeric literal syntax to add both explicit octal and binary number literals > alongside hexadecimal: > >     0xabcdef - hex literal >     0o777 - octal literal >     0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is > that the former is not ambiguous at parse time, it doesn't require a runtime > property set to true in order for the engine to convert the string to a number > correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them > for 10 already, and my gut tells me removing convertOctals is likely to cause > less consternation than those we already have - but I could be wrong! > From craig at starfirelighting.com Thu Jun 9 15:54:42 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 9 Jun 2022 15:54:42 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Mark. Gong the other way, is your task made much simpler by losing “converOctals”? I assume so, or the issue would never have come up. Are there other similar language elements that also are on the block? Craig > On Jun 9, 2022, at 1:03 PM, Ben Rubinstein via use-livecode wrote: > > 1) No (or didn't until I looked just now) > 2) N/A > 3) N/A > 4) N/A > > > On 09/06/2022 13:44, Mark Waddingham via use-livecode wrote: >> So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. >> Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). >> So three questions: >> 1) Do you know what convertOctals is, and what it does? >> 2) If you do, have you ever actually used it in any scripts which are actually still in use? >> 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? >> 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? >> Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: >> 0xabcdef - hex literal >> 0o777 - octal literal >> 0b101110101 >> The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. >> Please let me know your thoughts :) >> Warmest Regards, >> Mark. >> P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jerry at jhjensen.com Thu Jun 9 16:14:24 2022 From: jerry at jhjensen.com (Jerry Jensen) Date: Thu, 9 Jun 2022 13:14:24 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <86fc7306896b18dd8a63348049204d4a@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> Message-ID: <3AA83C11-6B11-45C0-BF08-77A3D640CB58@jhjensen.com> Wait, I like octal! I admit I have not used it since writing a disassembler for the HP-85, which nobody but me ever used. I agree with Ralf - carrots would be just fine. .Jerry > On Jun 9, 2022, at 5:44 AM, Mark Waddingham via use-livecode wrote: > > So I'm currently sitting here about to embark on fixing (which is the final thing to sort out before being able to merge my constant expression patch) and I was reminded of 'convertOctals'. > > Now, generally, I am somewhat averse to actually removing any language feature (even those we have deprecated, unless we absolutely have to!) - however, I would really like to make convertOctals have no effect at all in 10.0+ as it adds a disproportionate amount of complexity compared to (what I think, at least) its utility is (particularly in the context of things 'coming next' like the script compiler). > > So three questions: > > 1) Do you know what convertOctals is, and what it does? > > 2) If you do, have you ever actually used it in any scripts which are actually still in use? > > 3) If you do use it in any scripts which are still in use, would you be willing to change them to not use it? > > 4) If you do use/have used it, had you ever noticed that it has been slightly broken for years? > > Now, its always better to offer a carrot when there is a stick (or in this case, an axe) being wielded and the carrot in this case would be to expand the numeric literal syntax to add both explicit octal and binary number literals alongside hexadecimal: > > 0xabcdef - hex literal > 0o777 - octal literal > 0b101110101 > > The key difference between 0o777 and using 0777 (with convertOctals true) is that the former is not ambiguous at parse time, it doesn't require a runtime property set to true in order for the engine to convert the string to a number correctly. > > Please let me know your thoughts :) > > Warmest Regards, > > Mark. > > P.S. In the scheme of 'breaking changes' - we've already made a number of them for 10 already, and my gut tells me removing convertOctals is likely to cause less consternation than those we already have - but I could be wrong! > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From benr_mc at cogapp.com Thu Jun 9 16:31:46 2022 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Thu, 9 Jun 2022 21:31:46 +0100 Subject: Have we lost the Oracle driver? In-Reply-To: <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> References: <7CFA6CE8-CB12-4233-A179-85A54E44A94D@m-r-d.de> <30ba104925924fe988d911669ecc60c0@livecode.com> <2a93b9dc-78ea-0196-5f74-eaa8b394bc03@cogapp.com> <1c29c30d-fb89-de1c-acd5-28c5e68ff391@cogapp.com> Message-ID: <1495f9ef-f26a-29ea-dfd7-c131b732a71e@cogapp.com> I'm attempting to re-up this. I've been distracted by other issues, but now trying again to use the direct Oracle driver, rather than the ODBC one. I have confirmed that LiveCode is appropriately licensed ("professional" rather than "commercial"); and the standalone package contains "dboracle.bundle"(on Mac); on Windows the "dboracle.dll" is in the Externals folder. The current situation is that when I attempt this on Mac, I get the error message: 'revdberr,invalid database type' (30) On Windows, the standalone crashes. Where next...? TIA, Ben On 03/03/2022 17:14, Ben Rubinstein via use-livecode wrote: > Hi Panos, > > Alas, that's made no difference. > > Does this error message "revdberr,invalid database type" actually indicate a > failure to load the driver, or can it also occur if the driver was loaded but > there were issues initialising it, or some other issues connecting to the > given server and database? > > Is there any other detail of errors available anywhere (I looked at the > Console but there is just a continual tide of reports in that, so I couldn't > spot anything)? > > Thanks again, > > Ben > > On 03/03/2022 16:23, panagiotis m via use-livecode wrote: >> Hello Ben, >> >> I _think_ you just have to create a symlink to this version of the >> libclntsh: >> >> 1. Open a Terminal >> 2. Navigate to the instant client directory, e.g. suppose it is in your >> Downloads: >> >> cd ~/Downloads/instantclient_11_2 >> >> 3. Create the symlink: >> >> ln -s libclntsh.dylib.11.1 libclntsh.dylib >> >> Kind regards, >> Panos >> -- >> >> On Thu, 3 Mar 2022 at 15:25, Ben Rubinstein via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> Hi Panos, >>> >>> LiveCode 9.6.6 on macOS 10.15.7 (Catalina). >>> >>> I've downloaded the Oracle stuff but it doesn't seem to have an install >>> script >>> - where should I put "libclntsh.dylib.11.1"? >>> >>> thanks for your help, >>> >>> Ben >>> >>> On 02/03/2022 12:58, panagiotis m via use-livecode wrote: >>>> Hello Ben, >>>> >>>> I take it you are on MacOS? Which MacOS version, and which LiveCode >>> version >>>> are you using? >>>> >>>> Could it be the case you haven't got the right version of Oracle Instant >>>> Client installed? You need libclntsh.dylib.11.1, found here: >>>> >>>> >>> https://download.oracle.com/otn/mac/instantclient/11204/instantclient-basic-macos.x64-11.2.0.4.0.zip >>> >>>> >>>> Kind regards, >>>> Panos >>>> -- >>>> >>>> On Tue, 1 Mar 2022 at 19:46, Ben Rubinstein via use-livecode < >>>> use-livecode at lists.runrev.com> wrote: >>>> >>>>> Hi Mark, >>>>> >>>>> Thanks for responding. Indeed 'the revLicenseInfo` returned >>>>> "...commercial". >>>>> After re-licensing, it now says "...professional" - however, I still >>> can't >>>>> open a connection to an Oracle database. >>>>> >>>>> Re-licensing *did* make a difference: whereas previously it broke into >>> the >>>>> debugger, and (sometimes) displayed the error >>>>>    > execution error at line n/a (External handler execution error: >>>>> revdberr,driver not licensed for this edition) >>>>> >>>>> now revOpenDatabase simply returns >>>>>    > revdberr,invalid database type >>>>> >>>>> So I guess it's not a licensing issue any more, which is good; but I >>> still >>>>> can't get at the database! Can you suggest where my next issue might be? >>>>> >>>>> Many thanks, >>>>> >>>>> Ben >>>>> >>>>> On 01/03/2022 16:08, Mark Waddingham via use-livecode wrote: >>>>>> On 2022-03-01 15:51, Ben Rubinstein via use-livecode wrote: >>>>>>> Hi Matthias, >>>>>>> >>>>>>> Good spot! Thanks for checking. >>>>>>> >>>>>>> I wonder whether this is an accidental omission, in that Oracle was at >>>>>>> one time only available at a certain higher level of license; maybe >>>>>>> now that there is only level, perhaps someone forgot to tweak whatever >>>>>>> bit of code checked that the 'correct' license was in place? >>>>>> >>>>>> All business-only features were moved to be part of the pro features >>>>> pack - >>>>>> the oracle driver included. >>>>>> >>>>>> If it isn't working in your current version of LC, check that the >>>>> license you >>>>>> have licensed LC with does have the pro features pack in it... >>>>>> >>>>>> If you do `put the revLicenseInfo` it should say professional, rather >>>>> than >>>>>> commercial. >>>>>> >>>>>> If it doesn't say professional, Relicense your IDE using the menu item >>>>> in Help >>>>>> and flick through the licenses you have available until one says 'pro' >>>>> in the >>>>>> title. >>>>>> >>>>>> If the revLicenseInfo does say professional then something odd has >>>>> happened >>>>>> somewhere which will need to look into more deeply! >>>>>> >>>>>> Warmest Regards, >>>>>> >>>>>> Mark. >>>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 9 20:51:08 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 10:51:08 +1000 Subject: Property sheets In-Reply-To: References: Message-ID: I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. Neville From neville.smythe at optusnet.com.au Thu Jun 9 23:26:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 10 Jun 2022 13:26:35 +1000 Subject: Multiple revCursors substacks added to standalone In-Reply-To: References: Message-ID: <7F01C3B2-BF71-4FEA-90F2-6A2D9E715A89@optusnet.com.au> For a while now (LC 9.x) I have been finding that making a standalone sometimes adds multiple copies of revCursors to the standalone. One copy as a substack of the mainstack is expected, but under some unknown circumstances I get 3 more copies of the stack added (not as substacks). This on a Mac. I first thought this occurred when the standalone builder reported errors about the ask dialog, but my last build included the extra copies without any warnings occurring during the build process. The source file stack after the build has finished also has these copies of revCursors. I discovered this when I added the source stack to nsScriptDatabase. But it can also be seen in the Project Browser - a number of blank lines occur in the stack list tree, presumably because PB doesn’t like the duplicate stack names. A difficult bug to report to Quality Control without a recipe. Neville From mark at livecode.com Fri Jun 10 03:45:13 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 10 Jun 2022 08:45:13 +0100 Subject: Would anyone miss convertOctals? In-Reply-To: <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> Message-ID: <20239d6bbd1a802ab9eb686762583396@livecode.com> On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > converOctals? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Fri Jun 10 11:16:24 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:16:24 +0000 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. Bob S > On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: > > Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). From bobsneidar at iotecdigital.com Fri Jun 10 11:18:38 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 10 Jun 2022 15:18:38 +0000 Subject: Property sheets In-Reply-To: References: Message-ID: Hi Neville. A direct link, or where to go to get it would be helpful. Thanks. Bob S > On Jun 9, 2022, at 17:51 , Neville Smythe via use-livecode wrote: > > I have uploaded version 2.2 of nsScriptDatabase which can display supported properties of widgets, with their current and default values. > > There are also some bug fixes so current users should download the new version and update their database for those stacks which contain widgets or for which the bug fixes are relevant. A link to standalone versions is included in the new version. > > Neville > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rdimola at evergreeninfo.net Fri Jun 10 11:40:02 2022 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Fri, 10 Jun 2022 11:40:02 -0400 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <001401d87ce0$5cd91a00$168b4e00$@net> Same as many others on the octal question. Did not know/don’t use. (can see how it would be useful) On this one... don’t use it for msg or envs. I rarely use by ref to change calling parameters, but do it now and again. I mostly use by ref for performance in loops or extraordinary large data sets. Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net -----Original Message----- From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Mark Waddingham via use-livecode Sent: Friday, June 10, 2022 3:45 AM To: How to use LiveCode Cc: Mark Waddingham Subject: Re: Would anyone miss convertOctals? On 2022-06-09 20:54, Craig Newman via use-livecode wrote: > Mark. > > Gong the other way, is your task made much simpler by losing > “converOctals”? I assume so, or the issue would never have come up. > Are there other similar language elements that also are on the block? I'm not sure it makes things 'much simpler' - but it does remove one thing to have to think about. Further it removes a case where script is ambiguous at parse-time - i.e. the token 0123 could mean one of two different things depending on a runtime property. Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). Thus any added complexity caused by having this feature seems a waste of time/effort/mind-space - particularly as there is a more-than-adequate replacement which has none of its problems (i.e. 0o123) - and moreover one which other languages (e.g. JS) adopted a long time ago. In terms of other things which are 'on the block' - then no explicit features per-se but there are a couple of extreme 'edge cases' which will likely be removed. For example, the ability to use 'msg' (which is aliased to the content of the message box) and '$' implicit variables as referenced parameters in handlers. Currently you can do: on mouseUp fillVars msg, $FOOBAR end mouseUp on fillVars @pA, @pB put "foo" into pA put "bar" into pB end fillVars The ability to pass these 'quasi-variables' as references will potentially reduce the potential performance gains of moving to a bytecode-based VM when referenced parameters are used in general, and thus (like convertOctals) their existence seems too high a price to pay for what is almost certainly a rarely used (if used at all) feature. Note: I should stress that the above is *just* removing the ability to pass 'msg' and environment variable globals as reference parameters to handlers *not* removing 'msg' or environment variables in general! Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From jacque at hyperactivesw.com Fri Jun 10 13:06:48 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 10 Jun 2022 12:06:48 -0500 Subject: Would anyone miss convertOctals? In-Reply-To: <20239d6bbd1a802ab9eb686762583396@livecode.com> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <1814e952c40.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I may be dreaming, but didn't you mention that using "the" before a property name would be required? That will throw a lot of people who've become used to omitting that. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 10, 2022 2:46:46 AM Mark Waddingham via use-livecode wrote: > > In terms of other things which are 'on the block' - then no explicit > features per-se but there are a couple of extreme 'edge cases' which > will likely be removed. From phil at pdslabs.net Fri Jun 10 13:12:17 2022 From: phil at pdslabs.net (Phil Davis) Date: Fri, 10 Jun 2022 10:12:17 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> Message-ID: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> I was thinking along those lines as well. Heck, I just saw my octalmologist last week. Phil Davis On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: > So it has nothing to do with eye surgery?? Dang. I thought I was going to get a prize or something. > > Bob S > > >> On Jun 10, 2022, at 24:45 , Mark Waddingham via use-livecode wrote: >> >> Given the responses so far, it looks to me like convertOctals is an exceptionally rarely used feature (the number of years of LC experience amongst those who have responded is in excess of two centuries, and >80% of the respondents didn't know what the property was). > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From ahsoftware at sonic.net Fri Jun 10 13:20:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 10 Jun 2022 10:20:10 -0700 Subject: Would anyone miss convertOctals? In-Reply-To: <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> References: <86fc7306896b18dd8a63348049204d4a@livecode.com> <5FC7CCB6-30A6-4EC0-B235-36899CCBA67A@starfirelighting.com> <20239d6bbd1a802ab9eb686762583396@livecode.com> <22299866-c910-dcde-6504-f54f946aef23@pdslabs.net> Message-ID: On 6/10/22 10:12, Phil Davis via use-livecode wrote: "saw"... heh > I was thinking along those lines as well. Heck, I just saw my > octalmologist last week. > > Phil Davis > > > On 6/10/22 8:16 AM, Bob Sneidar via use-livecode wrote: >> So it has nothing to do with eye surgery?? Dang. I thought I was going >> to get a prize or something. >> >> Bob S -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Fri Jun 10 19:22:35 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 11 Jun 2022 09:22:35 +1000 Subject: nsScriptDatabase (was property sheets) In-Reply-To: References: Message-ID: <3CC942F3-B4FE-4022-BB92-AAD144002556@optusnet.com.au> Bob S wrote > On 11 Jun 2022, at 2:00 am, use-livecode-request at lists.runrev.com wrote: > > A direct link, or where to go to get it would be helpful. The stack is in the Development section of Sample Stacks, though it seems to help the extraordinarily slow search engine to click All before Go. There are only 542 stacks listed, why does it take so long to find one? Bob and I know a better way, eh? You can also download the stack and pre-build standalones from https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 I didn’t give the direct link in this list because I was interested in the number of downloads from Sample Stacks, but evidentlyI can track the number of accesses from my Dropbox folder. Neville Smythe neville.smythe at optusnet.com.au 0414517719 From jbv at souslelogo.com Mon Jun 13 04:30:34 2022 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Mon, 13 Jun 2022 04:30:34 -0400 Subject: Best way to update a large DB ? Message-ID: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Hi list, I have a mySQL DB with about 400000 entries, and I need to update 190000 of them in the following way : update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 I have a file with all the requests that weights almost 200 Mb. I can't upload it via phpMyadmin, because it's too big and running all the requests in one go will end up with a server timeout. I was thinking of a cron job that would trigger every minute or so, and run a short script that would read successive portions of 100 requests and feed them so mySQL. Any better idea ? Thanks in advance. jbv From MikeKerner at roadrunner.com Mon Jun 13 09:58:59 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 13 Jun 2022 09:58:59 -0400 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: and you can't do it locally? that isn't that many records. it shouldn't take long at all. On Mon, Jun 13, 2022 at 4:31 AM jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all > the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and > run a short > script that would read successive portions of 100 requests and feed them > so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From mark at livecode.com Mon Jun 13 12:13:37 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 13 Jun 2022 17:13:37 +0100 Subject: char as word boundary In-Reply-To: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> Message-ID: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Hi Jean-Jacques, On 2022-06-03 14:56, Jean-Jacques Wagner via use-livecode wrote: > Hi, > Version 6.7 word boudary are char number 09,10,11,12,13,32 > version 9.67 word boudary are char number 09,10,11,12,13,32,202 > > Hypercard and livecode 6.7: the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67 : the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 > > Is it a change or a bug considering now numtochar(202) as word > boundary, as it is with numtochar(32) This is something we will need to consider - please do file a bug about it at quality.livecode.com (so you can track any further discussion about it). I can see how this change occurred, and it is perhaps more a 'side-effect of implementation' rather than an intended change. Prior to 7.0 - the word chunk used the C library 'ctype' isspace function - which returns true if a character is 'whitespace'. However, the engine *also* tweaked the C library character tables to make it so that NBSP (202 on MacRoman - something else on Windows/Linux - 160 maybe?) was *not* a space character. This was primarily a very dirty hack (which was done before my time!) to allow non-breaking spaces to prevent word breaks in fields (I strongly suspect the effect on the word chunk was never considered!). When we moved to Unicode - we changed the word-breaking detection in fields to use a simplified version of the Unicode algorithm and Unicode character properties (NBSP has the, unsurprisingly, no-break property!). Similarly, we changed the word chunk to use the Unicode 'whitespace' property. In the unicode world - being whitespace, and non-breaking are two separate properties... Hence the difference in behavior since 7. The reason this is 'of interest' is that the word chunk has had quite a hefty performance regression since 7.0 due to the switch to Unicode, so re-looking at what it should *actually* do (taking into account what it would be most useful in the widest possible circumstances) is definitely on the cards. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Mon Jun 13 12:15:47 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:15:47 +0000 Subject: Best way to update a large DB ? In-Reply-To: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> References: <22e29aaf48aa606eaad9151ef80f4204@souslelogo.com> Message-ID: <021CD806-1D77-44E5-B760-B54A8950F08F@iotecdigital.com> If ID is a unique identifier, you should not need the limit. I agree with Mike, you shouldn't need to do anything fancy. A button and a loop should do it. If the data is critical, you may want to step through a few loops to verify, or backup the database first, always a good idea. Nothing worse than discovering you have bad input data halfway through an update like this. Bob S > On Jun 13, 2022, at 01:30 , jbv via use-livecode wrote: > > Hi list, > > I have a mySQL DB with about 400000 entries, and I need to update > 190000 of them in the following way : > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 limit 1 > > I have a file with all the requests that weights almost 200 Mb. > I can't upload it via phpMyadmin, because it's too big and running all the requests > in one go will end up with a server timeout. > > I was thinking of a cron job that would trigger every minute or so, and run a short > script that would read successive portions of 100 requests and feed them so mySQL. > > Any better idea ? > Thanks in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Mon Jun 13 12:18:44 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 13 Jun 2022 16:18:44 +0000 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: <60931B58-EF3F-404E-9EF4-BFF18C4B1F6F@iotecdigital.com> "dirty hack" is my middle name! :-) Bob S > On Jun 13, 2022, at 09:13 , Mark Waddingham via use-livecode wrote: > > This was primarily a very dirty hack (which was done before my time!) From paul at researchware.com Mon Jun 13 13:41:15 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 13 Jun 2022 13:41:15 -0400 Subject: char as word boundary In-Reply-To: <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> References: <87B47D95-738B-4257-887D-0572296905A8@dicod.com> <9cb3430b85ad4efa0521de5cad2bf01a@livecode.com> Message-ID: On 6/13/2022 12:13 PM, Mark Waddingham via use-livecode wrote: > Hypercard and livecode 6.7:  the number of chars (numtochar(32)& > numtochar(202)&numtochar(32)& numtochar(202)&numtochar(32)) = 2 > livecode 9.67                      :   the number of chars > (numtochar(32)& numtochar(202)&numtochar(32)& > numtochar(202)&numtochar(32)) = 0 LC 9.6.7 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 LC 6.7.11 STABLE (Win 10) put the number of chars of (numtochar(32) & numtochar(202) & numtochar(32) & numtochar(202) & numtochar(32))   -> ALSO results in 5 in the message box, exactly as it should. The number of words (of the same string) is 2 Or. at least those are the results I am getting, and I think that may be because numToChar(202) is a different character on macOS vs Windows. From neville.smythe at optusnet.com.au Mon Jun 13 19:19:01 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:19:01 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <456A7575-8628-42C4-8938-3F1663C7F263@optusnet.com.au> > update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 > limit 1 > I have a file with all the requests that weights almost 200 Mb. Unless your "blah blah”s are very large indeed shouldn’t your change data be packable into a much smaller file to transmit? Eg if they were integers (or could be made to be integer, ie indexes into string tables) 3 integers per line could be packed into 13 bytes, file length 2MB. If they are short strings and you needed say 100 bytes per line that’s still only 20MB. Then use php - if you have the luxury lcserver -to unpack at the server, wrapping the long list of requests with BEGIN and END TRANSACTION of course. Neville From neville.smythe at optusnet.com.au Mon Jun 13 19:22:49 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 14 Jun 2022 09:22:49 +1000 Subject: Best way to update a large DB ? In-Reply-To: References: Message-ID: <7F274337-0C9C-47ED-A369-B2E8C6F8511D@optusnet.com.au> Oh and you can prevent a file transfer from timing out… look up libURLSetExpect10 Neville From david.bovill at gmail.com Tue Jun 14 07:30:43 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 12:30:43 +0100 Subject: Pointlist to Bezier? In-Reply-To: References: Message-ID: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? 📆    Schedule a call with me On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > Pointlist to Bezier > > Hi there > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > There are explanations around the net for C-code but it is very hard to understand. > > (one here said to be good but misses the graphics:) > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > What could this code be used for. > > — Tracing an image > > — Smoothing the lines drawn by a user > > plus a lot more Im sure > > Thanks > Michael > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Tue Jun 14 08:54:49 2022 From: david.bovill at gmail.com (David Bovill) Date: Tue, 14 Jun 2022 13:54:49 +0100 Subject: Pointlist to Bezier? In-Reply-To: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: I found some well documented python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py And some Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js The javascript code could be called from Livecode. To see the demo of how this would work in the browser: • http://soswow.github.io/fit-curve/demo/ • https://codepen.io/Sphinxxxx/pen/jrLxvQ Would seem to be a useful library to have available in native LC? 📆    Schedule a call with me On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > 📆    Schedule a call with me > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > Pointlist to Bezier > > > > Hi there > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > (one here said to be good but misses the graphics:) > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > What could this code be used for. > > > > — Tracing an image > > > > — Smoothing the lines drawn by a user > > > > plus a lot more Im sure > > > > Thanks > > Michael > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 14 09:42:01 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 14 Jun 2022 09:42:01 -0400 Subject: Pointlist to Bezier? In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> Message-ID: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> There is a similar thread on the forum: https://forums.livecode.com/viewtopic.php?f=8&t=34550 Craig > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > I found some well documented python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > And some Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > • http://soswow.github.io/fit-curve/demo/ > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > Would seem to be a useful library to have available in native LC? > > 📆 Schedule a call with me > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: >> Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? >> >> 📆 Schedule a call with me >> On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: >>> Pointlist to Bezier >>> >>> Hi there >>> >>> I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. >>> >>> There are explanations around the net for C-code but it is very hard to understand. >>> >>> (one here said to be good but misses the graphics:) >>> http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html >>> >>> What could this code be used for. >>> >>> — Tracing an image >>> >>> — Smoothing the lines drawn by a user >>> >>> plus a lot more Im sure >>> >>> Thanks >>> Michael >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From david.bovill at gmail.com Wed Jun 15 05:46:50 2022 From: david.bovill at gmail.com (David Bovill) Date: Wed, 15 Jun 2022 10:46:50 +0100 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> Message-ID: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: Python code: • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py Javascript code: • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js Here is the core python function: > quote_type > def fitCubic(points, leftTangent, rightTangent, error): >  # Use heuristic if region only has two points in it >  if (len(points) == 2): >  dist = linalg.norm(points[0] - points[1]) / 3.0 >  bezCurve = [points[0], points[0] + leftTangent * dist, points[1] + rightTangent * dist, points[1]] >  return [bezCurve] > >  # Parameterize points, and attempt to fit curve >  u = chordLengthParameterize(points) >  bezCurve = generateBezier(points, u, leftTangent, rightTangent) >  # Find max deviation of points to fitted curve >  maxError, splitPoint = computeMaxError(points, bezCurve, u) >  if maxError < error: >  return [bezCurve] > >  # If error not too large, try some reparameterization and iteration >  if maxError < error**2: >  for i in range(20): >  uPrime = reparameterize(bezCurve, points, u) >  bezCurve = generateBezier(points, uPrime, leftTangent, rightTangent) >  maxError, splitPoint = computeMaxError(points, bezCurve, uPrime) >  if maxError < error: >  return [bezCurve] >  u = uPrime > >  # Fitting failed -- split at max error point and fit recursively >  beziers = [] >  centerTangent = normalize(points[splitPoint-1] - points[splitPoint+1]) >  beziers += fitCubic(points[:splitPoint+1], leftTangent, centerTangent, error) >  beziers += fitCubic(points[splitPoint:], -centerTangent, rightTangent, error) > >  return beziers > The maths code for the Newton Raphson method is: > quote_type > def newtonRaphsonRootFind(bez, point, u): >  """ >  Newton's root finding algorithm calculates f(x)=0 by reiterating >  x_n+1 = x_n - f(x_n)/f'(x_n) > >  We are trying to find curve parameter u for some point p that minimizes >  the distance from that point to the curve. Distance point to curve is d=q(u)-p. >  At minimum distance the point is perpendicular to the curve. >  We are solving >  f = q(u)-p * q'(u) = 0 >  with >  f' = q'(u) * q'(u) + q(u)-p * q''(u) > >  gives >  u_n+1 = u_n - |q(u_n)-p * q'(u_n)| / |q'(u_n)**2 + q(u_n)-p * q''(u_n)| >  """ >  d = bezier.q(bez, u)-point >  numerator = (d * bezier.qprime(bez, u)).sum() >  denominator = (bezier.qprime(bez, u)**2 + d * bezier.qprimeprime(bez, u)).sum() > > >  if denominator == 0.0: >  return u >  else: >  return u - numerator/denominator > Seems a useful little challenge for the list? 📆    Schedule a call with me On 14 Jun 2022, 14:43 +0100, Craig Newman via use-livecode , wrote: > There is a similar thread on the forum: > > https://forums.livecode.com/viewtopic.php?f=8&t=34550 > > Craig > > > On Jun 14, 2022, at 8:54 AM, David Bovill via use-livecode wrote: > > > > I found some well documented python code: > > > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > > > And some Javascript code: > > > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js > > > > The javascript code could be called from Livecode. To see the demo of how this would work in the browser: > > > > • http://soswow.github.io/fit-curve/demo/ > > • https://codepen.io/Sphinxxxx/pen/jrLxvQ > > > > Would seem to be a useful library to have available in native LC? > > > > 📆 Schedule a call with me > > On 14 Jun 2022, 12:30 +0100, David Bovill , wrote: > > > Searching around for a function in LC. It should take the points of a graphic and return a smoothed the points of a smoothed line. I’ve found lots of bezier style experiments but no “curve fitting” code. Anyone have a function? > > > > > > 📆 Schedule a call with me > > > On 6 Dec 2015, 12:10 +0000, Michael Kristensen , wrote: > > > > Pointlist to Bezier > > > > > > > > Hi there > > > > > > > > I wonder if any have code to take a point-list and turn it into a smooth-lined bezier. > > > > > > > > There are explanations around the net for C-code but it is very hard to understand. > > > > > > > > (one here said to be good but misses the graphics:) > > > > http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html > > > > > > > > What could this code be used for. > > > > > > > > — Tracing an image > > > > > > > > — Smoothing the lines drawn by a user > > > > > > > > plus a lot more Im sure > > > > > > > > Thanks > > > > Michael > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 15 11:50:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 15 Jun 2022 15:50:17 +0000 Subject: Challenge: converting python (or Javascript) code to Livecode In-Reply-To: <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: For extra credit, try writing a handler in LC to convert the python/js code to LC script. Bob S > On Jun 15, 2022, at 02:46 , David Bovill via use-livecode wrote: > > Thanks Craig - I dug around but no joy. I hate it when you loose code as I had a function somewhere… The javascript and python code is not that long, so it will be an interesting challenge to translate: > > Python code: > > • https://github.com/volkerp/fitCurves/blob/master/fitCurves.py > > Javascript code: > > • https://github.com/soswow/fit-curve/blob/master/src/fit-curve.js From rabit at revigniter.com Wed Jun 15 15:16:19 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Wed, 15 Jun 2022 21:16:19 +0200 Subject: [ANN] Universal Button version 1.1.0 Message-ID: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> There is a new version of the "universal button" widget which can be used as a replacement for the segmented control widget. The widget icon can now be placed independently of the label and the size of the icon can be customized. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From MikeKerner at roadrunner.com Wed Jun 15 17:17:31 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:17:31 -0400 Subject: seconds on mobile Message-ID: this is strange: on mobile (ios) seconds seems to be in local time on desktop, it seems to be in zulu time, regardless of timezone -- 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." From MikeKerner at roadrunner.com Wed Jun 15 17:20:38 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 15 Jun 2022 17:20:38 -0400 Subject: seconds on mobile In-Reply-To: References: Message-ID: never mind, i've got something else going on, i think. On Wed, Jun 15, 2022 at 5:17 PM Mike Kerner wrote: > this is strange: > on mobile (ios) seconds seems to be in local time > on desktop, it seems to be in zulu time, regardless of timezone > > -- > 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." > -- 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." From tom at makeshyft.com Thu Jun 16 01:43:11 2022 From: tom at makeshyft.com (Tom Glod) Date: Thu, 16 Jun 2022 01:43:11 -0400 Subject: [ANN] Universal Button version 1.1.0 In-Reply-To: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> References: <64bd14b8-618e-38c7-8553-0afea48b90da@revigniter.com> Message-ID: Hey Ralf, thanks for this, I don't know how I'm only coming across this now. :) On Wed, Jun 15, 2022 at 3:16 PM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > There is a new version of the "universal button" widget > which can be used as a replacement for the > segmented control widget. > > The widget icon can now be placed independently of the > label and the size of the icon can be customized. > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Thu Jun 16 09:31:20 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Thu, 16 Jun 2022 14:31:20 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> Message-ID: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Hi Folks, I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode Any alternative suggestions? David Glasgow PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. // String "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" "str" ends with "g" // Chunks char 5 of "str" is "n" From panos.merakos at livecode.com Thu Jun 16 10:12:42 2022 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 16 Jun 2022 17:12:42 +0300 Subject: [ANN] Release 9.6.8 RC-2 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.8 RC-2. Getting the Release =================== You can find the release in your LiveCode account area or get it via the automatic updater. To find the 9.6.8 RC-2 test release in your LiveCode account, please scroll down to below the list of stable releases, to find your available test releases. Release Contents ================ LiveCode 9.6.8 RC-2 comes with 4 regression bugfixes: - Using export when the source is an image object of a closed stack will no longer cause an error to be thrown - The property inspector geometry pane icons have been reinstated - LiveCode will no longer crash on startup on versions of macOS El Capitan (10.11) and below - Building a macOS standalone on macOS Sierra (10.12) and earlier 9.6.8- will not include an Apple architecture slice, even if selected For the full list of all fixes, updates and enhancements please see the release notes: http://downloads.livecode.com/livecode/9_6_8/LiveCodeNotes-9_6_8_rc_2.pdf Known issues ============ - The Browser widget's native layer is not shown in some Linux distros with Cinnamon window manager. - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit LTS yet. Required Software ================= To build iOS apps with LiveCode you must have the appropriate versions of Xcode as follows: - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS 12.1 SDK - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS 13.2 SDK - macOS 10.15.4: Xcode 12.4.x - LiveCode builds iOS apps using the iOS 14.4 SDK - macOS 11+ : Xcode 13.2.x - LiveCode builds iOS apps using the iOS 15.2 SDK There is a full list of working LiveCode/macOS/Xcode combinations here: https://livecode.com/faq Note: Whilst we endeavour to release updated versions of LiveCode supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly recommend disabling automatic update of Xcode or downloading the specific version of Xcode required directly from the Apple developer portal and installing it separately. Important: From the start of April 2022, Apple is only accepting apps built using iOS15.x SDKs. This means that, if you wish to submit apps to the AppStore you will have to be running at least macOS 11 in order to be able to install the necessary version of Xcode. To build macOS apps with an Apple architecture slice requires macOS High Sierra (10.13) or higher. Feedback ======== Please report any bugs encountered on our quality center at http://quality.livecode.com/ We have a forum available for discussing LiveCode at http://forums.livecode.com Have fun! The LiveCode Team -- From rabit at revigniter.com Thu Jun 16 12:00:57 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 16 Jun 2022 18:00:57 +0200 Subject: [ANN] Universal Button version 1.1.1 Message-ID: <7b6b5782-823e-061e-acf5-78f6f41cc98a@revigniter.com> There is a new version of the "universal button" widget. Fixed the compatibility loss with buttons created with previous widget versions. Sorry if this caused problems. This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From jacque at hyperactivesw.com Thu Jun 16 16:08:41 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 16 Jun 2022 15:08:41 -0500 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 16, 2022 8:33:45 AM David V Glasgow via use-livecode wrote: > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of > internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL > for doing this. If not I am inclined to use > https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the Cheat > Sheets page and PDFs, and stumbled on a couple of errors in the just LC > one not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Fri Jun 17 04:46:11 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 09:46:11 +0100 Subject: Referencing Livecode In-Reply-To: <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: > > Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It’s a commercial site. Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. > -- They do, don’t they. From memory, that wasn’t the context though. Cheers David G From richmondmathewson at gmail.com Fri Jun 17 04:57:15 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 11:57:15 +0300 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: >From what I know (my wife is a senior academic at a university) references to Wikipedia pages are academic suicide, fail, go straight to jail, do not pass GO, do not collect 200 smackers, and you get the picture. On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < use-livecode at lists.runrev.com> wrote: > > > On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Is there a reason not to use the LC site URL, either alone or in > addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on > drawing customers in rather than conveying anything about text processing, > or obvious links to information on text processing. No criticism of that > at all. It’s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the > advantage of lots of information presented in a more academic and neutral > style. > > > > > > Re: the errors, they look like examples of functions that would return > "false" but I haven't seen them in context. > > -- > > They do, don’t they. From memory, that wasn’t the context though. > > Cheers > > David G > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From dvglasgow at gmail.com Fri Jun 17 05:09:16 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Fri, 17 Jun 2022 10:09:16 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Of course that is completely true for academic content! This ain’t that. In the paper I simply state that all text searching, manipulation and aggregation was achieved using Livecode scripts, with a footnote to a brief description and link to … Go on. Ask your wife. That is how it’s done. (unless you used R, or Python, which are celebrities needing no explanation or external link) Best Wishes, David Glasgow > On 17 Jun 2022, at 9:57 am, Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. > > On Fri, 17 Jun 2022, 11:47 David V Glasgow via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in >> addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on >> drawing customers in rather than conveying anything about text processing, >> or obvious links to information on text processing. No criticism of that >> at all. It’s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the >> advantage of lots of information presented in a more academic and neutral >> style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return >> "false" but I haven't seen them in context. >>> -- >> >> They do, don’t they. From memory, that wasn’t the context though. >> >> Cheers >> >> David G >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From marksmithhfx at gmail.com Fri Jun 17 06:37:38 2022 From: marksmithhfx at gmail.com (Mark Smith) Date: Fri, 17 Jun 2022 11:37:38 +0100 Subject: Referencing Livecode In-Reply-To: <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> Message-ID: I think in this instance, probably asking support would be the best bet. > On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: > > Hi Folks, > > I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. > > I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode > > Any alternative suggestions? > > David Glasgow > > PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. > > // String > > "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" > "str" ends with "g" > > // Chunks > > char 5 of "str" is "n" > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Fri Jun 17 07:47:11 2022 From: brian at milby7.com (Brian Milby) Date: Fri, 17 Jun 2022 07:47:11 -0400 Subject: Referencing Livecode In-Reply-To: References: Message-ID: <54AD7477-1155-4F7E-B5BA-3E0E25162244@milby7.com> Maybe a direct link here would be better: https://livecode.com/resources/ Sent from my iPhone > On Jun 17, 2022, at 6:39 AM, Mark Smith via use-livecode wrote: > > I think in this instance, probably asking support would be the best bet. > >> On 16 Jun 2022, at 2:31 pm, David V Glasgow via use-livecode wrote: >> >> Hi Folks, >> >> I am writing a paper for publication (I hope) describing analysis of internet predator messages achieved using Livecode. >> >> I want to reference LC but I am not sure if there is a standard form or URL for doing this. If not I am inclined to use https://en.wikipedia.org/wiki/LiveCode >> >> Any alternative suggestions? >> >> David Glasgow >> >> PS Also, while trying to find a suitable URL I came across the ‘Cheat Sheets’ page and PDFs, and stumbled on a couple of errors in the just LC one… not sure who to alert. >> >> // String >> >> "foo" & "bar" is "foobar" "foo" && "bar" is "foo bar" "str" begins with "st" >> "str" ends with "g" >> >> // Chunks >> >> char 5 of "str" is "n" >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Fri Jun 17 08:42:38 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Fri, 17 Jun 2022 14:42:38 +0200 Subject: [ANN] Universal Button 1.2.0 Message-ID: At the risk of getting on your nerves, but there is another new version of the "universal button" widget. Added text alignment controls and a horizontal margin ratio slider in the "Text" section. You have now better control over text and icon placement in case icon gravity is set to "left" or "right". This release can be downloaded here: https://github.com/revig/universal-button-widget/releases Ralf From matthias_livecode_150811 at m-r-d.de Fri Jun 17 09:11:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 15:11:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? Message-ID: Hi, is there anyone who can use the new PolyGrid widget without any error? I am running into errors when i delete all default columns and add for example 2 new ones and filling adding content to it using the PI The error is similar to this one: executing at 2:55:48 PM LCB Error Value is not of correct type for assignment to variable - expected type for assigning to variable tWidth in com.livecode.widget.polygrid.drawHeader Object PolyGrid LCB File D:/PROYECTOS/Proyectos GitGub/Ferruslogic/addons-mega-bundle/Polygrid/com.livecode.widget.polygrid.lcb LCB Line 2555 Matthias From steven.crighton at livecode.com Fri Jun 17 11:05:52 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:05:52 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: References: Message-ID: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Hi Matthias We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. Thanks Steven From matthias_livecode_150811 at m-r-d.de Fri Jun 17 11:35:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 17 Jun 2022 17:35:38 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: Hi Steven, thanks, but now after applying a template to the PG and then deleting all columns, i have after i deleted the last column again 5 columns. 4 columns with the name Col 4 and one column Col 5. And those columns could not be deleted. Shall i submit this also to the QC? Matthias > Am 17.06.2022 um 17:05 schrieb Steven Crighton via use-livecode : > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From steven.crighton at livecode.com Fri Jun 17 11:46:19 2022 From: steven.crighton at livecode.com (Steven Crighton) Date: Fri, 17 Jun 2022 16:46:19 +0100 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> Message-ID: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Yes please. if you first empty the text data and then delete the column it should work as expected. But if you can submit it to QC we can look into further. Thanks Steven > On 17 Jun 2022, at 16:05, Steven Crighton wrote: > > Hi Matthias > > We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. > > Thanks > Steven > From bobsneidar at iotecdigital.com Fri Jun 17 12:09:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 16:09:05 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> I wonder why that is? While you may find inaccurate information on Wikipedia, the vastly overwhelming information there is absolutely accurate. But isn't that true of EVERY source? In my life experience I have found that settled science is very unsettled indeed. Salt causes high blood pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to live. A nuclear blast will render an area unlivable for 10,000 years. I could go on and on. Mankind is constantly revising "settled" science, and well we should, but what I object to is being told that what academia is now telling us is the new absolute, and I am expected to just accept that. Bob S > On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode wrote: > > From what I know (my wife is a senior academic at a university) references > to Wikipedia pages are academic suicide, fail, go straight to jail, do not > pass GO, do not collect 200 smackers, and you get the picture. From jacque at hyperactivesw.com Fri Jun 17 12:48:05 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 17 Jun 2022 11:48:05 -0500 Subject: Referencing Livecode In-Reply-To: <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> Message-ID: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode wrote: > I wonder why that is? While you may find inaccurate information on > Wikipedia, the vastly overwhelming information there is absolutely > accurate. But isn't that true of EVERY source? In my life experience I have > found that settled science is very unsettled indeed. Salt causes high blood > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. Eggs > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > live. A nuclear blast will render an area unlivable for 10,000 years. I > could go on and on. > > Mankind is constantly revising "settled" science, and well we should, but > what I object to is being told that what academia is now telling us is the > new absolute, and I am expected to just accept that. > > Bob S > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >> wrote: >> >> From what I know (my wife is a senior academic at a university) references >> to Wikipedia pages are academic suicide, fail, go straight to jail, do not >> pass GO, do not collect 200 smackers, and you get the picture. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From richmondmathewson at gmail.com Fri Jun 17 13:26:41 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Fri, 17 Jun 2022 20:26:41 +0300 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: As I, or anyone else could write on Wikipedia about Hamlet being Shakespeare's coded love notes to a camel he met in Oxford, I really wonder why anyone, 'academic' or not, would stick their neck under that guillotine's fairly jittery blade escapes me completely. I often look up things on Wikipedia, THEN check them elsewhere. On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < use-livecode at lists.runrev.com> wrote: > The same rules apply to US schools. It may be similar to doing a critique > of Hamlet after reading only the Cliff Notes summary. No actual research > or > thought required. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode > wrote: > > > I wonder why that is? While you may find inaccurate information on > > Wikipedia, the vastly overwhelming information there is absolutely > > accurate. But isn't that true of EVERY source? In my life experience I > have > > found that settled science is very unsettled indeed. Salt causes high > blood > > pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. > Eggs > > are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to > > live. A nuclear blast will render an area unlivable for 10,000 years. I > > could go on and on. > > > > Mankind is constantly revising "settled" science, and well we should, > but > > what I object to is being told that what academia is now telling us is > the > > new absolute, and I am expected to just accept that. > > > > Bob S > > > > > >> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode > >> wrote: > >> > >> From what I know (my wife is a senior academic at a university) > references > >> to Wikipedia pages are academic suicide, fail, go straight to jail, do > not > >> pass GO, do not collect 200 smackers, and you get the picture. > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bobsneidar at iotecdigital.com Fri Jun 17 13:49:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:49:17 +0000 Subject: Referencing Livecode In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <98C870D5-00BF-4235-BB21-A88058E37688@iotecdigital.com> I think no matter what you go to, inevitably you are looking for what other people have said in critiquing hamlet or anything else. We call some people experts because other people called experts certified them as such. It can’t be any other way. But I often wonder who the first expert in any field was, and who certified them. :-) Sent from my iPhone > On Jun 17, 2022, at 09:49, J. Landman Gay via use-livecode wrote: > > The same rules apply to US schools. It may be similar to doing a critique of Hamlet after reading only the Cliff Notes summary. No actual research or thought required. From bobsneidar at iotecdigital.com Fri Jun 17 13:50:49 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 17 Jun 2022 17:50:49 +0000 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <88ABC7BE-6B04-4A1E-9086-AF2A1B2BB636@iotecdigital.com> That’s absurd. Everyone knows it was a Sherland pony. Sent from my iPhone > On Jun 17, 2022, at 10:28, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. From mkoob at rogers.com Fri Jun 17 13:55:21 2022 From: mkoob at rogers.com (Martin Koob) Date: Fri, 17 Jun 2022 13:55:21 -0400 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: What about this link from the LiveCode.com site? https://livecode.com/core-benefits-of-livecode/ It summarizes what LiveCode is and gives a comparison of LiveCode script to code in JavaScript, PHP and Java. It even mentions an academic article: "A 2016 peer reviewed study conducted at Southern Cross University Australia and University of Newcastle”. Unfortunately it does not include a reference to the study. I looked around and found a conference paper in 2015 that probably what they are referring to. Using Cognitive Load Theory to select an Environment for Teaching Mobile Apps Development January 2015 Conference: Australasian Computing Education Conference 2015 (ACE2015) At: Sydney, Australia Volume: 160. Here is a link to that conference paper where you can download it. https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. Martin > On Jun 17, 2022, at 1:26 PM, Richmond Mathewson via use-livecode wrote: > > As I, or anyone else could write on Wikipedia about Hamlet being > Shakespeare's coded love notes to a camel he met in Oxford, I really wonder > why anyone, 'academic' or not, would stick their neck under that > guillotine's fairly jittery blade escapes me completely. > > I often look up things on Wikipedia, THEN check them elsewhere. > > On Fri, 17 Jun 2022, 19:49 J. Landman Gay via use-livecode, < > use-livecode at lists.runrev.com> wrote: > >> The same rules apply to US schools. It may be similar to doing a critique >> of Hamlet after reading only the Cliff Notes summary. No actual research >> or >> thought required. >> >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On June 17, 2022 11:11:14 AM Bob Sneidar via use-livecode >> wrote: >> >>> I wonder why that is? While you may find inaccurate information on >>> Wikipedia, the vastly overwhelming information there is absolutely >>> accurate. But isn't that true of EVERY source? In my life experience I >> have >>> found that settled science is very unsettled indeed. Salt causes high >> blood >>> pressure. Sugar causes diabetes. Red meat causes cancer. Milk is bad. >> Eggs >>> are bad. Coffee is bad. Mercury is a molten ball. Life needs sunlight to >>> live. A nuclear blast will render an area unlivable for 10,000 years. I >>> could go on and on. >>> >>> Mankind is constantly revising "settled" science, and well we should, >> but >>> what I object to is being told that what academia is now telling us is >> the >>> new absolute, and I am expected to just accept that. >>> >>> Bob S >>> >>> >>>> On Jun 17, 2022, at 01:57 , Richmond Mathewson via use-livecode >>>> wrote: >>>> >>>> From what I know (my wife is a senior academic at a university) >> references >>>> to Wikipedia pages are academic suicide, fail, go straight to jail, do >> not >>>> pass GO, do not collect 200 smackers, and you get the picture. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dvglasgow at gmail.com Sat Jun 18 04:40:52 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Sat, 18 Jun 2022 09:40:52 +0100 Subject: Referencing Livecode In-Reply-To: References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <47EE8E22-CF55-4BA3-BC20-97AF3A8ED518@gmail.com> > On 17 Jun 2022, at 6:55 pm, Martin Koob via use-livecode wrote: > > > Here is a link to that conference paper where you can download it. > https://www.researchgate.net/publication/269337987_Using_Cognitive_Load_Theory_to_select_an_Environment_for_Teaching_Mobile_Apps_Development > > Perhaps this was published in a journal in 2016 or publication in the 2015 conference proceedings is what they are referring to. That’s an interesting read! I might completely drop the footnote and just cite this. If I can find out exactly what it is…. Cheers David G From matthias_livecode_150811 at m-r-d.de Sat Jun 18 05:35:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 11:35:04 +0200 Subject: Anyone in the list who can successfully use the new PolyGrid widget? In-Reply-To: <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> References: <310D4681-B155-4DC9-A874-27B2573DC1D3@livecode.com> <4FB70B2C-8117-426B-89EA-50088E7CF206@livecode.com> Message-ID: <8B9A04B8-7B95-495F-A8B2-525B728CF611@m-r-d.de> Done. https://quality.livecode.com/show_bug.cgi?id=23752 As it's possible to delete columns in a Datagrid which still has content, i would say this is a bug in Polygrid. > Am 17.06.2022 um 17:46 schrieb Steven Crighton via use-livecode >: > > Yes please. if you first empty the text data and then delete the column it should work as expected. > > But if you can submit it to QC we can look into further. > > Thanks > Steven > >> On 17 Jun 2022, at 16:05, Steven Crighton > wrote: >> >> Hi Matthias >> >> We’ve just uploaded an update for the LiveCode Enhancements bundle which fixes this issue, you can re download this from your account area. It also fixes the magic palette issue that you reported, for this one you may have to click on the cog/gear button on the bottom right of the magic palette and clear cache, then restart LiveCode. >> >> Thanks >> Steven >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 13:33:54 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 17:33:54 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: Sorry if this has been discussed before but I could not find it. Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. After some testing I finally read the release notes and it states: Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" >From then on LC uses arm64. I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. Kind regards Bernd From harrison at all-auctions.com Sat Jun 18 14:06:46 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Sat, 18 Jun 2022 14:06:46 -0400 Subject: LC Server & Monterey In-Reply-To: <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <6c56db9e-2fce-448d-ad00-87ec7bc44c41@Spark> <476EB44D-8ECA-41BB-98FC-4ABD0E1522BF@starfirelighting.com> <21fe2851-f51e-409f-b4c7-13428954b7cf@Spark> <44758E04-EE86-48E7-91DA-011055D2A24D@gmail.com> <1816e21d928.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <25FA9D7A-43D5-418F-9216-B2540B2EC4CA@iotecdigital.com> <18172908d88.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <38032FA7-3DE9-4E3C-BBCA-771D619BFA5D@all-auctions.com> I’m trying to upgrade my web-server from Catalina to Monterey, and I’m running into Error 403 Forbidden You don't have permission to access this resource. I’m using LiveCode Server 9.6.7 Everything worked great under Catalina. What extra thing do I need to do for Monterey? Anyone else worked through this problem? Thanks, Rick From matthias_livecode_150811 at m-r-d.de Sat Jun 18 14:24:17 2022 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Sat, 18 Jun 2022 20:24:17 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: Message-ID: Bernd, May be a dumb question, but how did you verify that LC was running in Rosetta mode although it was not checked. Regards, Matthias Von meinem iPhone gesendet > Am 18.06.2022 um 19:35 schrieb Niggemann, Bernd via use-livecode : > > Sorry if this has been discussed before but I could not find it. > > Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see what difference the new Universal build does for speed. > > After some testing I finally read the release notes and it states: > Note: Apple architecture support is currently experimental. To run the IDE using Apple architecture (on supported machines), you must toggle the Open using Rosetta option to off in the LiveCode.app bundle's Get Info pane in Finder. To build a standalone with native Apple architecture support you must explicitly choose the macOS Apple option in standalone settings. > > For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta mode. > Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked but LC runs using Rosetta. You have to check "using Rosetta" and then right away uncheck "using Rosetta" > From then on LC uses arm64. > > I noticed some nice speed increase across all aspects of using LC: what used to take 10 seconds now takes 6.5 seconds. That is not bad for checking a box. > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Sat Jun 18 14:36:27 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 18 Jun 2022 18:36:27 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Hi Matthias, I should have added that to my previous post: If you put "put the processor" into the message box it says Rosetta: x86_64 Native: arm64 Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB Kind regards Bernd From dochawk at gmail.com Sat Jun 18 14:54:28 2022 From: dochawk at gmail.com (doc hawk) Date: Sat, 18 Jun 2022 11:54:28 -0700 Subject: Can't activate indy license on 10.0 Message-ID: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> I finally dropped my business subscription that I never used, but I have a lifetime indy license. The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. Am I missing something here? From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:22:31 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:22:31 +0200 Subject: Can't activate indy license on 10.0 In-Reply-To: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> References: <1D410A3B-5207-41DB-8E6D-9AA63C19D8A5@gmail.com> Message-ID: <27C7B37A-CC7C-4108-8ADE-8AEFEF3B5DA2@m-r-d.de> Maybe there is already a license for LC 10 DP4 or so. If you are on Maybe you could check the folder ~/Library/Application Support/RunRev/Licenses and see if there is already a license file for that version and delete it. I am not completely sure there that folder is on Windows, but i think under ~/Appdata/Roaming Matthias > Am 18.06.2022 um 20:54 schrieb doc hawk via use-livecode : > > > I finally dropped my business subscription that I never used, but I have a lifetime indy license. > > The 10.0 installer, however, isn’t asking which license I want to use, but instead tells me that my license expired. > > Am I missing something here? > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Sat Jun 18 16:27:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 18 Jun 2022 22:27:38 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> Message-ID: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Thanks Bernd, ....the processor... should have know that. it seems i got to much sun today. ;) I was also wondering why the check box for rosetta was already unchecked after installation, but did not had the idea to check. I just trusted macOS. ;) So, the question now is, is this a macOS problem or is it possible that a standalone could show the wrong setting due to a wrong configuration or so when it is created. Anyway, thanks for pointing this out. Matthias > Am 18.06.2022 um 20:36 schrieb Niggemann, Bernd via use-livecode : > > Hi Matthias, > > I should have added that to my previous post: > > If you put "put the processor" into the message box it says > > Rosetta: x86_64 > Native: arm64 > > Startup time is also noticeably reduced when running native. Also is the footprint of LC in memory smaller according to activity monitor: about 260 vs 500 MB > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From hechris at ziggo.nl Sun Jun 19 04:01:16 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 10:01:16 +0200 Subject: folders() does not return aliases to folders? Message-ID: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Hi, Aliases to foiders are missing in "the folders" function In the Dictionary for folders: Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. Is it a bug or could it be my mistake? This is on OSX 12.4 and LC 9.6.7 regards, Chris Heidecker From hechris at ziggo.nl Sun Jun 19 06:19:14 2022 From: hechris at ziggo.nl (Chris Heidecker) Date: Sun, 19 Jun 2022 12:19:14 +0200 Subject: folders() does not return aliases to folders? In-Reply-To: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> References: <363B8ECA-5651-40CA-9EA7-A0CA195E8D73@ziggo.nl> Message-ID: <13BD3E36-8B5F-499C-8111-FAEBB0B60E31@ziggo.nl> A workaround to get the alias folders into the folderlist. Maybe there is a more elegant approach? function theFolders targetFolder put the defaultFolder into oldDef set the defaultFolder to targetFolder put the folders into folderList put the files into fileList repeat for each line theFile in fileList put the aliasReference of theFile into theAlias if theAlias is not empty then if there is a folder theAlias then --answer "the path to: " & theAlias put return & theFile after folderList end if end if end repeat set the defaultFolder to oldDef return folderList end theFolders on mouseUp answer folder "Choose a folder with aliases to folders in it" put theFolders(it) into folderList filter folderList without ".." sort lines of folderList international answer folderList end mouseUp -- I set the defaultfolder and did not use folders(targetFolder) because -- otherwise i would have to construct the filepath for the aliasreference -- put the aliasReference of (targetFolder&"/"& theFile) into theAlias Regards, Chris Heidecker > Op 19 jun. 2022, om 10:01 heeft Chris Heidecker via use-livecode het volgende geschreven: > > Hi, > > Aliases to foiders are missing in "the folders" function > > In the Dictionary for folders: > Aliases (on OS X systems), symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a folder. > > Is it a bug or could it be my mistake? > This is on OSX 12.4 and LC 9.6.7 > > > regards, > Chris Heidecker > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Sun Jun 19 09:17:00 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sun, 19 Jun 2022 09:17:00 -0400 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: I, for one, appreciate these sorts of messages. On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < use-livecode at lists.runrev.com> wrote: > > At the risk of getting on your nerves, but there is another > new version of the "universal button" widget. > > Added text alignment controls and a horizontal margin > ratio slider in the "Text" section. > You have now better control over text and icon placement > in case icon gravity is set to "left" or "right". > > > This release can be downloaded here: > https://github.com/revig/universal-button-widget/releases > > > Ralf > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Sun Jun 19 10:54:07 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Sun, 19 Jun 2022 16:54:07 +0200 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: References: Message-ID: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Thank you, Mike. On 19.06.22 15:17, Mike Kerner via use-livecode wrote: > I, for one, appreciate these sorts of messages. > > On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> >> At the risk of getting on your nerves, but there is another >> new version of the "universal button" widget. >> >> Added text alignment controls and a horizontal margin >> ratio slider in the "Text" section. >> You have now better control over text and icon placement >> in case icon gravity is set to "left" or "right". >> >> >> This release can be downloaded here: >> https://github.com/revig/universal-button-widget/releases >> >> >> Ralf >> From prothero at earthlearningsolutions.org Sun Jun 19 11:35:48 2022 From: prothero at earthlearningsolutions.org (William Prothero) Date: Sun, 19 Jun 2022 08:35:48 -0700 Subject: [ANN] Universal Button 1.2.0 In-Reply-To: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> References: <4d54702b-78d0-6e73-af8e-bfeb8d51b024@revigniter.com> Message-ID: <8FEF6AE1-AD72-469C-A2A6-146F564EEBD2@earthlearningsolutions.org> This looks really useful. Thanks! Bill William A. Prothero, PhD Prof Emeritus, Dept of Earth Science University of California, Santa Barbara > On Jun 19, 2022, at 7:54 AM, Ralf Bitter via use-livecode wrote: > > Thank you, Mike. > > >> On 19.06.22 15:17, Mike Kerner via use-livecode wrote: >> I, for one, appreciate these sorts of messages. >>> On Fri, Jun 17, 2022 at 8:43 AM Ralf Bitter via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>> At the risk of getting on your nerves, but there is another >>> new version of the "universal button" widget. >>> >>> Added text alignment controls and a horizontal margin >>> ratio slider in the "Text" section. >>> You have now better control over text and icon placement >>> in case icon gravity is set to "left" or "right". >>> >>> >>> This release can be downloaded here: >>> https://github.com/revig/universal-button-widget/releases >>> >>> >>> Ralf >>> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 16:32:46 2022 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 19 Jun 2022 21:32:46 +0100 Subject: Stylistic question. Message-ID: I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. In the card script, there will be code like on mouseUp   switch the short name of the target     case "first"         doCommandFirst         break     case "another"         doCommandAnother         break     case "lastnotleast"         doCommandlastnotleast         break   end switch end mouseUp I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. Thanks for any opinions, Alex. From brian at milby7.com Sun Jun 19 17:06:37 2022 From: brian at milby7.com (Brian Milby) Date: Sun, 19 Jun 2022 17:06:37 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. Sent from my iPhone > On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: > > I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Sun Jun 19 19:19:54 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Sun, 19 Jun 2022 23:19:54 +0000 Subject: Stylistic question. In-Reply-To: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> Message-ID: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. Sent from my iPhone > On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: > > One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stack’s behavior script. > > Sent from my iPhone > >> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >> >> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Sun Jun 19 19:36:00 2022 From: alex at tweedly.net (Alex Tweedly) Date: Mon, 20 Jun 2022 00:36:00 +0100 Subject: Stylistic question. In-Reply-To: <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> References: <30BDEB1C-DB57-4BC1-A0C6-71DA3C052EEA@milby7.com> <4A836C16-C5B3-4E8F-8964-0902047D1FE4@iotecdigital.com> Message-ID: <2ed0b611-a13c-ba6b-7bff-ffa474b0cce3@tweedly.net> On 20/06/2022 00:19, Bob Sneidar via use-livecode wrote: > Well code shared commonly between multiple objects should generally be in an object shared by those objects. That can be the card, stack, behavior or front/back script. The script of a group as well. Absolutely. And the converse - code that is not shared should be as low in the hierarchy as possible. In this case, there is really no shared code. If it's button "first" you call one handler. If it's button "whatever I called the second", you call a different handler. etc.  Nothing shared at all. As to Brian's point about behaviours and Git, I can see that. I admit to being slightly "slack" about what code needs to go into behaviour scripts so it can be Gitted. If it's code that is very brief, and will "never" change, I put that in the regular stack. So in this case, I'd have the script of button "first" be on mouseUp    doCommandFirst end mouseUp and I'm willing to bet that will ever change :-) > For example I have a behavior for all my datagrids. Each datagrid has a property called gridconstants which is an array of all the things specific to each datagrid. The behavior handlers will get this property so that I can use generic terms in the behavior like cTableName and cPriKey etc. Now my behavior handlers like selectionChanged and such become universal to all my datagrids. Only one place to edit the handlers now. Sounds cool. If I ever use a Datagrid, I'll do that. Alex. > If I need to do anything specific with a datagrid, I keep those handlers in each datagrid script. > > Sent from my iPhone > >> On Jun 19, 2022, at 14:09, Brian Milby via use-livecode wrote: >> >> One reason would be if you were trying to use behaviors so you could manage your code with a repository like Git. This would greatly reduce the number of behavior scripts that you would create. One app that work on has the code in the stacks behavior script. >> >> Sent from my iPhone >> >>> On Jun 19, 2022, at 4:33 PM, Alex Tweedly via use-livecode wrote: >>> >>> I've noticed that in a lot of the example code I've seen recently, there's a bit of a common pattern. >>> >>> In the card script, there will be code like >>> >>> on mouseUp >>> switch the short name of the target >>> case "first" >>> doCommandFirst >>> break >>> case "another" >>> doCommandAnother >>> break >>> case "lastnotleast" >>> doCommandlastnotleast >>> break >>> end switch >>> end mouseUp >>> >>> I've seen this in examples from Livecloud, Appli, the WebApp example from Steven/Michael, and a few other places. >>> >>> I would generally have put this code in each button (or other control) directly, and I'm wondering whether there are advantages or preferences for one of those versus the other. >>> >>> Thanks for any opinions, >>> >>> Alex. >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Mon Jun 20 10:50:32 2022 From: mark at livecode.com (Mark Waddingham) Date: Mon, 20 Jun 2022 15:50:32 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> Message-ID: <0f06595048462558e4ea94965d8ebb81@livecode.com> On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: > So, the question now is, is this a macOS problem or is it possible > that a standalone could show the wrong setting due to a wrong > configuration or so when it is created. It is a macOS (Finder) bug - I think it was the same when they added 32-bit vs 64-bit, and probably Intel vs PowerPC. There's a plist entry 'LSArchitecturePriority' which is the order in which the different slices should be used - currently we have x86-64 then arm64 and it seems the Finder doesn't use this to determine whether to show the Rosetta box as checked or not when the user hasn't explicitly prodded it in the past (which obviously they won't have done for new apps / those which didn't have the option before!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From richmondmathewson at gmail.com Mon Jun 20 14:29:10 2022 From: richmondmathewson at gmail.com (Richmond) Date: Mon, 20 Jun 2022 21:29:10 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <0f06595048462558e4ea94965d8ebb81@livecode.com> References: <83E18047-E098-4F3B-8417-2B688E6599A7@uni-wh.de> <20C3442B-8B22-4E93-8218-8BDD4247986B@m-r-d.de> <0f06595048462558e4ea94965d8ebb81@livecode.com> Message-ID: <068d4b2a-3120-fce8-88a3-edae3de3bb9d@gmail.com> In the standalone builder you have always separated Linux 32-bit and 64-bit builds, and the same with Windows: could you alter the MacOS standalones so we end up with one INTEL 64-bit standalone, and one ARM standalone, rather than a awkward sandwich? Best, Richmond. On 20.06.22 17:50, Mark Waddingham via use-livecode wrote: > On 2022-06-18 21:27, matthias rebbe via use-livecode wrote: >> So, the question now is, is this a macOS problem or is it possible >> that a standalone could show the wrong setting due to a wrong >> configuration or so when it is created. > > It is a macOS (Finder) bug - I think it was the same when they added > 32-bit vs 64-bit, and probably Intel vs PowerPC. > > There's a plist entry 'LSArchitecturePriority' which is the order in > which the different slices should be used - currently we have x86-64 > then arm64 and it seems the Finder doesn't use this to determine > whether to show the Rosetta box as checked or not when the user hasn't > explicitly prodded it in the past (which obviously they won't have > done for new apps / those which didn't have the option before!). > > Warmest Regards, > > Mark. > From Bernd.Niggemann at uni-wh.de Mon Jun 20 14:54:48 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Mon, 20 Jun 2022 18:54:48 +0000 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs Message-ID: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Richmond wrote: > In the standalone builder you have always separated > Linux 32-bit and 64-bit builds, and the same with > Windows: could you alter the MacOS standalones so we > end up with one INTEL 64-bit standalone, and one ARM > standalone, rather than a awkward sandwich? In the current (see subject) versions the standalone builder for Mac lets you build: either Intel or Arm or both Kind regards Bernd From richmondmathewson at gmail.com Mon Jun 20 15:45:39 2022 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Mon, 20 Jun 2022 22:45:39 +0300 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: Indeed, but 'both' results in an app package containing 2 'slices', rather than 2 distinct apps. On Mon, 20 Jun 2022, 21:56 Niggemann, Bernd via use-livecode, < use-livecode at lists.runrev.com> wrote: > Richmond wrote: > > > In the standalone builder you have always separated > > Linux 32-bit and 64-bit builds, and the same with > > Windows: could you alter the MacOS standalones so we > > end up with one INTEL 64-bit standalone, and one ARM > > standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 20 15:55:01 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 20 Jun 2022 21:55:01 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> Message-ID: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Hm, here in LC 9.6.8 RC2 and 10DP4 i see only 'macOS Intel' and 'macOS Apple (experimental)'. When i select both, then a universal standalone is created. So to have separate Intel and M1 versions, I have to run the standalone building 2 times. Once with only Intel selected and then once with only Apple selected Better would be a third option which would say Universal. So one could select all 3 options to get a universal and also versions for each cpu platform. Anyway, the macOS Apple support is currently experimental, i am pretty sure there will be such an option in future. At least i hope so. ;) Matthias > Am 20.06.2022 um 20:54 schrieb Niggemann, Bernd via use-livecode : > > Richmond wrote: > >> In the standalone builder you have always separated >> Linux 32-bit and 64-bit builds, and the same with >> Windows: could you alter the MacOS standalones so we >> end up with one INTEL 64-bit standalone, and one ARM >> standalone, rather than a awkward sandwich? > > In the current (see subject) versions the standalone > builder for Mac lets you build: > > either Intel or Arm or both > > Kind regards > Bernd > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alanstenhouse at hotmail.com Mon Jun 20 19:46:58 2022 From: alanstenhouse at hotmail.com (Alan Stenhouse) Date: Tue, 21 Jun 2022 09:16:58 +0930 Subject: Referencing Livecode In-Reply-To: References: Message-ID: Hi David In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 and https://www.sciencedirect.com/science/article/pii/S2351989421001761 HTH cheers Alan > On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: > >> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >> >> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? > > The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. > > Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. > > >> >> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >> -- > > They do, don?t they. From memory, that wasn?t the context though. > > Cheers > > David G From Bernd.Niggemann at uni-wh.de Tue Jun 21 05:51:18 2022 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Tue, 21 Jun 2022 09:51:18 +0000 Subject: Referencing Livecode Message-ID: Alan Stenhouse via use-livecode wrote > In a couple of my publications, I described developing apps with Livecode and > referred to www.livecode.org and www.livecode.com, but didn't include anything > in the references as there was nothing (AFAICS at that time) that would satisfy > scientific publication standards. > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 Alan, that is really cool. Congratulations. Kind regards Bernd From mark at livecode.com Tue Jun 21 05:56:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 10:56:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: > Anyway, the macOS Apple support is currently experimental, i am pretty > sure there will be such an option in future. At least i hope so. ;) Why? The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. Warmest Regards, Mark. P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From dvglasgow at gmail.com Tue Jun 21 06:42:01 2022 From: dvglasgow at gmail.com (David V Glasgow) Date: Tue, 21 Jun 2022 11:42:01 +0100 Subject: OT Re: Referencing Livecode In-Reply-To: References: Message-ID: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> That is really helpful Alan. A pair of fine papers! I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. Cheers, David G > On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: > > Hi David > > In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. > > See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 > and > https://www.sciencedirect.com/science/article/pii/S2351989421001761 > > HTH > > cheers > > Alan > > >> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >> >>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>> >>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >> >> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >> >> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >> >> >>> >>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>> -- >> >> They do, don?t they. From memory, that wasn?t the context though. >> >> Cheers >> >> David G > From matthias_livecode_150811 at m-r-d.de Tue Jun 21 07:18:25 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 13:18:25 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> Message-ID: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> > Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : > > On 2022-06-20 20:55, matthias rebbe via use-livecode wrote: >> Anyway, the macOS Apple support is currently experimental, i am pretty >> sure there will be such an option in future. At least i hope so. ;) > > Why? > First, it's more convenient for the developer. The Intel only and Apple only builds are smaller ins size than the universal build. So if i want to build those single platform apps to offer the smaller sized apps i have to run the standalone building process twice, right? And before i run the 2nd build process i even have to switch the settings, right? That's not very convenient. And for those who want to build an universal app an "universal" option in the standalone settings would be great. And btw why did this option exist in previous LC versions for an Universal app with PPC and Intel support? Regards, Matthias > The idea of universal binaries is to ensure that a single app/installer can be shipped to users and that will then use the 'best' it can for their machine. They provide a much better end-user experience than Windows or Linux provide in this regard. > > Whilst you might not have many users using Apple architecture machines right now, you don't know when they might upgrade, so universal binaries mean that when a user upgrades their machine, their apps they already have (backed up, more than likely, and re-imaged on the new machine) will continue to take advantage of their hardware. > > Warmest Regards, > > Mark. > > P.S. I should point out that Apple architecture support *is* experimental, so its fine to include and seed to users for testing purposes, but I wouldn't include one in final shipping releases just yet. > > P.P.S. That being said, the only Apple architecture related bug we have had reported recently is related to standalone building itself (and is related to macOS High Sierra - 10.13 - and below *not* supported arm64 slices in some of the command-line tools the S/B uses) - and I fully expect the experimental tag to be removed by final release of 10 (and the corresponding 9.6.x maintenance release just after that). > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Tue Jun 21 08:28:48 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 08:28:48 -0400 Subject: OT Re: Referencing Livecode In-Reply-To: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> References: <6A1258E6-0D16-455B-8B1B-75DF8E62C062@gmail.com> Message-ID: Hi. These are great examples of use cases for LiveCode and it is great how you explain the app design. It especially cool that the apps are used for citizen science. It complements LiveCode's “anyone can code” tag line with the “any one can do science" ethic of citizen science. Thanks Alan. Martin Koob > On Jun 21, 2022, at 6:42 AM, David V Glasgow via use-livecode wrote: > > > That is really helpful Alan. A pair of fine papers! > > I visited Australia & NZ a few years back and started using iNaturalist and then the Seek app, so I’m now an enthusiastic CS observation reporter. > > Cheers, > > David G > >> On 21 Jun 2022, at 12:46 am, Alan Stenhouse wrote: >> >> Hi David >> >> In a couple of my publications, I described developing apps with Livecode and referred to www.livecode.org and www.livecode.com, but didn't include anything in the references as there was nothing (AFAICS at that time) that would satisfy scientific publication standards. >> >> See: https://www.sciencedirect.com/science/article/pii/S2351989420309173 >> and >> https://www.sciencedirect.com/science/article/pii/S2351989421001761 >> >> HTH >> >> cheers >> >> Alan >> >> >>> On 18 Jun 2022, at 1:30 am, David V Glasgow wrote: >>> >>>> On 16 Jun 2022, at 9:08 pm, J. Landman Gay via use-livecode wrote: >>>> >>>> Is there a reason not to use the LC site URL, either alone or in addition to the Wikipedia one? >>> >>> The https://livecode.com landing page is rather sparse, and focussed on drawing customers in rather than conveying anything about text processing, or obvious links to information on text processing. No criticism of that at all. It?s a commercial site. >>> >>> Wiki page has the disadvantage of a banner warning about link rot, but the advantage of lots of information presented in a more academic and neutral style. >>> >>> >>>> >>>> Re: the errors, they look like examples of functions that would return "false" but I haven't seen them in context. >>>> -- >>> >>> They do, don?t they. From memory, that wasn?t the context though. >>> >>> Cheers >>> >>> David G >> > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Jun 21 09:19:03 2022 From: mark at livecode.com (Mark Waddingham) Date: Tue, 21 Jun 2022 14:19:03 +0100 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> Message-ID: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode >> : >> Why? >> > > First, it's more convenient for the developer. I think the end user is more important (in this case) ;) > The Intel only and Apple only builds are smaller ins size than the > universal build. True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. > So if i want to build those single platform apps to offer the smaller > sized apps i have to run the standalone building process twice, > right? And before i run the 2nd build process i even have to switch > the settings, right? > That's not very convenient. Offering two separate downloads to users is not very convenient to them ;) > And btw why did this option exist in previous LC versions for an > Universal app with PPC and Intel support? Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From matthias_livecode_150811 at m-r-d.de Tue Jun 21 10:08:48 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Tue, 21 Jun 2022 16:08:48 +0200 Subject: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs In-Reply-To: <2daab8720c379e6b70faf42ce23f29cf@livecode.com> References: <26B5F7BD-694B-4DB4-B524-6618CCC9EDD3@uni-wh.de> <3FC7B742-D0CA-4CF1-A10D-278B453AD20A@m-r-d.de> <4A827FB2-CA23-49FC-BC0D-B6F2C72004E9@m-r-d.de> <2daab8720c379e6b70faf42ce23f29cf@livecode.com> Message-ID: <2AA3A6FD-E032-4B56-828E-9BCF11B99922@m-r-d.de> > Am 21.06.2022 um 15:19 schrieb Mark Waddingham via use-livecode : > > On 2022-06-21 12:18, matthias rebbe via use-livecode wrote: >>> Am 21.06.2022 um 11:56 schrieb Mark Waddingham via use-livecode : >>> Why? >> First, it's more convenient for the developer. > > I think the end user is more important (in this case) ;) > >> The Intel only and Apple only builds are smaller ins size than the >> universal build. > > True - universal builds are double the size essentially (well, resources in copy files are *not* duplicated) - however how important is that really? In my vocational training in the mid 80's the mantra of my instructors was "SAVE resources!". Okay, at that time computers did not have many ram and hard disk space. But anyway, i still keep this mantra in mind when programing or doing other things. Just because computers nowadays have plenty of ram and hard disk space does not mean we have to completely fill up it. ;) > > There's a high chance a user might download an app twice from a page offering two architectures - because they aren't necessarily sure which one they need - at which point, you've lost any advantage in splitting them (and just caused user consternation). [ Similar argument holds when users upgrade their machines, and restore from a full backup - which is what the majority of users do ]. > Therefore the Universal build would be. That's the reason why i argue for 3 options for macOS. When i switched to my new Mac Studio there were several 3rd party programs which were only available as single Apple Chips version and not as an universal build. But there might be special reasons for it. > Besides, if size is a real concern here then there are a couple of tweaks we could do to reduce the size of universal binaries (and indeed, Android APKs) which would see the size difference between universal and non-universal drop to maybe 3-4Mb (and probably only 1-2Mb when compressed - i.e. transmission size). [ This would be a *much* better use of time, than adding an edge-case option to the S/B, IMHO ]. Is it so much work to reimplement that routine? It already existed for PPC. > >> So if i want to build those single platform apps to offer the smaller >> sized apps i have to run the standalone building process twice, >> right? And before i run the 2nd build process i even have to switch >> the settings, right? >> That's not very convenient. > > Offering two separate downloads to users is not very convenient to them ;) Don't think so. Offering 3 separate downloads 1 x Intel, 1 x Apple, 1 x Universal is very convenient. The user can decide what to download and in case of a doubt the user can download the Universal build. > >> And btw why did this option exist in previous LC versions for an >> Universal app with PPC and Intel support? > > Well that was getting on for a decade ago - so can't really remember what the exact rationale was back then. However, I dimly recall that universal PPC+Intel binaries would not run on some earlier versions of 'MacOS X' which we still supported (and people still Don't exaggerate, it was just 8 years ago. ;) > had!) at the time - so you actually *needed* to offer a separate PPC download if you still needed to support those really old 'MacOS X' versions. > > These days that's not a problem as there's been a 32-bit -> 64-bit architecture switch since then which means all the macOS versions we currently support work correctly with universal binaries containing slices the OS does not understand. > But with the current problem that a Universal app by default runs in Rosetta although the Rosetta switch is not enabled that is also not very convenient for the customer. Anyway, i understand your points and can live with the decision. Regards, Matthias > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Tue Jun 21 13:44:10 2022 From: tom at makeshyft.com (Tom Glod) Date: Tue, 21 Jun 2022 13:44:10 -0400 Subject: arrayencode Message-ID: Hi Folks, I am wondering if anyone here knows the encoding algorithm that arrayencode() uses? Is it one that can be implemented in another language or is it proprietary? Thanks, Tom From craig at starfirelighting.com Tue Jun 21 14:16:28 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 14:16:28 -0400 Subject: my keyUp message has disappeared Message-ID: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> This is summarized from a couple of threads in the forum: ------------------------------------------------- The "keyUp"message has disappeared. This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. So a new stack in a new session has this in its card script: on keyUp x answer x end keyUp Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. ————————————— Just trashed the prefs file, which worked last time. Nope Just tried with another version of LC (9.6.6). Nope Just restarted. Nope. I have never seen anything quite like this, the complete loss of a message. I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. ——————————— This works from msg: send "keyUp" && "x" to this cd I can set a breakpoint and trap the message, or not. I get something like "x56”. —————————————————————————— Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. Craig From craig at starfirelighting.com Tue Jun 21 15:22:59 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 21 Jun 2022 15:22:59 -0400 Subject: my keyUp message has disappeared In-Reply-To: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> References: <14CF0883-9A12-4CF2-99E4-A57A363FE1AB@starfirelighting.com> Message-ID: I neglected to write the modified “keyUp” handler I am now using when I posted. it should read: > on keyUp x > answer x & random(99) > end keyUp in order to get that “x56” I mentioned. Craig > On Jun 21, 2022, at 2:16 PM, Craig Newman via use-livecode wrote: > > This is summarized from a couple of threads in the forum: > ------------------------------------------------- > > The "keyUp"message has disappeared. > > This happened to me once before, several weeks ago, and trashing the prefs file fixed it. But now even that does not cut it. > > So a new stack in a new session has this in its card script: > > on keyUp x > answer x > end keyUp > > Nothing. The message does not appear in the message watcher, though all its siblings, "keyDown", rawKeyDown" and "rawKeyUp”, all do. > > ————————————— > > Just trashed the prefs file, which worked last time. Nope > Just tried with another version of LC (9.6.6). Nope > Just restarted. Nope. > > I have never seen anything quite like this, the complete loss of a message. > > I went back to v8.1 and tried the same handler in the card script. Worked! Then tried 8.6. Did not work. Went BACK to 8.1. No longer worked. > > Something in my setup is doing this. I am not sure it is LC per se, though I cannot imagine what that could mean. > > ——————————— > > This works from msg: > > send "keyUp" && "x" to this cd > > I can set a breakpoint and trap the message, or not. I get something like "x56”. > > —————————————————————————— > > Bernd mentioned that he noticed this issue if his message box was visible. He thought maybe that stack somehow grabbed focus. I mention this only because something is surely going on somewhere. > > Craig > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 21 22:43:30 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 19:43:30 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> l oTom Glod wrote: > I am wondering if anyone here knows the encoding algorithm > that arrayencode() uses? Yes. > Is it one that can be implemented in another language or is > it proprietary? It should be technically possible to implement any algo in any sufficiently-complete language. Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). https://bsonspec.org/ BSON parsers are available for a great many languages: https://bsonspec.org/implementations.html -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Tue Jun 21 23:31:19 2022 From: mkoob at rogers.com (Martin Koob) Date: Tue, 21 Jun 2022 23:31:19 -0400 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: What is LSON? A web search doesn’t turn up anything. A shot in the dark here but Is it something internal to LiveCode i.e. Livecode Script Object Notation that is the basis for LiveCode arrays? Thanks for the references on BSON Martin > On Jun 21, 2022, at 10:43 PM, Richard Gaskin via use-livecode wrote: > > l oTom Glod wrote: > > > I am wondering if anyone here knows the encoding algorithm > > that arrayencode() uses? > > Yes. > > > > Is it one that can be implemented in another language or is > > it proprietary? > > It should be technically possible to implement any algo in any sufficiently-complete language. > > Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address. > > > I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later. > > But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC. > > If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send. > > But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time. > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. > > I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats. > > If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well). > > https://bsonspec.org/ > > BSON parsers are available for a great many languages: > https://bsonspec.org/implementations.html > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 22 00:55:43 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 21 Jun 2022 21:55:43 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Martin Koob wrote: > What is LSON? A web search doesnt turn up anything. A shot > in the dark here but Is it something internal to LiveCode i.e. > Livecode Script Object Notation that is the basis for LiveCode > arrays? Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. > Thanks for the references on BSON Glad someone found them interesting. I was especially impressed with variable integers for the length specifier. Nice format, would be cool if it were more widely used outside of MongoDB circles. -- Richard Gaskin Fourth World Systems From mkoob at rogers.com Wed Jun 22 08:26:44 2022 From: mkoob at rogers.com (Martin Koob) Date: Wed, 22 Jun 2022 08:26:44 -0400 Subject: arrayencode In-Reply-To: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> References: <40efe180-a85a-e22f-0c6f-08d4b5b6fbb8@fourthworld.com> Message-ID: Hi Richard Thanks for the explanation. I think it is a helpful term or distinction to have. I think it would be good to actually have that term with a formal definition published by LiveCode or the community with references to BSON so it will show up in web searches for either term to lead people to LiveCode. Maybe a start would be to introduce it in the forums. Just a question though how is what you define as LSON different from JSON. Is it a different way of serializing LiveCode native arrays? Is there a way that LiveCode developers can have access to it directly through LCB or is it accessible in the realm of the engine only. Thanks Martin Koob > On Jun 22, 2022, at 12:55 AM, Richard Gaskin via use-livecode wrote: > > > What is LSON? A web search doesn’t turn up anything. A shot > > in the dark here but Is it something internal to LiveCode i.e. > > Livecode Script Object Notation that is the basis for LiveCode > > arrays? > > Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized array format for so long that the friends I talk with most often have picked it up as well - and along the way I forget that not everyone else has. :) > > So it's just personal slang. But useful, IMO, to help newcomers familiar with JSON and BSON appreciate its role. From MikeKerner at roadrunner.com Wed Jun 22 09:46:54 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:46:54 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: For an example like a session during LCG, throwing everything into a single script can make it easier to see everything, together, however, I absolutely, always, without exception, do this: 1) Every object that needs to do something gets its own handler, unless there is some reason to allow the behavior to pass up the chain. This situation is not one of them. 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. 3) I don't ever use switch. I can't stand it. If I had to write something like the above, I would do something like put the short name of the target into snot if snot is "first" then doCommandFirst else if snot is "another" doCommandAnother else if snot is "lastnotleast" doCommandLastNotLeast else # uh oh answer "ruh roh." end if # snot is "first" this assumes that the names of the handlers I would be calling are not named like the ones in the example, because if they were, you could also put the short name of the target into snot put "doCommand" & snot into toDo try do toDo catch e answer "ruh roh." end try On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > I've noticed that in a lot of the example code I've seen recently, > there's a bit of a common pattern. > > In the card script, there will be code like > > on mouseUp > switch the short name of the target > case "first" > doCommandFirst > break > case "another" > doCommandAnother > break > case "lastnotleast" > doCommandlastnotleast > break > end switch > end mouseUp > > I've seen this in examples from Livecloud, Appli, the WebApp example > from Steven/Michael, and a few other places. > > I would generally have put this code in each button (or other control) > directly, and I'm wondering whether there are advantages or preferences > for one of those versus the other. > > Thanks for any opinions, > > Alex. > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From MikeKerner at roadrunner.com Wed Jun 22 09:50:50 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 09:50:50 -0400 Subject: Stylistic question. In-Reply-To: References: Message-ID: wupz. - i forgot the THEN's after each of the ELSE IF's too many languages on the same project swimming in my brain On Wed, Jun 22, 2022 at 9:46 AM Mike Kerner wrote: > For an example like a session during LCG, throwing everything into a > single script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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." > -- 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." From ambassador at fourthworld.com Wed Jun 22 10:09:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 07:09:09 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Martin Koob wrote: > Hi Richard > > Thanks for the explanation. I think it is a helpful term or > distinction to have. I think it would be good to actually have > that term with a formal definition published by LiveCode or > the community with references to BSON so it will show up in > web searches for either term to lead people to LiveCode. Maybe > a start would be to introduce it in the forums. I've been using the term for years whenever I discuss LC encoded arrays. A few others have as well, tho not many. If LC Ltd finds it useful for orienting newcomers to LC they could include it in the Dictionary's glossary, and perhaps sprinkle use of it in places where "LSON" can serve as a shorthand for "encoded associative array". > Just a question though how is what you define as LSON different > from JSON. Is it a different way of serializing LiveCode native > arrays? LSON is the LC-engine-native way to serialize LC arrays. JSON is the JavaScript-engine-native way to serialize JS objects. BSON is the MongoDB-engine-native way to serialize document objects. They're similar only in that each is purpose-built for its respective scripting engine. LSON is to LC what JSON is to JavaScript. But they're structurally very different, as different as LC associative arrays are from JavaScript's objects. > Is there a way that LiveCode developers can have access to it directly > through LCB or is it accessible in the realm of the engine only. I haven't yet had occasion to use LC Builder in production, so I'm not sure if that language also offers some form of LC Script's arrayEncode/arrayDecode. Given how central arrays are to working in LC I'd be surprised if LCB doesn't include support for array serialization. -- Richard Gaskin Fourth World Systems From tom at makeshyft.com Wed Jun 22 11:01:05 2022 From: tom at makeshyft.com (Tom Glod) Date: Wed, 22 Jun 2022 11:01:05 -0400 Subject: arrayencode In-Reply-To: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> References: <16db2e0c-30b6-1edc-2c6f-9e82217c6256@fourthworld.com> Message-ID: Hello Richard, thanks for the detailed answer. There are 2 reasons why I am considering this. 1. I can skip the encoding and decoding from and to json. 2. it supports binary, and does not require base encoding and its 33% inflation. For interoperability for the users, JSON is the way to go for sure. But for throughput between the UI Layer and "background service" I would love a way to just skip all the extra steps and send the serialized array to be unserialized into an array or map directly. I was hoping this was easy. I may ask you for your notes in the future, after I have a chat with Kevin and Mark about it. Thanks again, Tom On Wed, Jun 22, 2022 at 10:10 AM Richard Gaskin via use-livecode < use-livecode at lists.runrev.com> wrote: > Martin Koob wrote: > > > Hi Richard > > > > Thanks for the explanation. I think it is a helpful term or > > distinction to have. I think it would be good to actually have > > that term with a formal definition published by LiveCode or > > the community with references to BSON so it will show up in > > web searches for either term to lead people to LiveCode. Maybe > > a start would be to introduce it in the forums. > > I've been using the term for years whenever I discuss LC encoded arrays. > A few others have as well, tho not many. If LC Ltd finds it useful for > orienting newcomers to LC they could include it in the Dictionary's > glossary, and perhaps sprinkle use of it in places where "LSON" can > serve as a shorthand for "encoded associative array". > > > > Just a question though how is what you define as LSON different > > from JSON. Is it a different way of serializing LiveCode native > > arrays? > > LSON is the LC-engine-native way to serialize LC arrays. > > JSON is the JavaScript-engine-native way to serialize JS objects. > > BSON is the MongoDB-engine-native way to serialize document objects. > > They're similar only in that each is purpose-built for its respective > scripting engine. LSON is to LC what JSON is to JavaScript. > > But they're structurally very different, as different as LC associative > arrays are from JavaScript's objects. > > > > Is there a way that LiveCode developers can have access to it directly > > through LCB or is it accessible in the realm of the engine only. > > I haven't yet had occasion to use LC Builder in production, so I'm not > sure if that language also offers some form of LC Script's > arrayEncode/arrayDecode. Given how central arrays are to working in LC > I'd be surprised if LCB doesn't include support for array serialization. > > -- > Richard Gaskin > Fourth World Systems > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:10:57 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:10:57 +0200 Subject: Error message that vector icon widget missing when building iOS standalone Message-ID: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Hi, I have here an stack from which i created a standalone from in January. Today i needed to build a new version to get it running on iOS 15.5 When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Anyway, I checked my stack if that widget is somewhere, but cannot find it. I've reinstallled the Vectore Icon widget again and the build process was successful. Then i've unloaded the widget and rebuild the standalone again and the build was also successful. But as soon as i uninstall that widget i get that error. Does anyone have an idea where i can search the complete stack and its substacks for that widget? Btw.: For what exactly is that widget. To be honest i don't have a clue. Regards, Matthias From matthias_livecode_150811 at m-r-d.de Wed Jun 22 11:14:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 22 Jun 2022 17:14:34 +0200 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: > Am 22.06.2022 um 17:10 schrieb matthias rebbe via use-livecode : > > Hi, > > I have here an stack from which i created a standalone from in January. > > Today i needed to build a new version to get it running on iOS 15.5 > > > When i now try to build a standalone i get the error message "Extension com.livecode.widget.vectoricon not found". > > I looked at the extension manager and noticed that the SVG icon widget is not installed anymore. I am not sure if i did this. Of course the Vector Icon widget was not installed anymore > Anyway, I checked my stack if that widget is somewhere, but cannot find it. > > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 11:18:07 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 15:18:07 +0000 Subject: arrayencode In-Reply-To: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> References: <3d740ece-2d5e-470e-4780-5daa4fddde85@fourthworld.com> Message-ID: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Richard I think I hear you say that JSON is an alternative to arrayEncode? What about storing to SQL blob and binary files? Will it suffice? I'd consider converting all my arrayEncoding to JSON if so. Bob S > On Jun 21, 2022, at 19:43 , Richard Gaskin via use-livecode wrote: > > For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON. From ambassador at fourthworld.com Wed Jun 22 12:02:10 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:02:10 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Tom Glod wrote: > Hello Richard, thanks for the detailed answer. > There are 2 reasons why I am considering this. > > 1. I can skip the encoding and decoding from and to json. > 2. it supports binary, and does not require base encoding and its > 33% inflation. > > For interoperability for the users, JSON is the way to go for sure. > But for throughput between the UI Layer and "background service" I > would love a way to just skip all the extra steps and send the > serialized array to be unserialized into an array or map directly. > > I was hoping this was easy. If you don't need interoperability with non-LiveCode systems, the choice couldn't be easier: LSON is the LC way. But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. What did I miss? > I may ask you for your notes in the future, after I have a chat with > Kevin and Mark about it. If you're talking with Mark you won't need my notes. He knows a thing or two about LC's array formats. :) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 12:13:02 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 09:13:02 -0700 Subject: arrayencode In-Reply-To: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> Message-ID: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Bob Sneidar wrote: > Richard I think I hear you say that JSON is an alternative to > arrayEncode? I'm apparently writing so badly maybe I should skip the shorthand "LSON" and just write the full form: "output from LC's built-in arrayEncode". I'd adopted "LSON" to help position its role as the LC-native way to transport and store array data, similar to the role of JSON in JavaScript workflows or BSON within MongoDB systems. When you need interoperability, there's no longer much of a choice: JSON is the de facto standard. Though highly specific to how JavaScript works, browsers are so ubiquitous that most languages other than JavaScript now have some means of transforming JSON into a format that can be used internally, as LC does with its JSONtoArray and ArrayToJSON functions. But when all producers and consumers of data in a system use the LC engine, LSON (output from LC's built-in arrayEncode) is the with-the-grain choice. > What about storing to SQL blob and binary files? Will it suffice? I'd > consider converting all my arrayEncoding to JSON if so. LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. -- Richard Gaskin Fourth World Systems From bobsneidar at iotecdigital.com Wed Jun 22 12:30:55 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 16:30:55 +0000 Subject: arrayencode In-Reply-To: <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> References: <56931790-7EF7-4FFB-9F9E-BB1032439E95@iotecdigital.com> <83bd4350-7680-d7a9-320a-e509df883011@fourthworld.com> Message-ID: Okay I looked up JSON and can see these are two different animals. JSON looks like an xml-ish sort of format or a bit like the PDF fdf format for data files. (In fact, now that I think about it Adobe may be using JSON as their format. Bob S > On Jun 22, 2022, at 09:13 , Richard Gaskin via use-livecode wrote: > > > What about storing to SQL blob and binary files? Will it suffice? I'd > > consider converting all my arrayEncoding to JSON if so. > > LSON (output from LC's built-in arrayEncode) is a binary format, so any storage or transport mechanism suitable for binary data can be used. > > -- > Richard Gaskin > Fourth World Systems From jacque at hyperactivesw.com Wed Jun 22 15:41:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 22 Jun 2022 14:41:02 -0500 Subject: Stylistic question. In-Reply-To: References: Message-ID: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:49:51 AM Mike Kerner via use-livecode wrote: > For an example like a session during LCG, throwing everything into a single > script can make it easier to see everything, together, however, > I absolutely, always, without exception, do this: > 1) Every object that needs to do something gets its own handler, unless > there is some reason to allow the behavior to pass up the chain. This > situation is not one of them. > 2) I don't use scripts, at all, ever. Every handler is in a behavior stack. > 3) I don't ever use switch. I can't stand it. If I had to write something > like the above, I would do something like > put the short name of the target into snot > if snot is "first" then > doCommandFirst > else if snot is "another" > doCommandAnother > else if snot is "lastnotleast" > doCommandLastNotLeast > else # uh oh > answer "ruh roh." > end if # snot is "first" > > this assumes that the names of the handlers I would be calling are not > named like the ones in the example, because if they were, you could also > put the short name of the target into snot > put "doCommand" & snot into toDo > try > do toDo > catch e > answer "ruh roh." > end try > > On Sun, Jun 19, 2022 at 4:33 PM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I've noticed that in a lot of the example code I've seen recently, >> there's a bit of a common pattern. >> >> In the card script, there will be code like >> >> on mouseUp >> switch the short name of the target >> case "first" >> doCommandFirst >> break >> case "another" >> doCommandAnother >> break >> case "lastnotleast" >> doCommandlastnotleast >> break >> end switch >> end mouseUp >> >> I've seen this in examples from Livecloud, Appli, the WebApp example >> from Steven/Michael, and a few other places. >> >> I would generally have put this code in each button (or other control) >> directly, and I'm wondering whether there are advantages or preferences >> for one of those versus the other. >> >> Thanks for any opinions, >> >> Alex. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 22 16:24:40 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 22 Jun 2022 20:24:40 +0000 Subject: Stylistic question. In-Reply-To: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Well then Navigator is for you! If an object has a behavior and no script of it's own, it's color in the list is green. If it has a script but no behavior, it's color is blue. If it has both, it's purple. Simply double clicking an object opens it's behavior script if it has one, and it's native script if it doesn't. You don't have to keep track of anything anymore. Bob S > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode wrote: > > I find that too many behavior stacks make it difficult to keep track of where things are. But the primary downside is that script-only stacks don't work with remote debugging. That's a big drawback for me since most of my apps these days are for mobile. I do use behaviors quite a bit, but I put the scripts into buttons so they can be debugged remotely. Or maybe you mean you use regular stacks for behaviors? Those would work. > > The switch construct is way more flexible than if/then and much cleaner to read and track. I use them all the time. They're especially useful when you want to group several conditionals. What don't you like about them? Just curious. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From alex at tweedly.net Wed Jun 22 19:31:38 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:31:38 +0100 Subject: arrayencode In-Reply-To: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: > [ ... about using JSON ... ] > But if you don't need interoperability, you wouldn't need to write a > parser, since LC includes a good one built into the engine. > > What did I miss? > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? The parser "built-in" seems to work fine in the IDE, but not on the server : > set the errormode to inline > put the version > > put "{'name':'asdf'}" into t > replace "'" with quote in t > put JSONtoarray(t) into tA > put the keys of tA > fails with - file "/home/alextwee/public_html/rampuk/tJSON.lc" row 7, col 5: Function: error in function handler (JSONtoarray) row 7, col 5: put: error in expression (there's no mention of any platform restricitons in the dictionary). I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, which then fails with "error in function handler mergJSONDecode. (I must admit I encountered this a while ago, figured it was probably a temporary issue so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. I can't believe this problem isn't causing widespread problems, so it's probably something specific about me, or my on-rev account. If anyone has suggestions, I'll try them; if not, I'll put it as a bug report into QCC see what happens. Alex. From ambassador at fourthworld.com Wed Jun 22 19:38:27 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 16:38:27 -0700 Subject: arrayencode In-Reply-To: References: Message-ID: Alex Tweedly wrote: > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? > > The fact that Livecode's support for JSON is, hmmm, mediocre at > best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server Interesting take. Thanks. I'd read Tom's post as being about LSON, with LC in both producer and consumer roles, which would make a JavaScript-optimized format unnecessary. Perhaps I'd misunderstood. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From alex at tweedly.net Wed Jun 22 19:50:05 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 00:50:05 +0100 Subject: arrayencode In-Reply-To: References: Message-ID: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> On 23/06/2022 00:38, Richard Gaskin via use-livecode wrote: > > Interesting take. Thanks. I'd read Tom's post as being about LSON, > with LC in both producer and consumer roles, which would make a > JavaScript-optimized format unnecessary.  Perhaps I'd misunderstood. > No, you didn't misunderstand. I misread your earlier post.  Your reference to  "built-in parser" was indeed about LSON, and obviously so;  I just misread it as being about JSON. Nevertheless, my central point remains (afact) valid - the support for JSON in Livecode seems incomplete, and in particular it seems flaky/missing on LCServer. Alex. From ambassador at fourthworld.com Wed Jun 22 20:00:41 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:00:41 -0700 Subject: arrayencode In-Reply-To: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> References: <60090cb5-d928-6c92-05eb-a0dfdff980e8@tweedly.net> Message-ID: <7facfb24-94c8-865a-7832-59966128bd8e@fourthworld.com> Alex Tweedly wrote: > Nevertheless, my central point remains (afact) valid - the support > for JSON in Livecode seems incomplete, and in particular it seems > flaky/missing on LCServer. Making externals easily findable by the LC Server engine should be a quick fix for them, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From ambassador at fourthworld.com Wed Jun 22 20:11:09 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 22 Jun 2022 17:11:09 -0700 Subject: How to color a "cell"? Message-ID: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> I need to set the backgroundColor of a complete "cell", where "cell" is defined as the portion of a row in a table field between tabs when the vGrid is set. I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From MikeKerner at roadrunner.com Wed Jun 22 21:11:44 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 22 Jun 2022 21:11:44 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: J.: Not true on the remote debugging. Everything I write is for mobes. Literally everything. Except for the server code for the mobes, but comparatively speaking, there are many, many, many more lines in the mobe code than there is in the server code. All of these behaviors are in script-only-stacks. I have zero difficulty debugging them with the remote debugger. I have not found that I have too many files, but I also organize them into folders, as needed, and I do just about all of my editing in Sublime, which makes keeping the project straight very easy. The dislike I have for switch is a personal thing. I get that it's very similar to the way switch is used in other tongues. Maybe it's the way it looks. Maybe it's the break at the end of each segment. I don't know. It always feels clunky to write and it feels clunky to read. On Wed, Jun 22, 2022 at 4:25 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Well then Navigator is for you! If an object has a behavior and no script > of it's own, it's color in the list is green. If it has a script but no > behavior, it's color is blue. If it has both, it's purple. Simply double > clicking an object opens it's behavior script if it has one, and it's > native script if it doesn't. > > You don't have to keep track of anything anymore. > > Bob S > > > > On Jun 22, 2022, at 12:41 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > I find that too many behavior stacks make it difficult to keep track of > where things are. But the primary downside is that script-only stacks don't > work with remote debugging. That's a big drawback for me since most of my > apps these days are for mobile. I do use behaviors quite a bit, but I put > the scripts into buttons so they can be debugged remotely. Or maybe you > mean you use regular stacks for behaviors? Those would work. > > > > The switch construct is way more flexible than if/then and much cleaner > to read and track. I use them all the time. They're especially useful when > you want to group several conditionals. What don't you like about them? > Just curious. > > > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From rabit at revigniter.com Thu Jun 23 05:31:01 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 11:31:01 +0200 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows: > This external has been implemented to encode/decode UTF8 JSON to a LiveCode array as quickly as possible. Currently externals can not work with multi-dimensional LiveCode arrays so the intention is it is used with two functions like this: > > -- pArray - array to be encoded > -- pForceRootType - can force the root to be an object if it looks like an array > -- pPretty - include whitespace > function ArrayToJSON pArray,pForceRootType,pPretty > repeat for each key tKey in pArray > if pArray[tKey] is an array then > put "}"&ArrayToJSON(pArray[tKey]) into pArray[tKey] > end if > end repeat > return(mergJSONEncode("pArray",pForceRootType,pPretty)) > end ArrayToJSON > > function JSONToArray pJSON > local tArray,tKeys > repeat for each line tKey in mergJSONDecode(pJSON,"tArray") > put JSONToArray(tArray[tKey]) into tArray[tKey] > end repeat > return tArray > end JSONToArray > > For most cases the above is all the documentaion you will need. There are however some quirks to the external you might need to know about. Another option would be to load the JSON extension and to use the JsonImport() function. Ralf On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: > > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? >> > The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? > > The parser "built-in" seems to work fine in the IDE, but not on the > server : > >> > set the errormode to inline >> put the version >> >> put "{'name':'asdf'}" into t >> replace "'" with quote in t >> put JSONtoarray(t) into tA >> put the keys of tA >> > fails with - > > file "/home/alextwee/public_html/rampuk/tJSON.lc" >   row 7, col 5: Function: error in function handler (JSONtoarray) >   row 7, col 5: put: error in expression > > (there's no mention of any platform restricitons in the dictionary). > > I tried copying in the sample ode for wrapping JSONToArray around > mergJSONDecode, > which then fails with "error in function handler mergJSONDecode. > > > (I must admit I encountered this a while ago, figured it was probably a > temporary issue > so I replaced JSON by LSON, and forgot all about it.) This discussion > prompted me to re-try it. > > I can't believe this problem isn't causing widespread problems, so it's > probably > something specific about me, or my on-rev account. If anyone has > suggestions, I'll > try them; if not, I'll put it as a bug report into QCC see what happens. > > Alex. From alex at tweedly.net Thu Jun 23 08:23:04 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 13:23:04 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> Message-ID: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: > Hi Alex, > > the JSONtoArray() function is part of the mergJSON external. > The README of this external describes how to use this function > and it's counterpart JSONtoArray as follows: > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > Another option would be to load the JSON extension and to use > the JsonImport() function. > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). I can't find anything about loading extensions other than what to do in the IDE. How do you load extensions to LC Server ?  On a shared web provider ?  (on-rev) Thanks, Alex > > Ralf > > > > On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >> >> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>> [ ... about using JSON ... ] >>> But if you don't need interoperability, you wouldn't need to write a >>> parser, since LC includes a good one built into the engine. >>> >>> What did I miss? >>> >> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >> >> The parser "built-in" seems to work fine in the IDE, but not on the >> server : >> >>> >> set the errormode to inline >>> put the version >>> >>> put "{'name':'asdf'}" into t >>> replace "'" with quote in t >>> put JSONtoarray(t) into tA >>> put the keys of tA >>> >> fails with - >> >> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>    row 7, col 5: Function: error in function handler (JSONtoarray) >>    row 7, col 5: put: error in expression >> >> (there's no mention of any platform restricitons in the dictionary). >> >> I tried copying in the sample ode for wrapping JSONToArray around >> mergJSONDecode, >> which then fails with "error in function handler mergJSONDecode. >> >> >> (I must admit I encountered this a while ago, figured it was probably >> a temporary issue >> so I replaced JSON by LSON, and forgot all about it.) This discussion >> prompted me to re-try it. >> >> I can't believe this problem isn't causing widespread problems, so >> it's probably >> something specific about me, or my on-rev account. If anyone has >> suggestions, I'll >> try them; if not, I'll put it as a bug report into QCC see what happens. >> >> Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 23 08:41:38 2022 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 23 Jun 2022 08:41:38 -0400 Subject: How to color a "cell"? In-Reply-To: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> References: <976f9c90-f505-4e5d-c8f9-af5c5cbd7452@fourthworld.com> Message-ID: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Richard. I think this was discussed on the forum a while back. I do not believe you can do what you want without another control overlying the “rect” of the “cell”. Craig > On Jun 22, 2022, at 8:11 PM, Richard Gaskin via use-livecode wrote: > > I need to set the backgroundColor of a complete "cell", where "cell" is > defined as the portion of a row in a table field between tabs when the > vGrid is set. > > I had hoped the paragraph-level formatting options introduced in v5.x would help, but alas as far as I can tell I can only set the backgroundColor of a run of text, not the full cell. > > Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY? > > (Pardon the all-caps, but I can come up with many workarounds that include other objects, but I really need something here that works with one field object and nothing else.) > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 23 12:08:20 2022 From: mkoob at rogers.com (Martin Koob) Date: Thu, 23 Jun 2022 12:08:20 -0400 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <60FF3160-6D3C-40B7-9785-F34E439A4CA6@rogers.com> Hi There is a confirmed bug in bugzilla regarding loading of the mergJSON library. https://quality.livecode.com/show_bug.cgi?id=21223 I ran into it when building a standalone. I didn’t cause a problem in the IDE. In the standalone settings ‘Inclusions’ tab if I chose 'Search for required inclusions when saving the standalone application’ The app would not work properly when those commands were called. The work around is in the Inclusions tab choose 'Select inclusions for the standalone application' And then manually select the inclusion for mergJSON I reported the bug but it was marked a duplicate. I describe my workaround there. https://quality.livecode.com/show_bug.cgi?id=23736 I also have a demo stack showing the problem there. Also check if you have a 32 or 64 bit version of mergJSON. I have had mergJSON installed for a long time and while I was trying to trouble shoot this issue I found I had a few copies of mergJSON in the My LiveCode folder in different locations. I found one was created in 2013 which I think was 32 bit so I removed that and replaced it with one in another location created in 2019. Martin > On Jun 23, 2022, at 8:23 AM, Alex Tweedly via use-livecode wrote: > > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode" > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-). > > I can't find anything about loading extensions other than what to do in the IDE. > > How do you load extensions to LC Server ? On a shared web provider ? (on-rev) > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>> row 7, col 5: Function: error in function handler (JSONtoarray) >>> row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so it's probably >>> something specific about me, or my on-rev account. If anyone has suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From rabit at revigniter.com Thu Jun 23 12:48:05 2022 From: rabit at revigniter.com (Ralf Bitter) Date: Thu, 23 Jun 2022 18:48:05 +0200 Subject: arrayencode In-Reply-To: <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: On 23.06.22 14:23, Alex Tweedly via use-livecode wrote: > > On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: >> Hi Alex, >> >> the JSONtoArray() function is part of the mergJSON external. >> The README of this external describes how to use this function >> and it's counterpart JSONtoArray as follows: >> > Thanks Ralf. I did see that code in the dictionary - but it also says > that those functions are provided in > thews.goulding.script-library.mergjson library, so (I think) I shouldn't > need to put them in myself. > > In fact, I did try it anyway - but that simply changes the error to > "handler not found: mergJSONDecode" Hi Alex, have you added the mergJSON External to your server installation? I have just tested this again, actually it should work. My LC Server version is 9.6.6. > >> Another option would be to load the JSON extension and to use >> the JsonImport() function. >> > Didn't know about jsonImport; it's not mentioned in the dictionary, but > I now see it shows up in a few lessons, etc. > > However,I think the real problem for me is "... to load the JSON > extension ...". I wasn't aware I had to load those extensions which are > already part of the standard package (maybe I did that years ago and > have had time to forget :-). > > I can't find anything about loading extensions other than what to do in > the IDE. > > How do you load extensions to LC Server ?  On a shared web provider ? > (on-rev) You guessed it, use "load extension", example (tested on on-rev): load extension from file "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" Ralf > > Thanks, > Alex > >> >> Ralf >> >> >> >> On 23.06.22 01:31, Alex Tweedly via use-livecode wrote: >>> >>> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >>>> [ ... about using JSON ... ] >>>> But if you don't need interoperability, you wouldn't need to write a >>>> parser, since LC includes a good one built into the engine. >>>> >>>> What did I miss? >>>> >>> The fact that Livecode's support for JSON is, hmmm, mediocre at best ?? >>> >>> The parser "built-in" seems to work fine in the IDE, but not on the >>> server : >>> >>>> >>> set the errormode to inline >>>> put the version >>>> >>>> put "{'name':'asdf'}" into t >>>> replace "'" with quote in t >>>> put JSONtoarray(t) into tA >>>> put the keys of tA >>>> >>> fails with - >>> >>> file "/home/alextwee/public_html/rampuk/tJSON.lc" >>>    row 7, col 5: Function: error in function handler (JSONtoarray) >>>    row 7, col 5: put: error in expression >>> >>> (there's no mention of any platform restricitons in the dictionary). >>> >>> I tried copying in the sample ode for wrapping JSONToArray around >>> mergJSONDecode, >>> which then fails with "error in function handler mergJSONDecode. >>> >>> >>> (I must admit I encountered this a while ago, figured it was probably >>> a temporary issue >>> so I replaced JSON by LSON, and forgot all about it.) This discussion >>> prompted me to re-try it. >>> >>> I can't believe this problem isn't causing widespread problems, so >>> it's probably >>> something specific about me, or my on-rev account. If anyone has >>> suggestions, I'll >>> try them; if not, I'll put it as a bug report into QCC see what happens. >>> >>> Alex. From jacque at hyperactivesw.com Thu Jun 23 12:59:02 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 11:59:02 -0500 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 22, 2022 8:14:45 PM Mike Kerner via use-livecode wrote: > All of these behaviors are in script-only-stacks. I have zero difficulty > debugging them with the remote debugger. From bobsneidar at iotecdigital.com Thu Jun 23 13:03:32 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:03:32 +0000 Subject: Stylistic question. In-Reply-To: <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints are working for me. Try Clear All Breakpoints from the SE Debug menu (I think it will only clear breakpoints from open scripts though.) Also in the SE under the Breakpoints tab, you can uncheck all the existing breakpoints. Bob S > On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode wrote: > > Something must have changed or you use a debugging method different from mine. Red dot breakpoints do not work in script only stacks because those stacks have no custom properties, which is where breakpoints are kept. I couldn't get scripted breakpoints to work either but I may have forgotten to save correctly. > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com From jacque at hyperactivesw.com Thu Jun 23 13:25:15 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 12:25:15 -0500 Subject: Stylistic question. In-Reply-To: <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> Message-ID: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On June 23, 2022 12:05:27 PM Bob Sneidar via use-livecode wrote: > Hi Jacqueline. I use script only stacks a LOT, and the red dot breakpoints > are working for me. Try Clear All Breakpoints from the SE Debug menu (I > think it will only clear breakpoints from open scripts though.) Also in the > SE under the Breakpoints tab, you can uncheck all the existing breakpoints. > > Bob S > > >> On Jun 23, 2022, at 09:59 , J. Landman Gay via use-livecode >> wrote: >> >> Something must have changed or you use a debugging method different from >> mine. Red dot breakpoints do not work in script only stacks because those >> stacks have no custom properties, which is where breakpoints are kept. I >> couldn't get scripted breakpoints to work either but I may have forgotten >> to save correctly. >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Thu Jun 23 13:33:48 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:33:48 +0000 Subject: Stylistic question. In-Reply-To: <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: OIC I didn't grok you were talking about standalone apps. Bob S > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode wrote: > > Breakpoints work fine in the IDE. But script only stacks do not retain them when remote debugging, or at least they didn't for me. Are you talking about mobile apps? > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Thu Jun 23 13:56:42 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 23 Jun 2022 17:56:42 +0000 Subject: Using card with the long id in a variable Message-ID: <7818011F-8B59-4A15-8A19-9FEB80150E3C@iotecdigital.com> Hi all. I just ran across an interesting "bug". In the IDE I had erroneously used the keyword "card" with a reference to the long id of the card as in card pParentCard. Since the long id already contains the keyword card it resolved to card "card ID 12345 of stack x of stacks". The strange thing is that in the IDE this worked and did not throw an error. But in a standalone it did. Of course, the proper retort would be, "Well that don't do that." Bob S From ambassador at fourthworld.com Thu Jun 23 14:28:29 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 11:28:29 -0700 Subject: How to color a "cell"? In-Reply-To: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> Message-ID: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Craig wrote: > Richard wrote: >> I had hoped the paragraph-level formatting options introduced in >> v5.x would help, but alas as far as I can tell I can only set the >> backgroundColor of a run of text, not the full cell. > > I think this was discussed on the forum a while back. I do not believe > you can do what you want without another control overlying the rect > of the cell. Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. From the v5.5.4 Release Notes: - The backgroundColor property allows the color of the content area (inside any paragraph border) to be filled (note that strictly speaking this property is not inherited, but the effect is the same as if it was as the background of the field is rendered before the paragraphs are so the background color at the field level will show through to the paragraph if the paragraph has no background color). - The borderWidth property determines the width of the border to draw around the paragraph. Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. I was hoping I was just using it wrong. Here's how I set it in my tests: set the backgroundcolor of paragraph 2 of fld 1 to yellow Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From jacque at hyperactivesw.com Thu Jun 23 14:57:45 2022 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 23 Jun 2022 13:57:45 -0500 Subject: Error message that vector icon widget missing when building iOS standalone In-Reply-To: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> References: <0E106B39-08CF-4289-B5DB-0E3709530F02@m-r-d.de> Message-ID: On 6/22/22 10:10 AM, matthias rebbe via use-livecode wrote: > I've reinstallled the Vectore Icon widget again and the build process was successful. > Then i've unloaded the widget and rebuild the standalone again and the build was also successful. > > But as soon as i uninstall that widget i get that error. > > > Does anyone have an idea where i can search the complete stack and its substacks for that widget? > > > Btw.: For what exactly is that widget. To be honest i don't have a clue. I think that's the SVG widget that allows you to use SVG as button icons, or any other image. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From alex at tweedly.net Thu Jun 23 15:26:11 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:26:11 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <6DF1F53E-CCF2-4072-A287-27F51A445428@starfirelighting.com> <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: <411f4bc7-f62f-b844-0653-438476acd6e9@tweedly.net> On 23/06/2022 19:28, Richard Gaskin via use-livecode wrote: > > Thanks. I could get away with setting the backgroundColor of the whole > line, but that does the same as setting the backgroundColor of a > "cell": it draws the color only beneath the portion of the line that > contains text, leaving the rest blank. > Hmmmm - is there a non-visible character that would count as text ? then you could replace all spaces by it, and adjust back later. Alex From alex at tweedly.net Thu Jun 23 15:53:57 2022 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 23 Jun 2022 20:53:57 +0100 Subject: arrayencode In-Reply-To: References: <54e5e439-2de9-9c0a-996a-c08e14d2f9bb@fourthworld.com> <2e3ee68c-1bba-e926-0ecd-cfea2e0bb898@tweedly.net> Message-ID: <19c90254-7a32-bae1-f6bc-e5830d41b1b3@tweedly.net> On 23/06/2022 17:48, Ralf Bitter via use-livecode wrote: > > Hi Alex, have you added the mergJSON External to your server installation? No. In fact, I didn't realize I needed to, or even could :-) > You guessed it, use "load extension", example (tested on on-rev): > > load extension from file > "/home/rabit/public_html/ritest/application/extensions/com.livecode.library.json/module.lcm" > Well, I finally found that file, buried inside the Livecode Application bundle (inside Tools of all places). I don't know how anyone not familiar with command line tools would ever get there. And having uploaded it and then loaded it, JSONImport works !! Thank you Ralf for sticking with me patiently, and everyone else for their help. Now - back to that quick 5-minute test I was going to do 1-1/2 days ago :-( Alex. From mark at livecode.com Thu Jun 23 15:54:55 2022 From: mark at livecode.com (Mark Waddingham) Date: Thu, 23 Jun 2022 20:54:55 +0100 Subject: How to color a "cell"? In-Reply-To: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> References: <78f2bcb2-4b2c-02bf-a5eb-a58e81c1ead6@fourthworld.com> Message-ID: IIRC you need to use ‘line’ to set ‘paragraph‘ properties of fields… Sent from my iPhone > On 23 Jun 2022, at 19:29, Richard Gaskin via use-livecode wrote: > > Craig wrote: > > > Richard wrote: > >> I had hoped the paragraph-level formatting options introduced in > >> v5.x would help, but alas as far as I can tell I can only set the > >> backgroundColor of a run of text, not the full cell. > > > > I think this was discussed on the forum a while back. I do not believe > > you can do what you want without another control overlying the “rect” > > of the “cell”. > > Thanks. I could get away with setting the backgroundColor of the whole line, but that does the same as setting the backgroundColor of a "cell": it draws the color only beneath the portion of the line that contains text, leaving the rest blank. > > The borderWidth and borderColor paragraph properties work as expected, affecting the full line whether it's filled with text or has no text at all. > > But backgroundColor as a paragraph setting feels broken, as it works the same as setting that property for a chunk rather than for the field. > > From the v5.5.4 Release Notes: > > - The backgroundColor property allows the color of the content area > (inside any paragraph border) to be filled (note that strictly > speaking this property is not inherited, but the effect is the same > as if it was as the background of the field is rendered before the > paragraphs are so the background color at the field level will > ‘show through’ to the paragraph if the paragraph has no background > color). > > - The borderWidth property determines the width of the border to draw > around the paragraph. > > Pretty much all the other paragraph-level formatting options work just their their field-level counterparts, but of course limited to the specified paragraph. > > So I'm surprised the backgroundColor was added in such a way that it appears to do nothing we didn't already have with setting backgroundColor of chunks. > > I was hoping I was just using it wrong. > > Here's how I set it in my tests: > > set the backgroundcolor of paragraph 2 of fld 1 to yellow > > Unless there's a different syntax I should be using, it would appear the paragraph-level implementation of backgroundColor is unfinished, no? > > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Thu Jun 23 18:54:52 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 15:54:52 -0700 Subject: How to color a "cell"? In-Reply-To: References: Message-ID: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Thanks Mark - works. I could have sworn I'd tried "line" earlier when attempting to set the backgroundColor, and when it failed was when I switched to trying "paragraph". But it works now so I don't mind being mistaken. Oddly, "paragraph" appears to be synonymous with "line" for the borderWidth, borderColor, firstIndent, leftIndent, textAlign, spaceAbove, hGrid, vGrid, and tabs paragraph properties. Near as I can tell backgroundColor is the only paragraph properties where the "paragraph" chunk type isn't synonymous. Should it be? I'm good either way now that I have a solution, but if it would be helpful I could file a bug report/enhancement request. -- Richard Gaskin Fourth World Systems Mark Waddingham wrote: > IIRC you need to use line to set paragraph properties of fields > > On 23 Jun 2022, at 19:29, Richard Gaskin wrote: >> I could get away with setting the backgroundColor of the whole line, >> but that does the same as setting the backgroundColor of a "cell": it >> draws the color only beneath the portion of the line that contains >> text, leaving the rest blank. >> >> The borderWidth and borderColor paragraph properties work as >> expected, affecting the full line whether it's filled with text >> or has no text at all. From MikeKerner at roadrunner.com Thu Jun 23 19:59:58 2022 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 23 Jun 2022 19:59:58 -0400 Subject: Stylistic question. In-Reply-To: References: <1818ceeb0b0.276f.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <1819180bbf0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <77E8B7F6-F1A5-49AD-87EC-36200D4B68FA@iotecdigital.com> <1819198bc78.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Red-dotting: A couple of things: 1) I don't use the SE very often, so I have not tried red-dotting before building. However, "BREAKPOINT" works. 2) Once you have the remote debugger up, you can red-dot all you like, and they will stick until the app closes 3) When I'm debugging (like I am, tonight), I have a group of debugging buttons that I have show in the app. One of those is just on mouseUp global lastCommand ask "What" with lastCommand if it is not empty then put it into lastCommand do it end if end mouseUp When the dialog pops up, I type something like breakpoint; send "mouseUp" to someControl and I'm in the debugger, in that control On Thu, Jun 23, 2022 at 1:34 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > OIC I didn't grok you were talking about standalone apps. > > Bob S > > > > On Jun 23, 2022, at 10:25 , J. Landman Gay via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Breakpoints work fine in the IDE. But script only stacks do not retain > them when remote debugging, or at least they didn't for me. Are you talking > about mobile apps? > > -- > > Jacqueline Landman Gay | jacque at hyperactivesw.com > > HyperActive Software | http://www.hyperactivesw.com > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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." From ambassador at fourthworld.com Thu Jun 23 23:40:26 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 23 Jun 2022 20:40:26 -0700 Subject: Stylistic question. In-Reply-To: References: Message-ID: <6914ec36-b1aa-9a4b-07b8-ffd94924c932@fourthworld.com> J. Landman Gay wrote: > Breakpoints work fine in the IDE. But script only stacks do not > retain them when remote debugging Breakpoints are a runtime-settable property, so those who enjoy C-flavored workflows with lots of tiny text files could save their breakpoints out to text files and have a module load them in again at runtime. Maybe that could be added to any of the tools that turn normal stackfiles into script-only stack files and back again so they can be worked on. Then we could add a tool to handle custom props, turning those into JSON files and back again. Then the UI stuff could still be binary like it is with Apple's tools, and as long as we don't call them stackfiles but call them NIBs instead then it's cool again. :) ::ducking:: #FaFaFaFashion -- Richard Gaskin Fourth World Systems From mark at livecode.com Fri Jun 24 01:24:39 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 06:24:39 +0100 Subject: How to color a "cell"? In-Reply-To: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> References: <2d815688-0cea-e918-e8d5-66c1b66d13d4@fourthworld.com> Message-ID: <7d81320c68d6cb9c4d54323aa381c6d0@livecode.com> On 2022-06-23 23:54, Richard Gaskin via use-livecode wrote: > Thanks Mark - works. I could have sworn I'd tried "line" earlier when > attempting to set the backgroundColor, and when it failed was when I > switched to trying "paragraph". But it works now so I don't mind being > mistaken. > > Oddly, "paragraph" appears to be synonymous with "line" for the > borderWidth, borderColor, firstIndent, leftIndent, textAlign, > spaceAbove, hGrid, vGrid, and tabs paragraph properties. I suspect you have dontWrap set and possibly 'table-mode'. > Near as I can tell backgroundColor is the only paragraph properties > where the "paragraph" chunk type isn't synonymous. If you check the htmlText you can easily see the difference between using 'paragraph' and 'line' to set the aforementioned properties. When set on 'line' - the properties appear on the 'p' tags, and they have an effect on a per (wrapped) paragraph basis. When set on *all other string chunks* (which reduce to char chunks) - the properties appear as runs in the 'p' tags, and they have an effect on runs of text. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From paul at researchware.com Fri Jun 24 11:07:19 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 11:07:19 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? Message-ID: I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? If interested, please email me directly. From merakosp at gmail.com Fri Jun 24 11:27:19 2022 From: merakosp at gmail.com (panagiotis m) Date: Fri, 24 Jun 2022 18:27:19 +0300 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Hello Paul Not a ffmpeg expert, but have you seen the mediaFoundation library? See the dictionary entry for "mediaFoundationTranscode" - it has a detailed example for concatenating 2 media files. Hope this helps Kind regards, Panos -- On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < use-livecode at lists.runrev.com> wrote: > I am doing some work with Livecode script constructing calls (via > shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there > are any people proficient with ffmpeg wh might be interesting in a small > bit of paid consulting to help with ffmpeg command line syntax for > various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Fri Jun 24 11:36:32 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Fri, 24 Jun 2022 17:36:32 +0200 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: <49123771-6CD7-43CE-8B2E-38DE13F90A67@m-r-d.de> In one of my projects i do use ffmpeg for some audio conversion and id3 tag handling. For me the tool ff-Works (https://ffworks.net) helped me a lot. Normally its a GUI for ffmpeg, but the good thing is the user is also able to see the command line that was used for a task. So in case no one other jumps in and if you are on Mac maybe this tool is also of help for you, i Regards, Matthias > Am 24.06.2022 um 17:07 schrieb Paul Dupuis via use-livecode : > > I am doing some work with Livecode script constructing calls (via shell()) to ffmpeg to perform some video/audio concatenation. > > I have barely learned a tiny bit of ffmpeg and and wondering if there are any people proficient with ffmpeg wh might be interesting in a small bit of paid consulting to help with ffmpeg command line syntax for various operations? > > If interested, please email me directly. > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 24 12:05:44 2022 From: paul at researchware.com (Paul Dupuis) Date: Fri, 24 Jun 2022 12:05:44 -0400 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: Panos, Thank you! I was unaware of the mediaFoundation library - I had thought that we'd not see support under LiveCode 10 switches from DirectShow to MediaFoundation. That said, our application is macOS and Windows and the appeal of ffmpeg via shell is that the same code will work across platforms for us. Still, for other projects, I'm very happy to have been made aware of the mediaFoundation library! On 6/24/2022 11:27 AM, panagiotis m via use-livecode wrote: > Hello Paul > > Not a ffmpeg expert, but have you seen the mediaFoundation library? See the > dictionary entry for "mediaFoundationTranscode" - it has a detailed example > for concatenating 2 media files. > > Hope this helps > > Kind regards, > Panos > -- > > On Fri, 24 Jun 2022 at 18:08, Paul Dupuis via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I am doing some work with Livecode script constructing calls (via >> shell()) to ffmpeg to perform some video/audio concatenation. >> >> I have barely learned a tiny bit of ffmpeg and and wondering if there >> are any people proficient with ffmpeg wh might be interesting in a small >> bit of paid consulting to help with ffmpeg command line syntax for >> various operations? >> >> If interested, please email me directly. >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Fri Jun 24 12:23:02 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 17:23:02 +0100 Subject: {OT} Are there any ffmpeg "experts" on this list? In-Reply-To: References: Message-ID: On 2022-06-24 17:05, Paul Dupuis via use-livecode wrote: > I was unaware of the mediaFoundation library - I had thought that we'd > not see support under LiveCode 10 switches from DirectShow to > MediaFoundation. Its actually been buried in the product (business/pro features) for a long time - I had forgotten about it until relatively recently... > That said, our application is macOS and Windows and the appeal of > ffmpeg via shell is that the same code will work across platforms for > us. FWIW, I *think* mergAV can do similar things on macOS* to the mediafoundation external on Windows - although the APIs, while similar, do require different code. However, if you are using ffmpeg for things other than concatenating tracks/movies (i.e. the features those libraries provide) then the separate code needed wouldn't be worth it to save inclusion of ffmpeg. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Fri Jun 24 13:04:06 2022 From: mark at livecode.com (Mark Waddingham) Date: Fri, 24 Jun 2022 18:04:06 +0100 Subject: On API keys... Message-ID: <37140621287f3c6183bbebf49e4da698@livecode.com> So this is mainly aimed at Tom Glod due to a question he asked in this afternoon's Feature Focus session which I perhaps did not answer particularly well (and given that it is security related, I figured I should expand on what I said). The question was whether putting an API Key as a LiveCode 'constant', rather than anything else, made it 'more secure' - the answer is 'no more than putting it anywhere else in a password protected script'. However, what I should have probably expanded on is what my understanding on the best practice for API keys in general is... I have come across three kinds of API key in practice: 1) API keys intended to be used from web pages (in client-side code) 2) API keys intended to be used in deployed apps 3) API keys intended to be used for doing secure things How I would advise using them (based on my current understanding, at least) is: TYPE 1 In (1) above you have things like Google Analytics 'product ids' (which aren't strictly API keys I guess, but are similar enough to warrant inclusion) and Google Maps JS keys. As these are intended to be used in client side JavaScript - there is very little, if anything, you can do to protect them directly. For Analytics, since the worse that can happen is that someone can generate fake analytics it doesn't really matter - and the data can be relatively easily filtered and processed to eliminate any dodgy looking submissions. For Maps, it can cost you money if someone else tries to use yours - however, you can restrict the key by the referring website and IP addresses, as well as what the key can do. TYPE 2 In (2) you have things like Google Maps App keys (for Android/iOS) - and all manner of other 'cloud type' services which have (native) app bindings for mobile (and desktop). Many services offer restrictions for these keys too - for example Google Services API keys can be restricted by Android app signing hashes and ids, and iOS app bundle ids. However, in general, these services generally suggest that you ensure that the API key is not extractable directly from the app bundle (after decompressing in general) - i.e. that the key be obfuscated in some fashion and does not appear in plaintext. It is important to note that they do not require any more than this because, at the end of the day, any API key has to be in memory at some point, and indeed has to be transmitted 'over the wire'. If someone has enough access to access memory, then they have enough access to intercept the HTTP requests (even if encrypted - if they really know what they are doing) so obfuscating in the on-disk files of the app is as good as you can get. If these keys are compromised then it is a pain - it might cost you money (as all these services which have them tend to charge by use) - and, if embedded in an app, will require an app update to replace. TYPE 3 Certain services require (sometimes in the TOS!) that their API keys *never* leave a secure bubble which you control - this means they must never appear in deployed apps or in files transmitted to the browser. Payment gateway API keys will pretty much always fall into this category - Stripe is a good example. The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. Indeed, services which require this tend to design their APIs for the intention of being used on a server. WHAT TO DO IN LIVECODE If you are dealing with a type 1 key then you really don't have to worry - they are designed to be used in a context which offers zero ability to protect them, so including them in a deployed app (in particular) is more secure out of the gate than in their intended use in a webpage. [ Of course, whether you are actually *allowed* to use their services from anything other than websites is another matter - and entirely defined by their TOS - but I digress! ] If you are dealing with a type 2 key then the requirements put on their use in deployed (native) apps is more than catered for by having the key in script, in a password protected stack - for example, as a constant return value of a function, or indeed as a constant defined in the script which is talking to the API. With this, the key will not appear in plaintext in any of the files included in the built app (even after the container is unzipped). [ I should note here that custom properties values also do not appear in plaintext in any of the files of a built app - however, having them in a password protected script offers an extra level of protection ]. If you are dealing with a type 3 key then you must only use that key via a server - this means you need to set up server side scripts which your app then talks to via a suitable protocol (e.g. HTTP / REST) to perform the operations which use it. The key must never be sent over the wire between your app and the server as this could be intercepted by someone who is using your app locally. BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN Of course, the most secure way to use API keys of all types is to have them only ever on a server - however, this is only really suitable if your app is 'always online' and you can do all operations on the server - many services this doesn't work, e.g. Google Maps. However, there is a reasonable middle ground which offers a little more security (and convenience, in the case of compromise!). If your app can only be used by a user *after* they login locally then the best practice for type 1 and type 2 keys (as mentioned previously type 3 keys must NEVER leave your server!) is to not store the keys in the deployed app at all. Instead, once the user has successfully authenticated have the server send the API keys the app needs to use. You can either do this once per session, or if your app allows 'offline' use as long as they have signed in before (on mobile) you can use something like the 'secureKey' library to store them in the mobile devices 'trusted' store. This approach has two main benefits: 1) The API keys are never actually in a file someone can sit and dissect at will (even obfuscated, there are some very persistent bad actors out there!) 2) If your API key is compromised (or you do need to change it, for whatever reason) you can do so without having to have everyone install an app update with the new one in. Anyway, that's probably more than Tom probably needed to know (or perhaps knew already), but hopefully it is helpful (at least for those who have to deal with API keys and such things!). Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From tom at makeshyft.com Fri Jun 24 13:40:22 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 13:40:22 -0400 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: Mark, thanks for taking the time to give this in-depth answer. This will come in handy for others as well I am sure. Have a great weekend. Tom On Fri, Jun 24, 2022 at 1:04 PM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > So this is mainly aimed at Tom Glod due to a question he asked in this > afternoon's Feature Focus session which I perhaps did not answer > particularly well (and given that it is security related, I figured I > should expand on what I said). > > The question was whether putting an API Key as a LiveCode 'constant', > rather than anything else, made it 'more secure' - the answer is 'no > more than putting it anywhere else in a password protected script'. > > However, what I should have probably expanded on is what my > understanding on the best practice for API keys in general is... > > I have come across three kinds of API key in practice: > > 1) API keys intended to be used from web pages (in client-side code) > > 2) API keys intended to be used in deployed apps > > 3) API keys intended to be used for doing secure things > > How I would advise using them (based on my current understanding, at > least) is: > > TYPE 1 > > In (1) above you have things like Google Analytics 'product ids' (which > aren't strictly API keys I guess, but are similar enough to warrant > inclusion) and Google Maps JS keys. > > As these are intended to be used in client side JavaScript - there is > very little, if anything, you can do to protect them directly. > > For Analytics, since the worse that can happen is that someone can > generate fake analytics it doesn't really matter - and the data can be > relatively easily filtered and processed to eliminate any dodgy looking > submissions. > > For Maps, it can cost you money if someone else tries to use yours - > however, you can restrict the key by the referring website and IP > addresses, as well as what the key can do. > > TYPE 2 > > In (2) you have things like Google Maps App keys (for Android/iOS) - and > all manner of other 'cloud type' services which have (native) app > bindings for mobile (and desktop). > > Many services offer restrictions for these keys too - for example Google > Services API keys can be restricted by Android app signing hashes and > ids, and iOS app bundle ids. > > However, in general, these services generally suggest that you ensure > that the API key is not extractable directly from the app bundle (after > decompressing in general) - i.e. that the key be obfuscated in some > fashion and does not appear in plaintext. > > It is important to note that they do not require any more than this > because, at the end of the day, any API key has to be in memory at some > point, and indeed has to be transmitted 'over the wire'. If someone has > enough access to access memory, then they have enough access to > intercept the HTTP requests (even if encrypted - if they really know > what they are doing) so obfuscating in the on-disk files of the app is > as good as you can get. > > If these keys are compromised then it is a pain - it might cost you > money (as all these services which have them tend to charge by use) - > and, if embedded in an app, will require an app update to replace. > > TYPE 3 > > Certain services require (sometimes in the TOS!) that their API keys > *never* leave a secure bubble which you control - this means they must > never appear in deployed apps or in files transmitted to the browser. > Payment gateway API keys will pretty much always fall into this category > - Stripe is a good example. > > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. > > Indeed, services which require this tend to design their APIs for the > intention of being used on a server. > > WHAT TO DO IN LIVECODE > > If you are dealing with a type 1 key then you really don't have to worry > - they are designed to be used in a context which offers zero ability to > protect them, so including them in a deployed app (in particular) is > more secure out of the gate than in their intended use in a webpage. > > [ Of course, whether you are actually *allowed* to use their services > from anything other than websites is another matter - and entirely > defined by their TOS - but I digress! ] > > If you are dealing with a type 2 key then the requirements put on their > use in deployed (native) apps is more than catered for by having the key > in script, in a password protected stack - for example, as a constant > return value of a function, or indeed as a constant defined in the > script which is talking to the API. With this, the key will not appear > in plaintext in any of the files included in the built app (even after > the container is unzipped). > > [ I should note here that custom properties values also do not appear in > plaintext in any of the files of a built app - however, having them in a > password protected script offers an extra level of protection ]. > > If you are dealing with a type 3 key then you must only use that key via > a server - this means you need to set up server side scripts which your > app then talks to via a suitable protocol (e.g. HTTP / REST) to perform > the operations which use it. The key must never be sent over the wire > between your app and the server as this could be intercepted by someone > who is using your app locally. > > BEST PRACTICE FOR APPS WHICH REQUIRE USER LOGIN > > Of course, the most secure way to use API keys of all types is to have > them only ever on a server - however, this is only really suitable if > your app is 'always online' and you can do all operations on the server > - many services this doesn't work, e.g. Google Maps. However, there is a > reasonable middle ground which offers a little more security (and > convenience, in the case of compromise!). > > If your app can only be used by a user *after* they login locally then > the best practice for type 1 and type 2 keys (as mentioned previously > type 3 keys must NEVER leave your server!) is to not store the keys in > the deployed app at all. > > Instead, once the user has successfully authenticated have the server > send the API keys the app needs to use. You can either do this once per > session, or if your app allows 'offline' use as long as they have signed > in before (on mobile) you can use something like the 'secureKey' library > to store them in the mobile devices 'trusted' store. > > This approach has two main benefits: > > 1) The API keys are never actually in a file someone can sit and > dissect at will (even obfuscated, there are some very persistent bad > actors out there!) > > 2) If your API key is compromised (or you do need to change it, for > whatever reason) you can do so without having to have everyone install > an app update with the new one in. > > Anyway, that's probably more than Tom probably needed to know (or > perhaps knew already), but hopefully it is helpful (at least for those > who have to deal with API keys and such things!). > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ahsoftware at sonic.net Fri Jun 24 16:21:10 2022 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 24 Jun 2022 13:21:10 -0700 Subject: On API keys... In-Reply-To: <37140621287f3c6183bbebf49e4da698@livecode.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> Message-ID: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users > - usually the web-server user which is running the backend scripts which > needs to make the requests. Or as server environment variables retrieved only by server scripts which are not user-accessible. -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Fri Jun 24 18:23:04 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 24 Jun 2022 22:23:04 +0000 Subject: On API keys... In-Reply-To: <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> Message-ID: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay on the risk, benefits and rewards in multiple scenarios concerning the storage of keys. I’ve mentioned before that I came up with the idea of “poisoning” the encrypted data before the data was transmitted. If intercepted in transit, the data itself could never be decrypted without knowing how it was poisoned and what was needed to “cleanse” it. And that would require access to either the API of the device doing the corruption or the cleansing, or else someone who knew the method. By using this method, all but physical and social vectors are nullified. And control of those vectors is an illusion. Bob S Sent from my iPhone > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode wrote: > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > >> The only way to use these keys is from server scripts running on a server which you do your best to maintain the security of. Ideally these keys should be stored in files which are only readable by specific users - usually the web-server user which is running the backend scripts which needs to make the requests. > > Or as server environment variables retrieved only by server scripts which are not user-accessible. > > -- > Mark Wieder > ahsoftware at gmail.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Fri Jun 24 23:34:25 2022 From: tom at makeshyft.com (Tom Glod) Date: Fri, 24 Jun 2022 23:34:25 -0400 Subject: On API keys... In-Reply-To: <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: This is a great best-practice explanation. Perhaps someone can turn it into a blog post and put it on the site. Thanks again On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay > on the risk, benefits and rewards in multiple scenarios concerning the > storage of keys. I’ve mentioned before that I came up with the idea of > “poisoning” the encrypted data before the data was transmitted. If > intercepted in transit, the data itself could never be decrypted without > knowing how it was poisoned and what was needed to “cleanse” it. And that > would require access to either the API of the device doing the corruption > or the cleansing, or else someone who knew the method. > > By using this method, all but physical and social vectors are nullified. > And control of those vectors is an illusion. > > Bob S > > Sent from my iPhone > > > On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: > > > >> The only way to use these keys is from server scripts running on a > server which you do your best to maintain the security of. Ideally these > keys should be stored in files which are only readable by specific users - > usually the web-server user which is running the backend scripts which > needs to make the requests. > > > > Or as server environment variables retrieved only by server scripts > which are not user-accessible. > > > > -- > > Mark Wieder > > ahsoftware at gmail.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From matthias_livecode_150811 at m-r-d.de Mon Jun 27 08:26:49 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 14:26:49 +0200 Subject: Is Anyone on the list still using macOS 10.11? Message-ID: Hi, is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. The apps are just with one answer dialog. There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). The results of the testing would me help to enhance my LC Notarizing lesson. Regards, Matthias From harrison at all-auctions.com Mon Jun 27 09:55:07 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 09:55:07 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Hi Matthias, macOS 10.11 El Capitan? You shouldn’t be testing with that at all. It’s 6-7 years out of date now. What kind of testing do you need? Good luck! Rick > On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 10:14:38 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 16:14:38 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> Message-ID: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Hi Rick, it's even older. I meant 10.10 (Yosemite). ;) I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. And i just need a confirmation, if that's the case Regards, Matthias > Am 27.06.2022 um 15:55 schrieb Rick Harrison via use-livecode : > > Hi Matthias, > > macOS 10.11 El Capitan? > > You shouldn’t be testing with that at all. It’s 6-7 years out of date now. > > What kind of testing do you need? > > Good luck! > > Rick > >> On Jun 27, 2022, at 8:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Mon Jun 27 10:15:08 2022 From: paul at researchware.com (Paul Dupuis) Date: Mon, 27 Jun 2022 10:15:08 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> I still have a system running High Sierra and one running El Capatan. I can test on either of those. On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From heather at livecode.com Mon Jun 27 11:03:46 2022 From: heather at livecode.com (Heather Laine) Date: Mon, 27 Jun 2022 16:03:46 +0100 Subject: On API keys... In-Reply-To: References: <37140621287f3c6183bbebf49e4da698@livecode.com> <747f241e-c46c-ac9e-fe8c-d1d6b533d708@sonic.net> <0C3BD20D-521B-46E2-89BE-6C3A07B5E5C9@iotecdigital.com> Message-ID: Yes indeed. See Blog. Best Regards, Heather Heather Laine Customer Services Manager LiveCode Ltd www.livecode.com > On 25 Jun 2022, at 04:34, Tom Glod via use-livecode wrote: > > This is a great best-practice explanation. Perhaps someone can turn it into > a blog post and put it on the site. > Thanks again > > > > On Fri, Jun 24, 2022 at 6:24 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Mr. (Or should I say Doctor) Waddingham! This is a really brilliant essay >> on the risk, benefits and rewards in multiple scenarios concerning the >> storage of keys. I’ve mentioned before that I came up with the idea of >> “poisoning” the encrypted data before the data was transmitted. If >> intercepted in transit, the data itself could never be decrypted without >> knowing how it was poisoned and what was needed to “cleanse” it. And that >> would require access to either the API of the device doing the corruption >> or the cleansing, or else someone who knew the method. >> >> By using this method, all but physical and social vectors are nullified. >> And control of those vectors is an illusion. >> >> Bob S >> >> Sent from my iPhone >> >>> On Jun 24, 2022, at 13:22, Mark Wieder via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> On 6/24/22 10:04, Mark Waddingham via use-livecode wrote: >>> >>>> The only way to use these keys is from server scripts running on a >> server which you do your best to maintain the security of. Ideally these >> keys should be stored in files which are only readable by specific users - >> usually the web-server user which is running the backend scripts which >> needs to make the requests. >>> >>> Or as server environment variables retrieved only by server scripts >> which are not user-accessible. >>> >>> -- >>> Mark Wieder >>> ahsoftware at gmail.com >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 11:28:07 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 15:28:07 +0000 Subject: Audio in Background Message-ID: Happy Monday! I am using the native player control (on both iOS and Android). It's working quite well! The only problem I have is that the background audio doesn't seem to honor this control. If I play audio in a native browser, it works. Is there something I need to set or do to get it to work? I have "Android Background Audio" selected in application settings and "Background Audio" checked in the "Requirements" panel. Thanks in advance! -Dan From merakosp at gmail.com Mon Jun 27 11:47:52 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:47:52 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From merakosp at gmail.com Mon Jun 27 11:50:30 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 18:50:30 +0300 Subject: Audio in Background In-Reply-To: References: Message-ID: Hello Dan, And probably you need to check "Background Audio" in the iOS standalone settings (in Requirements tab) Cheers, Panos -- On Mon, 27 Jun 2022 at 18:47, panagiotis m wrote: > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Happy Monday! I am using the native player control (on both iOS and >> Android). It's working quite well! The only problem I have is that the >> background audio doesn't seem to honor this control. If I play audio in a >> native browser, it works. Is there something I need to set or do to get >> it to work? I have "Android Background Audio" selected in application >> settings and "Background Audio" checked in the "Requirements" panel. >> >> Thanks in advance! >> -Dan >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From dan at clearvisiontech.com Mon Jun 27 12:25:27 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 16:25:27 +0000 Subject: Audio in Background In-Reply-To: References: Message-ID: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From merakosp at gmail.com Mon Jun 27 13:25:43 2022 From: merakosp at gmail.com (panagiotis m) Date: Mon, 27 Jun 2022 20:25:43 +0300 Subject: Audio in Background In-Reply-To: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman wrote: > Panos, > > Thank you... That fixed it! The audio continues when the app is sent to > the background. However, the application's audio does not appear in the > Control Center: > > > https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg > > Is this possible? > > > -Dan > > > On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via > use-livecode" use-livecode at lists.runrev.com> wrote: > > Hello Dan, > > On iOS, I think you have to add this line in your openStack handler (or > elsewhere): > > iphoneSetAudioCategory "playback" > > Kind regards, > Panos > -- > > On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Happy Monday! I am using the native player control (on both iOS and > > Android). It's working quite well! The only problem I have is > that the > > background audio doesn't seem to honor this control. If I play > audio in a > > native browser, it works. Is there something I need to set or do > to get > > it to work? I have "Android Background Audio" selected in > application > > settings and "Background Audio" checked in the "Requirements" panel. > > > > Thanks in advance! > > -Dan > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > From harrison at all-auctions.com Mon Jun 27 14:57:39 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Mon, 27 Jun 2022 14:57:39 -0400 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> References: <42A41CE5-2EB3-42CA-BDF9-4A7A767C89D5@all-auctions.com> <2907A763-19F4-418C-93C7-2B56E72340D9@m-r-d.de> Message-ID: Hi Matthias, Sorry, but I am no longer have Yosemite on any of my older Macs. Thanks for the clarification though. Hopefully someone can help you out with this. Cheers, Rick > On Jun 27, 2022, at 10:14 AM, matthias rebbe via use-livecode wrote: > > Hi Rick, > > it's even older. I meant 10.10 (Yosemite). ;) > > I would just send you a download link with a zip file. The zip file contains 2 or 3 app. I need to know which of the apps can be opened on 10.10. > > There seems to be a problem when a standalone was code sigend on a Mac with Apple cpu. Codesign then automatically uses SHA256, but macOS below 10.11 still needs the standalone to be code signed with SHA1. > There is a way to do this by telling codesign command not to automatically choose the algorithm, but to use instead SHA1 and SHA256. This should fix this. > > And i just need a confirmation, if that's the case > > > Regards, > Matthias From ambassador at fourthworld.com Mon Jun 27 15:00:47 2022 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 27 Jun 2022 12:00:47 -0700 Subject: On API keys... In-Reply-To: References: Message-ID: <978d1d63-2eeb-db2a-5ab4-4850339b8f26@fourthworld.com> Heather Laine wrote: > Tom Glod wrote: >> This is a great best-practice explanation. Perhaps someone can turn >> it into a blog post and put it on the site. > > Yes indeed. See Blog. https://livecode.com/best-practice-for-api-keys-and-security/ Tip: Dropping in-bound links to relevant content is a useful organization habit, making it easy for customers, prospects, and searchbots alike to discover the roads that lead to the site where the store lives. -- Richard Gaskin Fourth World Systems From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:09:04 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:09:04 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: Hi Paul, thanks for your offer. I have sent you a private email with the D/L link. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:15:00 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:15:00 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: I just noticed that High Sierra and El Capitan are higher then 10.10.... I need some one who can test with 10.10. thanks anyway. Regards, Matthias > Am 27.06.2022 um 21:09 schrieb matthias rebbe via use-livecode : > > Hi Paul, thanks for your offer. > > I have sent you a private email with the D/L link. > > Regards, > Matthias > > >> Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : >> >> I still have a system running High Sierra and one running El Capatan. I can test on either of those. >> >> >> On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >>> Hi, >>> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >>> The apps are just with one answer dialog. >>> >>> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >>> >>> The results of the testing would me help to enhance my LC Notarizing lesson. >>> >>> >>> Regards, >>> Matthias >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:18:14 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:18:14 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> References: <48830f91-be4c-13fb-3705-e2a74fbffd57@researchware.com> Message-ID: No worries, Rick, if i cannot find some one then i just need to setup a VM with Yosemite. Regards, Matthias > Am 27.06.2022 um 16:15 schrieb Paul Dupuis via use-livecode : > > I still have a system running High Sierra and one running El Capatan. I can test on either of those. > > > On 6/27/2022 8:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From phil at pdslabs.net Mon Jun 27 15:30:10 2022 From: phil at pdslabs.net (Phil Davis) Date: Mon, 27 Jun 2022 12:30:10 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: Hi Matthias, If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. Phil Davis On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Phil Davis (503) 307-4363 From matthias_livecode_150811 at m-r-d.de Mon Jun 27 15:49:29 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 21:49:29 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <5577AD36-D74B-4497-BAEA-720770934A41@m-r-d.de> Phil, thank you very much for your offer. I've sent you the D/L links in a private email. Regards, Matthias > Am 27.06.2022 um 21:30 schrieb Phil Davis via use-livecode : > > Hi Matthias, > > If you need another tester, one of my machines is an early 2009 Core 2 Duo mini running 10.10.5. > > Phil Davis > > > On 6/27/22 5:26 AM, matthias rebbe via use-livecode wrote: >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From scott at elementarysoftware.com Mon Jun 27 15:54:54 2022 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Mon, 27 Jun 2022 12:54:54 -0700 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Hello Matthias, I have machines running 10.10.5 and a 10.7.5 if these would be of help. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ > On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:09:34 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:09:34 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <89675024-0EB4-49BF-A7C6-C058DB857F09@m-r-d.de> Hello Scott, thanks for your offer. I've sent you a private email with the D/L links and a short explanation. Regards, Matthias > Am 27.06.2022 um 21:54 schrieb scott--- via use-livecode : > > Hello Matthias, > I have machines running 10.10.5 and a 10.7.5 if these would be of help. > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email scott at elementarysoftware.com > booth 1-360-734-4701 > ------------------------------------------------------ > >> On Jun 27, 2022, at 5:26 AM, matthias rebbe via use-livecode wrote: >> >> Hi, >> is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. >> The apps are just with one answer dialog. >> >> There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). >> >> The results of the testing would me help to enhance my LC Notarizing lesson. >> >> >> Regards, >> Matthias >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Mon Jun 27 16:11:41 2022 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 27 Jun 2022 22:11:41 +0200 Subject: Is Anyone on the list still using macOS 10.11? In-Reply-To: References: Message-ID: <0EC1B5B2-79B7-4456-A9A9-BE88DFBA2240@m-r-d.de> Thanks to all for your offer to help. I would say 2 testers are enough. ;) So i do not need anymore testers. Regards, Matthias > Am 27.06.2022 um 14:26 schrieb matthias rebbe via use-livecode : > > Hi, > is there anyone on the list still using macOS 10.10 and would be willing to test 2 or 3 sample apps for me. > The apps are just with one answer dialog. > > There seems to be a problem with standalones under macOS 10.10 that were code signed with a Mac with Apple cpu (M1/M2). > > The results of the testing would me help to enhance my LC Notarizing lesson. > > > Regards, > Matthias > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dan at clearvisiontech.com Mon Jun 27 17:51:47 2022 From: dan at clearvisiontech.com (Dan Friedman) Date: Mon, 27 Jun 2022 21:51:47 +0000 Subject: Audio in Background In-Reply-To: References: <5393C19A-F9B7-4F6F-AECC-142027ED3A61@clearvisiontech.com> Message-ID: <2C9AAE2E-516B-4299-935C-23A7E5CB5B8C@clearvisiontech.com> Panos, Just wanted you to know that adding “iphoneEnableRemoteControl” did the trick! The app received the “remoteControlReceived” message and was able to act on that message even in the background. Sweet! Thank you! Dan Friedman CEO, ClearVision Technologies, LLC Voice: 909/484-2052 http://www.clearvisiontech.com From: panagiotis m Date: Monday, June 27, 2022 at 10:25 AM To: How to use LiveCode Cc: Dan Friedman Subject: Re: Audio in Background Hello Dan In fact this feature might be supported already. If you have a look at the dictionary, there is the "iphoneEnableRemoteControl" command. This is to enable remote control. Then, you can use "setRemoteControlDisplay" to update the metadata and such. Then, you get "remoteControlReceived" events when the buttons in the remote control are pressed. (remote control is the thingy in the Control Center) Note that this code has not been tested recently. I'll have a play tomorrow and see if it still works. Kind regards, Panos On Mon, 27 Jun 2022 at 19:25, Dan Friedman > wrote: Panos, Thank you... That fixed it! The audio continues when the app is sent to the background. However, the application's audio does not appear in the Control Center: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/10/ios-11-control-center-view-now-playing-screens-01.jpeg Is this possible? -Dan On 6/27/22, 8:49 AM, "use-livecode on behalf of panagiotis m via use-livecode" on behalf of use-livecode at lists.runrev.com> wrote: Hello Dan, On iOS, I think you have to add this line in your openStack handler (or elsewhere): iphoneSetAudioCategory "playback" Kind regards, Panos -- On Mon, 27 Jun 2022 at 18:29, Dan Friedman via use-livecode < use-livecode at lists.runrev.com> wrote: > Happy Monday! I am using the native player control (on both iOS and > Android). It's working quite well! The only problem I have is that the > background audio doesn't seem to honor this control. If I play audio in a > native browser, it works. Is there something I need to set or do to get > it to work? I have "Android Background Audio" selected in application > settings and "Background Audio" checked in the "Requirements" panel. > > Thanks in advance! > -Dan > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Mon Jun 27 23:27:04 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Tue, 28 Jun 2022 13:27:04 +1000 Subject: long id trap for the unwary Message-ID: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> If I write put the long id of field 1 of card 1 into tObject; put the text of tObject I get the text of field 1 of card 1, right ? Not necessarily. If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. Sigh, a new version of nsScriptDatabase coming up. Neville From bobsneidar at iotecdigital.com Tue Jun 28 11:34:05 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 15:34:05 +0000 Subject: long id trap for the unwary In-Reply-To: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> Message-ID: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: function returnTheText pFieldName return the text of field pFieldName of me end returnTheText If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: function extract tParentCard return the text of field 1 of tParentCard end extract Bob S > On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: > > If I write > > put the long id of field 1 of card 1 into tObject; put the text of tObject > > I get the text of field 1 of card 1, right ? Not necessarily. > > If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. > > This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. > > The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. > > Sigh, a new version of nsScriptDatabase coming up. > > Neville > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From harrison at all-auctions.com Tue Jun 28 13:46:23 2022 From: harrison at all-auctions.com (Rick Harrison) Date: Tue, 28 Jun 2022 13:46:23 -0400 Subject: LC Screen Recording? In-Reply-To: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> References: <578353AE-51D4-46D3-A667-C88DF7D1DCDA@elementarysoftware.com> Message-ID: <883969E2-6C30-45BE-9215-141FBF9613F8@all-auctions.com> I’m wondering if there is a way from within LC to make a video recording of what is going on within a rect in a macOS LC app. Recording audio at the same time would also be a big plus. Anyone with good ideas or suggestions for what I might be able to do? Thanks, Rick From bogdanoff at me.com Tue Jun 28 14:04:48 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 11:04:48 -0700 Subject: long id trap for the unwary In-Reply-To: <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: Bob, This makes sense. I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. send … ? Peter Bogdanoff > On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: > > Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. > > If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: > > function returnTheText pFieldName > return the text of field pFieldName of me > end returnTheText > > If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. > > For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: > > function extract tParentCard > return the text of field 1 of tParentCard > end extract > > Bob S > > >> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >> >> If I write >> >> put the long id of field 1 of card 1 into tObject; put the text of tObject >> >> I get the text of field 1 of card 1, right ? Not necessarily. >> >> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >> >> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >> >> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >> >> Sigh, a new version of nsScriptDatabase coming up. >> >> Neville >> >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:07:35 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:07:35 +0000 Subject: long id trap for the unwary In-Reply-To: References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> Message-ID: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. Sent from my iPhone > On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: > > Bob, > > This makes sense. > > I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. > > send … ? > > Peter Bogdanoff > >> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >> >> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >> >> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >> >> function returnTheText pFieldName >> return the text of field pFieldName of me >> end returnTheText >> >> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >> >> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >> >> function extract tParentCard >> return the text of field 1 of tParentCard >> end extract >> >> Bob S >> >> >>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>> >>> If I write >>> >>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>> >>> I get the text of field 1 of card 1, right ? Not necessarily. >>> >>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>> >>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>> >>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>> >>> Sigh, a new version of nsScriptDatabase coming up. >>> >>> Neville >>> >>> >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 28 15:12:10 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 19:12:10 +0000 Subject: long id trap for the unwary In-Reply-To: <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> Message-ID: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. Sent from my iPhone > On Jun 28, 2022, at 12:08, Bob Sneidar wrote: > > Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. > > Sent from my iPhone > >> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >> >> Bob, >> >> This makes sense. >> >> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >> >> send … ? >> >> Peter Bogdanoff >> >>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>> >>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>> >>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>> >>> function returnTheText pFieldName >>> return the text of field pFieldName of me >>> end returnTheText >>> >>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>> >>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>> >>> function extract tParentCard >>> return the text of field 1 of tParentCard >>> end extract >>> >>> Bob S >>> >>> >>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>> >>>> If I write >>>> >>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>> >>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>> >>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>> >>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>> >>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>> >>>> Sigh, a new version of nsScriptDatabase coming up. >>>> >>>> Neville >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode From bogdanoff at me.com Tue Jun 28 15:49:22 2022 From: bogdanoff at me.com (Peter Bogdanoff) Date: Tue, 28 Jun 2022 12:49:22 -0700 Subject: long id trap for the unwary In-Reply-To: <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> Message-ID: <59965883-1445-4B08-A9F1-681537F714F4@me.com> Hi Bob, I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: > > Send IF you need in time. Stupid spell correct. It cannot be me mistyping. > > Sent from my iPhone > >> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >> >> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>> >>> Bob, >>> >>> This makes sense. >>> >>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>> >>> send … ? >>> >>> Peter Bogdanoff >>> >>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>> >>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>> >>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>> >>>> function returnTheText pFieldName >>>> return the text of field pFieldName of me >>>> end returnTheText >>>> >>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>> >>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>> >>>> function extract tParentCard >>>> return the text of field 1 of tParentCard >>>> end extract >>>> >>>> Bob S >>>> >>>> >>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>> >>>>> If I write >>>>> >>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>> >>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>> >>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>> >>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>> >>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>> >>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>> >>>>> Neville >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 28 16:27:25 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 16:27:25 -0400 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? Craig > On Jun 28, 2022, at 3:49 PM, Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > >> On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode wrote: >> >> Send IF you need in time. Stupid spell correct. It cannot be me mistyping. >> >> Sent from my iPhone >> >>> On Jun 28, 2022, at 12:08, Bob Sneidar wrote: >>> >>> Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. >>> >>> Sent from my iPhone >>> >>>> On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode wrote: >>>> >>>> Bob, >>>> >>>> This makes sense. >>>> >>>> I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. >>>> >>>> send … ? >>>> >>>> Peter Bogdanoff >>>> >>>>>> On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode wrote: >>>>> >>>>> Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not if at all possible "reach out and touch" something on another card. >>>>> >>>>> If you need to get or set something on a card other than the one in the message path of the current handler, it's better to have a command or function in the script of the target card. That way you can say: >>>>> >>>>> function returnTheText pFieldName >>>>> return the text of field pFieldName of me >>>>> end returnTheText >>>>> >>>>> If you DO need to have handlers working in a broader context, then when calling the handler get the long id of the target card first and then pass that in a parameter to the handler. >>>>> >>>>> For instance I have a handler called Extract which retrieves to values for every object on a card with certain prefixes in their name like fld or btn or menu. I pass the long id of the card they are on so that there is never any confusion as in: >>>>> >>>>> function extract tParentCard >>>>> return the text of field 1 of tParentCard >>>>> end extract >>>>> >>>>> Bob S >>>>> >>>>> >>>>>>> On Jun 27, 2022, at 20:27 , Neville Smythe via use-livecode wrote: >>>>>> >>>>>> If I write >>>>>> >>>>>> put the long id of field 1 of card 1 into tObject; put the text of tObject >>>>>> >>>>>> I get the text of field 1 of card 1, right ? Not necessarily. >>>>>> >>>>>> If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of the current card or maybe the first card containing the group. >>>>>> >>>>>> This is not actually a bug when you read the docs carefully but it certainly is a trap and in my case a major bug generator. It means this seemingly obvious way of obtaining the long id of an object (rather, in this case an instance of an object) cannot be used to uniquely identify it when getting its properties. >>>>>> >>>>>> The workaround is to replace card id (whatever) with card id (the id of card 1) in tObject; the properties of tObject returned are then the properties of the expected instance of the object. >>>>>> >>>>>> Sigh, a new version of nsScriptDatabase coming up. >>>>>> >>>>>> Neville >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> use-livecode mailing list >>>>>> use-livecode at 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 at 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 at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From klaus at major-k.de Tue Jun 28 16:35:13 2022 From: klaus at major-k.de (Klaus major-k) Date: Tue, 28 Jun 2022 22:35:13 +0200 Subject: long id trap for the unwary In-Reply-To: <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <169FAF3C-CA7E-43D1-B874-C616708C4EB0@starfirelighting.com> Message-ID: <8F2CA68F-EF34-4232-905E-699B0392E041@major-k.de> Hi Craig, > Am 28.06.2022 um 22:27 schrieb Craig Newman via use-livecode : > > I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? no, if the variable contains a valid description of a field control. This works as advertized: ... put the long ID of fld 1 into tField put the text of tField ... Hope I understood you correctly. > Craig Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From bobsneidar at iotecdigital.com Tue Jun 28 17:38:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 28 Jun 2022 21:38:59 +0000 Subject: long id trap for the unwary In-Reply-To: <59965883-1445-4B08-A9F1-681537F714F4@me.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> Message-ID: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> You can find the definition of both send and dispatch in the dictionary. So an example of Dispatch being called from a card of a substack would be: put the long id of me into tParentCard dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed -- but there's nothing wrong with using it extract tRecordA, tParentCard, tExclusions -- aRecordData is an array you want to populate with the field contents of pParentCard -- pParentCard is the long id of the target card containing field, button and menu objects -- pExclusions is a comma delimited list of object names you want to pass over on extract @aRecordData, pParentCard, pExclusions -- store object values in aRecordData put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] ... -- no need to return anything in this example because aRecordData is passed by reference end extract Bob S > On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: > > Hi Bob, > > I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > From craig at starfirelighting.com Tue Jun 28 18:05:41 2022 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 28 Jun 2022 18:05:41 -0400 Subject: long id trap for the unwary In-Reply-To: <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> References: <9818D089-2B84-42C4-A912-228671A8D2D2@optusnet.com.au> <846234AD-69F5-4B46-B7BB-05B01B6EB766@iotecdigital.com> <9765ECC7-0405-4E46-997D-07D033E40F0C@iotecdigital.com> <42242118-CD30-4D71-A33F-D4E769717AE1@iotecdigital.com> <59965883-1445-4B08-A9F1-681537F714F4@me.com> <53B798B2-C686-4EB5-B2A2-2351C3689E97@iotecdigital.com> Message-ID: <6D3998B2-5780-4594-8280-A98E87E5BD87@starfirelighting.com> Klaus. You are correct; I missed that the “long iD” was used, and that expression includes the work “field”. LC can then use that as a valid reference. Craig > On Jun 28, 2022, at 5:38 PM, Bob Sneidar via use-livecode wrote: > > You can find the definition of both send and dispatch in the dictionary. > > So an example of Dispatch being called from a card of a substack would be: > > put the long id of me into tParentCard > dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions > > > -- if however extract is in the message path for everything, such as in a library or back/front script, dispatch is not needed > -- but there's nothing wrong with using it > extract tRecordA, tParentCard, tExclusions > > > -- aRecordData is an array you want to populate with the field contents of pParentCard > -- pParentCard is the long id of the target card containing field, button and menu objects > -- pExclusions is a comma delimited list of object names you want to pass over > > on extract @aRecordData, pParentCard, pExclusions > -- store object values in aRecordData > put the text of field "fldCustomerName" of pParentCard into aRecordData ["customername"] > put the hilited of button "btnActive" of pParentCard into aRecordData ["active"] > put the label of button "mnuCategories" of pParentCard into aRecordData ["category"] > ... > -- no need to return anything in this example because aRecordData is passed by reference > end extract > > Bob S > > >> On Jun 28, 2022, at 12:49 , Peter Bogdanoff via use-livecode wrote: >> >> Hi Bob, >> >> I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Tue Jun 28 21:38:54 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 29 Jun 2022 11:38:54 +1000 Subject: long id trap for the unwary In-Reply-To: References: Message-ID: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> No crashes or errors, I just didn’t get back the data I expected. Does it really have anything to do with message paths? I just expected the long id of field1 of card 1 to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) Neville From craig at starfirelighting.com Wed Jun 29 09:33:39 2022 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 29 Jun 2022 09:33:39 -0400 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <9D1EA6FF-DEA2-4FF0-AF44-75D0F0B7D686@starfirelighting.com> Neville. I know this thread has been broken into parts, but what exactly is your question? I made two stacks, The first with a button on it, and this in its script: on mouseup put the long id of field 1 of card 1 of stack "untitled 3" into fieldID put the long ID of the owner of fieldID into groupID put the owner of groupID into ownerID end mouseup The second stack (untitled 3) has a field that has been grouped. You get, in the SE, three pieces of information in those three variables. What does this do for you? Craig > On Jun 28, 2022, at 9:38 PM, Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 29 11:32:33 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 29 Jun 2022 15:32:33 +0000 Subject: long id trap for the unwary In-Reply-To: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> References: <7A80C36B-F03B-482B-9AE9-9405DD6BD825@optusnet.com.au> Message-ID: <887A07C8-8D59-40B6-B8D3-AA8A23373505@iotecdigital.com> So the *actual* long id reference to any object looks something like: field id 1388156 of group id 1388155 of group id 1388175 of card id 1002 of stack "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms Generator 8.livecode" If you don't provide all of that as a reference, then it's up to the engine to "fill in the blanks." That means you can say something like "field 1 of card 1" or "field 1 of stack myStack" or "field 1 of group 1" and you get what you expect. But when working with multiple stacks THAT depends on what is the topStack and currentCard, which can vary depending on whether or not you are actually opening the substacks and what they are opened as (modal, pallette, drawer etc.) Relative References are a great feature, making coding much simpler, but as you have seen it can also be a "trap" when working with multiple cards or stacks. To ensure you don't fall into it, it may be better for you to not leave it up to the engine, but to provide the full path to your objects. Bob S > On Jun 28, 2022, at 18:38 , Neville Smythe via use-livecode wrote: > > No crashes or errors, I just didn’t get back the data I expected. > > Does it really have anything to do with message paths? > > I just expected > > the long id of field1 of card 1 > > to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating through all substacks and controls in a stack and wanted a specifier which would work for substacks as well as objects so the long id was the natural choice. > > I understand why the long id of a group has to contain a reference to the current card or the first card containing the group, but in this case I am actually specifying the card reference I want, so it *could* return what I expected, it just doesn’t. Tough cheese. (Oops, I mentioned c…..) > > > Neville From hershelflc at gmail.com Thu Jun 30 18:59:55 2022 From: hershelflc at gmail.com (Hershel F) Date: Thu, 30 Jun 2022 18:59:55 -0400 Subject: sorting datagrids Message-ID: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Hi all, is there any way of sorting a data grid horizontally? thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:21:17 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:21:17 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <95CB8B88-CDB9-46E5-A54C-124B6759B84D@iotecdigital.com> Sure there is! put the dgProp ["columns"] of group myDatagrid into tGridColumns sort tGridColumns ascending set the dgProp ["columns"] of group myDataGrid to tGridColumns I would store the original sort order first though so you can recover. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. From bobsneidar at iotecdigital.com Thu Jun 30 19:26:59 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 30 Jun 2022 23:26:59 +0000 Subject: sorting datagrids In-Reply-To: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> References: <510268AA-C4D4-444A-AE64-99F0307E9C25@gmail.com> Message-ID: <240E44BA-75A1-4E14-8226-0C874FFFA8CD@iotecdigital.com> Or are you talking about sorting the DATA of a datagrid? put the dgText of group "myDataGrid" into tText set the itemDelimiter to tab repeat with i = 1 to the number of lines of tText put item i of tText into tLine sort items of tLine ascending put tLine into line i of tText end repeat set the dgText of group "myDataGrid" to tText Nothing else would make any sense. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via use-livecode wrote: > > Hi all, is there any way of sorting a data grid horizontally? > thanks a mill. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Thu Jun 30 21:44:02 2022 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 1 Jul 2022 11:44:02 +1000 Subject: nsScriptDatabase (and long id's) Message-ID: I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? Neville From bobsneidar at iotecdigital.com Thu Jun 30 22:03:51 2022 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 1 Jul 2022 02:03:51 +0000 Subject: nsScriptDatabase (and long id's) In-Reply-To: References: Message-ID: <3AE641A7-DC69-443B-A4D4-EE47E010F075@iotecdigital.com> OIC this is for your library. I didn’t realize that your need was to access objects in projects you didn’t have control of. 😟 Sent from my iPhone > On Jun 30, 2022, at 18:45, Neville Smythe via use-livecode wrote: > > I have uploaded version 3 of nsScriptDatabase to Sample Stacks, and the standalones are at > > https://www.dropbox.com/sh/6z4yuw55rnvub3t/AAB3jJ9yO4l2zCOoDq1uO7L2a?dl=0 > > This version addresses the issues with groups caused by my misplaced expectations raised in the thread about long id’s of grouped controls, as well as some more serious bugs. Existing users should read the info page accessed from the i button. Hopefully this version is finally fit for purpose. > > Referring back briefly to that thread, which rather ran away with itself, I was struck once again how useful was the old version of the dictionary in which users could add notes to the entries, to augment, exemplify, elucidate or even correct documentation. In this case I would have added to the long id entry a note to the effect that the paragraph concerning the long id of a group also applied to the long id of controls contained in groups, even if the group was not explicitly mentioned. Did that feature disappear just because of the new implementation of the Dictionary, or was it killed because it needed moderation? > > Neville > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode