From livfoss at mac.com Tue Sep 1 07:53:00 2020 From: livfoss at mac.com (Graham Samuel) Date: Tue, 1 Sep 2020 13:53:00 +0200 Subject: ...and now for something completely off the wall... In-Reply-To: <0d28b27f-9b58-8113-3498-0b3d295a3f3b@gmail.com> References: <827CEE4B-6195-450D-B794-0587C82C8C99@iotecdigital.com> <0d28b27f-9b58-8113-3498-0b3d295a3f3b@gmail.com> Message-ID: <32D9CB87-6835-4856-B43D-D5824DA3B725@mac.com> Richmond, is this Scots or just badly spelled 16th Century English? A genuine enquiry The stait of man dois change and vary, Now sound, now seik, now blith, now sary, Now dansand mery, now like to dee; Timor mortis conturbat me. Graham > On 28 Aug 2020, at 21:22, Richmond via use-livecode wrote: > > Very droll: that's a load of Frenchies having fun. > > On 28.08.20 19:44, Bob Sneidar via use-livecode wrote: >> If the painting is any indication of a real event, the Scots would be well advised to build their bon fires a wee bit further from the wooden ladders they are torturing their victims on. :-) >> >> Bob S >> >> >>> On Aug 28, 2020, at 9:09 AM, Richmond via use-livecode wrote: >>> >>> Well, I suppose it is funny: about as funny as pointing out to those people in Utah who spawned this idiot that >>> undder Scots law as a citizen of a Scottish colony whose indepndence is only de facto under Scots law he should >>> suffer the death sentence for treason: drawing and quartering. >>> >>> https://upload.wikimedia.org/wikipedia/commons/f/fc/BNMsFr2643FroissartFol97vExecHughDespenser.jpg >>> >>> On 28.08.20 18:54, Bob Sneidar via use-livecode wrote: >>>> ? >>>> >>>>> On Aug 28, 2020, at 7:59 AM, Mark Wieder via use-livecode wrote: >>>>> >>>>> Almost every article on the Scots version of Wikipedia is written by one American teenager who can't speak Scots >>>>> >>>>> "A veelage is a clustered human settlement or community, larger than a hamlet but smawer than a toun, wi a population rangin frae a few hunder tae a few thoosand (sometimes tens o thoosands)." >>>>> >>>>> https://boingboing.net/2020/08/27/almost-every-article-on-the-sc.html >>>>> https://www.scotslanguage.com/news/5724 >>>>> >>>>> -- >>>>> 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 >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Tue Sep 1 09:25:07 2020 From: paul at researchware.com (Paul Dupuis) Date: Tue, 1 Sep 2020 09:25:07 -0400 Subject: formattedRect, formattedLeft, formattedWidth of chunks Message-ID: <5088ff38-ccf9-a0e6-dd81-0c8039df4f73@researchware.com> Just a heads up to anyone else out there who may be having VERY hard to track down crashes in LC 9.x.x. The following functions: formattedRect, formattedLeft, formattedWidth when operating on chunk expressions (i.e. char X to Y of field Z) can cause an engine crash for certain field content. This is present in all versions of LC 9.x.x (actual back to some version of LC8) The issue is when the chuck contains tab characters. See https://quality.livecode.com/show_bug.cgi?id=22882 FYI: formattedTop and formattedHeight of chunks still work. From tom at makeshyft.com Tue Sep 1 13:35:16 2020 From: tom at makeshyft.com (Tom Glod) Date: Tue, 1 Sep 2020 13:35:16 -0400 Subject: Hacktoberfest is coming In-Reply-To: References: Message-ID: Hmmmm..... good question Mark...I certainly don't want to do any work thats going to sit there for a year+ Maybe someone from the mothership can give a yay or nay. On Mon, Aug 31, 2020 at 10:55 PM Mark Wieder via use-livecode < use-livecode at lists.runrev.com> wrote: > On 8/27/20 9:05 AM, Mike Kerner via use-livecode wrote: > > > Please discuss, here, add a repo and/or an update that you would like to > > see to a particular repo (include a link to the repo), and let's see if > we > > can get a bunch of LC Hackers, this year. > > > > Kind of an exercise in futility, though, no? > I submitted... let's see... (goes off and counts)... nine pull requests > against LC last October (two for the engine, seven for the IDE) and > they're still sitting in the hopper waiting to be reviewed. > Why bother "fixing" things when nobody's paying attention? > > (the above is somewhat rhetorical since I just submitted another PR > earlier today.. not that I expect any action on it) > > -- > 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 > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 From bobsneidar at iotecdigital.com Tue Sep 1 17:49:49 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 1 Sep 2020 21:49:49 +0000 Subject: formattedRect, formattedLeft, formattedWidth of chunks In-Reply-To: <5088ff38-ccf9-a0e6-dd81-0c8039df4f73@researchware.com> References: <5088ff38-ccf9-a0e6-dd81-0c8039df4f73@researchware.com> Message-ID: I have a great many of these. I?ll keep a lookout. Bob S On Sep 1, 2020, at 6:25 AM, Paul Dupuis via use-livecode > wrote: formattedWidth From paul at researchware.com Tue Sep 1 18:52:20 2020 From: paul at researchware.com (Paul Dupuis) Date: Tue, 1 Sep 2020 18:52:20 -0400 Subject: formattedRect, formattedLeft, formattedWidth of chunks In-Reply-To: References: <5088ff38-ccf9-a0e6-dd81-0c8039df4f73@researchware.com> Message-ID: <86747992-19f0-cf99-092d-e654283ebac4@researchware.com> If you control the content, it is probably not an issue. In our case, the content and the ranges (char x to y) are set by the people that use our product - we have no control - so we end up with customer's trying to do their research and suddenly our product hard crashes, sometimes resulting in lost work. They don't understand why since bunches of other documents they are working with all process fine. Even the document that is causing the crash may seem fine UNTIL they add a bookmarked range that includes the tabs. As tabs are invisible in MS-Word and a lot of MS-Word user are not really skilled at formatting, they may end up with tabs in their documents that they are not even aware they are there. This one really was a pain to track down as we had to get a customer, with the crashing, who was willing to provide their whole research study so we could reproducethe error in-house and then tracing it down in the IDE took a very long time to go through the 1000's of lines of code to find the crash on the 'formattedRect' call. On 9/1/2020 5:49 PM, Bob Sneidar via use-livecode wrote: > I have a great many of these. I?ll keep a lookout. > > Bob S > > > On Sep 1, 2020, at 6:25 AM, Paul Dupuis via use-livecode > wrote: > > formattedWidth > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 1 19:04:36 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 1 Sep 2020 23:04:36 +0000 Subject: formattedRect, formattedLeft, formattedWidth of chunks In-Reply-To: <86747992-19f0-cf99-092d-e654283ebac4@researchware.com> References: <5088ff38-ccf9-a0e6-dd81-0c8039df4f73@researchware.com> <86747992-19f0-cf99-092d-e654283ebac4@researchware.com> Message-ID: <44591BEB-69C4-4EDD-9153-C48C71BFE6AE@iotecdigital.com> When data causes the crash it?s the worst. I had an issue with drag-dropping text from a PDF not knowing that Adobe uses all kinds of non-printing characters. I wrote a cleanASCII function for just that purpose Bob S On Sep 1, 2020, at 3:52 PM, Paul Dupuis via use-livecode > wrote: If you control the content, it is probably not an issue. In our case, the content and the ranges (char x to y) are set by the people that use our product - we have no control - so we end up with customer's trying to do their research and suddenly our product hard crashes, sometimes resulting in lost work. They don't understand why since bunches of other documents they are working with all process fine. Even the document that is causing the crash may seem fine UNTIL they add a bookmarked range that includes the tabs. As tabs are invisible in MS-Word and a lot of MS-Word user are not really skilled at formatting, they may end up with tabs in their documents that they are not even aware they are there. This one really was a pain to track down as we had to get a customer, with the crashing, who was willing to provide their whole research study so we could reproducethe error in-house and then tracing it down in the IDE took a very long time to go through the 1000's of lines of code to find the crash on the 'formattedRect' call. On 9/1/2020 5:49 PM, Bob Sneidar via use-livecode wrote: I have a great many of these. I?ll keep a lookout. Bob S From ivar.andreassen at gmail.com Wed Sep 2 02:47:13 2020 From: ivar.andreassen at gmail.com (Ivar Andreassen) Date: Wed, 2 Sep 2020 08:47:13 +0200 Subject: Looking for LiveCode developer in Norway, Stavanger area Message-ID: A mature startup is looking for programmers that have from "little" to professional experience with LiveCode in Norway, and in "south Rogaland" "Stavanger Sandnes region". The reason for being so specific on location is that we want you physically present in our team meetings. We are developing a new exciting music service, and need several people onboard. Right now we are specifically looking for LiveCode developers to work on apps and back end solutions. Send an e-mail to ivar.andreassen at gmail.com, or reach out to me on Linkedin https://www.linkedin.com/in/ivarandreassen/ Regards Ivar Andreassen From stephen at barncard.com Wed Sep 2 03:07:09 2020 From: stephen at barncard.com (Stephen Barncard) Date: Wed, 2 Sep 2020 00:07:09 -0700 Subject: Looking for LiveCode developer in Norway, Stavanger area In-Reply-To: References: Message-ID: Wow. Looking forward to the success story. On Tue, Sep 1, 2020 at 23:48 Ivar Andreassen via use-livecode < use-livecode at lists.runrev.com> wrote: > A mature startup is looking for programmers that have from "little" to > > professional experience with LiveCode in Norway, and in "south Rogaland" > > "Stavanger Sandnes region". The reason for being so specific on location is > > that we want you physically present in our team meetings. > > > > We are developing a new exciting music service, and need several people > > onboard. Right now we are specifically looking for LiveCode developers to > > work on apps and back end solutions. > > > > Send an e-mail to ivar.andreassen at gmail.com, or reach out to me on > Linkedin > > https://www.linkedin.com/in/ivarandreassen/ > > > > Regards > > Ivar Andreassen > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > -- -- Stephen Barncard - Sebastopol Ca. USA - mixstream.org From tore.nilsen at me.com Wed Sep 2 04:47:45 2020 From: tore.nilsen at me.com (Tore Nilsen) Date: Wed, 2 Sep 2020 10:47:45 +0200 Subject: Looking for LiveCode developer in Norway, Stavanger area In-Reply-To: References: Message-ID: <56BFC203-4EF3-4C25-995F-7A112F8373BE@me.com> And I thought I was the only person in Rogaland County using LiveCode. I have been teaching Information Technology at an upper secondary school in Haugesund for the last seven years, using LiveCode. I would very much like to keep tabs on what you are doing. It may be of interest to both me and my students to connect with a professional organization that uses LiveCode. Best of luck with your project. Best regards Tore Nilsen > 2. sep. 2020 kl. 08:47 skrev Ivar Andreassen via use-livecode : > > A mature startup is looking for programmers that have from "little" to > professional experience with LiveCode in Norway, and in "south Rogaland" > "Stavanger Sandnes region". The reason for being so specific on location is > that we want you physically present in our team meetings. > > We are developing a new exciting music service, and need several people > onboard. Right now we are specifically looking for LiveCode developers to > work on apps and back end solutions. > > Send an e-mail to ivar.andreassen at gmail.com, or reach out to me on Linkedin > https://www.linkedin.com/in/ivarandreassen/ > > Regards > Ivar Andreassen > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 2 08:55:43 2020 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 2 Sep 2020 08:55:43 -0400 Subject: Hacktoberfest is coming In-Reply-To: References: Message-ID: there isn't any reason why we can't have a fork of the ide that doesn't sit around waiting for themuns to say "ok". On Tue, Sep 1, 2020 at 1:36 PM Tom Glod via use-livecode < use-livecode at lists.runrev.com> wrote: > Hmmmm..... good question Mark...I certainly don't want to do any work thats > going to sit there for a year+ > > Maybe someone from the mothership can give a yay or nay. > > On Mon, Aug 31, 2020 at 10:55 PM Mark Wieder via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > On 8/27/20 9:05 AM, Mike Kerner via use-livecode wrote: > > > > > Please discuss, here, add a repo and/or an update that you would like > to > > > see to a particular repo (include a link to the repo), and let's see if > > we > > > can get a bunch of LC Hackers, this year. > > > > > > > Kind of an exercise in futility, though, no? > > I submitted... let's see... (goes off and counts)... nine pull requests > > against LC last October (two for the engine, seven for the IDE) and > > they're still sitting in the hopper waiting to be reviewed. > > Why bother "fixing" things when nobody's paying attention? > > > > (the above is somewhat rhetorical since I just submitted another PR > > earlier today.. not that I expect any action on it) > > > > -- > > 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 > > > > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > _______________________________________________ > use-livecode mailing list > use-livecode 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 gcanyon at gmail.com Wed Sep 2 10:15:27 2020 From: gcanyon at gmail.com (Geoff Canyon) Date: Wed, 2 Sep 2020 21:15:27 +0700 Subject: Layers in PBrowser In-Reply-To: References: <61B78F95-54CA-4A1D-9114-6015676F998C@m-r-d.de> Message-ID: Hi Bob, Goes to show how important user research is. For me personally, I want to get Navigator out of the way entirely when I minimize it. It's trivial to have a preference to make it minimize in place. But also: I went to some length to have it avoid minimizing behind/on top of (don't remember which way it went) the menu bar. I think I could easily both: 1. Offer a preference to minimize where it is 2. Automatically avoid overlapping the GLX2 bar. Can you send me the name of any stacks involved to avoid? I haven't looked, but I think it would be as simple as adding a stack name to a list. On Mon, Aug 31, 2020 at 10:09 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Sean. I concur with Geoff. There were quite a while ago issues, but > Geoff got on them and now I use Navigator all the time. The only thing I > will say Geoff is that when I drag the window to a location, I would like > it to remain there, even when minimized. It always reverts to a default > location when first opened, which happens to overlap the GLX2 bar. > > Bob S > > > On Aug 29, 2020, at 12:54 AM, Geoff Canyon via use-livecode < > use-livecode at lists.runrev.com> > wrote: > > Hey Sean, > > Late to the conversation because Navigator is a hobby, but: I've worked > *really* hard to make drag-and-drop relayering work properly. > > I've implemented it almost from scratch something like five times over the > years, each time because I reached a dead end with the previous method (or > sometimes because I'd reached a dead end with the previous method of > implementing drag and drop. > > Which is to say: drag and drop has a large number of special cases, and is > very hard to get right. Anyone attempting it has my sympathies. > > *That* said, there are only a very small number of problematic use cases in > Navigator that I know of. If the latest (which has been out for some time > now) update of Navigator doesn't relayer the way you think it should, email > me directly and let me know. > > gc > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 2 10:54:36 2020 From: david.bovill at gmail.com (David Bovill) Date: Wed, 2 Sep 2020 15:54:36 +0100 Subject: Looping though a numerically indexed array In-Reply-To: References: Message-ID: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? From david.bovill at gmail.com Wed Sep 2 10:59:43 2020 From: david.bovill at gmail.com (David Bovill) Date: Wed, 2 Sep 2020 15:59:43 +0100 Subject: iOS sharing extension - anyone ever made one? In-Reply-To: <98eddab7-85b6-4038-b121-82fd05c0161e@Spark> References: <98eddab7-85b6-4038-b121-82fd05c0161e@Spark> Message-ID: <08868fae-80f2-4db2-aa9d-cdb0869984cf@Spark> I?m still having no joy figuring our how to make a sharing extension for a Livecode app. Has anyone ever done this? On 25 Jun 2020, 21:05 +0100, David Bovill , wrote: > Having another go at creating an iOS Share extension in Livecode. > > Ben I had a go with the code snippets you supplied, but I?m not getting my app appearing in the list of apps available to share. I had a bit of a goose around and tried a bunch of options for the info.plist file without result - well in fact I?m getting the app launching with a black screen and then crashing if I use the following style recipe: > NSExtension > ? > ?NSExtensionAttributes > ? > ?NSExtensionActivationRule > ?TRUEPREDICATE > ? > ?NSExtensionMainStoryboard > ?MainInterface > ?NSExtensionPointIdentifier > ?com.apple.share-services > ? > > This type of plist addition: > CFBundleDocumentTypes > > > CFBundleTypeName > Sound Garden > CFBundleTypeRole > Editor > LSItemContentTypes > > public.plain-text > > LSHandlerRank > Alternate > > > CFBundleTypeName > Audio > CFBundleTypeRole > Editor > LSItemContentTypes > > public.audio > > LSHandlerRank > Alternate > > > > Does not crash the app - but appears to do nothing? The following lesson appears related -?http://lessons.livecode.com/m/4069/l/1069016-associating-a-file-type-file-extension-with-an-lc-ios-app?and I note there are / were issues with iPhone X and this lesson. > > My basic question is how do I get an iOS app to work with as an iOS sharing extension such that in any app (say a web browser) where I select the share icon I can use my Livecode app as something that handles the share? > On 20 Nov 2018, 18:40 +0000, Ben Rubinstein via use-livecode , wrote: > > You need to do two things: > > > > - add code in your app to handle the "urlWakeUp" message, see the dictionary > > entry and > > http://lessons.livecode.com/m/4069/l/58672-using-custom-url-schemes > > > > - add entries in the app's plist to tell the operating system what file types > > your app can handle, see > > https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685 > > > > The latter is the bit you need to do for iOS - not sure what the Android > > equivalent is. > > > > > > On 19/11/2018 20:35, David Bovill via use-livecode wrote: > > > How could I create the ability for Livecode mobile apps - say iOS but > > > ideally also on Android) to add the ability for other apps to share to them? > > > > > > - > > > https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html > > > > > > I can't find any thread here or in the forums? > > > _______________________________________________ > > > use-livecode mailing list > > > use-livecode 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 jeejeestudio at gmail.com Wed Sep 2 11:01:32 2020 From: jeejeestudio at gmail.com (JeeJeeStudio) Date: Wed, 2 Sep 2020 17:01:32 +0200 Subject: Looking for LiveCode developer in Norway, Stavanger area In-Reply-To: <56BFC203-4EF3-4C25-995F-7A112F8373BE@me.com> References: <56BFC203-4EF3-4C25-995F-7A112F8373BE@me.com> Message-ID: Off topic-- Ah Stavanger, i was there on motor holiday in 1995 or 96. Very nice to see the Fjords. On topic-- Keep us posted, most interested. But i'm Dutch, living in Belgium since a few months. So if you can't find people, it can be done remote. Tak, Jerry Op wo 2 sep. 2020 10:48 schreef Tore Nilsen via use-livecode < use-livecode at lists.runrev.com>: > And I thought I was the only person in Rogaland County using LiveCode. I > have been teaching Information Technology at an upper secondary school in > Haugesund for the last seven years, using LiveCode. I would very much like > to keep tabs on what you are doing. It may be of interest to both me and my > students to connect with a professional organization that uses LiveCode. > > Best of luck with your project. > > Best regards > Tore Nilsen > > > 2. sep. 2020 kl. 08:47 skrev Ivar Andreassen via use-livecode < > use-livecode at lists.runrev.com>: > > > > A mature startup is looking for programmers that have from "little" to > > professional experience with LiveCode in Norway, and in "south Rogaland" > > "Stavanger Sandnes region". The reason for being so specific on location > is > > that we want you physically present in our team meetings. > > > > We are developing a new exciting music service, and need several people > > onboard. Right now we are specifically looking for LiveCode developers to > > work on apps and back end solutions. > > > > Send an e-mail to ivar.andreassen at gmail.com, or reach out to me on > Linkedin > > https://www.linkedin.com/in/ivarandreassen/ > > > > Regards > > Ivar Andreassen > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 rdimola at evergreeninfo.net Wed Sep 2 11:24:07 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Wed, 2 Sep 2020 11:24:07 -0400 Subject: Looping though a numerically indexed array In-Reply-To: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> Message-ID: <002301d6813d$1cafcdc0$560f6940$@net> David, Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. put the keys of tMyArray into tKeys sort lines of tKeys numeric repeat for each line tKey in tKeys -- do what you want with tMyArray[tKey] -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). put tMyArray[tKey] into tMyVar end repeat 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 David Bovill via use-livecode Sent: Wednesday, September 02, 2020 10:55 AM To: How to use LiveCode Cc: David Bovill Subject: Looping though a numerically indexed array I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? _______________________________________________ use-livecode mailing list use-livecode at 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 Sep 2 11:22:10 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 2 Sep 2020 15:22:10 +0000 Subject: Layers in PBrowser In-Reply-To: References: <61B78F95-54CA-4A1D-9114-6015676F998C@m-r-d.de> Message-ID: Looks like revGLX2 status. Bob S On Sep 2, 2020, at 7:15 AM, Geoff Canyon via use-livecode > wrote: Hi Bob, Goes to show how important user research is. For me personally, I want to get Navigator out of the way entirely when I minimize it. It's trivial to have a preference to make it minimize in place. But also: I went to some length to have it avoid minimizing behind/on top of (don't remember which way it went) the menu bar. I think I could easily both: 1. Offer a preference to minimize where it is 2. Automatically avoid overlapping the GLX2 bar. Can you send me the name of any stacks involved to avoid? I haven't looked, but I think it would be as simple as adding a stack name to a list. On Mon, Aug 31, 2020 at 10:09 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: Hi Sean. I concur with Geoff. There were quite a while ago issues, but Geoff got on them and now I use Navigator all the time. The only thing I will say Geoff is that when I drag the window to a location, I would like it to remain there, even when minimized. It always reverts to a default location when first opened, which happens to overlap the GLX2 bar. Bob S From brian at milby7.com Wed Sep 2 11:28:08 2020 From: brian at milby7.com (Brian Milby) Date: Wed, 2 Sep 2020 11:28:08 -0400 Subject: Looping though a numerically indexed array In-Reply-To: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> Message-ID: <136A22F8-0EE0-42C3-A07A-D829A50B7BF5@milby7.com> As long as the array is indexed starting at 1 with no gaps it should work by looping for each element. I just did a quick test to confirm. I built a 100 element array and it looped in order. I deleted 2 keys and then it didn?t. I then added those 2 missing keys back and it worked again. Sent from my iPhone > On Sep 2, 2020, at 10:55 AM, David Bovill via use-livecode wrote: > > ?I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 2 11:28:25 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 2 Sep 2020 15:28:25 +0000 Subject: Looping though a numerically indexed array In-Reply-To: <002301d6813d$1cafcdc0$560f6940$@net> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <002301d6813d$1cafcdc0$560f6940$@net> Message-ID: <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> Ditto, and I am not sure what noticeable impact one method would have over another. There was some blurb a long time ago about how these keys are internally sorted. I believe what was proposed is that a set of NUMERIC keys beginning with 0 would actually sort correctly. Bob S > On Sep 2, 2020, at 8:24 AM, Ralph DiMola via use-livecode wrote: > > David, > > Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. > > put the keys of tMyArray into tKeys > sort lines of tKeys numeric > repeat for each line tKey in tKeys > > -- do what you want with tMyArray[tKey] > -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). > put tMyArray[tKey] into tMyVar > > end repeat > > 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 David Bovill via use-livecode > Sent: Wednesday, September 02, 2020 10:55 AM > To: How to use LiveCode > Cc: David Bovill > Subject: Looping though a numerically indexed array > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > _______________________________________________ > use-livecode mailing list > use-livecode 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 ahsoftware at sonic.net Wed Sep 2 11:30:04 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Wed, 2 Sep 2020 08:30:04 -0700 Subject: Layers in PBrowser In-Reply-To: References: <61B78F95-54CA-4A1D-9114-6015676F998C@m-r-d.de> Message-ID: On 9/2/20 8:22 AM, Bob Sneidar via use-livecode wrote: > Looks like revGLX2 status. Interesting. I don't have that problem. I see a different problem though. I just tried minimizing Navigator and it's more or less centered on my main screen, but it's also unmovable when minimized, which is annoying. -- Mark Wieder ahsoftware at gmail.com From ambassador at fourthworld.com Wed Sep 2 12:19:52 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 2 Sep 2020 09:19:52 -0700 Subject: Hacktoberfest is coming In-Reply-To: References: Message-ID: Mike Kerner wrote: > there isn't any reason why we can't have a fork of the ide that > doesn't sit around waiting for themuns to say "ok". I've considered this myself, but maintaining something as complex as LC's IDE is no small task. In fact, I'm finding it less time consuming to replace portions as I need them than to prowl around in that complex code. But even if someone had the time for to maintain a fork of the IDE (and you might get some assistance on that from others if you do), engine pull requests would still be in queue with the mother ship. Few in our community have the C++ skills to do serious work on the engine, and the GPL license would make using such a community project a non-starter for most license holders. -- 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 benr_mc at cogapp.com Wed Sep 2 12:39:30 2020 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Wed, 2 Sep 2020 17:39:30 +0100 Subject: iOS sharing extension - anyone ever made one? In-Reply-To: <08868fae-80f2-4db2-aa9d-cdb0869984cf@Spark> References: <98eddab7-85b6-4038-b121-82fd05c0161e@Spark> <08868fae-80f2-4db2-aa9d-cdb0869984cf@Spark> Message-ID: <229ccb13-5645-8daa-8b49-e3755f564f73@cogapp.com> Hi David, Yes, I did have this working on iOS. ... unfortunately that's all I've got to offer! It's a couple of years since I worked on this project, and it was an internal app only - not distributed to the app store. I'm actually currently disbarred from testing apps on iOS - my current profile/certificate/whatever expired last month and I had a couple of goes at the whole dance, but failed, and since it was only for a fun personal app I haven't had time to get back to it. I can tell you it should work (or at least used to). My app appeared in the list of destinations for sharing, and IIRC I had it tuned to accept either text files or mp3 audio, and that worked as well. Is your issue that the app doesn't launch at all; or doesn't appear as a sharing destination; or does both those things but doesn't respond when something is shared to it? Ben On 02/09/2020 15:59, David Bovill wrote: > I?m still having no joy figuring our how to make a sharing extension for a > Livecode app. Has anyone ever done this? > On 25 Jun 2020, 21:05 +0100, David Bovill , wrote: >> Having another go at creating an iOS Share extension in Livecode. >> >> Ben I had a go with the code snippets you supplied, but I?m not getting my >> app appearing in the list of apps available to share. I had a bit of a goose >> around and tried a bunch of options for the info.plist file without result - >> well in fact I?m getting the app launching with a black screen and then >> crashing if I use the following style recipe: >> >> NSExtension >> >> ? >> >> ?NSExtensionAttributes >> >> ? >> >> ?NSExtensionActivationRule >> >> ?TRUEPREDICATE >> >> ? >> >> ?NSExtensionMainStoryboard >> >> ?MainInterface >> >> ?NSExtensionPointIdentifier >> >> ?com.apple.share-services >> >> ? >> >> >> This type of plist addition: >> >> CFBundleDocumentTypes >> >> >> >> CFBundleTypeName >> Sound Garden >> CFBundleTypeRole >> Editor >> LSItemContentTypes >> >> public.plain-text >> >> LSHandlerRank >> Alternate >> >> >> CFBundleTypeName >> Audio >> CFBundleTypeRole >> Editor >> LSItemContentTypes >> >> public.audio >> >> LSHandlerRank >> Alternate >> >> >> >> Does not crash the app - but appears to do nothing? The following lesson >> appears related - >> http://lessons.livecode.com/m/4069/l/1069016-associating-a-file-type-file-extension-with-an-lc-ios-app?and >> I note there are / were issues with iPhone X and this lesson. >> >> My basic question is how do I get an iOS app to work with as an iOS sharing >> extension such that in any app (say a web browser) where I select the share >> icon I can use my Livecode app as something that handles the share? >> On 20 Nov 2018, 18:40 +0000, Ben Rubinstein via use-livecode >> , wrote: >>> You need to do two things: >>> >>> - add code in your app to handle the "urlWakeUp" message, see the dictionary >>> entry and >>> http://lessons.livecode.com/m/4069/l/58672-using-custom-url-schemes >>> >>> - add entries in the app's plist to tell the operating system what file types >>> your app can handle, see >>> https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685 >>> >>> The latter is the bit you need to do for iOS - not sure what the Android >>> equivalent is. >>> >>> >>> On 19/11/2018 20:35, David Bovill via use-livecode wrote: >>>> How could I create the ability for Livecode mobile apps - say iOS but >>>> ideally also on Android) to add the ability for other apps to share to them? >>>> >>>> - >>>> https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html >>>> >>>> I can't find any thread here or in the forums? >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 Wed Sep 2 14:45:38 2020 From: alex at tweedly.net (Alex Tweedly) Date: Wed, 2 Sep 2020 19:45:38 +0100 Subject: Looping though a numerically indexed array In-Reply-To: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> Message-ID: <02D4FF99-2C64-435F-982B-70FCD95492B9@tweedly.net> If the array is indexed from 1 with no gaps, you can do repeat with I = 1 to item 2 of line 1 of the extents of myArray Alex > On 2 Sep 2020, at 15:54, David Bovill via use-livecode wrote: > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 2 17:01:58 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 2 Sep 2020 21:01:58 +0000 Subject: Looping though a numerically indexed array In-Reply-To: <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <002301d6813d$1cafcdc0$560f6940$@net> <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> Message-ID: <56FCC584-34FA-49AB-A7AA-53227A7C173E@iotecdigital.com> It appears I have that backwards? Bob S > On Sep 2, 2020, at 8:28 AM, Bob Sneidar wrote: > > Ditto, and I am not sure what noticeable impact one method would have over another. There was some blurb a long time ago about how these keys are internally sorted. I believe what was proposed is that a set of NUMERIC keys beginning with 0 would actually sort correctly. > > Bob S > > >> On Sep 2, 2020, at 8:24 AM, Ralph DiMola via use-livecode wrote: >> >> David, >> >> Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. >> >> put the keys of tMyArray into tKeys >> sort lines of tKeys numeric >> repeat for each line tKey in tKeys >> >> -- do what you want with tMyArray[tKey] >> -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). >> put tMyArray[tKey] into tMyVar >> >> end repeat >> >> 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 David Bovill via use-livecode >> Sent: Wednesday, September 02, 2020 10:55 AM >> To: How to use LiveCode >> Cc: David Bovill >> Subject: Looping though a numerically indexed array >> >> I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays >> >> Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 irog at mac.com Wed Sep 2 22:38:29 2020 From: irog at mac.com (Roger Guay) Date: Wed, 2 Sep 2020 19:38:29 -0700 Subject: Contesting for Idiot du Jour Message-ID: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> Your chance to be Genius du Jour: If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. But, I must be doing something wrong because I get ? ! Here is my script: on mouseDown getStuff end mouseDown local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount on getStuff put item 1 of the loc of grc OuterCircle into tx0 put item 2 of the loc of grc OuterCircle into tY0 put "" into tTotCount put "" into tLongCount emptyFlds end getStuff on mouseUp lock screen repeat 1000 put random(200) into tR -- 200 is half the width of the larger circle if tR > 1 then ## put random(2*pi) into tTheta1 get random(360) put it*pi/180 into tTheta1 put tR*cos(tTheta1) into tX1 put tR*sin(tTheta1) into tY1 set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount add 1 to tTotCount end if end repeat put tTotCount into fld "totcountFld" put tLongCount into fld ?LongCountFld" put tLongCount/tTotCount into fld "RatioFld" unlock screen end mouseUp Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? Thanks, Roger From jerry at jhjensen.com Wed Sep 2 23:27:28 2020 From: jerry at jhjensen.com (Jerry Jensen) Date: Wed, 2 Sep 2020 20:27:28 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> Message-ID: <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> 1/2 is the right answer. Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. Now add up all the possible positions of that line. Why would that change the answer? Congratulations, you understand integrals! .Jerry > On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: > > Your chance to be Genius du Jour: > > If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. > Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. > But, I must be doing something wrong because I get ? ! > > Here is my script: > > on mouseDown > > getStuff > > end mouseDown > > > local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount > > on getStuff > > put item 1 of the loc of grc OuterCircle into tx0 > > put item 2 of the loc of grc OuterCircle into tY0 > > put "" into tTotCount > > put "" into tLongCount > > emptyFlds > > end getStuff > > > on mouseUp > > lock screen > > repeat 1000 > > put random(200) into tR -- 200 is half the width of the larger circle > > if tR > 1 then > > ## put random(2*pi) into tTheta1 > > get random(360) > > put it*pi/180 into tTheta1 > > put tR*cos(tTheta1) into tX1 > put tR*sin(tTheta1) into tY1 > > set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval > > if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount > > add 1 to tTotCount > > end if > > end repeat > put tTotCount into fld "totcountFld" > > put tLongCount into fld ?LongCountFld" > > put tLongCount/tTotCount into fld "RatioFld" > > unlock screen > > end mouseUp > > > Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? > > Thanks, > Roger > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Wed Sep 2 23:43:24 2020 From: jerry at jhjensen.com (Jerry Jensen) Date: Wed, 2 Sep 2020 20:43:24 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: Additional thought: If you just used random x and y, then ignored points outside the larger circle, you would see that 1/4 of the points would be in the smaller circle. No trig or integrals involved. .Jerry > On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: > > 1/2 is the right answer. > > Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. > > Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. > > Now add up all the possible positions of that line. Why would that change the answer? > > Congratulations, you understand integrals! > .Jerry > >> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >> >> Your chance to be Genius du Jour: >> >> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >> But, I must be doing something wrong because I get ? ! >> >> Here is my script: >> >> on mouseDown >> >> getStuff >> >> end mouseDown >> >> >> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >> >> on getStuff >> >> put item 1 of the loc of grc OuterCircle into tx0 >> >> put item 2 of the loc of grc OuterCircle into tY0 >> >> put "" into tTotCount >> >> put "" into tLongCount >> >> emptyFlds >> >> end getStuff >> >> >> on mouseUp >> >> lock screen >> >> repeat 1000 >> >> put random(200) into tR -- 200 is half the width of the larger circle >> >> if tR > 1 then >> >> ## put random(2*pi) into tTheta1 >> >> get random(360) >> >> put it*pi/180 into tTheta1 >> >> put tR*cos(tTheta1) into tX1 >> put tR*sin(tTheta1) into tY1 >> >> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >> >> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >> >> add 1 to tTotCount >> >> end if >> >> end repeat >> put tTotCount into fld "totcountFld" >> >> put tLongCount into fld ?LongCountFld" >> >> put tLongCount/tTotCount into fld "RatioFld" >> >> unlock screen >> >> end mouseUp >> >> >> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >> >> Thanks, >> Roger >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 dev at porta.ca Thu Sep 3 00:10:26 2020 From: dev at porta.ca (Dev) Date: Wed, 2 Sep 2020 22:10:26 -0600 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: Hi Jerry I just tried that because I?m no math wizard and need to see things. When shooting a random shotgun blast of 1000 pellets into the centre of a target square that contained the large circle and small circles, the ratio worked out to around 0.2 - not 0.25. It seems the corners outside the big circle receive about 20% of the shots, the inner circle gets another 20% and the outer circle gets 60%. So I don?t understand your thought about ?. Kelly > On 2Sep, 2020, at 9:43 PM, Jerry Jensen via use-livecode wrote: > > Additional thought: > If you just used random x and y, then ignored points outside the larger circle, you would see that 1/4 of the points would be in the smaller circle. > > No trig or integrals involved. > .Jerry > >> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >> >> 1/2 is the right answer. >> >> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >> >> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >> >> Now add up all the possible positions of that line. Why would that change the answer? >> >> Congratulations, you understand integrals! >> .Jerry >> >>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>> >>> Your chance to be Genius du Jour: >>> >>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>> But, I must be doing something wrong because I get ? ! >>> >>> Here is my script: >>> >>> on mouseDown >>> >>> getStuff >>> >>> end mouseDown >>> >>> >>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>> >>> on getStuff >>> >>> put item 1 of the loc of grc OuterCircle into tx0 >>> >>> put item 2 of the loc of grc OuterCircle into tY0 >>> >>> put "" into tTotCount >>> >>> put "" into tLongCount >>> >>> emptyFlds >>> >>> end getStuff >>> >>> >>> on mouseUp >>> >>> lock screen >>> >>> repeat 1000 >>> >>> put random(200) into tR -- 200 is half the width of the larger circle >>> >>> if tR > 1 then >>> >>> ## put random(2*pi) into tTheta1 >>> >>> get random(360) >>> >>> put it*pi/180 into tTheta1 >>> >>> put tR*cos(tTheta1) into tX1 >>> put tR*sin(tTheta1) into tY1 >>> >>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>> >>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>> >>> add 1 to tTotCount >>> >>> end if >>> >>> end repeat >>> put tTotCount into fld "totcountFld" >>> >>> put tLongCount into fld ?LongCountFld" >>> >>> put tLongCount/tTotCount into fld "RatioFld" >>> >>> unlock screen >>> >>> end mouseUp >>> >>> >>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>> >>> Thanks, >>> Roger >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 dev at porta.ca Thu Sep 3 00:25:06 2020 From: dev at porta.ca (Dev) Date: Wed, 2 Sep 2020 22:25:06 -0600 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: Me again Jerry Changed the setup so that the pellets landing outside the big circle were ignored and just kept going until I had 1000 within the circles in a completely random pattern without Trig. Now the ratio in the smaller circle is 25% or ? like the area comparison would suggest. You do understand math much better than I do obviously! Kelly > On 2Sep, 2020, at 10:10 PM, Dev wrote: > > Hi Jerry > > I just tried that because I?m no math wizard and need to see things. When shooting a random shotgun blast of 1000 pellets into the centre of a target square that contained the large circle and small circles, the ratio worked out to around 0.2 - not 0.25. It seems the corners outside the big circle receive about 20% of the shots, the inner circle gets another 20% and the outer circle gets 60%. So I don?t understand your thought about ?. > > Kelly > >> On 2Sep, 2020, at 9:43 PM, Jerry Jensen via use-livecode wrote: >> >> Additional thought: >> If you just used random x and y, then ignored points outside the larger circle, you would see that 1/4 of the points would be in the smaller circle. >> >> No trig or integrals involved. >> .Jerry >> >>> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >>> >>> 1/2 is the right answer. >>> >>> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >>> >>> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >>> >>> Now add up all the possible positions of that line. Why would that change the answer? >>> >>> Congratulations, you understand integrals! >>> .Jerry >>> >>>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>>> >>>> Your chance to be Genius du Jour: >>>> >>>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>>> But, I must be doing something wrong because I get ? ! >>>> >>>> Here is my script: >>>> >>>> on mouseDown >>>> >>>> getStuff >>>> >>>> end mouseDown >>>> >>>> >>>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>>> >>>> on getStuff >>>> >>>> put item 1 of the loc of grc OuterCircle into tx0 >>>> >>>> put item 2 of the loc of grc OuterCircle into tY0 >>>> >>>> put "" into tTotCount >>>> >>>> put "" into tLongCount >>>> >>>> emptyFlds >>>> >>>> end getStuff >>>> >>>> >>>> on mouseUp >>>> >>>> lock screen >>>> >>>> repeat 1000 >>>> >>>> put random(200) into tR -- 200 is half the width of the larger circle >>>> >>>> if tR > 1 then >>>> >>>> ## put random(2*pi) into tTheta1 >>>> >>>> get random(360) >>>> >>>> put it*pi/180 into tTheta1 >>>> >>>> put tR*cos(tTheta1) into tX1 >>>> put tR*sin(tTheta1) into tY1 >>>> >>>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>>> >>>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>>> >>>> add 1 to tTotCount >>>> >>>> end if >>>> >>>> end repeat >>>> put tTotCount into fld "totcountFld" >>>> >>>> put tLongCount into fld ?LongCountFld" >>>> >>>> put tLongCount/tTotCount into fld "RatioFld" >>>> >>>> unlock screen >>>> >>>> end mouseUp >>>> >>>> >>>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>>> >>>> Thanks, >>>> Roger >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 jerry at jhjensen.com Thu Sep 3 00:50:55 2020 From: jerry at jhjensen.com (Jerry Jensen) Date: Wed, 2 Sep 2020 21:50:55 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: <2757115B-4B7C-49CC-A8D0-AE6035FE01B4@jhjensen.com> Whew !! > On Sep 2, 2020, at 9:25 PM, Dev via use-livecode wrote: > > Me again Jerry > > Changed the setup so that the pellets landing outside the big circle were ignored and just kept going until I had 1000 within the circles in a completely random pattern without Trig. Now the ratio in the smaller circle is 25% or ? like the area comparison would suggest. > > You do understand math much better than I do obviously! > > Kelly > >> On 2Sep, 2020, at 10:10 PM, Dev wrote: >> >> Hi Jerry >> >> I just tried that because I?m no math wizard and need to see things. When shooting a random shotgun blast of 1000 pellets into the centre of a target square that contained the large circle and small circles, the ratio worked out to around 0.2 - not 0.25. It seems the corners outside the big circle receive about 20% of the shots, the inner circle gets another 20% and the outer circle gets 60%. So I don?t understand your thought about ?. >> >> Kelly >> >>> On 2Sep, 2020, at 9:43 PM, Jerry Jensen via use-livecode wrote: >>> >>> Additional thought: >>> If you just used random x and y, then ignored points outside the larger circle, you would see that 1/4 of the points would be in the smaller circle. >>> >>> No trig or integrals involved. >>> .Jerry >>> >>>> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >>>> >>>> 1/2 is the right answer. >>>> >>>> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >>>> >>>> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >>>> >>>> Now add up all the possible positions of that line. Why would that change the answer? >>>> >>>> Congratulations, you understand integrals! >>>> .Jerry >>>> >>>>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>>>> >>>>> Your chance to be Genius du Jour: >>>>> >>>>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>>>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>>>> But, I must be doing something wrong because I get ? ! >>>>> >>>>> Here is my script: >>>>> >>>>> on mouseDown >>>>> >>>>> getStuff >>>>> >>>>> end mouseDown >>>>> >>>>> >>>>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>>>> >>>>> on getStuff >>>>> >>>>> put item 1 of the loc of grc OuterCircle into tx0 >>>>> >>>>> put item 2 of the loc of grc OuterCircle into tY0 >>>>> >>>>> put "" into tTotCount >>>>> >>>>> put "" into tLongCount >>>>> >>>>> emptyFlds >>>>> >>>>> end getStuff >>>>> >>>>> >>>>> on mouseUp >>>>> >>>>> lock screen >>>>> >>>>> repeat 1000 >>>>> >>>>> put random(200) into tR -- 200 is half the width of the larger circle >>>>> >>>>> if tR > 1 then >>>>> >>>>> ## put random(2*pi) into tTheta1 >>>>> >>>>> get random(360) >>>>> >>>>> put it*pi/180 into tTheta1 >>>>> >>>>> put tR*cos(tTheta1) into tX1 >>>>> put tR*sin(tTheta1) into tY1 >>>>> >>>>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>>>> >>>>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>>>> >>>>> add 1 to tTotCount >>>>> >>>>> end if >>>>> >>>>> end repeat >>>>> put tTotCount into fld "totcountFld" >>>>> >>>>> put tLongCount into fld ?LongCountFld" >>>>> >>>>> put tLongCount/tTotCount into fld "RatioFld" >>>>> >>>>> unlock screen >>>>> >>>>> end mouseUp >>>>> >>>>> >>>>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>>>> >>>>> Thanks, >>>>> Roger >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode 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 ahsoftware at sonic.net Thu Sep 3 00:56:17 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Wed, 2 Sep 2020 21:56:17 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: <66b0ca33-b712-d800-892e-5e46859686e5@sonic.net> On 9/2/20 9:25 PM, Dev via use-livecode wrote: > You do understand math much better than I do obviously! Better than I do as well. I was puzzling over that thing until Jerry came through with the answer. -- Mark Wieder ahsoftware at gmail.com From MikeKerner at roadrunner.com Thu Sep 3 07:30:58 2020 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 3 Sep 2020 07:30:58 -0400 Subject: Hacktoberfest is coming In-Reply-To: References: Message-ID: it's not the engine, it's the ide portion, which is not binary. in addition, as it is a fork, it would be maintained in parallel with the LC version, so when LC releases an update, beta or otherwise to the ide, you would merge it into the fork, and review all the diffs. in some other projects, the community fork thus becomes the major branch and the community becomes the major maintainers of the fork. i'm not saying it's easy, and i am by no means volunteering to do it. it's a suggestion for the community to consider: if we are jointly frustrated with LC's IDE and the progress it is making, especially in accepting and integrating PR's, then we do have the option of forking it, perhaps for the purpose of fast-tracking updates, experimental features, etc. things that might appeal to an audience of developers: * PR's issued for open bug reports, e.g. mobile scrolling (PR issued in...June, I think?) * Project Browser * Code folding * Speed in the script editor It's not like there aren't multiple independent projects going on that couldn't make this effort better. Some of those are: Navigator Baker's Assistant Any of Bernd's proposed SE updates On Wed, Sep 2, 2020 at 12:21 PM Richard Gaskin via use-livecode < use-livecode at lists.runrev.com> wrote: > Mike Kerner wrote: > > > there isn't any reason why we can't have a fork of the ide that > > doesn't sit around waiting for themuns to say "ok". > > I've considered this myself, but maintaining something as complex as > LC's IDE is no small task. In fact, I'm finding it less time consuming > to replace portions as I need them than to prowl around in that complex > code. > > But even if someone had the time for to maintain a fork of the IDE (and > you might get some assistance on that from others if you do), engine > pull requests would still be in queue with the mother ship. Few in our > community have the C++ skills to do serious work on the engine, and the > GPL license would make using such a community project a non-starter for > most license holders. > > -- > 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 > -- 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 irog at mac.com Thu Sep 3 11:17:21 2020 From: irog at mac.com (Roger Guay) Date: Thu, 3 Sep 2020 08:17:21 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> Message-ID: <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> Jerry, You?ve done a very nice job of describing what?s actually(?) happening in my code, but I think you missed the point of my question. You agree that if you simply sample random pixels then the ratio of a random pick inside the smaller circle will depend on the area of the circles. And, if I pick a random x and y within the concentric circles of radius R and 2R, ? of the time they will lie in the smaller circle and ? of the time in the bigger. So, pick any random x and y and convert to radial coordinates. Everything should work! In my code I pick a random angle and a random radius (radial coordinates) within the limits of the larger circle, thus picking random points within the area of the larger circle, yet I get ? (which you say is the right answer). My intent was to pick random points (using radial coordinates) for which the result should be ?! What?s wrong with my code? Thanks, Roger > On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: > > 1/2 is the right answer. > > Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. > > Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. > > Now add up all the possible positions of that line. Why would that change the answer? > > Congratulations, you understand integrals! > .Jerry > >> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >> >> Your chance to be Genius du Jour: >> >> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >> But, I must be doing something wrong because I get ? ! >> >> Here is my script: >> >> on mouseDown >> >> getStuff >> >> end mouseDown >> >> >> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >> >> on getStuff >> >> put item 1 of the loc of grc OuterCircle into tx0 >> >> put item 2 of the loc of grc OuterCircle into tY0 >> >> put "" into tTotCount >> >> put "" into tLongCount >> >> emptyFlds >> >> end getStuff >> >> >> on mouseUp >> >> lock screen >> >> repeat 1000 >> >> put random(200) into tR -- 200 is half the width of the larger circle >> >> if tR > 1 then >> >> ## put random(2*pi) into tTheta1 >> >> get random(360) >> >> put it*pi/180 into tTheta1 >> >> put tR*cos(tTheta1) into tX1 >> put tR*sin(tTheta1) into tY1 >> >> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >> >> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >> >> add 1 to tTotCount >> >> end if >> >> end repeat >> put tTotCount into fld "totcountFld" >> >> put tLongCount into fld ?LongCountFld" >> >> put tLongCount/tTotCount into fld "RatioFld" >> >> unlock screen >> >> end mouseUp >> >> >> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >> >> Thanks, >> Roger >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 irog at mac.com Thu Sep 3 13:21:25 2020 From: irog at mac.com (Roger Guay) Date: Thu, 3 Sep 2020 10:21:25 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> Message-ID: Or to put it simply, how would one select random point (e.g. in a circle) using Polar Coordinates?? Roger > On Sep 3, 2020, at 8:17 AM, Roger Guay via use-livecode wrote: > > Jerry, > > You?ve done a very nice job of describing what?s actually(?) happening in my code, but I think you missed the point of my question. > You agree that if you simply sample random pixels then the ratio of a random pick inside the smaller circle will depend on the area of the circles. > And, if I pick a random x and y within the concentric circles of radius R and 2R, ? of the time they will lie in the smaller circle and ? of the time in the bigger. > So, pick any random x and y and convert to radial coordinates. Everything should work! > In my code I pick a random angle and a random radius (radial coordinates) within the limits of the larger circle, thus picking random points within the area of the larger circle, yet I get ? (which you say is the right answer). > My intent was to pick random points (using radial coordinates) for which the result should be ?! > > What?s wrong with my code? > > Thanks, > > Roger > >> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >> >> 1/2 is the right answer. >> >> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >> >> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >> >> Now add up all the possible positions of that line. Why would that change the answer? >> >> Congratulations, you understand integrals! >> .Jerry >> >>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>> >>> Your chance to be Genius du Jour: >>> >>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>> But, I must be doing something wrong because I get ? ! >>> >>> Here is my script: >>> >>> on mouseDown >>> >>> getStuff >>> >>> end mouseDown >>> >>> >>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>> >>> on getStuff >>> >>> put item 1 of the loc of grc OuterCircle into tx0 >>> >>> put item 2 of the loc of grc OuterCircle into tY0 >>> >>> put "" into tTotCount >>> >>> put "" into tLongCount >>> >>> emptyFlds >>> >>> end getStuff >>> >>> >>> on mouseUp >>> >>> lock screen >>> >>> repeat 1000 >>> >>> put random(200) into tR -- 200 is half the width of the larger circle >>> >>> if tR > 1 then >>> >>> ## put random(2*pi) into tTheta1 >>> >>> get random(360) >>> >>> put it*pi/180 into tTheta1 >>> >>> put tR*cos(tTheta1) into tX1 >>> put tR*sin(tTheta1) into tY1 >>> >>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>> >>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>> >>> add 1 to tTotCount >>> >>> end if >>> >>> end repeat >>> put tTotCount into fld "totcountFld" >>> >>> put tLongCount into fld ?LongCountFld" >>> >>> put tLongCount/tTotCount into fld "RatioFld" >>> >>> unlock screen >>> >>> end mouseUp >>> >>> >>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>> >>> Thanks, >>> Roger >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 francois.chaplais at mines-paristech.fr Thu Sep 3 13:55:51 2020 From: francois.chaplais at mines-paristech.fr (francois.chaplais at mines-paristech.fr) Date: Thu, 3 Sep 2020 19:55:51 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> Message-ID: <2d502c40-f4b0-42bd-b14c-7f764c1ad693@Spark> There is no simple way, because the infinitesimal area is polar coordinates is r dr dtheta where r is the radius and theta is the angle. More intuitively, the farther you are from the center, the smaller the angle that covers a fixed size pixel becomes. All the best, Fran?ois Le 3 sept. 2020 ? 19:22 +0200, Roger Guay via use-livecode , a ?crit : > Or to put it simply, how would one select random point (e.g. in a circle) using Polar Coordinates?? > > Roger > > > On Sep 3, 2020, at 8:17 AM, Roger Guay via use-livecode wrote: > > > > Jerry, > > > > You?ve done a very nice job of describing what?s actually(?) happening in my code, but I think you missed the point of my question. > > You agree that if you simply sample random pixels then the ratio of a random pick inside the smaller circle will depend on the area of the circles. > > And, if I pick a random x and y within the concentric circles of radius R and 2R, ? of the time they will lie in the smaller circle and ? of the time in the bigger. > > So, pick any random x and y and convert to radial coordinates. Everything should work! > > In my code I pick a random angle and a random radius (radial coordinates) within the limits of the larger circle, thus picking random points within the area of the larger circle, yet I get ? (which you say is the right answer). > > My intent was to pick random points (using radial coordinates) for which the result should be ?! > > > > What?s wrong with my code? > > > > Thanks, > > > > Roger > > > > > On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: > > > > > > 1/2 is the right answer. > > > > > > Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. > > > > > > Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. > > > > > > Now add up all the possible positions of that line. Why would that change the answer? > > > > > > Congratulations, you understand integrals! > > > .Jerry > > > > > > > On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: > > > > > > > > Your chance to be Genius du Jour: > > > > > > > > If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. > > > > Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. > > > > But, I must be doing something wrong because I get ? ! > > > > > > > > Here is my script: > > > > > > > > on mouseDown > > > > > > > > getStuff > > > > > > > > end mouseDown > > > > > > > > > > > > local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount > > > > > > > > on getStuff > > > > > > > > put item 1 of the loc of grc OuterCircle into tx0 > > > > > > > > put item 2 of the loc of grc OuterCircle into tY0 > > > > > > > > put "" into tTotCount > > > > > > > > put "" into tLongCount > > > > > > > > emptyFlds > > > > > > > > end getStuff > > > > > > > > > > > > on mouseUp > > > > > > > > lock screen > > > > > > > > repeat 1000 > > > > > > > > put random(200) into tR -- 200 is half the width of the larger circle > > > > > > > > if tR > 1 then > > > > > > > > ## put random(2*pi) into tTheta1 > > > > > > > > get random(360) > > > > > > > > put it*pi/180 into tTheta1 > > > > > > > > put tR*cos(tTheta1) into tX1 > > > > put tR*sin(tTheta1) into tY1 > > > > > > > > set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval > > > > > > > > if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount > > > > > > > > add 1 to tTotCount > > > > > > > > end if > > > > > > > > end repeat > > > > put tTotCount into fld "totcountFld" > > > > > > > > put tLongCount into fld ?LongCountFld" > > > > > > > > put tLongCount/tTotCount into fld "RatioFld" > > > > > > > > unlock screen > > > > > > > > end mouseUp > > > > > > > > > > > > Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? > > > > > > > > Thanks, > > > > Roger > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode 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 richmondmathewson at gmail.com Thu Sep 3 14:08:55 2020 From: richmondmathewson at gmail.com (Richmond) Date: Thu, 3 Sep 2020 21:08:55 +0300 Subject: ...and now for something completely off the wall... In-Reply-To: <32D9CB87-6835-4856-B43D-D5824DA3B725@mac.com> References: <827CEE4B-6195-450D-B794-0587C82C8C99@iotecdigital.com> <0d28b27f-9b58-8113-3498-0b3d295a3f3b@gmail.com> <32D9CB87-6835-4856-B43D-D5824DA3B725@mac.com> Message-ID: <83ba2169-faa8-fa32-a3c5-1a7b243335d2@gmail.com> Well, the last line is in Latin. Also, be aware that Scots and English have been twining round each other like the two snakes on a caduceus; how ever, to my mind that is part of a poem by William Dunbar, so 15th century. Fit fashes me, mynd, is that the orthographie micht hae been chaungit, as qhat scriever screivit 'now' in the 15th centutie qhan they micht hae scrievit 'nou'? On 1.09.20 14:53, Graham Samuel via use-livecode wrote: > Richmond, is this Scots or just badly spelled 16th Century English? A genuine enquiry > > The stait of man dois change and vary, > Now sound, now seik, now blith, now sary, > Now dansand mery, now like to dee; > Timor mortis conturbat me. > > Graham > >> On 28 Aug 2020, at 21:22, Richmond via use-livecode wrote: >> >> Very droll: that's a load of Frenchies having fun. >> >> On 28.08.20 19:44, Bob Sneidar via use-livecode wrote: >>> If the painting is any indication of a real event, the Scots would be well advised to build their bon fires a wee bit further from the wooden ladders they are torturing their victims on. :-) >>> >>> Bob S >>> >>> >>>> On Aug 28, 2020, at 9:09 AM, Richmond via use-livecode wrote: >>>> >>>> Well, I suppose it is funny: about as funny as pointing out to those people in Utah who spawned this idiot that >>>> undder Scots law as a citizen of a Scottish colony whose indepndence is only de facto under Scots law he should >>>> suffer the death sentence for treason: drawing and quartering. >>>> >>>> https://upload.wikimedia.org/wikipedia/commons/f/fc/BNMsFr2643FroissartFol97vExecHughDespenser.jpg >>>> >>>> On 28.08.20 18:54, Bob Sneidar via use-livecode wrote: >>>>> ? >>>>> >>>>>> On Aug 28, 2020, at 7:59 AM, Mark Wieder via use-livecode wrote: >>>>>> >>>>>> Almost every article on the Scots version of Wikipedia is written by one American teenager who can't speak Scots >>>>>> >>>>>> "A veelage is a clustered human settlement or community, larger than a hamlet but smawer than a toun, wi a population rangin frae a few hunder tae a few thoosand (sometimes tens o thoosands)." >>>>>> >>>>>> https://boingboing.net/2020/08/27/almost-every-article-on-the-sc.html >>>>>> https://www.scotslanguage.com/news/5724 >>>>>> >>>>>> -- >>>>>> 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 >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 ambassador at fourthworld.com Thu Sep 3 16:40:33 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 3 Sep 2020 13:40:33 -0700 Subject: Hacktoberfest is coming In-Reply-To: References: Message-ID: <129666f2-a908-627f-ca1d-77fa3bb9a755@fourthworld.com> True, focusing on the subset of issues in the IDE, leaving the engine work to the experts on the core team, would make the work much more actionable. The enthusiasm is good to see. I like the vision of a world where we all share one common engine and language, and have a wide range of IDE options available, tailored for our tastes and workflows. If you can find a lead maintainer on this, it may be worth pursuing. But given the work commitment involved, that may be a big "if". The nice thing about pinching off corners of IDE functionality in plugins is that the scope of work is limited to the size of the itch being scratched. They're also easier to share than convincing folks to replace their whole IDE with an alternate one. But if IDE bugs mount up without workarounds or acceptance long enough, sooner or later it will become easier to find contributors to replacing it with a fork. Like the old saying goes, "Change occurs when the pain of changing is finally exceeded by the pain of not changing." -- Richard Gaskin Fourth World Systems Mike Kerner wrote: > it's not the engine, it's the ide portion, which is not binary. > in addition, as it is a fork, it would be maintained in parallel with the > LC version, so when LC releases an update, beta or otherwise to the ide, > you would merge it into the fork, and review all the diffs. > in some other projects, the community fork thus becomes the major branch > and the community becomes the major maintainers of the fork. > i'm not saying it's easy, and i am by no means volunteering to do it. it's > a suggestion for the community to consider: if we are jointly frustrated > with LC's IDE and the progress it is making, especially in accepting and > integrating PR's, then we do have the option of forking it, perhaps for the > purpose of fast-tracking updates, experimental features, etc. > things that might appeal to an audience of developers: > * PR's issued for open bug reports, e.g. mobile scrolling (PR issued > in...June, I think?) > * Project Browser > * Code folding > * Speed in the script editor > It's not like there aren't multiple independent projects going on that > couldn't make this effort better. Some of those are: > Navigator > Baker's Assistant > Any of Bernd's proposed SE updates > > On Wed, Sep 2, 2020 at 12:21 PM Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Mike Kerner wrote: >> >> > there isn't any reason why we can't have a fork of the ide that >> > doesn't sit around waiting for themuns to say "ok". >> >> I've considered this myself, but maintaining something as complex as >> LC's IDE is no small task. In fact, I'm finding it less time consuming >> to replace portions as I need them than to prowl around in that complex >> code. >> >> But even if someone had the time for to maintain a fork of the IDE (and >> you might get some assistance on that from others if you do), engine >> pull requests would still be in queue with the mother ship. Few in our >> community have the C++ skills to do serious work on the engine, and the >> GPL license would make using such a community project a non-starter for >> most license holders. >> >> -- >> 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 >> > > > -- > 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 runrev at vonfintel.org Thu Sep 3 16:42:12 2020 From: runrev at vonfintel.org (Thomas von Fintel) Date: Thu, 3 Sep 2020 22:42:12 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> Message-ID: <494282b8-39ea-71fa-44b4-726b68bf5973@vonfintel.org> I think the easiest way is to adjust the linear random function so that it produces higher numbers more frequently than lower numbers. More precisely, the frequency of 10 must be four times that of 5 (because the area quadruples if you double the radius). Or else the outer points have a lower probability of being found. If you replace put random(200) into tR -- 200 is half the width of the larger circle by put sqrt(random(1000^2))/1000*200 into tR -- 200 is half the width of the larger circle you get random numbers that fulfil these requirements. If you only want to test whether a certain point is within the inner corcle, you only need to look at the radius. But I assume you need this in a more complicated situation. I hope this helps Thomas Am 03.09.2020 um 19:21 schrieb Roger Guay via use-livecode: > Or to put it simply, how would one select random point (e.g. in a circle) using Polar Coordinates?? > > Roger > >> On Sep 3, 2020, at 8:17 AM, Roger Guay via use-livecode wrote: >> >> Jerry, >> >> You?ve done a very nice job of describing what?s actually(?) happening in my code, but I think you missed the point of my question. >> You agree that if you simply sample random pixels then the ratio of a random pick inside the smaller circle will depend on the area of the circles. >> And, if I pick a random x and y within the concentric circles of radius R and 2R, ? of the time they will lie in the smaller circle and ? of the time in the bigger. >> So, pick any random x and y and convert to radial coordinates. Everything should work! >> In my code I pick a random angle and a random radius (radial coordinates) within the limits of the larger circle, thus picking random points within the area of the larger circle, yet I get ? (which you say is the right answer). >> My intent was to pick random points (using radial coordinates) for which the result should be ?! >> >> What?s wrong with my code? >> >> Thanks, >> >> Roger >> >>> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >>> >>> 1/2 is the right answer. >>> >>> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >>> >>> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >>> >>> Now add up all the possible positions of that line. Why would that change the answer? >>> >>> Congratulations, you understand integrals! >>> .Jerry >>> >>>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>>> >>>> Your chance to be Genius du Jour: >>>> >>>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>>> But, I must be doing something wrong because I get ? ! >>>> >>>> Here is my script: >>>> >>>> on mouseDown >>>> >>>> getStuff >>>> >>>> end mouseDown >>>> >>>> >>>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>>> >>>> on getStuff >>>> >>>> put item 1 of the loc of grc OuterCircle into tx0 >>>> >>>> put item 2 of the loc of grc OuterCircle into tY0 >>>> >>>> put "" into tTotCount >>>> >>>> put "" into tLongCount >>>> >>>> emptyFlds >>>> >>>> end getStuff >>>> >>>> >>>> on mouseUp >>>> >>>> lock screen >>>> >>>> repeat 1000 >>>> >>>> put random(200) into tR -- 200 is half the width of the larger circle >>>> >>>> if tR > 1 then >>>> >>>> ## put random(2*pi) into tTheta1 >>>> >>>> get random(360) >>>> >>>> put it*pi/180 into tTheta1 >>>> >>>> put tR*cos(tTheta1) into tX1 >>>> put tR*sin(tTheta1) into tY1 >>>> >>>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>>> >>>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>>> >>>> add 1 to tTotCount >>>> >>>> end if >>>> >>>> end repeat >>>> put tTotCount into fld "totcountFld" >>>> >>>> put tLongCount into fld ?LongCountFld" >>>> >>>> put tLongCount/tTotCount into fld "RatioFld" >>>> >>>> unlock screen >>>> >>>> end mouseUp >>>> >>>> >>>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>>> >>>> Thanks, >>>> Roger >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 irog at mac.com Thu Sep 3 19:46:04 2020 From: irog at mac.com (Roger Guay) Date: Thu, 3 Sep 2020 16:46:04 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <494282b8-39ea-71fa-44b4-726b68bf5973@vonfintel.org> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> <494282b8-39ea-71fa-44b4-726b68bf5973@vonfintel.org> Message-ID: <6D0B937E-F144-4EBA-AED9-97C9B02A3D50@mac.com> Great suggestion, Thomas! It works very well. Originally, I was flummoxed by my code, using polar coordinates, not working as expected. Thanks to you and the others responding to this thread, I now get it. Your suggestion reestablishes my faith in the basic math, while recognizing limitations sometime apply to any particular solution. FWIW, I am playing around with Bertrand Paradox, https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) , and I'm trying to be as precise as possible in simulating the approaches to the problem. Just having fun, as it were! Roger > On Sep 3, 2020, at 1:42 PM, Thomas von Fintel via use-livecode wrote: > > I think the easiest way is to adjust the linear random function so that it produces higher numbers more frequently than lower numbers. More precisely, the frequency of 10 must be four times that of 5 (because the area quadruples if you double the radius). Or else the outer points have a lower probability of being found. > > If you replace > > put random(200) into tR -- 200 is half the width of the larger circle > > by > > put sqrt(random(1000^2))/1000*200 into tR -- 200 is half the width of the larger circle > > you get random numbers that fulfil these requirements. > > If you only want to test whether a certain point is within the inner corcle, you only need to look at the radius. But I assume you need this in a more complicated situation. > > I hope this helps > Thomas > > > Am 03.09.2020 um 19:21 schrieb Roger Guay via use-livecode: >> Or to put it simply, how would one select random point (e.g. in a circle) using Polar Coordinates?? >> >> Roger >> >>> On Sep 3, 2020, at 8:17 AM, Roger Guay via use-livecode wrote: >>> >>> Jerry, >>> >>> You?ve done a very nice job of describing what?s actually(?) happening in my code, but I think you missed the point of my question. >>> You agree that if you simply sample random pixels then the ratio of a random pick inside the smaller circle will depend on the area of the circles. >>> And, if I pick a random x and y within the concentric circles of radius R and 2R, ? of the time they will lie in the smaller circle and ? of the time in the bigger. >>> So, pick any random x and y and convert to radial coordinates. Everything should work! >>> In my code I pick a random angle and a random radius (radial coordinates) within the limits of the larger circle, thus picking random points within the area of the larger circle, yet I get ? (which you say is the right answer). >>> My intent was to pick random points (using radial coordinates) for which the result should be ?! >>> >>> What?s wrong with my code? >>> >>> Thanks, >>> >>> Roger >>> >>>> On Sep 2, 2020, at 8:27 PM, Jerry Jensen via use-livecode wrote: >>>> >>>> 1/2 is the right answer. >>>> >>>> Take your drawing of the circles. Cut a verrrryy thin radial slice from the center to the outside circle. So thin that it is just a line. >>>> >>>> Now think of how likely a random point on that line will be in the part of the line that was in the smaller circle. The part that was from the smaller circle is HALF as long as the entire line. >>>> >>>> Now add up all the possible positions of that line. Why would that change the answer? >>>> >>>> Congratulations, you understand integrals! >>>> .Jerry >>>> >>>>> On Sep 2, 2020, at 7:38 PM, Roger Guay via use-livecode wrote: >>>>> >>>>> Your chance to be Genius du Jour: >>>>> >>>>> If I construct 2 concentric circles, one being half the radius of the larger, then simple math shows that the smaller circle has an area ? the area of the larger. >>>>> Now if I generate a random point within the radius of the larger circle, I should expect that the probability of it landing in the smaller circle to be ?. >>>>> But, I must be doing something wrong because I get ? ! >>>>> >>>>> Here is my script: >>>>> >>>>> on mouseDown >>>>> >>>>> getStuff >>>>> >>>>> end mouseDown >>>>> >>>>> >>>>> local tR, tTheta, tX0, tY0, tX1, tY1, tTotCount, tL, tLongCount >>>>> >>>>> on getStuff >>>>> >>>>> put item 1 of the loc of grc OuterCircle into tx0 >>>>> >>>>> put item 2 of the loc of grc OuterCircle into tY0 >>>>> >>>>> put "" into tTotCount >>>>> >>>>> put "" into tLongCount >>>>> >>>>> emptyFlds >>>>> >>>>> end getStuff >>>>> >>>>> >>>>> on mouseUp >>>>> >>>>> lock screen >>>>> >>>>> repeat 1000 >>>>> >>>>> put random(200) into tR -- 200 is half the width of the larger circle >>>>> >>>>> if tR > 1 then >>>>> >>>>> ## put random(2*pi) into tTheta1 >>>>> >>>>> get random(360) >>>>> >>>>> put it*pi/180 into tTheta1 >>>>> >>>>> put tR*cos(tTheta1) into tX1 >>>>> put tR*sin(tTheta1) into tY1 >>>>> >>>>> set the loc of grc Ptgrc to tX0 + tX1, tY0 - tY1 --- grc Ptgrc is a 2 pixle oval >>>>> >>>>> if intersect(grc Ptgrc, grc InnerCircle, "opaque Pixels") then add 1 to tLongCount >>>>> >>>>> add 1 to tTotCount >>>>> >>>>> end if >>>>> >>>>> end repeat >>>>> put tTotCount into fld "totcountFld" >>>>> >>>>> put tLongCount into fld ?LongCountFld" >>>>> >>>>> put tLongCount/tTotCount into fld "RatioFld" >>>>> >>>>> unlock screen >>>>> >>>>> end mouseUp >>>>> >>>>> >>>>> Apparently, this does not generate a random point within the larger circle! Can someone please tell me what?s wrong here? >>>>> >>>>> Thanks, >>>>> Roger >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode 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 bobsneidar at iotecdigital.com Fri Sep 4 13:04:55 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 4 Sep 2020 17:04:55 +0000 Subject: Hacktoberfest is coming In-Reply-To: <129666f2-a908-627f-ca1d-77fa3bb9a755@fourthworld.com> References: <129666f2-a908-627f-ca1d-77fa3bb9a755@fourthworld.com> Message-ID: That's really an old saying?? I came up with the saying People don't change until it hurts not to. I thought I was being pithy. Bob S > On Sep 3, 2020, at 13:40 , Richard Gaskin via use-livecode wrote: > > Like the old saying goes, "Change occurs when the pain of changing is finally exceeded by the pain of not changing." > > -- > Richard Gaskin > Fourth World Systems From jacque at hyperactivesw.com Fri Sep 4 15:23:50 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 4 Sep 2020 14:23:50 -0500 Subject: ANN: Zygodact 2.0.1 update available Message-ID: <8da343f1-e4fe-5046-d400-0464d114a31a@hyperactivesw.com> Zygodact is an easy way to add serial key registration to standalones. Version 2.0.1 is now available at no cost to currently registered users. There are many new features, so please read the revised documentation included with the download. Also, the most annoying bug has been fixed, and now pasting a serial key into the dialog no longer causes issues. Interested people can read more about Zygodact here: Registered users can download the latest version here: Changes in Zygodact 2.0.1 * Signed and notarized app for Mac Gatekeeper * Updated to 64-bit on Mac Changes in Zygodact 2.0.0 * Supports a single custom character in a hex key. This allows an app to branch its feature set depending on which character is assigned. * Added compatibility for Android standalones. Caveat: Due to Android OS limitations, Android use isn't as secure as the desktop version. * Added compatibility with iOS. This should NOT be used for App Store submissions, where Apple will reject it, so it's probably of limited value. It only works if the script sends "zygodact" to the register stack after a short delay; 1 tick seems to be enough. * Added compatibility with mobile platforms in the Generator stack in case you want to compile it into a standalone in order to create serial keys from a mobile device. This is not compatible with previous versions. * Added an "Email key" button to the generator stack. Works on all platforms including mobile. It launches the default email app and puts the User Name and Serial Key into the body of an otherwise blank email. You must supply the To: address, subject, etc. * Added email templates. If there is a folder named "templates" in the stack folder (or resources folder on mobile) the template is merged with the key code data for emailing. Added a version check on preOpenCard in the Setup app. If a newer version is available, Zygodact offers to go to the download page. * Added a check to avoid overwriting a set of files to a folder where older files already exist. * Fixed the bug where the Register button did not enable when pasting a serial key. * Updated documentation. Please read for more details. NOTE: New registration stacks created with version 2.0.1 are not compatible with older versions; that is, you can't replace the Register stack with a newer copy without also sending the user a new serial key. If this is a problem, please contact me privately. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Fri Sep 4 16:46:55 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 4 Sep 2020 20:46:55 +0000 Subject: Contesting for Idiot du Jour In-Reply-To: <6D0B937E-F144-4EBA-AED9-97C9B02A3D50@mac.com> References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> <494282b8-39ea-71fa-44b4-726b68bf5973@vonfintel.org> <6D0B937E-F144-4EBA-AED9-97C9B02A3D50@mac.com> Message-ID: If math breaks, we are all in for a world of hurt. Bob S On Sep 3, 2020, at 4:46 PM, Roger Guay via use-livecode > wrote: Your suggestion reestablishes my faith in the basic math, while recognizing limitations sometime apply to any particular solution. From irog at mac.com Fri Sep 4 22:39:18 2020 From: irog at mac.com (Roger Guay) Date: Fri, 4 Sep 2020 19:39:18 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: References: <5683FA72-B230-4DDB-AF2F-8AFE4DB33F5F@mac.com> <0B0B5D05-957E-4CE5-927A-81FAC02F7A1D@jhjensen.com> <89A367B9-283A-4843-A5D1-DF085BE28A65@mac.com> <494282b8-39ea-71fa-44b4-726b68bf5973@vonfintel.org> <6D0B937E-F144-4EBA-AED9-97C9B02A3D50@mac.com> Message-ID: <5F610CB5-5DDF-4DEC-9521-B2B4D32225B3@mac.com> Speaking of broken math, you should check out Bertrand Paradox. Roger > On Sep 4, 2020, at 1:46 PM, Bob Sneidar via use-livecode wrote: > > If math breaks, we are all in for a world of hurt. > > Bob S > > > On Sep 3, 2020, at 4:46 PM, Roger Guay via use-livecode > wrote: > > Your suggestion reestablishes my faith in the basic math, while recognizing limitations sometime apply to any particular solution. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From runrev at vonfintel.org Sat Sep 5 03:24:54 2020 From: runrev at vonfintel.org (Thomas von Fintel) Date: Sat, 5 Sep 2020 09:24:54 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: <5F610CB5-5DDF-4DEC-9521-B2B4D32225B3@mac.com> References: <5F610CB5-5DDF-4DEC-9521-B2B4D32225B3@mac.com> Message-ID: <4CCBEBAA-344D-4D84-9B89-50724AB3FB60@vonfintel.org> Having had no contact with Bertrand Paradox except reading the Wikipedia entries in English and German, my impression is that this is not a case of broken math but a case of an ill-defined problem. Saying that a chord of a circle is chosen at random seems to imply that all possible chords are chosen with the same probability. My interpretation would be that all points on the circle have the same probability and also every combination of two points have the same probability of being chosen. Not all methods proposed by Bertrand fulfil this requirement. My interpretation may be wrong. But the fact that you need an interpretation shows that a problem like this needs more clarification. Thomas > Am 05.09.2020 um 04:40 schrieb Roger Guay via use-livecode : > > Bertrand Paradox From irog at mac.com Sat Sep 5 11:10:08 2020 From: irog at mac.com (Roger Guay) Date: Sat, 5 Sep 2020 08:10:08 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <4CCBEBAA-344D-4D84-9B89-50724AB3FB60@vonfintel.org> References: <5F610CB5-5DDF-4DEC-9521-B2B4D32225B3@mac.com> <4CCBEBAA-344D-4D84-9B89-50724AB3FB60@vonfintel.org> Message-ID: <8479B710-4409-46F1-8580-9B4E8651F683@mac.com> My intent was not to suggest that math is ?really? broken in the Bertrand Paradox, but it did make me wonder what is going on. Enter LC. I built a simulation of your description where each of two points on a circle are randomly chosen. This kind of chord generation is consistently producing a ratio of about ? which, of course, disagrees with 2 of the methods in the BP, but is close to one of them. I don?t mean to promote controversy here . . . I am just having fun playing with this and wondering what is indeed going on??? Thanks for playing, Thomas. Roger > On Sep 5, 2020, at 12:24 AM, Thomas von Fintel via use-livecode wrote: > > Having had no contact with Bertrand Paradox except reading the Wikipedia entries in English and German, my impression is that this is not a case of broken math but a case of an ill-defined problem. > Saying that a chord of a circle is chosen at random seems to imply that all possible chords are chosen with the same probability. My interpretation would be that all points on the circle have the same probability and also every combination of two points have the same probability of being chosen. Not all methods proposed by Bertrand fulfil this requirement. > My interpretation may be wrong. But the fact that you need an interpretation shows that a problem like this needs more clarification. > > Thomas > >> Am 05.09.2020 um 04:40 schrieb Roger Guay via use-livecode : >> >> Bertrand Paradox > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Sep 5 11:32:45 2020 From: mkoob at rogers.com (Martin Koob) Date: Sat, 5 Sep 2020 11:32:45 -0400 Subject: ANN: Zygodact 2.0.1 update available In-Reply-To: <8da343f1-e4fe-5046-d400-0464d114a31a@hyperactivesw.com> References: <8da343f1-e4fe-5046-d400-0464d114a31a@hyperactivesw.com> Message-ID: <54751697-5EEB-4D59-BEE3-BF12B2DDAFD4@rogers.com> Thanks for the update. I must say Zydodact has the best preferences dialog I have ever seen. You should patent this. Martin > On Sep 4, 2020, at 3:23 PM, J. Landman Gay via use-livecode wrote: > > Zygodact is an easy way to add serial key registration to standalones. Version 2.0.1 is now available at no cost to currently registered users. There are many new features, so please read the revised documentation included with the download. Also, the most annoying bug has been fixed, and now pasting a serial key into the dialog no longer causes issues. > > Interested people can read more about Zygodact here: > > > Registered users can download the latest version here: > > > Changes in Zygodact 2.0.1 > * Signed and notarized app for Mac Gatekeeper > * Updated to 64-bit on Mac > > Changes in Zygodact 2.0.0 > * Supports a single custom character in a hex key. This allows an app to branch its feature set depending on which character is assigned. > * Added compatibility for Android standalones. Caveat: Due to Android OS limitations, Android use isn't as secure as the desktop version. > * Added compatibility with iOS. This should NOT be used for App Store submissions, where Apple will reject it, so it's probably of limited value. It only works if the script sends "zygodact" to the register stack after a short delay; 1 tick seems to be enough. > * Added compatibility with mobile platforms in the Generator stack in case you want to compile it into a standalone in order to create serial keys from a mobile device. This is not compatible with previous versions. > * Added an "Email key" button to the generator stack. Works on all platforms including mobile. It launches the default email app and puts the User Name and Serial Key into the body of an otherwise blank email. You must supply the To: address, subject, etc. > * Added email templates. If there is a folder named "templates" in the stack folder (or resources folder on mobile) the template is merged with the key code data for emailing. Added a version check on preOpenCard in the Setup app. If a newer version is available, Zygodact offers to go to the download page. > * Added a check to avoid overwriting a set of files to a folder where older files already exist. > * Fixed the bug where the Register button did not enable when pasting a serial key. > * Updated documentation. Please read for more details. > > NOTE: New registration stacks created with version 2.0.1 are not compatible with older versions; that is, you can't replace the Register stack with a newer copy without also sending the user a new serial key. If this is a problem, please contact me privately. > > -- > 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 From runrev at vonfintel.org Sat Sep 5 12:34:51 2020 From: runrev at vonfintel.org (Thomas von Fintel) Date: Sat, 5 Sep 2020 18:34:51 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: <8479B710-4409-46F1-8580-9B4E8651F683@mac.com> References: <8479B710-4409-46F1-8580-9B4E8651F683@mac.com> Message-ID: That is strange. Choosing two points ?at random? should give a ratio of 1/3. At least if you choose them by generating two random numbers between 0 and 360 and use this numbers as angles between a fixed line connecting the centre (e.g. the x-axis) and the line between the centre and the chosen point. Something like (without access to any LiveCode) put Random(360) *pi / 180 into angle1. put sin (angle1) * radius into p1y put cos (angle1) * radius into p1x That?s the method I would choose. How do you choose the two points? Thomas > Am 05.09.2020 um 17:11 schrieb Roger Guay via use-livecode : > > ?My intent was not to suggest that math is ?really? broken in the Bertrand Paradox, but it did make me wonder what is going on. > Enter LC. I built a simulation of your description where each of two points on a circle are randomly chosen. This kind of chord generation is consistently producing a ratio of about ? which, of course, disagrees with 2 of the methods in the BP, but is close to one of them. > I don?t mean to promote controversy here . . . I am just having fun playing with this and wondering what is indeed going on??? > Thanks for playing, Thomas. > > Roger > >>>> On Sep 5, 2020, at 12:24 AM, Thomas von Fintel via use-livecode wrote: >> Having had no contact with Bertrand Paradox except reading the Wikipedia entries in English and German, my impression is that this is not a case of broken math but a case of an ill-defined problem. >> Saying that a chord of a circle is chosen at random seems to imply that all possible chords are chosen with the same probability. My interpretation would be that all points on the circle have the same probability and also every combination of two points have the same probability of being chosen. Not all methods proposed by Bertrand fulfil this requirement. >> My interpretation may be wrong. But the fact that you need an interpretation shows that a problem like this needs more clarification. >> Thomas >>>> Am 05.09.2020 um 04:40 schrieb Roger Guay via use-livecode : >>> Bertrand Paradox >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 irog at mac.com Sat Sep 5 13:14:46 2020 From: irog at mac.com (Roger Guay) Date: Sat, 5 Sep 2020 10:14:46 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: References: <8479B710-4409-46F1-8580-9B4E8651F683@mac.com> Message-ID: You?re absolutely right. I should have been more careful in describing what I did: In addition to your method, using polar coordinates, which results in a ratio of ?, I also did a random selection of 2 points on the circle in cartesian coordinates which produces the ?. Very curious! I am now wondering if I did the math right? I am known for making many more mistakes than not! Roger > On Sep 5, 2020, at 9:34 AM, Thomas von Fintel via use-livecode wrote: > > That is strange. Choosing two points ?at random? should give a ratio of 1/3. > > At least if you choose them by generating two random numbers between 0 and 360 and use this numbers as angles between a fixed line connecting the centre (e.g. the x-axis) and the line between the centre and the chosen point. > Something like (without access to any LiveCode) > put Random(360) *pi / 180 into angle1. > put sin (angle1) * radius into p1y > put cos (angle1) * radius into p1x > That?s the method I would choose. > How do you choose the two points? > > Thomas > > > >> Am 05.09.2020 um 17:11 schrieb Roger Guay via use-livecode : >> >> ?My intent was not to suggest that math is ?really? broken in the Bertrand Paradox, but it did make me wonder what is going on. >> Enter LC. I built a simulation of your description where each of two points on a circle are randomly chosen. This kind of chord generation is consistently producing a ratio of about ? which, of course, disagrees with 2 of the methods in the BP, but is close to one of them. >> I don?t mean to promote controversy here . . . I am just having fun playing with this and wondering what is indeed going on??? >> Thanks for playing, Thomas. >> >> Roger >> >>>>> On Sep 5, 2020, at 12:24 AM, Thomas von Fintel via use-livecode wrote: >>> Having had no contact with Bertrand Paradox except reading the Wikipedia entries in English and German, my impression is that this is not a case of broken math but a case of an ill-defined problem. >>> Saying that a chord of a circle is chosen at random seems to imply that all possible chords are chosen with the same probability. My interpretation would be that all points on the circle have the same probability and also every combination of two points have the same probability of being chosen. Not all methods proposed by Bertrand fulfil this requirement. >>> My interpretation may be wrong. But the fact that you need an interpretation shows that a problem like this needs more clarification. >>> Thomas >>>>> Am 05.09.2020 um 04:40 schrieb Roger Guay via use-livecode : >>>> Bertrand Paradox >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 runrev at vonfintel.org Sat Sep 5 14:07:55 2020 From: runrev at vonfintel.org (Thomas von Fintel) Date: Sat, 5 Sep 2020 20:07:55 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: References: Message-ID: <089D3BCE-B232-46BF-8584-C33879B3BC94@vonfintel.org> ?I am known for making many more mistakes than not!? Aren?t we all? I guess using Cartesian coordinates for choosing points on a circle could produce some bias, though I have no clear idea how. So, what is your code? Thomas > Am 05.09.2020 um 19:15 schrieb Roger Guay via use-livecode : > > I am known for making many more mistakes than not! From irog at mac.com Sat Sep 5 14:28:28 2020 From: irog at mac.com (Roger Guay) Date: Sat, 5 Sep 2020 11:28:28 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <089D3BCE-B232-46BF-8584-C33879B3BC94@vonfintel.org> References: <089D3BCE-B232-46BF-8584-C33879B3BC94@vonfintel.org> Message-ID: <4BC32AD8-8116-4DCD-9339-CF02EF1A6FB6@mac.com> Aha, in prepping my code to send to you, I found an error! Now the Cartesian Coord code is consistent with the Polar Coord code producing a ratio of about ?. Here is the code: on mouseDown getStuff end mouseDown local tR, tX0, tY0, txl, tX1, tY1, tconstL, tTotCount, tL, tLongCount, tLocA, tLocB on getStuff put item 1 of the loc of grc OuterCircle into tX0 put item 2 of the loc of grc OuterCircle into tY0 put the width of grc OuterCircle/2 into tR put the left of grc outerCircle into tXl put 2*tR*cos(Pi/6) into tconstL put "" into tTotCount put "" into tLongCount emptyFlds end getStuff on mouseUp lock screen repeat 10000 add 1 to tTotCount PickApointA PickApointB set the points of grc theChord to tLocA, tLocB GetLength tLocA, tLocB end repeat put tTotCount into fld "totcountFld" put tLongCount/tTotCount into fld "RatioFld" unlock screen end mouseUp on PickApointA set the numberFormat to "#." put tXl + random(400) into X put sqrt(tR^2 - (X-tX0)^2) - tY0 into y get random(2) if it is 1 then put x, + y+2*tY0 into tLocA else put x, - y into tLocA end PickApointA on PickApointB set the numberFormat to "#." put tXl + random(400) into X put sqrt(tR^2 - (X-tX0)^2) - tY0 into y get random(2) if it is 1 then put x, + y+2*tY0 into tLocB else put x, - y into tLocB end PickApointB on GetLength pLocA, pLocB put item 1 of pLocA into PX1 put item 2 of pLocA into Py1 put item 1 of pLocB into PX2 put item 2 of pLocB into Py2 set the numberFormat to "#.0" put (pX2- pX1)^2 + (pY2- pY1)^2 into Lsquared put Sqrt(Lsquared) into tL if tL > tconstL then add 1 to tLongCount --- put tLongCount into fld "LongCountFld" end GetLength Thanks, Roger > On Sep 5, 2020, at 11:07 AM, Thomas von Fintel via use-livecode wrote: > > ?I am known for making many more mistakes than not!? > Aren?t we all? > I guess using Cartesian coordinates for choosing points on a circle could produce some bias, though I have no clear idea how. > So, what is your code? > > Thomas > >> Am 05.09.2020 um 19:15 schrieb Roger Guay via use-livecode : >> >> I am known for making many more mistakes than not! > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From runrev at vonfintel.org Sat Sep 5 16:19:28 2020 From: runrev at vonfintel.org (Thomas von Fintel) Date: Sat, 5 Sep 2020 22:19:28 +0200 Subject: Contesting for Idiot du Jour In-Reply-To: <4BC32AD8-8116-4DCD-9339-CF02EF1A6FB6@mac.com> References: <089D3BCE-B232-46BF-8584-C33879B3BC94@vonfintel.org> <4BC32AD8-8116-4DCD-9339-CF02EF1A6FB6@mac.com> Message-ID: <0a94d2bf-76f1-5fdd-0555-96ac0579ea76@vonfintel.org> I am officially puzzled and out of my waters. If you divide the circle in four equal parts using two diagonal lines, you find that 25 percent of all points have a x-value of more than 70 percent of the radius. Using 200 as radius, 25% of all points x > 141,42 (= cos(45?)*200). But using your method only 60/400 = 15% of points have value x greater than 141,42. So there ecertainly is a bias towards points in the upper and lower quarter. I have no idea why this bias isn't influencing your results. Maybe because the second point is also influenced by this bias. But how? I wonder whether it's okay to keep this discussion on the list. We are straying far from matters LiveCode. Thomas Am 05.09.2020 um 20:28 schrieb Roger Guay via use-livecode: > Aha, in prepping my code to send to you, I found an error! Now the Cartesian Coord code is consistent with the Polar Coord code producing a ratio of about ?. Here is the code: > > on mouseDown > > getStuff > > end mouseDown > > > local tR, tX0, tY0, txl, tX1, tY1, tconstL, tTotCount, tL, tLongCount, tLocA, tLocB > > > on getStuff > > put item 1 of the loc of grc OuterCircle into tX0 > > put item 2 of the loc of grc OuterCircle into tY0 > > put the width of grc OuterCircle/2 into tR > > put the left of grc outerCircle into tXl > > put 2*tR*cos(Pi/6) into tconstL > > put "" into tTotCount > > put "" into tLongCount > > emptyFlds > > end getStuff > > > on mouseUp > > lock screen > > repeat 10000 > > add 1 to tTotCount > > PickApointA > > PickApointB > > set the points of grc theChord to tLocA, tLocB > > GetLength tLocA, tLocB > > end repeat > > put tTotCount into fld "totcountFld" > > put tLongCount/tTotCount into fld "RatioFld" > > unlock screen > > end mouseUp > > > on PickApointA > > set the numberFormat to "#." > > put tXl + random(400) into X > > put sqrt(tR^2 - (X-tX0)^2) - tY0 into y > > get random(2) > > if it is 1 then put x, + y+2*tY0 into tLocA > > else put x, - y into tLocA > > end PickApointA > > > on PickApointB > > set the numberFormat to "#." > > put tXl + random(400) into X > > put sqrt(tR^2 - (X-tX0)^2) - tY0 into y > > get random(2) > > if it is 1 then put x, + y+2*tY0 into tLocB > > else put x, - y into tLocB > > end PickApointB > > > on GetLength pLocA, pLocB > > put item 1 of pLocA into PX1 > > put item 2 of pLocA into Py1 > > put item 1 of pLocB into PX2 > > put item 2 of pLocB into Py2 > > set the numberFormat to "#.0" > > put (pX2- pX1)^2 + (pY2- pY1)^2 into Lsquared > > put Sqrt(Lsquared) into tL > > if tL > tconstL then add 1 to tLongCount --- > > put tLongCount into fld "LongCountFld" > > end GetLength > > > Thanks, > Roger > > >> On Sep 5, 2020, at 11:07 AM, Thomas von Fintel via use-livecode wrote: >> >> ?I am known for making many more mistakes than not!? >> Aren?t we all? >> I guess using Cartesian coordinates for choosing points on a circle could produce some bias, though I have no clear idea how. >> So, what is your code? >> >> Thomas >> >>> Am 05.09.2020 um 19:15 schrieb Roger Guay via use-livecode : >>> >>> I am known for making many more mistakes than not! >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 jacque at hyperactivesw.com Sat Sep 5 16:52:17 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 05 Sep 2020 15:52:17 -0500 Subject: ANN: Zygodact 2.0.1 update available In-Reply-To: <54751697-5EEB-4D59-BEE3-BF12B2DDAFD4@rogers.com> References: <8da343f1-e4fe-5046-d400-0464d114a31a@hyperactivesw.com> <54751697-5EEB-4D59-BEE3-BF12B2DDAFD4@rogers.com> Message-ID: <174600a87e8.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Ah well. If I weren't so indifferent I might have. :) -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 5, 2020 10:34:47 AM Martin Koob via use-livecode wrote: > Thanks for the update. > > I must say Zydodact has the best preferences dialog I have ever seen. You > should patent this. > > Martin > >> On Sep 4, 2020, at 3:23 PM, J. Landman Gay via use-livecode >> wrote: >> >> Zygodact is an easy way to add serial key registration to standalones. >> Version 2.0.1 is now available at no cost to currently registered users. >> There are many new features, so please read the revised documentation >> included with the download. Also, the most annoying bug has been fixed, and >> now pasting a serial key into the dialog no longer causes issues. >> >> Interested people can read more about Zygodact here: >> >> >> Registered users can download the latest version here: >> >> >> Changes in Zygodact 2.0.1 >> * Signed and notarized app for Mac Gatekeeper >> * Updated to 64-bit on Mac >> >> Changes in Zygodact 2.0.0 >> * Supports a single custom character in a hex key. This allows an app to >> branch its feature set depending on which character is assigned. >> * Added compatibility for Android standalones. Caveat: Due to Android OS >> limitations, Android use isn't as secure as the desktop version. >> * Added compatibility with iOS. This should NOT be used for App Store >> submissions, where Apple will reject it, so it's probably of limited value. >> It only works if the script sends "zygodact" to the register stack after a >> short delay; 1 tick seems to be enough. >> * Added compatibility with mobile platforms in the Generator stack in case >> you want to compile it into a standalone in order to create serial keys >> from a mobile device. This is not compatible with previous versions. >> * Added an "Email key" button to the generator stack. Works on all >> platforms including mobile. It launches the default email app and puts the >> User Name and Serial Key into the body of an otherwise blank email. You >> must supply the To: address, subject, etc. >> * Added email templates. If there is a folder named "templates" in the >> stack folder (or resources folder on mobile) the template is merged with >> the key code data for emailing. Added a version check on preOpenCard in the >> Setup app. If a newer version is available, Zygodact offers to go to the >> download page. >> * Added a check to avoid overwriting a set of files to a folder where older >> files already exist. >> * Fixed the bug where the Register button did not enable when pasting a >> serial key. >> * Updated documentation. Please read for more details. >> >> NOTE: New registration stacks created with version 2.0.1 are not compatible >> with older versions; that is, you can't replace the Register stack with a >> newer copy without also sending the user a new serial key. If this is a >> problem, please contact me privately. >> >> -- >> 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 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From irog at mac.com Sat Sep 5 22:35:45 2020 From: irog at mac.com (Roger Guay) Date: Sat, 5 Sep 2020 19:35:45 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <0a94d2bf-76f1-5fdd-0555-96ac0579ea76@vonfintel.org> References: <089D3BCE-B232-46BF-8584-C33879B3BC94@vonfintel.org> <4BC32AD8-8116-4DCD-9339-CF02EF1A6FB6@mac.com> <0a94d2bf-76f1-5fdd-0555-96ac0579ea76@vonfintel.org> Message-ID: <24951A7C-9B54-4AB0-B5C7-36C8B4588A3B@mac.com> I?m having trouble understanding this last message or how you got these results, but I guess you?re right about this topic being somewhat straying from LC. So, I want to say I really appreciate your help and ideas. I will continue to attempt to push back the frontiers of my ignorance. Thanks and cheers, Roger > On Sep 5, 2020, at 1:19 PM, Thomas von Fintel via use-livecode wrote: > > f you divide the circle in four equal parts using two diagonal lines, you find that 25 percent of all points have a x-value of more than 70 percent of the radius. Using 200 as radius, 25% of all points x > 141,42 (= cos(45?)*200). But using your method only 60/400 = 15% of points have value x greater than 141,42. So there ecertainly is a bias towards points in the upper and lower quarter. > > I have no idea why this bias isn't influencing your results. Maybe because the second point is also influenced by this bias. But how? > > I wonder whether it's okay to keep this discussion on the list. We are straying far from matters LiveCode. From brahma at hindu.org Sun Sep 6 09:58:39 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sun, 6 Sep 2020 13:58:39 +0000 Subject: How Do You Get Filename / Image Message-ID: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> Maybe it is aphasia... How do we get file from one location to another location on mouseUp local tRelativeURL -- repeat with x = 1 to (the number of cards of stack ?SlideShowSetUp?) --go card x set the itemdelimiter to ?/? put (the item -2 to -1 of the filename of img ?slideimage? ) into tRelativeURL # this works is: there is a path # 1-ellora/dsc1234.jpg # this does not work: put URL(?binfile:? & tRelativeURL ) into URL(?binfile:_ForWebSite/? & tRelativeURL) put the filename of img ?slideimage? into URL(?binfile:_ForWebSite/? & tRelativeURL) -- end repeat end mouseUp ?? Brahmanathaswami From sean at pidigital.co.uk Sun Sep 6 13:54:48 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Sun, 6 Sep 2020 18:54:48 +0100 Subject: Contesting for Idiot du Jour In-Reply-To: <24951A7C-9B54-4AB0-B5C7-36C8B4588A3B@mac.com> References: <24951A7C-9B54-4AB0-B5C7-36C8B4588A3B@mac.com> Message-ID: <4B821871-F59F-4127-810C-7F4EBFF35FB3@pidigital.co.uk> Pixel math: Counting incomplete pixels within a circle outline (%Pass)(%Fail): 10x10 = 88 (88%)(12%) 20x20 = 344 (86%)(14%) 100x100 = 8012 (80%)(20%) Counting complete pixels: 10x10 = 48 (48%)(52%) 20x20 = 276 (69%)(31%) 100x100 = 7444 (74.4%)(26%) Your conclusion here: _________________________ From brian at milby7.com Sun Sep 6 14:06:55 2020 From: brian at milby7.com (Brian Milby) Date: Sun, 6 Sep 2020 14:06:55 -0400 Subject: How Do You Get Filename / Image In-Reply-To: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> References: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> Message-ID: Looks like you need to specify a full path for the source and destination. on mouseUp local tImageName, tDestinationPath set the itemdelimiter to "/" put (item -1 of the filename of img 1 ) into tImageName put item 1 to -2 of the filename of this stack & "/" into tDestinationPath put URL("binfile:" & the filename of img 1 ) into URL("binfile:" & tDestinationPath & tImageName) end mouseUp On Sun, Sep 6, 2020 at 9:59 AM Sannyasin Brahmanathaswami via use-livecode < use-livecode at lists.runrev.com> wrote: > Maybe it is aphasia... > > How do we get file from one location to another location > > on mouseUp > local tRelativeURL > -- repeat with x = 1 to (the number of cards of stack > ?SlideShowSetUp?) > --go card x > set the itemdelimiter to ?/? > put (the item -2 to -1 of the filename of img ?slideimage? ) into > tRelativeURL > # this works is: there is a path > # 1-ellora/dsc1234.jpg > > # this does not work: > put URL(?binfile:? & tRelativeURL ) into > URL(?binfile:_ForWebSite/? & tRelativeURL) > > put the filename of img ?slideimage? into > URL(?binfile:_ForWebSite/? & tRelativeURL) > > -- end repeat > end mouseUp > > ?? > > Brahmanathaswami > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From brahma at hindu.org Sun Sep 6 17:31:16 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sun, 6 Sep 2020 21:31:16 +0000 Subject: How Do You Get Filename / Image In-Reply-To: References: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> Message-ID: <3B8C63B1-0E8C-4A19-9F11-DB9D403FD50A@hindu.org> Looks like that does not work on mouseUp local tImageName, tDestinationPath,tHolder set the itemdelimiter to "/" put (item -2 to -1 of the filename of img "slideImage") into tImageName put "_ForWebSite/" into tDestinationPath put tDestinationPath & tImageName into tHolder -- put URL("binfile:" & the filename of img "slideImage" ) into URL("binfile:" & tDestinationPath & tImageName) put the filename of img "slideImage" into URL("binfile:" & tDestinationPath & tImageName) end mouseUp ?On 9/6/20, 8:08 AM, "use-livecode on behalf of Brian Milby via use-livecode" wrote: Looks like you need to specify a full path for the source and destination. on mouseUp local tImageName, tDestinationPath set the itemdelimiter to "/" put (item -1 of the filename of img 1 ) into tImageName put item 1 to -2 of the filename of this stack & "/" into tDestinationPath put URL("binfile:" & the filename of img 1 ) into URL("binfile:" & tDestinationPath & tImageName) end mouseUp On Sun, Sep 6, 2020 at 9:59 AM Sannyasin Brahmanathaswami via use-livecode < use-livecode at lists.runrev.com> wrote: > Maybe it is aphasia... > > How do we get file from one location to another location > > on mouseUp > local tRelativeURL > -- repeat with x = 1 to (the number of cards of stack > ?SlideShowSetUp?) > --go card x > set the itemdelimiter to ?/? > put (the item -2 to -1 of the filename of img ?slideimage? ) into > tRelativeURL > # this works is: there is a path > # 1-ellora/dsc1234.jpg > > # this does not work: > put URL(?binfile:? & tRelativeURL ) into > URL(?binfile:_ForWebSite/? & tRelativeURL) > > put the filename of img ?slideimage? into > URL(?binfile:_ForWebSite/? & tRelativeURL) > > -- end repeat > end mouseUp > > ?? > > Brahmanathaswami > > > _______________________________________________ > use-livecode mailing list > use-livecode 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 Sun Sep 6 17:46:03 2020 From: phil at pdslabs.net (Phil Davis) Date: Sun, 6 Sep 2020 14:46:03 -0700 Subject: How Do You Get Filename / Image In-Reply-To: <3B8C63B1-0E8C-4A19-9F11-DB9D403FD50A@hindu.org> References: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> <3B8C63B1-0E8C-4A19-9F11-DB9D403FD50A@hindu.org> Message-ID: <0662d789-1af4-6d7d-fff5-e6c231a374a1@pdslabs.net> Maybe check the result after your 'put URL... into URL ...' statement. That might give you a hint about the problem. Phil Davis On 9/6/20 2:31 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > Looks like that does not work > > on mouseUp > local tImageName, tDestinationPath,tHolder > set the itemdelimiter to "/" > put (item -2 to -1 of the filename of img "slideImage") into tImageName > > put "_ForWebSite/" into tDestinationPath > put tDestinationPath & tImageName into tHolder > -- put URL("binfile:" & the filename of img "slideImage" ) into URL("binfile:" & tDestinationPath & tImageName) > put the filename of img "slideImage" into URL("binfile:" & tDestinationPath & tImageName) > > end mouseUp > > > ?On 9/6/20, 8:08 AM, "use-livecode on behalf of Brian Milby via use-livecode" wrote: > > Looks like you need to specify a full path for the source and destination. > > on mouseUp > local tImageName, tDestinationPath > set the itemdelimiter to "/" > put (item -1 of the filename of img 1 ) into tImageName > put item 1 to -2 of the filename of this stack & "/" into tDestinationPath > put URL("binfile:" & the filename of img 1 ) into URL("binfile:" & tDestinationPath & tImageName) > end mouseUp > > > On Sun, Sep 6, 2020 at 9:59 AM Sannyasin Brahmanathaswami via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Maybe it is aphasia... > > > > How do we get file from one location to another location > > > > on mouseUp > > local tRelativeURL > > -- repeat with x = 1 to (the number of cards of stack > > ?SlideShowSetUp?) > > --go card x > > set the itemdelimiter to ?/? > > put (the item -2 to -1 of the filename of img ?slideimage? ) into > > tRelativeURL > > # this works is: there is a path > > # 1-ellora/dsc1234.jpg > > > > # this does not work: > > put URL(?binfile:? & tRelativeURL ) into > > URL(?binfile:_ForWebSite/? & tRelativeURL) > > > > put the filename of img ?slideimage? into > > URL(?binfile:_ForWebSite/? & tRelativeURL) > > > > -- end repeat > > end mouseUp > > > > ?? > > > > Brahmanathaswami > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 -- Phil Davis 503-307-4363 From sean at pidigital.co.uk Sun Sep 6 18:01:41 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Sun, 6 Sep 2020 23:01:41 +0100 Subject: How Do You Get Filename / Image In-Reply-To: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> References: <55E9E34E-333C-4B65-BBC5-40AFF1ECC9DE@hindu.org> Message-ID: <9BF7787A-08A6-4D3F-BFD4-D2800BFCAC15@pidigital.co.uk> on mouseUp local tRelativeURL -- repeat with x = 1 to (the number of cards of stack ?SlideShowSetUp?) --go card x set the itemdelimiter to ?/? put (the item -2 to -1 of the filename of img ?slideimage? ) into tRelativeURL # this works is: there is a path # 1-ellora/dsc1234.jpg # this will work Set the defaultFolder to item 1 to -3 of the filename of img ?slideimage? # Just in case: If there is not a folder ?_ForWebSite? then Create folder ?_ForWebSite? End if put URL(?binfile:? & tRelativeURL ) into URL(?binfile:_ForWebSite/? & tRelativeURL) # I?m going to assume this was a hiccup too and now fixed: set the filename of img ?slideimage? to URL(?binfile:_ForWebSite/? & tRelativeURL) -- end repeat end mouseUp > On 6 Sep 2020, at 14:58, Sannyasin Brahmanathaswami via use-livecode wrote: > > ?Maybe it is aphasia... > > How do we get file from one location to another location > > ?? > > Brahmanathaswami From sean at pidigital.co.uk Sun Sep 6 18:37:06 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Sun, 6 Sep 2020 23:37:06 +0100 Subject: How Do You Get Filename / Image In-Reply-To: <9BF7787A-08A6-4D3F-BFD4-D2800BFCAC15@pidigital.co.uk> References: <9BF7787A-08A6-4D3F-BFD4-D2800BFCAC15@pidigital.co.uk> Message-ID: I?ll try that again:: # I?m going to assume this was a hiccup too and now fixed: set the filename of img ?slideimage? to (item 1 to -3 of the filename of img ?slideimage? & ?/_ForWebSite/? & tRelativeURL) > On 6 Sep 2020, at 23:01, Pi Digital via use-livecode wrote: > > # I?m going to assume this was a hiccup too and now fixed: > set the filename of img ?slideimage? to URL(?binfile:_ForWebSite/? & tRelativeURL) From m.schonewille at economy-x-talk.com Sun Sep 6 22:05:01 2020 From: m.schonewille at economy-x-talk.com (Drs Mark Schonewille) Date: Mon, 7 Sep 2020 04:05:01 +0200 Subject: GABRIELE STROE could you please contact me Message-ID: <5acef902-be9a-f9b4-b455-e34c93bc267d@economy-x-talk.com> Dear Gabriele Stroe, We (Economy-x-Talk) have tried to contact you in every possible way. We have even tried to call you, but your phone number appears dysfunctional. Please contact me as a as possible by sending an e-mail addres to m.schonewille at economy-x-talk.com, or contact me on Twitter (xtalkprogrammer) or Facebook (marksch) if you have trouble sending e-mails. -- Mark Schonewille Economy-x-Talk https://ecxtalk.nl https://www.nt2.nu Programming LiveCode for the Real Beginner http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner From irog at mac.com Mon Sep 7 00:26:28 2020 From: irog at mac.com (Roger Guay) Date: Sun, 6 Sep 2020 21:26:28 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <4B821871-F59F-4127-810C-7F4EBFF35FB3@pidigital.co.uk> References: <24951A7C-9B54-4AB0-B5C7-36C8B4588A3B@mac.com> <4B821871-F59F-4127-810C-7F4EBFF35FB3@pidigital.co.uk> Message-ID: I?m sorry, I don?t understand your terminology. Could you please elaborate? Thanks, Roger > On Sep 6, 2020, at 10:54 AM, Pi Digital via use-livecode wrote: > > Pixel math: > > Counting incomplete pixels within a circle outline (%Pass)(%Fail): > 10x10 = 88 (88%)(12%) > 20x20 = 344 (86%)(14%) > 100x100 = 8012 (80%)(20%) > > Counting complete pixels: > 10x10 = 48 (48%)(52%) > 20x20 = 276 (69%)(31%) > 100x100 = 7444 (74.4%)(26%) > > Your conclusion 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 sean at pidigital.co.uk Mon Sep 7 05:04:31 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Mon, 7 Sep 2020 10:04:31 +0100 Subject: Contesting for Idiot du Jour In-Reply-To: References: Message-ID: <7D5FD3D5-972E-4228-9374-10420FB157A3@pidigital.co.uk> Sure. Draw a circle on a 10x10, 20x20, 100x100, etc grid. Only Whole pixels get counted (Pass or 1 in digital binary). Depending on the methodology, either 1) only those within the circle line (complete) or 2) those on the line itself and within it (incomplete). In your example, a 200x200 circle has a resolution where it?s practically negligible from regular mathematics. However, the resolution at 100x100 and lower starts to flat wildly away from it. If you are measuring using collision and it?s accounting for antialiased pixels it can become even more diverse from standard math as it does not ?see? it in percentages of visible, only on or off. So, the difference between measuring only inside of a 200x200 and outside of the 100x100 will throw off considerably any ordinary calculations you might expect. Even a 400x400 PixelWise ?circle?. Look up Gauss? Circle Problem. The same chap we get the name for Gaussian blur from. > On 7 Sep 2020, at 05:26, Roger Guay via use-livecode wrote: > > ?I?m sorry, I don?t understand your terminology. Could you please elaborate? > > Thanks, > Roger > >> On Sep 6, 2020, at 10:54 AM, Pi Digital via use-livecode wrote: >> >> Pixel math: >> >> Counting incomplete pixels within a circle outline (%Pass)(%Fail): >> 10x10 = 88 (88%)(12%) >> 20x20 = 344 (86%)(14%) >> 100x100 = 8012 (80%)(20%) >> >> Counting complete pixels: >> 10x10 = 48 (48%)(52%) >> 20x20 = 276 (69%)(31%) >> 100x100 = 7444 (74.4%)(26%) >> >> Your conclusion 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 > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brahma at hindu.org Mon Sep 7 10:11:01 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 7 Sep 2020 14:11:01 +0000 Subject: How Do You Get Filename / Image In-Reply-To: References: <9BF7787A-08A6-4D3F-BFD4-D2800BFCAC15@pidigital.co.uk> Message-ID: <941EA31E-D8F3-4CD8-8D63-172B5DAF57DF@hindu.org> Goal: to get a folder a disk that can be copied to the web server. We have all kinds of files on disk. So, I am trying to copy a list of filename in the cards of stack. It can't that hard. But I think the method for doing the tRelativeName of filename is "broken" where are get the defaultFolder. So I tried this. As it as simple as revCopyFile (as I discovered in that dictionary) But this don't work! on mouseUp local tImageName, tDestinationPath, tDefaultFolder get the effective filename of this stack set the itemdelimiter to "/" put item 1 to -2 of it into tDefaultFolder set the defaultFolder to tDefaultFolder put the defaultFolder # it appears correct --put the filename of img "slideImage" into tImageName put "ellora /DC123344.jpg" into tImageName put "_ForWebSite" into tDestinationPath revCopyFile tImageName, tDestinationPath end mouseup # I'm against the wall on this! ____________ # but directed at your attempt did not work # as expected, no file was written # a new attempt at your email was expecting # but the defaultFolder was entirely different! on mouseUp local tRelativeURL set the itemdelimiter to "/" put (the item -2 to -1 of the filename of img "slideimage" ) into tRelativeURL # this works is: there is a path # 1-ellora/dsc1234.jpg # this will work Set the defaultFolder to item 1 to -3 of the filename of img "slideimage" put the defaultFolder # a defaultFolder appeared that was older put URL("binfile:" & tRelativeURL ) into URL("binfile:_ForWebSite/"& tRelativeURL) end mouseUp ? Pi Digital wrote: I?ll try that again:: # I?m going to assume this was a hiccup too and now fixed: set the filename of img ?slideimage? to (item 1 to -3 of the filename of img ?slideimage? & ?/_ForWebSite/? & tRelativeURL) > On 6 Sep 2020, at 23:01, Pi Digital via use-livecode wrote: > > # I?m going to assume this was a hiccup too and now fixed: > set the filename of img ?slideimage? to URL(?binfile:_ForWebSite/? & tRelativeURL) From panos.merakos at livecode.com Mon Sep 7 10:34:22 2020 From: panos.merakos at livecode.com (panagiotis merakos) Date: Mon, 7 Sep 2020 17:34:22 +0300 Subject: [ANN] This Week in LiveCode 237 Message-ID: Hi all, Read about new developments in LiveCode open source and the open source community in today's edition of the "This Week in LiveCode" newsletter! Read issue #237 here: https://bit.ly/2R4TQzw This is a weekly newsletter about LiveCode, focussing on what's been going on in and around the open source project. New issues will be released weekly on Mondays. We have a dedicated mailing list that will deliver each issue directly to your e-mail, so you don't miss any! If you have anything you'd like mentioned (a project, a discussion somewhere, an upcoming event) then please get in touch. -- Panagiotis Merakos LiveCode Software Developer Everyone Can Create Apps From sean at pidigital.co.uk Mon Sep 7 11:29:36 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Mon, 7 Sep 2020 16:29:36 +0100 Subject: How Do You Get Filename / Image In-Reply-To: <941EA31E-D8F3-4CD8-8D63-172B5DAF57DF@hindu.org> References: <941EA31E-D8F3-4CD8-8D63-172B5DAF57DF@hindu.org> Message-ID: <78D9624F-C059-4D9E-A3AB-BFCEA14CC1A3@pidigital.co.uk> I see. You will need to use the full path for tImageName. That will be true for all of the file names you have stored on your cards and stacks. With images, the filename can be either the full path or a relative path, relative to the defaultFolder or the folder the stack is saved in. RevCopy only assumes names without full paths to be relative to the defaultFolder, not the stack location. RevCopy is definitely better when on desktop systems. One way to only see full paths is by turning on ?Always use absolute file paths for images? in the Files & Memory section of the main LC prefs. Or you could set the defaultFolder to specialFolderPath(?resources?) if you would prefer to keep relative paths in the file lists. Relying on ?item n1 to n2? for working out the origin path is not always going to be right, especially if you have been using relative paths in your script. Best to use full paths for both tImageName and tDestinationPath. Just make sure there wasn?t a space after ?ellora? as in your sample. I?m confident you will work this out. As you said, it can?t be hard :) It is working fine using both methods here so I?m sure it?s going to be something simple you end up kicking yourself about. All the best. > On 7 Sep 2020, at 15:11, Sannyasin Brahmanathaswami via use-livecode wrote: > > ?Goal: to get a folder a disk that can be copied to the web server. We have all kinds of files on disk. So, I am trying to copy a list of filename in the cards of stack. It can't that hard. But I think the method for doing the tRelativeName of filename is "broken" where are get the defaultFolder. > > So I tried this. As it as simple as revCopyFile (as I discovered in that dictionary) > > But this don't work! > > on mouseUp > local tImageName, tDestinationPath, tDefaultFolder > get the effective filename of this stack > set the itemdelimiter to "/" > put item 1 to -2 of it into tDefaultFolder > > set the defaultFolder to tDefaultFolder > put the defaultFolder > # it appears correct > > --put the filename of img "slideImage" into tImageName > > put "ellora /DC123344.jpg" into tImageName > put "_ForWebSite" into tDestinationPath > > revCopyFile tImageName, tDestinationPath > > end mouseup > > # I'm against the wall on this! > ____________ > # but directed at your attempt did not work > # as expected, no file was written > > # a new attempt at your email was expecting > # but the defaultFolder was entirely different! > > on mouseUp > local tRelativeURL > > set the itemdelimiter to "/" > put (the item -2 to -1 of the filename of img "slideimage" ) into tRelativeURL > # this works is: there is a path > # 1-ellora/dsc1234.jpg > > # this will work > Set the defaultFolder to item 1 to -3 of the filename of img "slideimage" > put the defaultFolder > # a defaultFolder appeared that was older > > put URL("binfile:" & tRelativeURL ) into URL("binfile:_ForWebSite/"& tRelativeURL) > > end mouseUp > > ? Pi Digital wrote: > > I?ll try that again:: > > # I?m going to assume this was a hiccup too and now fixed: > set the filename of img ?slideimage? to (item 1 to -3 of the filename of img ?slideimage? & ?/_ForWebSite/? & tRelativeURL) > >> On 6 Sep 2020, at 23:01, Pi Digital via use-livecode wrote: >> >> # I?m going to assume this was a hiccup too and now fixed: >> set the filename of img ?slideimage? to URL(?binfile:_ForWebSite/? & tRelativeURL) > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From irog at mac.com Mon Sep 7 13:12:07 2020 From: irog at mac.com (Roger Guay) Date: Mon, 7 Sep 2020 10:12:07 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <7D5FD3D5-972E-4228-9374-10420FB157A3@pidigital.co.uk> References: <7D5FD3D5-972E-4228-9374-10420FB157A3@pidigital.co.uk> Message-ID: <9BD9574A-75EB-400B-A7EC-059D5D54DECA@mac.com> Thank you! This is excellent information for me to keep in mind. And a special thanks for pointing me to the Gauss Circle Problem. Roger > On Sep 7, 2020, at 2:04 AM, Pi Digital via use-livecode wrote: > > Sure. Draw a circle on a 10x10, 20x20, 100x100, etc grid. Only Whole pixels get counted (Pass or 1 in digital binary). Depending on the methodology, either 1) only those within the circle line (complete) or 2) those on the line itself and within it (incomplete). > > In your example, a 200x200 circle has a resolution where it?s practically negligible from regular mathematics. However, the resolution at 100x100 and lower starts to flat wildly away from it. If you are measuring using collision and it?s accounting for antialiased pixels it can become even more diverse from standard math as it does not ?see? it in percentages of visible, only on or off. > > So, the difference between measuring only inside of a 200x200 and outside of the 100x100 will throw off considerably any ordinary calculations you might expect. Even a 400x400 PixelWise ?circle?. > > Look up Gauss? Circle Problem. The same chap we get the name for Gaussian blur from. > >> On 7 Sep 2020, at 05:26, Roger Guay via use-livecode wrote: >> >> ?I?m sorry, I don?t understand your terminology. Could you please elaborate? >> >> Thanks, >> Roger >> >>> On Sep 6, 2020, at 10:54 AM, Pi Digital via use-livecode wrote: >>> >>> Pixel math: >>> >>> Counting incomplete pixels within a circle outline (%Pass)(%Fail): >>> 10x10 = 88 (88%)(12%) >>> 20x20 = 344 (86%)(14%) >>> 100x100 = 8012 (80%)(20%) >>> >>> Counting complete pixels: >>> 10x10 = 48 (48%)(52%) >>> 20x20 = 276 (69%)(31%) >>> 100x100 = 7444 (74.4%)(26%) >>> >>> Your conclusion 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 >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 irog at mac.com Mon Sep 7 13:16:20 2020 From: irog at mac.com (Roger Guay) Date: Mon, 7 Sep 2020 10:16:20 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <7D5FD3D5-972E-4228-9374-10420FB157A3@pidigital.co.uk> References: <7D5FD3D5-972E-4228-9374-10420FB157A3@pidigital.co.uk> Message-ID: ? and reminding me yet again that most things are never black or white! > On Sep 7, 2020, at 2:04 AM, Pi Digital via use-livecode wrote: > > Sure. Draw a circle on a 10x10, 20x20, 100x100, etc grid. Only Whole pixels get counted (Pass or 1 in digital binary). Depending on the methodology, either 1) only those within the circle line (complete) or 2) those on the line itself and within it (incomplete). > > In your example, a 200x200 circle has a resolution where it?s practically negligible from regular mathematics. However, the resolution at 100x100 and lower starts to flat wildly away from it. If you are measuring using collision and it?s accounting for antialiased pixels it can become even more diverse from standard math as it does not ?see? it in percentages of visible, only on or off. > > So, the difference between measuring only inside of a 200x200 and outside of the 100x100 will throw off considerably any ordinary calculations you might expect. Even a 400x400 PixelWise ?circle?. > > Look up Gauss? Circle Problem. The same chap we get the name for Gaussian blur from. > >> On 7 Sep 2020, at 05:26, Roger Guay via use-livecode wrote: >> >> ?I?m sorry, I don?t understand your terminology. Could you please elaborate? >> >> Thanks, >> Roger >> >>> On Sep 6, 2020, at 10:54 AM, Pi Digital via use-livecode wrote: >>> >>> Pixel math: >>> >>> Counting incomplete pixels within a circle outline (%Pass)(%Fail): >>> 10x10 = 88 (88%)(12%) >>> 20x20 = 344 (86%)(14%) >>> 100x100 = 8012 (80%)(20%) >>> >>> Counting complete pixels: >>> 10x10 = 48 (48%)(52%) >>> 20x20 = 276 (69%)(31%) >>> 100x100 = 7444 (74.4%)(26%) >>> >>> Your conclusion 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 >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 sean at pidigital.co.uk Mon Sep 7 15:05:56 2020 From: sean at pidigital.co.uk (Pi Digital) Date: Mon, 7 Sep 2020 20:05:56 +0100 Subject: Contesting for Idiot du Jour In-Reply-To: References: Message-ID: <60E511E2-2955-499E-9BAE-0B2750D3ED29@pidigital.co.uk> Except Black ... and white. > On 7 Sep 2020, at 18:16, Roger Guay via use-livecode wrote: > > ?? and reminding me yet again that most things are never black or white! From irog at mac.com Mon Sep 7 18:48:44 2020 From: irog at mac.com (Roger Guay) Date: Mon, 7 Sep 2020 15:48:44 -0700 Subject: Contesting for Idiot du Jour In-Reply-To: <60E511E2-2955-499E-9BAE-0B2750D3ED29@pidigital.co.uk> References: <60E511E2-2955-499E-9BAE-0B2750D3ED29@pidigital.co.uk> Message-ID: <6BA2992B-0A56-4FF2-B9FD-58C23A5B3C93@mac.com> That?s why I said most! > On Sep 7, 2020, at 12:05 PM, Pi Digital via use-livecode wrote: > > Except Black > > ... and white. > > >> On 7 Sep 2020, at 18:16, Roger Guay via use-livecode wrote: >> >> ?? and reminding me yet again that most things are never black or white! > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brahma at hindu.org Mon Sep 7 22:32:47 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Tue, 8 Sep 2020 02:32:47 +0000 Subject: How Do You Get Filename / Image In-Reply-To: <78D9624F-C059-4D9E-A3AB-BFCEA14CC1A3@pidigital.co.uk> References: <941EA31E-D8F3-4CD8-8D63-172B5DAF57DF@hindu.org> <78D9624F-C059-4D9E-A3AB-BFCEA14CC1A3@pidigital.co.uk> Message-ID: Yes! It was so easy. I did not expect to find that specialFolderPath("resources") on desktop went to folder with your stack inside it. Perfect for tDefaultFolder This did my job! Yay! on mouseUp local tImageName, tDestinationPath,tFolder, tDefaultFolder put specialFolderPath("resources") into tDefaultFolder set the itemdelimiter to "/" repeat with x = 1 to the number of cards go card x put the filename of img "slideImage" into tImageName put item 1 of tImageName into tFolder create folder tDefaultFolder & "/_ForWebSite/" & tFolder put tDefaultFolder & "/" & the filename of img "slideImage" into tImageName put tDefaultFolder & "/_ForWebSite/" & tFolder & "/" into tDestinationPath revCopyFile tImageName, tDestinationPath end repeat end mouseup ? Pi Digital wrote: I see. From engleerica at yahoo.com Tue Sep 8 23:55:12 2020 From: engleerica at yahoo.com (Eric A. Engle) Date: Wed, 9 Sep 2020 03:55:12 +0000 (UTC) Subject: text manipulation with Chinese characters (unicode): guide? References: <1924915525.84357.1599623712542.ref@mail.yahoo.com> Message-ID: <1924915525.84357.1599623712542@mail.yahoo.com> Hi! I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. Is this possible in livecode? How? Are there any good Recent guides to working with unicode in livecode? From richmondmathewson at gmail.com Wed Sep 9 03:57:44 2020 From: richmondmathewson at gmail.com (Richmond) Date: Wed, 9 Sep 2020 10:57:44 +0300 Subject: text manipulation with Chinese characters (unicode): guide? In-Reply-To: <1924915525.84357.1599623712542@mail.yahoo.com> References: <1924915525.84357.1599623712542.ref@mail.yahoo.com> <1924915525.84357.1599623712542@mail.yahoo.com> Message-ID: <592281dd-fc48-45f3-0ca8-a76ef7c2afe6@gmail.com> I won't pretend to know anything about Chinese. BUT, I have just copy-pasted ?? from a Google Translate window into an LC text-field. I have, also, copied Chinese ideographs from one text-field and posted them into a second one. Dead easy. :-) Richmond. On 9.09.20 6:55, Eric A. Engle via use-livecode wrote: > Hi! > > I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. > > Is this possible in livecode? How? Are there any good Recent guides to working with unicode in 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 Wed Sep 9 08:37:22 2020 From: paul at researchware.com (Paul Dupuis) Date: Wed, 9 Sep 2020 08:37:22 -0400 Subject: text manipulation with Chinese characters (unicode): guide? In-Reply-To: <1924915525.84357.1599623712542@mail.yahoo.com> References: <1924915525.84357.1599623712542.ref@mail.yahoo.com> <1924915525.84357.1599623712542@mail.yahoo.com> Message-ID: <377095e3-277d-6c39-4462-3b1bc8b934d1@researchware.com> As mentions, Unicode in a field just works (there is a known issue with Thai word breaks and another with printing Hindi) If you want to get Chinese (traditional or simplified) into a field, you can: 1)? get the text from a Utf8 ot utf16 text file and textDecode it i.e put url ("file:"&filepath) into tContent; put textDecode(tContent,"utf8") into fld "someField" 2) get the text from an RTF file, like the above, but set the rtfText of the field to the imported rtf data 3) use a 3rd party library, like Wordlib (see the livecode store) to read Microsoft Word .docx or Open Office .odt files On 9/8/2020 11:55 PM, Eric A. Engle via use-livecode wrote: > Hi! > > I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. > > Is this possible in livecode? How? Are there any good Recent guides to working with unicode in 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 MikeKerner at roadrunner.com Wed Sep 9 10:16:05 2020 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 9 Sep 2020 10:16:05 -0400 Subject: Hacktoberfest is coming In-Reply-To: References: <129666f2-a908-627f-ca1d-77fa3bb9a755@fourthworld.com> Message-ID: it's yours until you get a cease and desist letter. On Fri, Sep 4, 2020 at 1:06 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > That's really an old saying?? I came up with the saying People don't > change until it hurts not to. I thought I was being pithy. > > Bob S > > > > On Sep 3, 2020, at 13:40 , Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Like the old saying goes, "Change occurs when the pain of changing is > finally exceeded by the pain of not changing." > > > > -- > > 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 > -- 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 curry at pair.com Wed Sep 9 13:28:43 2020 From: curry at pair.com (Curry Kenworthy) Date: Wed, 9 Sep 2020 13:28:43 -0400 Subject: text manipulation with Chinese characters (unicode): guide? In-Reply-To: <1924915525.84357.1599623712542@mail.yahoo.com> References: <1924915525.84357.1599623712542@mail.yahoo.com> Message-ID: Livecode ???????? ????????? ???????????????????????????? Livecode ????????????????????????? ?????????????????? :) Best wishes, Curry Kenworthy Custom Software Development "Better Methods, Better Results" LiveCode Training and Consulting http://livecodeconsulting.com/ From bogdanoff at me.com Wed Sep 9 13:58:05 2020 From: bogdanoff at me.com (Peter Bogdanoff) Date: Wed, 9 Sep 2020 10:58:05 -0700 Subject: text manipulation with Chinese characters (unicode): guide? In-Reply-To: <377095e3-277d-6c39-4462-3b1bc8b934d1@researchware.com> References: <1924915525.84357.1599623712542.ref@mail.yahoo.com> <1924915525.84357.1599623712542@mail.yahoo.com> <377095e3-277d-6c39-4462-3b1bc8b934d1@researchware.com> Message-ID: <7E76355C-A0CF-460E-9922-243EBF69EB83@me.com> I?ve been working with simplified Chinese for some time now. You can indeed move and manipulate the characters quite straightforwardly. I do see some odd line breaks that show mostly in narrow fields. If you are working with cross-platform (Mac/Windows) text, you won?t necessarily get uniformity between them. Windows text is rendered slightly wider. If you?re working on a Mac and setting some text to a particular font, the same text that is displayed can be bad if you don?t have the font installed on the Windows machine. Font substitution happens, which will look odd. Fonts in Chinese are somewhat of a black hole. Peter Bogdanoff > On Sep 9, 2020, at 5:37 AM, Paul Dupuis via use-livecode wrote: > > As mentions, Unicode in a field just works (there is a known issue with Thai word breaks and another with printing Hindi) > > If you want to get Chinese (traditional or simplified) into a field, you can: > > 1) get the text from a Utf8 ot utf16 text file and textDecode it i.e put url ("file:"&filepath) into tContent; put textDecode(tContent,"utf8") into fld "someField" > 2) get the text from an RTF file, like the above, but set the rtfText of the field to the imported rtf data > 3) use a 3rd party library, like Wordlib (see the livecode store) to read Microsoft Word .docx or Open Office .odt files > > > On 9/8/2020 11:55 PM, Eric A. Engle via use-livecode wrote: >> Hi! >> >> I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. >> >> Is this possible in livecode? How? Are there any good Recent guides to working with unicode in 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 david.bovill at gmail.com Thu Sep 10 17:37:21 2020 From: david.bovill at gmail.com (David Bovill) Date: Thu, 10 Sep 2020 22:37:21 +0100 Subject: Looping though a numerically indexed array In-Reply-To: <136A22F8-0EE0-42C3-A07A-D829A50B7BF5@milby7.com> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <136A22F8-0EE0-42C3-A07A-D829A50B7BF5@milby7.com> Message-ID: <5594a0bf-5e56-4ee4-a2f9-e37b4f0609d2@Spark> Ah that explains it. The extents works but I seem to remember for each is considerably faster On 2 Sep 2020, 16:29 +0100, Brian Milby via use-livecode , wrote: > As long as the array is indexed starting at 1 with no gaps it should work by looping for each element. I just did a quick test to confirm. I built a 100 element array and it looped in order. I deleted 2 keys and then it didn?t. I then added those 2 missing keys back and it worked again. > > Sent from my iPhone > > > On Sep 2, 2020, at 10:55 AM, David Bovill via use-livecode wrote: > > > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 Thu Sep 10 17:41:48 2020 From: david.bovill at gmail.com (David Bovill) Date: Thu, 10 Sep 2020 22:41:48 +0100 Subject: Possible : stack with transparent backgound? In-Reply-To: <56FCC584-34FA-49AB-A7AA-53227A7C173E@iotecdigital.com> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <002301d6813d$1cafcdc0$560f6940$@net> <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> <56FCC584-34FA-49AB-A7AA-53227A7C173E@iotecdigital.com> Message-ID: Id like to create a stack??- has to be a stack - and for the text and some other elements to be visible but the stack background to be transparent - is this possible with some combination of inks and masks and blend levels? On 2 Sep 2020, 22:03 +0100, Bob Sneidar via use-livecode , wrote: > It appears I have that backwards? > > Bob S > > > > On Sep 2, 2020, at 8:28 AM, Bob Sneidar wrote: > > > > Ditto, and I am not sure what noticeable impact one method would have over another. There was some blurb a long time ago about how these keys are internally sorted. I believe what was proposed is that a set of NUMERIC keys beginning with 0 would actually sort correctly. > > > > Bob S > > > > > > > On Sep 2, 2020, at 8:24 AM, Ralph DiMola via use-livecode wrote: > > > > > > David, > > > > > > Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. > > > > > > put the keys of tMyArray into tKeys > > > sort lines of tKeys numeric > > > repeat for each line tKey in tKeys > > > > > > -- do what you want with tMyArray[tKey] > > > -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). > > > put tMyArray[tKey] into tMyVar > > > > > > end repeat > > > > > > 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 David Bovill via use-livecode > > > Sent: Wednesday, September 02, 2020 10:55 AM > > > To: How to use LiveCode > > > Cc: David Bovill > > > Subject: Looping though a numerically indexed array > > > > > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > > > > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > > > _______________________________________________ > > > use-livecode mailing list > > > use-livecode 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 Thu Sep 10 18:10:06 2020 From: dan at clearvisiontech.com (Dan Friedman) Date: Thu, 10 Sep 2020 22:10:06 +0000 Subject: Looping though a numerically indexed array In-Reply-To: <5594a0bf-5e56-4ee4-a2f9-e37b4f0609d2@Spark> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <136A22F8-0EE0-42C3-A07A-D829A50B7BF5@milby7.com> <5594a0bf-5e56-4ee4-a2f9-e37b4f0609d2@Spark> Message-ID: David, Maybe there are better ways, but here's what I always do when I have an array with numbered keys... put the keys of pArray into aKeys sort lines of aKeys numeric repeat for each line k in aKeys //do something with pArray[k] end repeat Hope that helps. :) -Dan ?On 9/10/20, 2:39 PM, "use-livecode on behalf of David Bovill via use-livecode" wrote: Ah that explains it. The extents works but I seem to remember for each is considerably faster On 2 Sep 2020, 16:29 +0100, Brian Milby via use-livecode , wrote: > As long as the array is indexed starting at 1 with no gaps it should work by looping for each element. I just did a quick test to confirm. I built a 100 element array and it looped in order. I deleted 2 keys and then it didn?t. I then added those 2 missing keys back and it worked again. > > Sent from my iPhone > > > On Sep 2, 2020, at 10:55 AM, David Bovill via use-livecode wrote: > > > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 Thu Sep 10 18:12:44 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 10 Sep 2020 22:12:44 +0000 Subject: Possible : stack with transparent backgound? In-Reply-To: References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <002301d6813d$1cafcdc0$560f6940$@net> <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> <56FCC584-34FA-49AB-A7AA-53227A7C173E@iotecdigital.com> Message-ID: <5A73AD7F-D14B-48CC-A34E-B6A02181A8AA@iotecdigital.com> I believe you can add an alpha channel to mask the stack. I have never done it, but I heard it discussed a number of times. Bob S > On Sep 10, 2020, at 2:41 PM, David Bovill via use-livecode wrote: > > Id like to create a stack - has to be a stack - and for the text and some other elements to be visible but the stack background to be transparent - is this possible with some combination of inks and masks and blend levels? > On 2 Sep 2020, 22:03 +0100, Bob Sneidar via use-livecode , wrote: >> It appears I have that backwards? >> >> Bob S >> >> >>> On Sep 2, 2020, at 8:28 AM, Bob Sneidar wrote: >>> >>> Ditto, and I am not sure what noticeable impact one method would have over another. There was some blurb a long time ago about how these keys are internally sorted. I believe what was proposed is that a set of NUMERIC keys beginning with 0 would actually sort correctly. >>> >>> Bob S >>> >>> >>>> On Sep 2, 2020, at 8:24 AM, Ralph DiMola via use-livecode wrote: >>>> >>>> David, >>>> >>>> Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. >>>> >>>> put the keys of tMyArray into tKeys >>>> sort lines of tKeys numeric >>>> repeat for each line tKey in tKeys >>>> >>>> -- do what you want with tMyArray[tKey] >>>> -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). >>>> put tMyArray[tKey] into tMyVar >>>> >>>> end repeat >>>> >>>> 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 David Bovill via use-livecode >>>> Sent: Wednesday, September 02, 2020 10:55 AM >>>> To: How to use LiveCode >>>> Cc: David Bovill >>>> Subject: Looping though a numerically indexed array >>>> >>>> I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays >>>> >>>> Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 david.bovill at gmail.com Thu Sep 10 18:37:16 2020 From: david.bovill at gmail.com (David Bovill) Date: Thu, 10 Sep 2020 23:37:16 +0100 Subject: Possible : stack with transparent backgound? In-Reply-To: <5A73AD7F-D14B-48CC-A34E-B6A02181A8AA@iotecdigital.com> References: <537ae012-e11b-4e5d-80c9-9d8af5d7a71f@Spark> <002301d6813d$1cafcdc0$560f6940$@net> <7DA5CCBB-4E86-43CD-8ABB-0C99287F32F5@iotecdigital.com> <56FCC584-34FA-49AB-A7AA-53227A7C173E@iotecdigital.com> <5A73AD7F-D14B-48CC-A34E-B6A02181A8AA@iotecdigital.com> Message-ID: Yes. Not sure but I think this will nuke all the other layers - I?m hoping that an ink on an object can prevent this from being transparent as well. I don?t think that is possible/ Use case scrolling text over a live video. On 10 Sep 2020, 23:13 +0100, Bob Sneidar via use-livecode , wrote: > I believe you can add an alpha channel to mask the stack. I have never done it, but I heard it discussed a number of times. > > Bob S > > > > On Sep 10, 2020, at 2:41 PM, David Bovill via use-livecode wrote: > > > > Id like to create a stack - has to be a stack - and for the text and some other elements to be visible but the stack background to be transparent - is this possible with some combination of inks and masks and blend levels? > > On 2 Sep 2020, 22:03 +0100, Bob Sneidar via use-livecode , wrote: > > > It appears I have that backwards? > > > > > > Bob S > > > > > > > > > > On Sep 2, 2020, at 8:28 AM, Bob Sneidar wrote: > > > > > > > > Ditto, and I am not sure what noticeable impact one method would have over another. There was some blurb a long time ago about how these keys are internally sorted. I believe what was proposed is that a set of NUMERIC keys beginning with 0 would actually sort correctly. > > > > > > > > Bob S > > > > > > > > > > > > > On Sep 2, 2020, at 8:24 AM, Ralph DiMola via use-livecode wrote: > > > > > > > > > > David, > > > > > > > > > > Nope you have to sort them NUMERIC. As you said this is the only way I know of. I do this all the time. I don't know of any other way. > > > > > > > > > > put the keys of tMyArray into tKeys > > > > > sort lines of tKeys numeric > > > > > repeat for each line tKey in tKeys > > > > > > > > > > -- do what you want with tMyArray[tKey] > > > > > -- this line will put the array data in the message box (assuming there is no other sub keys in each numeric array entry). > > > > > put tMyArray[tKey] into tMyVar > > > > > > > > > > end repeat > > > > > > > > > > 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 David Bovill via use-livecode > > > > > Sent: Wednesday, September 02, 2020 10:55 AM > > > > > To: How to use LiveCode > > > > > Cc: David Bovill > > > > > Subject: Looping though a numerically indexed array > > > > > > > > > > I?m pretty sure there must be a way to efficiently loop through numerically indexed arrays > > > > > > > > > > Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way? > > > > > _______________________________________________ > > > > > use-livecode mailing list > > > > > use-livecode 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 charles-lachat at orange.fr Thu Sep 10 18:33:37 2020 From: charles-lachat at orange.fr (Charles Lachat) Date: Fri, 11 Sep 2020 00:33:37 +0200 Subject: Issue with dropbox References: Message-ID: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> Hi everybody, A friend has accepted to test my new desktop app. I upload the app to dropbox and send a link, by e-mail, to my friend. My app is in a folder "A" containing : ** the app ** a folder "B" containing several text files the app needs The folder "A" is zipped before uploading. After downloading (friend side) and unzipping, all the files are there but the app behaves as if there were no folder "B". Most of the time. What am I doing wrong ? Any idee ? Thanks Charles Lachat =========== iMac 2019 macOS 10.14 Livecode 9.6.0 From sundown at pacifier.com Thu Sep 10 19:30:15 2020 From: sundown at pacifier.com (JB) Date: Thu, 10 Sep 2020 16:30:15 -0700 Subject: Issue with dropbox In-Reply-To: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> References: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> Message-ID: <0723A7E7-CC05-4E85-9240-3ACE1F201279@pacifier.com> Is it possible the app refers to folder B using the path created when folder B was not in the zipped or unzipped file therefore it can not see folder B? JB > On Sep 10, 2020, at 3:42 PM, Charles Lachat via use-livecode wrote: > > ?Hi everybody, > > A friend has accepted to test my new desktop app. I upload the app to dropbox and send a link, by e-mail, to my friend. > > My app is in a folder "A" containing : > > ** the app > ** a folder "B" containing several text files the app needs > > The folder "A" is zipped before uploading. > > After downloading (friend side) and unzipping, all the files are there but the app behaves as if there were no folder "B". > > Most of the time. > > What am I doing wrong ? Any idee ? > > > > > Thanks > Charles Lachat > > =========== > iMac 2019 > macOS 10.14 > Livecode 9.6.0 > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Thu Sep 10 22:51:56 2020 From: harrison at all-auctions.com (Rick Harrison) Date: Thu, 10 Sep 2020 22:51:56 -0400 Subject: Pass Javascript Variable to LiveCode? In-Reply-To: <0723A7E7-CC05-4E85-9240-3ACE1F201279@pacifier.com> References: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> <0723A7E7-CC05-4E85-9240-3ACE1F201279@pacifier.com> Message-ID: I have a Javascript variable that I need to get from one web format file into another, over an LC server. I was looking at Javascript Sessions variables, but then I wondered if I could somehow put the Javascript variable into a LiveCode variable and work with it that way? I?m still learning Javascript so I thought perhaps others on this list might know better than I what is possible and what isn?t possible. Thanks, Rick From phil at liverpool.ac.uk Fri Sep 11 03:52:01 2020 From: phil at liverpool.ac.uk (Jimmieson, Phil) Date: Fri, 11 Sep 2020 07:52:01 +0000 Subject: Issue with dropbox In-Reply-To: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> References: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> Message-ID: <736FBC4A-703B-41D9-BE41-B42B046D637A@liverpool.ac.uk> Hi Charles, if this is on a Mac, it?s a security feature - apps cannot access folders outside of their own bundle unless the user explicitly grants permission. If you add an "answer folder? command to your program, and ask the user to select folder B, then your app will be granted access to it and everything will work as it should. Downloaded apps (even if you download them in a zip file) are flagged as being insecure and are not allowed to access your Mac?s filesystem. I had this problem with an app of mine. An alternative approach I took there was to put folders of required supporting files into the app?s own bundle - using the standalone builder?s copy files tab. Apps are allowed to access files in their own bundle (but should not change them if your app is digitally signed). -- Phil Jimmieson University of Liverpool, Computer Science Department Ashton Bldg, Ashton Street, Liverpool. L69 3BX 0151 795 4236 On 10 Sep 2020, at 23:33, Charles Lachat via use-livecode > wrote: Hi everybody, A friend has accepted to test my new desktop app. I upload the app to dropbox and send a link, by e-mail, to my friend. My app is in a folder "A" containing : ** the app ** a folder "B" containing several text files the app needs The folder "A" is zipped before uploading. After downloading (friend side) and unzipping, all the files are there but the app behaves as if there were no folder "B". Most of the time. What am I doing wrong ? Any idee ? Thanks Charles Lachat =========== iMac 2019 macOS 10.14 Livecode 9.6.0 _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From jiml at netrin.com Fri Sep 11 14:04:26 2020 From: jiml at netrin.com (Jim Lambert) Date: Fri, 11 Sep 2020 11:04:26 -0700 Subject: Possible : stack with transparent backgound? In-Reply-To: References: Message-ID: > DavidB wrote: > > the text and some other elements to be visible but the stack background to be transparent Start with a card having a field and a button. 1. Create a GRC retangle the same rect as the card. 2. Set its opaque to false. 3. Set its linesize to 0. 4. Send it to back. 5. Group it with the field and a button. 6. Set the threeD of the Group to false. 7. Set both the borderwidth and margins of the group to 0. 8. Import snapshot from this card. 9. Hide last image. 10. Set the windowshape of this stack to the id of the last image. This results in the field and button 'floating independently' over whatever else is on your screen. That is, the rest of the card is invisible. From martyknappster at gmail.com Fri Sep 11 18:32:37 2020 From: martyknappster at gmail.com (Marty Knapp) Date: Fri, 11 Sep 2020 15:32:37 -0700 Subject: Possible : stack with transparent backgound? In-Reply-To: References: Message-ID: <208DB8B7-B694-4420-8EBA-0106123F4F25@gmail.com> I was just tinkering with this and it wouldn?t work until I changed the ?import snapshot" from card to ?import snapshot? from the group. But that?s a very cool trick! Thanks Jim. Marty > On Sep 11, 2020, at 11:04 AM, Jim Lambert via use-livecode wrote: > >> DavidB wrote: >> >> the text and some other elements to be visible but the stack background to be transparent > > > Start with a card having a field and a button. > 1. Create a GRC retangle the same rect as the card. > > 2. Set its opaque to false. > > 3. Set its linesize to 0. > > 4. Send it to back. > > 5. Group it with the field and a button. > > 6. Set the threeD of the Group to false. > > 7. Set both the borderwidth and margins of the group to 0. > > 8. Import snapshot from this card. > > 9. Hide last image. > > 10. Set the windowshape of this stack to the id of the last image. > > > This results in the field and button 'floating independently' over whatever else is on your screen. That is, the rest of the card is invisible. > _______________________________________________ From matthias_livecode_150811 at m-r-d.de Fri Sep 11 19:09:23 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Sat, 12 Sep 2020 01:09:23 +0200 Subject: Possible : stack with transparent backgound? In-Reply-To: <208DB8B7-B694-4420-8EBA-0106123F4F25@gmail.com> References: <208DB8B7-B694-4420-8EBA-0106123F4F25@gmail.com> Message-ID: <45A2A86A-9FCD-4239-AB13-2F86EC53057A@m-r-d.de> Thanks for the hint to import the snapshot from the group. I followed Jim's instructions w/o success and was a little disappointed. - Matthias Rebbe Life Is Too Short For Boring Code > Am 12.09.2020 um 00:32 schrieb Marty Knapp via use-livecode : > > I was just tinkering with this and it wouldn?t work until I changed the ?import snapshot" from card to ?import snapshot? from the group. But that?s a very cool trick! Thanks Jim. > > Marty > >> On Sep 11, 2020, at 11:04 AM, Jim Lambert via use-livecode wrote: >> >>> DavidB wrote: >>> >>> the text and some other elements to be visible but the stack background to be transparent >> >> >> Start with a card having a field and a button. >> 1. Create a GRC retangle the same rect as the card. >> >> 2. Set its opaque to false. >> >> 3. Set its linesize to 0. >> >> 4. Send it to back. >> >> 5. Group it with the field and a button. >> >> 6. Set the threeD of the Group to false. >> >> 7. Set both the borderwidth and margins of the group to 0. >> >> 8. Import snapshot from this card. >> >> 9. Hide last image. >> >> 10. Set the windowshape of this stack to the id of the last image. >> >> >> This results in the field and button 'floating independently' over whatever else is on your screen. That is, the rest of the card is invisible. >> _______________________________________________ > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From irog at mac.com Fri Sep 11 19:16:11 2020 From: irog at mac.com (Roger Guay) Date: Fri, 11 Sep 2020 16:16:11 -0700 Subject: Persistant Insertion Point Message-ID: I have 2 fields, the first from which I take the mouseText, the second into which I place that text. Trouble is, I want the placed text to be at the insertion point I had before clicking outside that field. Can someone suggest a way to preserve the insertion point in a field as one clicks into another field? I appreciate any help From alex at tweedly.net Fri Sep 11 19:58:50 2020 From: alex at tweedly.net (Alex Tweedly) Date: Sat, 12 Sep 2020 00:58:50 +0100 Subject: Persistant Insertion Point In-Reply-To: References: Message-ID: <832775b5-2b05-3127-854c-4eab5c838131@tweedly.net> You can save the insertion point (i.e. the selectedchunk) when you leave the second field, and then provide a handler to insert text at that saved point; and of course call that handler when needed e.g.?? in your "second field, have > local sChunk > on exitfield > ?? put the selectedchunk into sChunk > ?? put schunk &CR after msg > end exitfield > > on closefield > ?? put the selectedchunk into sChunk > ?? put schunk &CR after msg > end closefield > > on acceptText pText > ?? do "put" && pText && "into" && sChunk > ?? put "accepted" && schunk & Cr after msg > end acceptText and in the other field have something like > ON selectionchanged > ?? local tmp > ?? put "here" &Cr after msg > ?? put the mousetext into tmp > ?? dispatch "accepttext" to fld 2 with tmp > ?? put "disp" && it && the result &Cr after msg > end selectionchanged Alex. On 12/09/2020 00:16, Roger Guay via use-livecode wrote: > I have 2 fields, the first from which I take the mouseText, the second into which I place that text. Trouble is, I want the placed text to be at the insertion point I had before clicking outside that field. > Can someone suggest a way to preserve the insertion point in a field as one clicks into another field? > > I appreciate any help > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jiml at netrin.com Fri Sep 11 20:44:11 2020 From: jiml at netrin.com (Jim Lambert) Date: Fri, 11 Sep 2020 17:44:11 -0700 Subject: Possible : stack with transparent backgound? In-Reply-To: References: Message-ID: <9C432444-4D39-4BB1-A816-DC255D048743@netrin.com> Here's an example: go stack url "https://netrin.on-rev.com/misc/TransparentStack.livecode" JimL From irog at mac.com Fri Sep 11 21:25:51 2020 From: irog at mac.com (Roger Guay) Date: Fri, 11 Sep 2020 18:25:51 -0700 Subject: Persistant Insertion Point In-Reply-To: <832775b5-2b05-3127-854c-4eab5c838131@tweedly.net> References: <832775b5-2b05-3127-854c-4eab5c838131@tweedly.net> Message-ID: <55FAB67C-70A1-48FF-A58E-2A58D0A2CD94@mac.com> Thank you, Alex. That?s just what I need! Roger > On Sep 11, 2020, at 4:58 PM, Alex Tweedly via use-livecode wrote: > > You can save the insertion point (i.e. the selectedchunk) when you leave the second field, and then provide a handler to insert text at that saved point; and of course call that handler when needed > > e.g. in your "second field, have > >> local sChunk >> on exitfield >> put the selectedchunk into sChunk >> put schunk &CR after msg >> end exitfield >> >> on closefield >> put the selectedchunk into sChunk >> put schunk &CR after msg >> end closefield >> >> on acceptText pText >> do "put" && pText && "into" && sChunk >> put "accepted" && schunk & Cr after msg >> end acceptText > and in the other field have something like > >> ON selectionchanged >> local tmp >> put "here" &Cr after msg >> put the mousetext into tmp >> dispatch "accepttext" to fld 2 with tmp >> put "disp" && it && the result &Cr after msg >> end selectionchanged > Alex. > > On 12/09/2020 00:16, Roger Guay via use-livecode wrote: >> I have 2 fields, the first from which I take the mouseText, the second into which I place that text. Trouble is, I want the placed text to be at the insertion point I had before clicking outside that field. >> Can someone suggest a way to preserve the insertion point in a field as one clicks into another field? >> >> I appreciate any help >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Sat Sep 12 03:52:34 2020 From: david.bovill at gmail.com (David Bovill) Date: Sat, 12 Sep 2020 08:52:34 +0100 Subject: Livecode and GPU's In-Reply-To: <9C432444-4D39-4BB1-A816-DC255D048743@netrin.com> References: <9C432444-4D39-4BB1-A816-DC255D048743@netrin.com> Message-ID: <3a95bd07-cb18-41ef-b3dc-3510afe6d057@Spark> Thanks Jim - works a treat. Didn?t think this one would be possible. On 12 Sep 2020, 01:45 +0100, How to use LiveCode , wrote: > > go stack url "https://netrin.on-rev.com/misc/TransparentStack.livecode" I can now use this technique to layer elements over things such as the browser widget, of player object when playing streaming video. It?s relatively fast so for instance typing text in the field and exporting a snapshot with each letter types works acceptably. Graphic processing of live video layers Out of interest why does live streaming video to a player object or other tools (camera control or browser widget) draw directly to the screen? I understand this will be faster, but with modern gpu?s other applications do amazing things. Does anyone know if this is a complex thing to do in terms of coding - or is it just a choice made by developers thinking that layering of things like video is not something many people want to do? Livecode and GPU's I?ve noticed in these tests that Livecode is not using any GPU?s for doing these complex graphic tasks. I have Activity Monitor open and a couple of CPU cores are being used but none of the GPU?s. I?m wondering if this is an issue for speed, and what is involved with taking advantage of the capabilities of GPU?s in the code we write? From engleerica at yahoo.com Sun Sep 13 22:39:07 2020 From: engleerica at yahoo.com (Eric A. Engle) Date: Mon, 14 Sep 2020 02:39:07 +0000 (UTC) Subject: sudo apt-get install livecode In-Reply-To: References: Message-ID: <1756738993.1765951.1600051147199@mail.yahoo.com> I just get tired of downloading the silly installer app etc. why isn't it in a repo? any way i will google it but if there is a terminal command line interface set of commands which will gksudo aptitude livecode OR SIMILAR please tell me On Wednesday, September 9, 2020, 12:01:04 PM EDT, wrote: Send use-livecode mailing list submissions to ??? use-livecode at lists.runrev.com To subscribe or unsubscribe via the World Wide Web, visit ??? http://lists.runrev.com/mailman/listinfo/use-livecode or, via email, send a message with subject or body 'help' to ??? use-livecode-request at lists.runrev.com You can reach the person managing the list at ??? use-livecode-owner at lists.runrev.com When replying, please edit your Subject line so it is more specific than "Re: Contents of use-livecode digest..." you can find the archives for this list at: http://lists.runrev.com/pipermail/use-livecode/ and search them using this link: http://www.google.com/advanced_search?q=site:lists.runrev.com Today's Topics: ? 1. text manipulation with Chinese characters (unicode): guide? ? ? ? (Eric A. Engle) ? 2. Re: text manipulation with Chinese characters (unicode): ? ? ? guide? (Richmond) ? 3. Re: text manipulation with Chinese characters (unicode): ? ? ? guide? (Paul Dupuis) ? 4. Re: Hacktoberfest is coming (Mike Kerner) ---------------------------------------------------------------------- Message: 1 Date: Wed, 9 Sep 2020 03:55:12 +0000 (UTC) From: "Eric A. Engle" To: use-livecode at lists.runrev.com Subject: text manipulation with Chinese characters (unicode): guide? Message-ID: <1924915525.84357.1599623712542 at mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Hi! I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. Is this possible in livecode? How? Are there any good Recent guides to working with unicode in livecode? ------------------------------ Message: 2 Date: Wed, 9 Sep 2020 10:57:44 +0300 From: Richmond To: "Eric A. Engle via use-livecode" Subject: Re: text manipulation with Chinese characters (unicode): ??? guide? Message-ID: <592281dd-fc48-45f3-0ca8-a76ef7c2afe6 at gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed I won't pretend to know anything about Chinese. BUT, I have just copy-pasted ?? from a Google Translate window into an LC text-field. I have, also, copied Chinese ideographs from one text-field and posted them into a second one. Dead easy. :-) Richmond. On 9.09.20 6:55, Eric A. Engle via use-livecode wrote: > Hi! > > I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. > > Is this possible in livecode? How? Are there any good Recent guides to working with unicode in 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 ------------------------------ Message: 3 Date: Wed, 9 Sep 2020 08:37:22 -0400 From: Paul Dupuis To: use-livecode at lists.runrev.com Subject: Re: text manipulation with Chinese characters (unicode): ??? guide? Message-ID: <377095e3-277d-6c39-4462-3b1bc8b934d1 at researchware.com> Content-Type: text/plain; charset=utf-8; format=flowed As mentions, Unicode in a field just works (there is a known issue with Thai word breaks and another with printing Hindi) If you want to get Chinese (traditional or simplified) into a field, you can: 1)? get the text from a Utf8 ot utf16 text file and textDecode it i.e put url ("file:"&filepath) into tContent; put textDecode(tContent,"utf8") into fld "someField" 2) get the text from an RTF file, like the above, but set the rtfText of the field to the imported rtf data 3) use a 3rd party library, like Wordlib (see the livecode store) to read Microsoft Word .docx or Open Office .odt files On 9/8/2020 11:55 PM, Eric A. Engle via use-livecode wrote: > Hi! > > I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings. > > Is this possible in livecode? How? Are there any good Recent guides to working with unicode in 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 ------------------------------ Message: 4 Date: Wed, 9 Sep 2020 10:16:05 -0400 From: Mike Kerner To: How to use LiveCode Subject: Re: Hacktoberfest is coming Message-ID: ??? Content-Type: text/plain; charset="UTF-8" it's yours until you get a cease and desist letter. On Fri, Sep 4, 2020 at 1:06 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > That's really an old saying?? I came up with the saying People don't > change until it hurts not to. I thought I was being pithy. > > Bob S > > > > On Sep 3, 2020, at 13:40 , Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Like the old saying goes, "Change occurs when the pain of changing is > finally exceeded by the pain of not changing." > > > > -- > > 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 > -- 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." ------------------------------ Subject: Digest Footer _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-livecode ------------------------------ End of use-livecode Digest, Vol 204, Issue 9 ******************************************** From klaus at major-k.de Mon Sep 14 05:00:18 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 14 Sep 2020 11:00:18 +0200 Subject: THIS group Message-ID: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> Hi friends, I just field an enhancement request to make THIS also work for groups. ... of THIS GROUP Would be a helpful addition. Currently THIS only works for cards and stacks. Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From matthias_livecode_150811 at m-r-d.de Mon Sep 14 08:10:09 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Mon, 14 Sep 2020 14:10:09 +0200 Subject: THIS group In-Reply-To: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> Message-ID: <39296468-9A12-43C5-9F1B-344C287A8620@m-r-d.de> But which group shall be "this group" if there are nested groups and a script in a button, which is in a "sub" group, uses "this group"? - Matthias Rebbe Life Is Too Short For Boring Code > Am 14.09.2020 um 11:00 schrieb Klaus major-k via use-livecode : > > Hi friends, > > I just field an enhancement request to make THIS also work for groups. > ... of THIS GROUP > > Would be a helpful addition. > > Currently THIS only works for cards and stacks. > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > 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 klaus at major-k.de Mon Sep 14 08:22:37 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 14 Sep 2020 14:22:37 +0200 Subject: THIS group In-Reply-To: <39296468-9A12-43C5-9F1B-344C287A8620@m-r-d.de> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <39296468-9A12-43C5-9F1B-344C287A8620@m-r-d.de> Message-ID: <71BC67C9-9432-43B3-88C2-33D4513A751A@major-k.de> Hi Matthias, > Am 14.09.2020 um 14:10 schrieb matthias rebbe via use-livecode : > > But which group shall be "this group" if there are nested groups and a script in a button, which is in a "sub" group, uses "this group"? well, this would of course mean -> the owner of the target The "sub" group in your example. Would not make sense otherwise. > - > Matthias Rebbe > Life Is Too Short For Boring Code > >> Am 14.09.2020 um 11:00 schrieb Klaus major-k via use-livecode : >> >> Hi friends, >> >> I just field an enhancement request to make THIS also work for groups. >> ... of THIS GROUP >> >> Would be a helpful addition. >> >> Currently THIS only works for cards and stacks. Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From charles-lachat at orange.fr Mon Sep 14 08:20:39 2020 From: charles-lachat at orange.fr (Charles Lachat) Date: Mon, 14 Sep 2020 14:20:39 +0200 Subject: Issue with dropbox In-Reply-To: <736FBC4A-703B-41D9-BE41-B42B046D637A@liverpool.ac.uk> References: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> <736FBC4A-703B-41D9-BE41-B42B046D637A@liverpool.ac.uk> Message-ID: <101D6697-5112-4E03-939A-8E5EA29918A6@orange.fr> Hi, Everything works fine now. Thanks a lot. Ch. Lachat > Le 11 sept. 2020 ? 09:52, Jimmieson, Phil via use-livecode a ?crit : > > Hi Charles, > if this is on a Mac, it?s a security feature - apps cannot access folders outside of their own bundle unless the user explicitly grants permission. If you add an "answer folder? command to your program, and ask the user to select folder B, then your app will be granted access to it and everything will work as it should. > > Downloaded apps (even if you download them in a zip file) are flagged as being insecure and are not allowed to access your Mac?s filesystem. > > I had this problem with an app of mine. An alternative approach I took there was to put folders of required supporting files into the app?s own bundle - using the standalone builder?s copy files tab. Apps are allowed to access files in their own bundle (but should not change them if your app is digitally signed). > > -- > Phil Jimmieson > University of Liverpool, Computer Science Department > Ashton Bldg, Ashton Street, Liverpool. L69 3BX > 0151 795 4236 > > On 10 Sep 2020, at 23:33, Charles Lachat via use-livecode > wrote: > > Hi everybody, > > A friend has accepted to test my new desktop app. I upload the app to dropbox and send a link, by e-mail, to my friend. > > My app is in a folder "A" containing : > > ** the app > ** a folder "B" containing several text files the app needs > > The folder "A" is zipped before uploading. > > After downloading (friend side) and unzipping, all the files are there but the app behaves as if there were no folder "B". > > Most of the time. > > What am I doing wrong ? Any idee ? > > > > > Thanks > Charles Lachat > > =========== > iMac 2019 > macOS 10.14 > Livecode 9.6.0 > > > > _______________________________________________ > use-livecode mailing list > use-livecode 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 Sep 14 09:04:16 2020 From: paul at researchware.com (Paul Dupuis) Date: Mon, 14 Sep 2020 09:04:16 -0400 Subject: sudo apt-get install livecode In-Reply-To: <1756738993.1765951.1600051147199@mail.yahoo.com> References: <1756738993.1765951.1600051147199@mail.yahoo.com> Message-ID: On 9/13/2020 10:39 PM, Eric A. Engle via use-livecode wrote: > I just get tired of downloading the silly installer app etc. why isn't it in a repo? > > any way i will google it but if there is a terminal command line interface set of commands which will gksudo aptitude livecode OR SIMILAR please tell me It probably isn't in a 'repo' because I, like probably a number of other people on this list who use LiveCode a lot, have no idea what 'gksudo aptitude livecode' is other than probably some Linux commands. I'd much rather download and run the installer than need to learn some more esoteric commands to install the software. From panos.merakos at livecode.com Mon Sep 14 11:13:04 2020 From: panos.merakos at livecode.com (panagiotis merakos) Date: Mon, 14 Sep 2020 18:13:04 +0300 Subject: [ANN] This Week in LiveCode 238 Message-ID: Hi all, Read about new developments in LiveCode open source and the open source community in today's edition of the "This Week in LiveCode" newsletter! Read issue #238 here: https://bit.ly/3iy24MW This is a weekly newsletter about LiveCode, focussing on what's been going on in and around the open source project. New issues will be released weekly on Mondays. We have a dedicated mailing list that will deliver each issue directly to your e-mail, so you don't miss any! If you have anything you'd like mentioned (a project, a discussion somewhere, an upcoming event) then please get in touch. -- Panagiotis Merakos LiveCode Software Developer Everyone Can Create Apps From ahsoftware at sonic.net Mon Sep 14 11:33:16 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Mon, 14 Sep 2020 08:33:16 -0700 Subject: THIS group In-Reply-To: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> Message-ID: <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> On 9/14/20 2:00 AM, Klaus major-k via use-livecode wrote: > Hi friends, > > I just field an enhancement request to make THIS also work for groups. > ... of THIS GROUP > > Would be a helpful addition. > > Currently THIS only works for cards and stacks. But as you point out "of the owner of me" already does the trick, and since Mr. Waddingham is allergic to synonyms, there's no chance this will ever get implemented. -- Mark Wieder ahsoftware at gmail.com From klaus at major-k.de Mon Sep 14 11:35:14 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 14 Sep 2020 17:35:14 +0200 Subject: THIS group In-Reply-To: <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> Message-ID: Hi Mark, > Am 14.09.2020 um 17:33 schrieb Mark Wieder via use-livecode : > > On 9/14/20 2:00 AM, Klaus major-k via use-livecode wrote: >> Hi friends, >> I just field an enhancement request to make THIS also work for groups. >> ... of THIS GROUP >> >> Would be a helpful addition. >> Currently THIS only works for cards and stacks. > > But as you point out "of the owner of me" already does the trick, and since Mr. Waddingham is allergic to synonyms, there's no chance this will ever get implemented. thank your for your encouraging words! :-D > -- > Mark Wieder > ahsoftware at gmail.com Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From ahsoftware at sonic.net Mon Sep 14 11:46:49 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Mon, 14 Sep 2020 08:46:49 -0700 Subject: sudo apt-get install livecode In-Reply-To: <1756738993.1765951.1600051147199@mail.yahoo.com> References: <1756738993.1765951.1600051147199@mail.yahoo.com> Message-ID: On 9/13/20 7:39 PM, Eric A. Engle via use-livecode wrote: > I just get tired of downloading the silly installer app etc. why isn't it in a repo? > > any way i will google it but if there is a terminal command line interface set of commands which will gksudo aptitude livecode OR SIMILAR please tell me On Wednesday, September 9, 2020, 12:01:04 PM EDT, wrote: It's been a topic of discussion for years, i.e., https://forums.livecode.com/viewtopic.php?f=20&t=29266 as to the "why not" of this, I don't have an answer. Building a .deb package isn't a huge task and would make uninstalling *much* easier than the current kludge. (as an aside, note that gksudo has been deprecated for some time now in favor of pkexec, and is no longer included in most modern distros. But no doubt you meant "sudo" anyway.) -- Mark Wieder ahsoftware at gmail.com From ahsoftware at sonic.net Mon Sep 14 11:49:21 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Mon, 14 Sep 2020 08:49:21 -0700 Subject: THIS group In-Reply-To: References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> Message-ID: <84343580-4e62-e597-df86-c87d100da187@sonic.net> On 9/14/20 8:35 AM, Klaus major-k via use-livecode wrote: > thank your for your encouraging words! :-D LOL. Well, having been down that rabbit hole before, I just thought I'd mention it. -- Mark Wieder ahsoftware at gmail.com From klaus at major-k.de Mon Sep 14 11:51:04 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 14 Sep 2020 17:51:04 +0200 Subject: THIS group In-Reply-To: <84343580-4e62-e597-df86-c87d100da187@sonic.net> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> <84343580-4e62-e597-df86-c87d100da187@sonic.net> Message-ID: Hi Mark, > Am 14.09.2020 um 17:49 schrieb Mark Wieder via use-livecode : > > On 9/14/20 8:35 AM, Klaus major-k via use-livecode wrote: > >> thank your for your encouraging words! :-D > > LOL. Well, having been down that rabbit hole before, I just thought I'd mention it. yes, and as I said I thank you for this, but it is always worth a try. ;-) > -- > Mark Wieder > ahsoftware at gmail.com Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From richmondmathewson at gmail.com Mon Sep 14 13:47:27 2020 From: richmondmathewson at gmail.com (Richmond) Date: Mon, 14 Sep 2020 20:47:27 +0300 Subject: sudo apt-get install livecode In-Reply-To: References: <1756738993.1765951.1600051147199@mail.yahoo.com> Message-ID: <63ec782b-720b-4933-4291-1e945ec7e749@gmail.com> Because, in spite of what LiveCode will tell you, the Linux side of things is marginal and minimal, and while a .deb might be alright for Debian and its derivatives, it is not going to be alright for other types of Linux: "too much work for too little return": I can see it coming. Also: why is the installer app "silly"? It is no worse or no better than? the installer apps for Macintosh and Windows, and I, for one, have no real problem with any of them. On 14.09.20 18:46, Mark Wieder via use-livecode wrote: > On 9/13/20 7:39 PM, Eric A. Engle via use-livecode wrote: >> ? I just get tired of downloading the silly installer app etc. why >> isn't it in a repo? >> >> any way i will google it but if there is a terminal command line >> interface set of commands which will gksudo aptitude livecode OR >> SIMILAR please tell me???? On Wednesday, September 9, 2020, 12:01:04 >> PM EDT, wrote: > > It's been a topic of discussion for years, i.e., > > https://forums.livecode.com/viewtopic.php?f=20&t=29266 > > as to the "why not" of this, I don't have an answer. Building a .deb > package isn't a huge task and would make uninstalling *much* easier > than the current kludge. > > (as an aside, note that gksudo has been deprecated for some time now > in favor of pkexec, and is no longer included in most modern distros. > But no doubt you meant "sudo" anyway.) > From rdimola at evergreeninfo.net Mon Sep 14 14:18:34 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Mon, 14 Sep 2020 14:18:34 -0400 Subject: THIS group In-Reply-To: References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> <84343580-4e62-e597-df86-c87d100da187@sonic.net> Message-ID: <002101d68ac3$784434c0$68cc9e40$@net> I can see why the mother ship does not like synonyms. In this case I think it would be advantageous for new users if "this" was extended so that "this group" was the same as "the owner of the target". I found myself digging around until I found "the owner of the target" in the beginning. Not all synonyms are the devil incarnate. In this case there would be no backwards compatibility issues? 2 cents... Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net From ahsoftware at sonic.net Mon Sep 14 14:53:27 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Mon, 14 Sep 2020 11:53:27 -0700 Subject: sudo apt-get install livecode In-Reply-To: <63ec782b-720b-4933-4291-1e945ec7e749@gmail.com> References: <1756738993.1765951.1600051147199@mail.yahoo.com> <63ec782b-720b-4933-4291-1e945ec7e749@gmail.com> Message-ID: <893d3ceb-189a-9104-f051-5df2e33f8d1d@sonic.net> On 9/14/20 10:47 AM, Richmond via use-livecode wrote: > Also: why is the installer app "silly"? It is no worse or no better > than? the installer apps for Macintosh and Windows, > and I, for one, have no real problem with any of them. Having "real" installers (.deb, .rpm) would enable LiveCode to get into the various repositories and thus get more exposure. -- Mark Wieder ahsoftware at gmail.com From richmondmathewson at gmail.com Mon Sep 14 15:05:40 2020 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Mon, 14 Sep 2020 22:05:40 +0300 Subject: sudo apt-get install livecode In-Reply-To: <893d3ceb-189a-9104-f051-5df2e33f8d1d@sonic.net> References: <1756738993.1765951.1600051147199@mail.yahoo.com> <63ec782b-720b-4933-4291-1e945ec7e749@gmail.com> <893d3ceb-189a-9104-f051-5df2e33f8d1d@sonic.net> Message-ID: That is a good point. The same could be said for the Apple store, the Windows store and the Ubuntu thing. On Mon, 14 Sep 2020 9:54 pm Mark Wieder via use-livecode, < use-livecode at lists.runrev.com> wrote: > On 9/14/20 10:47 AM, Richmond via use-livecode wrote: > > > Also: why is the installer app "silly"? It is no worse or no better > > than the installer apps for Macintosh and Windows, > > and I, for one, have no real problem with any of them. > > Having "real" installers (.deb, .rpm) would enable LiveCode to get into > the various repositories and thus get more exposure. > > -- > 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 klaus at major-k.de Mon Sep 14 15:06:59 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 14 Sep 2020 21:06:59 +0200 Subject: THIS group In-Reply-To: <002101d68ac3$784434c0$68cc9e40$@net> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> <84343580-4e62-e597-df86-c87d100da187@sonic.net> <002101d68ac3$784434c0$68cc9e40$@net> Message-ID: <299B60C5-97BB-4FE6-A1BA-B383826B39BD@major-k.de> Ji Ralph, > Am 14.09.2020 um 20:18 schrieb Ralph DiMola via use-livecode : > > I can see why the mother ship does not like synonyms. In this case I think > it would be advantageous for new users if "this" was extended so that "this > group" was the same as "the owner of the target". I found myself digging > around until I found "the owner of the target" in the beginning. Not all > synonyms are the devil incarnate. In this case there would be no backwards > compatibility issues? of course not, simply because this does not work currently! :-) > 2 cents... > > Ralph DiMola > IT Director > Evergreen Information Services > rdimola at evergreeninfo.net Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From andre at andregarzia.com Mon Sep 14 16:17:56 2020 From: andre at andregarzia.com (Andre Garzia) Date: Mon, 14 Sep 2020 21:17:56 +0100 Subject: sudo apt-get install livecode In-Reply-To: References: <1756738993.1765951.1600051147199@mail.yahoo.com> <63ec782b-720b-4933-4291-1e945ec7e749@gmail.com> <893d3ceb-189a-9104-f051-5df2e33f8d1d@sonic.net> Message-ID: The problem with the installers is that the LC binaries are linked with specific versions of the shared libraries in the system. If you have a different version, or the library has a different name in that system, then there is a chance that LC will not run correctly (and by not run I mean not run at all). For example, here in our server, LC is linked against: $ ldd livecode-community-server linux-vdso.so.1 (0x00007ffcee51b000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f617d849000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f617d62a000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f617d376000) libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f617d131000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f617cf29000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f617cba0000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f617c802000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f617c5ea000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f617c1f9000) /lib64/ld-linux-x86-64.so.2 (0x00007f617da4d000) libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f617bfc7000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f617bdaa000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f617bb78000) Of course the engine for the IDE and desktop apps (alongside the externals) links with more libraries than what is shown here. What having real .deb and .rpm would allow on Linux is to get the correct library versions installed at the same time as the LC installation is running because the package manager would know which dependencies were needed for LC to work. Right now, if something fails on Linux, you need to be savvy enough to check libraries and then install the correct ones. Another solution for that would be to generate AppImages which are quite similar to Application Bundles from macOS in the sense that they are a package of files disguised as a single file and contains everything an app needs to run. In the case of Linux appimages they'll even contain the shared libraries inside them which makes them quite large but easier to run. On Mon, 14 Sep 2020 at 20:07, Richmond Mathewson via use-livecode < use-livecode at lists.runrev.com> wrote: > That is a good point. > The same could be said for the Apple store, the Windows store and the > Ubuntu thing. > > On Mon, 14 Sep 2020 9:54 pm Mark Wieder via use-livecode, < > use-livecode at lists.runrev.com> wrote: > > > On 9/14/20 10:47 AM, Richmond via use-livecode wrote: > > > > > Also: why is the installer app "silly"? It is no worse or no better > > > than the installer apps for Macintosh and Windows, > > > and I, for one, have no real problem with any of them. > > > > Having "real" installers (.deb, .rpm) would enable LiveCode to get into > > the various repositories and thus get more exposure. > > > > -- > > 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 > -- https://www.andregarzia.com Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia From jacque at hyperactivesw.com Mon Sep 14 18:18:09 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Mon, 14 Sep 2020 17:18:09 -0500 Subject: THIS group In-Reply-To: <002101d68ac3$784434c0$68cc9e40$@net> References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> <84343580-4e62-e597-df86-c87d100da187@sonic.net> <002101d68ac3$784434c0$68cc9e40$@net> Message-ID: I see how it could work if a child control referenced "this group" but what should happen if: You type "the name of this group" into the message box? The child control is in a nested group? On 9/14/20 1:18 PM, Ralph DiMola via use-livecode wrote: > I can see why the mother ship does not like synonyms. In this case I think > it would be advantageous for new users if "this" was extended so that "this > group" was the same as "the owner of the target". I found myself digging > around until I found "the owner of the target" in the beginning. Not all > synonyms are the devil incarnate. In this case there would be no backwards > compatibility issues? > > 2 cents... > > Ralph DiMola > IT Director > Evergreen Information Services > rdimola at evergreeninfo.net > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From sean at pidigital.co.uk Mon Sep 14 20:24:43 2020 From: sean at pidigital.co.uk (Sean Cole (Pi)) Date: Tue, 15 Sep 2020 01:24:43 +0100 Subject: THIS group In-Reply-To: References: <5BD70FFD-0356-47F8-B51D-0B17623BDC56@major-k.de> <4d923d83-4615-d9f6-bcdb-c11fdd8710bb@sonic.net> <84343580-4e62-e597-df86-c87d100da187@sonic.net> <002101d68ac3$784434c0$68cc9e40$@net> Message-ID: hypothetical and rhetorical: what would be the difference between the owner of the owner of the owner of the owner of me and the owner of the owner of the owner of this group ? halfpennies worth: 'this group' gives no greater benefit and does not fit in with the current use of 'this card' and 'this stack' which get referred to as 'this' because multiple stacks and cards that are visible or invisible might receive a massage. Targets are better at referencing groups and pinpointing which have become active. not that my opinion matters a jot on this forum From klaus at major-k.de Tue Sep 15 09:30:28 2020 From: klaus at major-k.de (Klaus major-k) Date: Tue, 15 Sep 2020 15:30:28 +0200 Subject: knot in my brain? Message-ID: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> Hi friends, ... repeat with i = 1 to the num of grcs ## This line: if the short name of grc i begins with "Graphic_" then ## Gives me the error -> no such object ... What am I overlooking? I know do, but have no clue currently... Thanks in advance! Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From klaus at major-k.de Tue Sep 15 09:34:21 2020 From: klaus at major-k.de (Klaus major-k) Date: Tue, 15 Sep 2020 15:34:21 +0200 Subject: knot in my brain? In-Reply-To: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> References: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> Message-ID: Hi all, > Am 15.09.2020 um 15:30 schrieb Klaus major-k via use-livecode : > > Hi friends, > > ... > repeat with i = 1 to the num of grcs > ## This line: > if the short name of grc i begins with "Graphic_" then > ## Gives me the error -> no such object > ... > What am I overlooking? > I know do, but have no clue currently... ignore this, of course I cannot delete an already deleted object. ... repeat with i = the num of grcs down to 1 ... Does the trick, ouch embassing! Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From m.schonewille at economy-x-talk.com Tue Sep 15 09:35:38 2020 From: m.schonewille at economy-x-talk.com (Drs Mark Schonewille) Date: Tue, 15 Sep 2020 15:35:38 +0200 Subject: knot in my brain? In-Reply-To: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> References: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> Message-ID: <97531ad4-e8f2-9e07-26e5-1ce12b93f2d8@economy-x-talk.com> Hi Klaus, I bet the problem is in the remainder of the script, for instance changing layers or deleting graphics (although the latter probably not). If you change it to repeat with i = 1 to the num of grcs ? if the short name of grc i beginswith "Graphic_" then put i end repeat do you still get an error? Mark Schonewille Economy-x-Talk https://ecxtalk.nl https://www.nt2.nu Programming LiveCode for the Real Beginner http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner Op 15-9-2020 om 15:30 schreef Klaus major-k via use-livecode: > Hi friends, > > ... > repeat with i = 1 to the num of grcs > ## This line: > if the short name of grc i begins with "Graphic_" then > ## Gives me the error -> no such object > ... > What am I overlooking? > I know do, but have no clue currently... > > Thanks in advance! > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > 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 m.schonewille at economy-x-talk.com Tue Sep 15 09:36:25 2020 From: m.schonewille at economy-x-talk.com (Drs Mark Schonewille) Date: Tue, 15 Sep 2020 15:36:25 +0200 Subject: knot in my brain? In-Reply-To: References: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> Message-ID: <7bcaa396-0a73-1de6-7480-ca348a1d556f@economy-x-talk.com> :-) Mark Schonewille Economy-x-Talk https://ecxtalk.nl https://www.nt2.nu Programming LiveCode for the Real Beginner http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner Op 15-9-2020 om 15:34 schreef Klaus major-k via use-livecode: > Hi all, > >> Am 15.09.2020 um 15:30 schrieb Klaus major-k via use-livecode : >> >> Hi friends, >> >> ... >> repeat with i = 1 to the num of grcs >> ## This line: >> if the short name of grc i begins with "Graphic_" then >> ## Gives me the error -> no such object >> ... >> What am I overlooking? >> I know do, but have no clue currently... > ignore this, of course I cannot delete an already deleted object. > ... > repeat with i = the num of grcs down to 1 > ... > Does the trick, ouch embassing! > > > Best > > Klaus > > > -- > Klaus Major > https://www.major-k.de > 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 klaus at major-k.de Tue Sep 15 09:35:41 2020 From: klaus at major-k.de (Klaus major-k) Date: Tue, 15 Sep 2020 15:35:41 +0200 Subject: knot in my brain? In-Reply-To: References: <9E05913D-C8CF-4D80-B53C-F4F88B61DF3E@major-k.de> Message-ID: <1E171103-EDC3-4119-B921-663FD0DAF2CE@major-k.de> > ... > Does the trick, ouch embaRAssing! Even more embarrassing... 8-) -- Klaus Major https://www.major-k.de klaus at major-k.de From bobsneidar at iotecdigital.com Tue Sep 15 12:49:15 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 15 Sep 2020 16:49:15 +0000 Subject: Issue with dropbox In-Reply-To: <0723A7E7-CC05-4E85-9240-3ACE1F201279@pacifier.com> References: <567A290A-6B37-4BAF-A2AC-C4528E4A55D5@orange.fr> <0723A7E7-CC05-4E85-9240-3ACE1F201279@pacifier.com> Message-ID: <1F36C476-E7D2-400F-84B1-A306D191EC75@iotecdigital.com> Interesting. Not sure how far app signing goes. For instance I downloaded Livecode for Mac, then made the mistake of modifying 2 data grid libraries (in the bundle) before opening the app for the first time. This of course caused the system to refuse to open Livecode, but when I re-copy Livecode to my apps folder, once opened the first time, I can subsequently modify the libraries and the system will no longer balk when opening the app. Bob S > On Sep 10, 2020, at 4:30 PM, JB via use-livecode wrote: > > Is it possible the app refers to folder B using > the path created when folder B was not in > the zipped or unzipped file therefore it can > not see folder B? > > JB > >> On Sep 10, 2020, at 3:42 PM, Charles Lachat via use-livecode wrote: >> >> ?Hi everybody, >> >> A friend has accepted to test my new desktop app. I upload the app to dropbox and send a link, by e-mail, to my friend. >> >> My app is in a folder "A" containing : >> >> ** the app >> ** a folder "B" containing several text files the app needs >> >> The folder "A" is zipped before uploading. >> >> After downloading (friend side) and unzipping, all the files are there but the app behaves as if there were no folder "B". >> >> Most of the time. >> >> What am I doing wrong ? Any idee ? >> >> >> >> >> Thanks >> Charles Lachat >> >> =========== >> iMac 2019 >> macOS 10.14 >> Livecode 9.6.0 >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 scott at elementarysoftware.com Tue Sep 15 21:30:06 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Tue, 15 Sep 2020 18:30:06 -0700 Subject: Mouse messages in scrollers In-Reply-To: <2992b394-31b3-fec9-6689-c71818953b7e@hyperactivesw.com> References: <6C9770C7-FD36-4C36-9B43-67CF9303F906@elementarysoftware.com> <05DE3607-935A-49B3-94BA-D6CE7DD61075@elementarysoftware.com> <1722f509e00.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <2992b394-31b3-fec9-6689-c71818953b7e@hyperactivesw.com> Message-ID: <51F3CAEA-1ED8-4EE7-AB3C-E148622F975F@elementarysoftware.com> on mobile (just iOS at the moment) I?m trying to not only register a horizontal swipe in a UIScroller but to calculate the line in the field under the scroller so that I can perform a delete action. I can get the swipe but? while these calculations seem to work fairly well in the IDE, not so much in the simulator. both the mouseH and the mouseLoc report a value but when I check it during scrollerDidScroll the X value is always 0 and the Y value is always the bottom of the screen? which of course is not particularly helpful. Am I doing something wrong or is this just not available when a scroller is under the ?mouse?? Setting delayTouches and canCancelTouches to false doesn?t appear to change anything. ? 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 May 21, 2020, at 1:22 PM, J. Landman Gay via use-livecode wrote: > > It was "delayTouches" mostly. Default is true, I had to set it to false. I also set canCancelTouches to false but didn't test how necessary that was. Default for that is also true. > > This allowed messages to pass through to LC, but you had to very deliberately swipe, holding down a moment so the mouseDown would fire. Brian Milby came up with a faster solution using something like Jim MacConnell's suggestion -- make the contentRect wider than the group so that a horizontal swipe triggers scrollerDidScroll. Lock direction to vertical to prevent wiggle. That proved to be a the solution for a more natural swipe. > > You have to branch for Android because it doesn't have a lockDirection property; for that OS keep the contentRect the same width as the group. Mouse messages pass through to LC automatically, which is good because the above two settings don't exist on Android. > > Swiping is such a normal behavior on mobile, I'd like to see an easier method in LC to accomodate all this. > > > On 5/19/20 8:00 PM, scott--- via use-livecode wrote: >> You have probably already looked at these but here are (some of) the scroller settings I use for the below-mentioned field: >> ---------------- >> mobileControlSet sScrollerId, "pagingEnabled", "false" >> mobileControlSet sScrollerId, "decelerationRate", "normal" -- fast --iOS only >> mobileControlSet sScrollerId, "canScrollToTop", "true" >> mobileControlSet sScrollerId, "delayTouches", "false" >> mobileControlSet sScrollerId, "canCancelTouches", ?true" > > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From james at thehales.id.au Wed Sep 16 00:17:32 2020 From: james at thehales.id.au (James Hale) Date: Wed, 16 Sep 2020 14:17:32 +1000 Subject: Big Sur and Drag and drop Message-ID: <750553F7-239B-47EE-9AFF-6C86A9B58B44@thehales.id.au> Hi, Just a question to others using Big Sur on their Macs. I have an app which uses drag and drop to place a list of files in a field. I drag the folder containing the files over the list, release the mouse and boom the list of files appear. Today I went to use this app on my main Mac which is also running the latest Big Sur beta. Dragging over the field and the cursor turns to a grey circle with diagonal line, i.e. no entry/go Launching LC and opening the original stack and sure enough, the same thing. My question, if you are using Big Sur and have an app that uses drag and drop in this way (to get a listing of files in a folder) could you please see if it still works? If not I will submit a bug report. Thanks in advance. James From sundown at pacifier.com Wed Sep 16 01:37:37 2020 From: sundown at pacifier.com (JB) Date: Tue, 15 Sep 2020 22:37:37 -0700 Subject: OT: change email address Message-ID: <791BCD5F-4950-4FE1-A1D4-F6C659D140EA@pacifier.com> Will someone please tell me how to change the email address I am using to receive messages from the LiveCode lists? I tried the run rev.com web link and the message I sent there failed and was returned. thanks, JB From matthias_livecode_150811 at m-r-d.de Wed Sep 16 05:23:27 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 16 Sep 2020 11:23:27 +0200 Subject: OT: change email address In-Reply-To: <791BCD5F-4950-4FE1-A1D4-F6C659D140EA@pacifier.com> References: <791BCD5F-4950-4FE1-A1D4-F6C659D140EA@pacifier.com> Message-ID: <2D88069E-A3A9-4957-A04B-7333FC1F19D4@m-r-d.de> Go here http://lists.runrev.com/mailman/listinfo/use-livecode At the bottom there is a field, where you can enter your current email address. After that press the button 'unsubscribe or edit options' On the nextpage you can login with your email address and your password. On the next page you can change your email address. If you do not know your password anymore the press the button 'remind me' to get your password emailed to you. Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 16.09.2020 um 07:37 schrieb JB via use-livecode : > > Will someone please tell me how to change the email address I am using to receive messages from the LiveCode lists? > > I tried the run rev.com web link and the message I sent there failed and was returned. > > thanks, > JB > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From martyknappster at gmail.com Wed Sep 16 13:22:26 2020 From: martyknappster at gmail.com (Marty Knapp) Date: Wed, 16 Sep 2020 10:22:26 -0700 Subject: Big Sur and Drag and drop In-Reply-To: <750553F7-239B-47EE-9AFF-6C86A9B58B44@thehales.id.au> References: <750553F7-239B-47EE-9AFF-6C86A9B58B44@thehales.id.au> Message-ID: <1F8BA8E0-88F6-479F-AE3B-3FC30742A746@gmail.com> Hi James, Have an app that uses drag and drop for number of functions, including dropping a folder onto a field and then it lists the files in that folder. Everything seems to be working for me with my app built in LC 9.6.1 running on Big Sur. Marty > On Sep 15, 2020, at 9:17 PM, James Hale via use-livecode wrote: > > Hi, > > Just a question to others using Big Sur on their Macs. > > I have an app which uses drag and drop to place a list of files in a field. > > I drag the folder containing the files over the list, release the mouse and boom the list of files appear. > > Today I went to use this app on my main Mac which is also running the latest Big Sur beta. > > Dragging over the field and the cursor turns to a grey circle with diagonal line, i.e. no entry/go > > Launching LC and opening the original stack and sure enough, the same thing. > > My question, if you are using Big Sur and have an app that uses drag and drop in this way (to get a listing of files in a folder) could you please see if it still works? > > If not I will submit a bug report. > > Thanks in advance. > > James From sundown.pacifier at icloud.com Wed Sep 16 20:49:35 2020 From: sundown.pacifier at icloud.com (John Balgenorth) Date: Wed, 16 Sep 2020 17:49:35 -0700 Subject: OT: change email address In-Reply-To: <8112D41E-D7FF-419C-BA05-01D013E5EF1E@pacifier.com> References: <8112D41E-D7FF-419C-BA05-01D013E5EF1E@pacifier.com> Message-ID: Thanks for the info and fast reply! It worked great. JB > >> On Sep 16, 2020, at 2:25 AM, matthias rebbe via use-livecode wrote: >> >> ?Go here >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> At the bottom there is a field, where you can enter your current email address. After that press the button 'unsubscribe or edit options' >> >> On the nextpage you can login with your email address and your password. >> On the next page you can change your email address. >> >> If you do not know your password anymore the press the button 'remind me' to get your password emailed to you. >> >> Regards, >> Matthias >> >> >> >> >> - >> Matthias Rebbe >> Life Is Too Short For Boring Code >> >>>> Am 16.09.2020 um 07:37 schrieb JB via use-livecode : >>> >>> Will someone please tell me how to change the email address I am using to receive messages from the LiveCode lists? >>> >>> I tried the run rev.com web link and the message I sent there failed and was returned. >>> >>> thanks, >>> JB >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 brahma at hindu.org Thu Sep 17 14:34:45 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 17 Sep 2020 18:34:45 +0000 Subject: How do we set layers for groups Message-ID: <79C1B700-3B9D-420B-8D53-820BF1C41185@hindu.org> if the layer of fld "checkHtml" > 3 then set the layer of fld "checkHtml" to 3 else set the layer of fld "checkHtml" to 20 end if? # do not work. stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer (card not open, or control in group)), char 1 ?? From paul at researchware.com Thu Sep 17 14:51:47 2020 From: paul at researchware.com (Paul Dupuis) Date: Thu, 17 Sep 2020 14:51:47 -0400 Subject: How do we set layers for groups In-Reply-To: <79C1B700-3B9D-420B-8D53-820BF1C41185@hindu.org> References: <79C1B700-3B9D-420B-8D53-820BF1C41185@hindu.org> Message-ID: see the 'relayer' command in the dictionary On 9/17/2020 2:34 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > if the layer of fld "checkHtml" > 3 then > set the layer of fld "checkHtml" to 3 > else > set the layer of fld "checkHtml" to 20 > end if? > > # do not work. > > stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer (card not open, or control in group)), char 1 > > ?? > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brahma at hindu.org Thu Sep 17 15:09:00 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 17 Sep 2020 19:09:00 +0000 Subject: How to get layer for group Message-ID: <87174801-C94D-4BC3-90F1-348810239708@hindu.org> f the layer of fld "checkHtml" > 3 then set the layer of fld "checkHtml" to 3 else set the layer of fld "checkHtml" to 20 end if # do not work. stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer (card not open, or control in group)), char 1 ??? From brahma at hindu.org Thu Sep 17 15:14:15 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 17 Sep 2020 19:14:15 +0000 Subject: HOw to get htmltext from the field to display in another field Message-ID: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> --set the htmltext of fld "mainText" into fld "checkHTML" put text of fld "mainText" into fld "checkHTML" ?? From rdimola at evergreeninfo.net Thu Sep 17 15:31:56 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Thu, 17 Sep 2020 15:31:56 -0400 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> Message-ID: <005b01d68d29$37973400$a6c59c00$@net> BR, set the htmltext of fld "Dest" to the htmlText of fld "Src" 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 Sannyasin Brahmanathaswami via use-livecode Sent: Thursday, September 17, 2020 3:14 PM To: How LiveCode Cc: Sannyasin Brahmanathaswami Subject: HOw to get htmltext from the field to display in another field --set the htmltext of fld "mainText" into fld "checkHTML" put text of fld "mainText" into fld "checkHTML" ?? _______________________________________________ use-livecode mailing list use-livecode at 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 Thu Sep 17 15:34:45 2020 From: paul at researchware.com (Paul Dupuis) Date: Thu, 17 Sep 2020 15:34:45 -0400 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <005b01d68d29$37973400$a6c59c00$@net> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> Message-ID: <19de9c17-9f57-9cd5-8d28-c73945e1d133@researchware.com> OR set the text of fld "Dest" to the htmText of fld "Src" IF you want to see what the htmlText (i.e. the tags) of fld "Src"actually is. On 9/17/2020 3:31 PM, Ralph DiMola via use-livecode wrote: > BR, > > set the htmltext of fld "Dest" to the htmlText of fld "Src" > > 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 Sannyasin Brahmanathaswami via use-livecode > Sent: Thursday, September 17, 2020 3:14 PM > To: How LiveCode > Cc: Sannyasin Brahmanathaswami > Subject: HOw to get htmltext from the field to display in another field > > --set the htmltext of fld "mainText" into fld "checkHTML" > > put text of fld "mainText" into fld "checkHTML" > > ?? > > _______________________________________________ > use-livecode mailing list > use-livecode 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 Thu Sep 17 17:32:10 2020 From: bogdanoff at me.com (Peter Bogdanoff) Date: Thu, 17 Sep 2020 14:32:10 -0700 Subject: How to get layer for group In-Reply-To: <87174801-C94D-4BC3-90F1-348810239708@hindu.org> References: <87174801-C94D-4BC3-90F1-348810239708@hindu.org> Message-ID: I believe this is one of the commands/properties that require you to be on that card?it must be open?for completion. Others are formattedText, etc. Peter > On Sep 17, 2020, at 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > > f the layer of fld "checkHtml" > 3 then > set the layer of fld "checkHtml" to 3 > else > set the layer of fld "checkHtml" to 20 > end if > > # do not work. > > stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer (card not open, or control in group)), char 1 > > ??? > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 17 18:55:50 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 17 Sep 2020 22:55:50 +0000 Subject: How to get layer for group In-Reply-To: References: <87174801-C94D-4BC3-90F1-348810239708@hindu.org> Message-ID: <54B9C258-9B90-4EE4-8CE5-02B1CD2C2C35@iotecdigital.com> I think Control in Group is the phrase that pays here. The property you are looking for is relayerGroupedControls. Bob S > On Sep 17, 2020, at 2:32 PM, Peter Bogdanoff via use-livecode wrote: > > I believe this is one of the commands/properties that require you to be on that card?it must be open?for completion. > > Others are formattedText, etc. > > Peter > >> On Sep 17, 2020, at 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote: >> >> f the layer of fld "checkHtml" > 3 then >> set the layer of fld "checkHtml" to 3 >> else >> set the layer of fld "checkHtml" to 20 >> end if >> >> # do not work. >> >> stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer (card not open, or control in group)), char 1 >> >> ??? >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 brahma at hindu.org Thu Sep 17 20:41:55 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Fri, 18 Sep 2020 00:41:55 +0000 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <005b01d68d29$37973400$a6c59c00$@net> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> Message-ID: Ralph, So this did not work. I have -------- [ fld "Src" ]

My Trek to Siva
Magical Abodes

Join the author on a tour of ancient Siva temples

------ [ fld "Dest" ]

My Trek to Siva
Magical Abodes

Join the author on a tour of ancient Siva temples

------- It same for both fields. Neither one displays the htmltext text . ?? set the htmltext of fld "checkHTML" to the htmlText of fld "mainText" BR ? Ralph DiMola wrote: set the htmltext of fld "Dest" to the htmlText of fld "Src" From ahsoftware at sonic.net Thu Sep 17 21:22:23 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Thu, 17 Sep 2020 18:22:23 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> Message-ID: <9adb1ce5-bb27-69fc-c64e-c04adb762e88@sonic.net> On 9/17/20 5:41 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > Ralph, > > So this did not work. I have > -------- > [ fld "Src" ] > >

My Trek to Siva
> Magical Abodes

> >

Join the author on a tour of ancient Siva temples

> ------ > [ fld "Dest" ] > >

My Trek to Siva
> Magical Abodes

> >

Join the author on a tour of ancient Siva temples

> ------- > It same for both fields. Neither one displays the htmltext text . Brahmanathaswami- Hard to tell exactly what you're looking for, but if you want to display the raw html, try put the htmltext of field "Src" into field "Dest" -- Mark Wieder ahsoftware at gmail.com From bogdanoff at me.com Thu Sep 17 23:32:11 2020 From: bogdanoff at me.com (Peter Bogdanoff) Date: Thu, 17 Sep 2020 20:32:11 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> Message-ID: <76943E45-8653-417E-A039-F764D696A657@me.com> If the field ?Src" contains:

My Trek to Siva
Magical Abodes

Join the author on a tour of ancient Siva temples

then: set the htmlText of field "Src" to field "Src" will show HTML-formatted text. Peter > On Sep 17, 2020, at 5:41 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > > Ralph, > > So this did not work. I have > -------- > [ fld "Src" ] > >

My Trek to Siva
> Magical Abodes

> >

Join the author on a tour of ancient Siva temples

> ------ > [ fld "Dest" ] > >

My Trek to Siva
> Magical Abodes

> >

Join the author on a tour of ancient Siva temples

> ------- > It same for both fields. Neither one displays the htmltext text . > > ?? > set the htmltext of fld "checkHTML" to the htmlText of fld "mainText" > BR > > ? > > Ralph DiMola wrote: > > set the htmltext of fld "Dest" to the htmlText of fld "Src" > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From james at thehales.id.au Fri Sep 18 12:38:28 2020 From: james at thehales.id.au (james at thehales.id.au) Date: Sat, 19 Sep 2020 02:38:28 +1000 Subject: Big Sur and Drag and drop (Marty Knapp) Message-ID: <2AE1BC26-2322-417B-998C-DBED2D929E0C@thehales.id.au> Thanks Marty. Seems my code is at fault, even though it has worked until now. From brahma at hindu.org Sun Sep 20 10:28:40 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sun, 20 Sep 2020 14:28:40 +0000 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <76943E45-8653-417E-A039-F764D696A657@me.com> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> Message-ID: <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> Eureka! So easy, now to get back to the htmlText as per the code if the htmlText of field "mainText" then put the htmlText of field "mainText" into field "mainText" else set the htmlText of field "mainText" to field "mainText" end if we wonder how easy it to tell that "if" the clause is telling it is "true" if (set the htmlText of field "mainText" to field "mainText") then does not work BR ? Peter Bougdanof wrote: set the htmlText of field "Src" to field "Src" From ahsoftware at sonic.net Sun Sep 20 11:55:43 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 20 Sep 2020 08:55:43 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> Message-ID: <47cd84cb-cf28-0ecb-5880-ae6fcd69b00b@sonic.net> On 9/20/20 7:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > Eureka! So easy, now to get back to the htmlText as per the code > > if the htmlText of field "mainText" then > put the htmlText of field "mainText" into field "mainText" > else > set the htmlText of field "mainText" to field "mainText" > end if > > we wonder how easy it to tell that "if" the clause is telling it is "true" > > if (set the htmlText of field "mainText" to field "mainText") then > > does not work if field "mainText" is not empty then -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Sun Sep 20 16:10:40 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 20 Sep 2020 15:10:40 -0500 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> Message-ID: <2e20e9fe-598d-0c71-a7fd-7478d169fed1@hyperactivesw.com> On 9/20/20 9:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > Eureka! So easy, now to get back to the htmlText as per the code > > if the htmlText of field "mainText" then > put the htmlText of field "mainText" into field "mainText" > else > set the htmlText of field "mainText" to field "mainText" > end if > > we wonder how easy it to tell that "if" the clause is telling it is "true" > > if (set the htmlText of field "mainText" to field "mainText") then > > does not work Typically you can check the field text for a known html entity to see if it contains html or not. I think LC uses "

" because almost all html includes a paragraph mark. if "

" is in field "mainText" then -- htmltext is there If your html doesn't have paragraph entities then see if you can find one that you know will be there. As an aside, I first thought that this would work: if the htmltext of field "mainText" <> the text of field "mainText" then -- plain text is in the field which does return "false" correctly. But when I set the text of the field to the htmltext of the field and run the same test, it also returns "false". I'm not sure why. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From jacque at hyperactivesw.com Sun Sep 20 16:11:30 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 20 Sep 2020 15:11:30 -0500 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <47cd84cb-cf28-0ecb-5880-ae6fcd69b00b@sonic.net> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> <47cd84cb-cf28-0ecb-5880-ae6fcd69b00b@sonic.net> Message-ID: On 9/20/20 10:55 AM, Mark Wieder via use-livecode wrote: > On 9/20/20 7:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: >> Eureka! So easy, now to get back to the htmlText as per the code >> >> if the htmlText of field "mainText"? then >> ?????? put the htmlText of field "mainText" into field "mainText" >> ??? else >> ?????? set the htmlText of field "mainText" to field "mainText" >> ?? end if >> >> we wonder how easy it to tell that "if" the clause is telling it is "true" >> >> ? if (set the htmlText of field "mainText" to field "mainText") then >> >> does not work > > if field "mainText" is not empty then > I think Swami wants a toggle, so it's likely the field won't ever be empty. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From jacque at hyperactivesw.com Sun Sep 20 16:17:36 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 20 Sep 2020 15:17:36 -0500 Subject: Mouse messages in scrollers In-Reply-To: <51F3CAEA-1ED8-4EE7-AB3C-E148622F975F@elementarysoftware.com> References: <6C9770C7-FD36-4C36-9B43-67CF9303F906@elementarysoftware.com> <05DE3607-935A-49B3-94BA-D6CE7DD61075@elementarysoftware.com> <1722f509e00.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <2992b394-31b3-fec9-6689-c71818953b7e@hyperactivesw.com> <51F3CAEA-1ED8-4EE7-AB3C-E148622F975F@elementarysoftware.com> Message-ID: <2c1d499a-1c24-e312-d5bf-f044b4cf215e@hyperactivesw.com> Scott, did you ever figure this out? When are you capturing the mouse locations? If I remember right, they are accurate if you store them on mouseDown. I meant to reply sooner but the email got lost in a barrage for a while. On 9/15/20 8:30 PM, scott--- via use-livecode wrote: > on mobile (just iOS at the moment) I?m trying to not only register a horizontal swipe in a UIScroller but to calculate the line in the field under the scroller so that I can perform a delete action. I can get the swipe but? while these calculations seem to work fairly well in the IDE, not so much in the simulator. both the mouseH and the mouseLoc report a value but when I check it during scrollerDidScroll the X value is always 0 and the Y value is always the bottom of the screen? which of course is not particularly helpful. Am I doing something wrong or is this just not available when a scroller is under the ?mouse?? Setting delayTouches and canCancelTouches to false doesn?t appear to change anything. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From ahsoftware at sonic.net Sun Sep 20 16:20:45 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 20 Sep 2020 13:20:45 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: <2e20e9fe-598d-0c71-a7fd-7478d169fed1@hyperactivesw.com> References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> <2e20e9fe-598d-0c71-a7fd-7478d169fed1@hyperactivesw.com> Message-ID: On 9/20/20 1:10 PM, J. Landman Gay via use-livecode wrote: > As an aside, I first thought that this would work: > > ? if the htmltext of field "mainText" <> the text of field "mainText" > then -- plain text is in the field > > which does return "false" correctly. But when I set the text of the > field to the htmltext of the field and run the same test, it also > returns "false". I'm not sure why. I don't see why that would ever return true. If you set the text of the field to the htmltext of the field, then isn't the htmltext of that the htmltext of the htmltext? -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Sun Sep 20 17:07:10 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 20 Sep 2020 16:07:10 -0500 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> <2e20e9fe-598d-0c71-a7fd-7478d169fed1@hyperactivesw.com> Message-ID: <84e0468f-36ae-1695-8897-c2341c386996@hyperactivesw.com> On 9/20/20 3:20 PM, Mark Wieder via use-livecode wrote: > On 9/20/20 1:10 PM, J. Landman Gay via use-livecode wrote: > >> As an aside, I first thought that this would work: >> >> ?? if the htmltext of field "mainText" <> the text of field "mainText" then -- plain text is >> in the field >> >> which does return "false" correctly. But when I set the text of the field to the htmltext of >> the field and run the same test, it also returns "false". I'm not sure why. > > I don't see why that would ever return true. > If you set the text of the field to the htmltext of the field, then isn't the htmltext of that > the htmltext of the htmltext? Ah. Of course. The scales have been lifted from my eyes. The htmltext of a field put into the same field:

this is a test

The htmltext of that:

<p>this is a <b>test</b></p>

Silly me. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From scott at elementarysoftware.com Sun Sep 20 22:00:30 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Sun, 20 Sep 2020 19:00:30 -0700 Subject: Mouse messages in scrollers In-Reply-To: <2c1d499a-1c24-e312-d5bf-f044b4cf215e@hyperactivesw.com> References: <6C9770C7-FD36-4C36-9B43-67CF9303F906@elementarysoftware.com> <05DE3607-935A-49B3-94BA-D6CE7DD61075@elementarysoftware.com> <1722f509e00.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <2992b394-31b3-fec9-6689-c71818953b7e@hyperactivesw.com> <51F3CAEA-1ED8-4EE7-AB3C-E148622F975F@elementarysoftware.com> <2c1d499a-1c24-e312-d5bf-f044b4cf215e@hyperactivesw.com> Message-ID: <5C96B5C4-3544-4298-8B75-376A3A0AA0DB@elementarysoftware.com> Unfortunately, I did not make any further progress on this one. Stumped. -- 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 Sep 20, 2020, at 1:17 PM, J. Landman Gay via use-livecode wrote: > > Scott, did you ever figure this out? When are you capturing the mouse locations? If I remember right, they are accurate if you store them on mouseDown. > > I meant to reply sooner but the email got lost in a barrage for a while. > > > On 9/15/20 8:30 PM, scott--- via use-livecode wrote: >> on mobile (just iOS at the moment) I?m trying to not only register a horizontal swipe in a UIScroller but to calculate the line in the field under the scroller so that I can perform a delete action. I can get the swipe but? while these calculations seem to work fairly well in the IDE, not so much in the simulator. both the mouseH and the mouseLoc report a value but when I check it during scrollerDidScroll the X value is always 0 and the Y value is always the bottom of the screen? which of course is not particularly helpful. Am I doing something wrong or is this just not available when a scroller is under the ?mouse?? Setting delayTouches and canCancelTouches to false doesn?t appear to change anything. > > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From scott at elementarysoftware.com Sun Sep 20 22:11:07 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Sun, 20 Sep 2020 19:11:07 -0700 Subject: formattedHeight formattedWidth on android Message-ID: <705EFA6A-593E-4D58-9BDC-AB76048F9286@elementarysoftware.com> I?ve recently run into what feels like a bug with formattedWidth and formattedHeight of a field in android. I?m attempting to maximize (without clipping) the textSize of a string in a fixed-size field. I have code that works reliably in the IDE and on iOS but not on android. My use case seems to be solvable by first calculating the amount it is likely to be off and then factoring that in. It seems that there might be some related issues in Bugzilla but I didn?t find anything exactly the same. I?m somewhat new to Android so I always wonder if my stumbles are known limitations that I just can?t find the documentation for. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com ------------------------------------------------------ From scott at elementarysoftware.com Sun Sep 20 22:13:52 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Sun, 20 Sep 2020 19:13:52 -0700 Subject: Mouse messages in scrollers In-Reply-To: <5C96B5C4-3544-4298-8B75-376A3A0AA0DB@elementarysoftware.com> References: <6C9770C7-FD36-4C36-9B43-67CF9303F906@elementarysoftware.com> <05DE3607-935A-49B3-94BA-D6CE7DD61075@elementarysoftware.com> <1722f509e00.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <2992b394-31b3-fec9-6689-c71818953b7e@hyperactivesw.com> <51F3CAEA-1ED8-4EE7-AB3C-E148622F975F@elementarysoftware.com> <2c1d499a-1c24-e312-d5bf-f044b4cf215e@hyperactivesw.com> <5C96B5C4-3544-4298-8B75-376A3A0AA0DB@elementarysoftware.com> Message-ID: <51D8ED25-AD23-4026-A82E-01E04ED45423@elementarysoftware.com> Ack! I replied without fully grokking what you wrote. I will revisit this and look at storing them on mouseDown. Thank you! ? Scott > On Sep 20, 2020, at 7:00 PM, scott--- via use-livecode wrote: > > Unfortunately, I did not make any further progress on this one. Stumped. > > -- > 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 Sep 20, 2020, at 1:17 PM, J. Landman Gay via use-livecode wrote: >> >> Scott, did you ever figure this out? When are you capturing the mouse locations? If I remember right, they are accurate if you store them on mouseDown. >> >> I meant to reply sooner but the email got lost in a barrage for a while. >> >> >> On 9/15/20 8:30 PM, scott--- via use-livecode wrote: >>> on mobile (just iOS at the moment) I?m trying to not only register a horizontal swipe in a UIScroller but to calculate the line in the field under the scroller so that I can perform a delete action. I can get the swipe but? while these calculations seem to work fairly well in the IDE, not so much in the simulator. both the mouseH and the mouseLoc report a value but when I check it during scrollerDidScroll the X value is always 0 and the Y value is always the bottom of the screen? which of course is not particularly helpful. Am I doing something wrong or is this just not available when a scroller is under the ?mouse?? Setting delayTouches and canCancelTouches to false doesn?t appear to change anything. >> >> >> -- >> 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 From scott at elementarysoftware.com Mon Sep 21 03:06:03 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Mon, 21 Sep 2020 00:06:03 -0700 Subject: formattedHeight formattedWidth on android In-Reply-To: <705EFA6A-593E-4D58-9BDC-AB76048F9286@elementarysoftware.com> References: <705EFA6A-593E-4D58-9BDC-AB76048F9286@elementarysoftware.com> Message-ID: <3440F626-3765-4610-957E-D3130598A999@elementarysoftware.com> Hmm? Well now I can?t reproduce the issue that consumed a fair number of hours yesterday. Which, (with the exception of lost hours) is a very good thing. ? Scott Morrow > On Sep 20, 2020, at 7:11 PM, scott--- via use-livecode wrote: > > I?ve recently run into what feels like a bug with formattedWidth and formattedHeight of a field in android. I?m attempting to maximize (without clipping) the textSize of a string in a fixed-size field. I have code that works reliably in the IDE and on iOS but not on android. My use case seems to be solvable by first calculating the amount it is likely to be off and then factoring that in. It seems that there might be some related issues in Bugzilla but I didn?t find anything exactly the same. I?m somewhat new to Android so I always wonder if my stumbles are known limitations that I just can?t find the documentation for. > > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email scott at elementarysoftware.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 brahma at hindu.org Mon Sep 21 13:55:45 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 21 Sep 2020 17:55:45 +0000 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> <47cd84cb-cf28-0ecb-5880-ae6fcd69b00b@sonic.net> Message-ID: I found it: button "Check HTML" on mouseUp If "

" is in field "mainText" then -- htmltext is there set the htmlText of field "mainText" to field "mainText" else put the htmltext of field "mainText" into field "mainText" end if end mouse BUT!

Vedas
A Random Selection
of Sutras

gets turned around. It becomes

Vedas

A Random Selection

of Sutras

?? where does the font size becomes "34" . Even with the font size of field increases, it stays at size="34"?? BR ? J. Landman Gay wrote: I think Swami wants a toggle, so it's likely the field won't ever be empty. From paul at livecode.org Mon Sep 21 15:38:25 2020 From: paul at livecode.org (Paul Hibbert) Date: Mon, 21 Sep 2020 12:38:25 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: <7CCE7E06-1D15-40B0-BBB5-EE1798BB9EAC@hindu.org> <005b01d68d29$37973400$a6c59c00$@net> <76943E45-8653-417E-A039-F764D696A657@me.com> <9373C79A-1562-4A42-9E22-9F25DD2C5F40@hindu.org> <47cd84cb-cf28-0ecb-5880-ae6fcd69b00b@sonic.net> Message-ID: <263E5EE9-2E3E-4F3E-9A38-1F370AE52321@livecode.org> > On 21Sep, 2020, at 10:55, Sannyasin Brahmanathaswami via use-livecode wrote: > > ?? where does the font size becomes "34" . Even with the font size of field increases, it stays at size="34??? I would say from the h1 attribute that sets the text as a heading, h1 being the largest size. If you test with h2, h3 etc. you should see different font sizes. As you can see, LiveCode?s conversion to HTML is not exactly how you would write the code if you were producing a web page, AFAIK it?s designed to suit LC's internal use. Paul From klaus at major-k.de Mon Sep 21 15:57:53 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 21 Sep 2020 21:57:53 +0200 Subject: Create image from SVG widget Message-ID: Hi friends, I need a little hint, I forgot what command creates an image from an SVG widget. 8-) ... set the text of img 1 to ???(???) ... Thanks for any hint! Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From ahsoftware at sonic.net Mon Sep 21 16:31:45 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Mon, 21 Sep 2020 13:31:45 -0700 Subject: Create image from SVG widget In-Reply-To: References: Message-ID: On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: > Hi friends, > > I need a little hint, I forgot what command creates an image > from an SVG widget. 8-) > ... > set the text of img 1 to ???(???) > ... > > Thanks for any hint! Dunno. I export a snapshot from the widget. -- Mark Wieder ahsoftware at gmail.com From klaus at major-k.de Mon Sep 21 16:41:35 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 21 Sep 2020 22:41:35 +0200 Subject: Create image from SVG widget In-Reply-To: References: Message-ID: <1D761661-81FF-426F-BFE4-E28A849B83DC@major-k.de> Hi Mark, > Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode : > On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: >> Hi friends, >> I need a little hint, I forgot what command creates an image >> from an SVG widget. 8-) >> ... >> set the text of img 1 to ???(???) >> ... >> Thanks for any hint! > > Dunno. very helpful, thank you. :-D > I export a snapshot from the widget. > > -- > Mark Wieder > ahsoftware at gmail.com Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From brian at milby7.com Mon Sep 21 17:03:18 2020 From: brian at milby7.com (Brian Milby) Date: Mon, 21 Sep 2020 17:03:18 -0400 Subject: Create image from SVG widget In-Reply-To: <1D761661-81FF-426F-BFE4-E28A849B83DC@major-k.de> References: <1D761661-81FF-426F-BFE4-E28A849B83DC@major-k.de> Message-ID: This may be what you're looking for: put drawingSvgCompile(tFileText) into tDrawing set the text of image "svgImage" to tDrawing http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024 The stack in the forum post will let you see the difference in how a particular svg file is rendered in the browser widget, as a SVG path (widget), and as a SVG Compiled Drawing (image). There is some additional code available that will translate the path (effectively trim extra space around the image) that I have not incorporated. On Mon, Sep 21, 2020 at 4:41 PM Klaus major-k via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Mark, > > > Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode < > use-livecode at lists.runrev.com>: > > On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: > >> Hi friends, > >> I need a little hint, I forgot what command creates an image > >> from an SVG widget. 8-) > >> ... > >> set the text of img 1 to ???(???) > >> ... > >> Thanks for any hint! > > > > Dunno. > > very helpful, thank you. :-D > > > I export a snapshot from the widget. > > > > -- > > Mark Wieder > > ahsoftware at gmail.com > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > 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 klaus at major-k.de Mon Sep 21 17:07:56 2020 From: klaus at major-k.de (Klaus major-k) Date: Mon, 21 Sep 2020 23:07:56 +0200 Subject: Create image from SVG widget In-Reply-To: References: <1D761661-81FF-426F-BFE4-E28A849B83DC@major-k.de> Message-ID: Hi Brian > Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode : > > This may be what you're looking for: > > put drawingSvgCompile(tFileText) into tDrawing > set the text of image "svgImage" to tDrawing > http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024 > The stack in the forum post will let you see the difference in how a > particular svg file is rendered in the browser widget, as a SVG path > (widget), and as a SVG Compiled Drawing (image). There is some additional > code available that will translate the path (effectively trim extra space > around the image) that I have not incorporated. thank you! But I thought we could do this from a SVG widget without the need of a .svg FILE. Was I dreaming? Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From ambassador at fourthworld.com Mon Sep 21 17:13:34 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 21 Sep 2020 14:13:34 -0700 Subject: HOw to get htmltext from the field to display in another field In-Reply-To: References: Message-ID: <72c0847b-23c9-4ff2-13c3-7cb30ca99493@fourthworld.com> Sannyasin Brahmanathaswami wrote: >

Vedas
> A Random Selection
> of Sutras

> > gets turned around. It becomes > >

Vedas

>

A Random Selection

>

of Sutras

> > ?? where does the font size becomes "34" . HtmlText is not HTML. It was added to the engine as a convenient way to use HTML-like tagging to express field contents with styles. Header tags (eg "H1") are an HTML convention. LiveCode has no CSS, and hence ability to define header specifiers for size. If you try this: set the textSize of fld 1 to "h1" ...it should fail. But as a convenience or those who may be attempting to mix and match a limited form of HTML with LC's HtmlText, the engine will allow header tags as input, translating them to fixed values. As you've discovered there, the fixed value for "H1" is 34. > Even with the font size of field increases, it stays at size="34"?? Attributes of field objects are different from attributes of style runs in the content within the field object. Changes to the object's textColor, textSize, and textFont will affect the visual rendering of the object's contents only, leaving the contents as stored unaffected. If the content has any attribute set within a style run, that setting overrides any setting for the object, much as we see with inheritance of visual properties throughout LC. If you want to change the textSize of the contents of the field, you can either: a) set the textSize of char 1 to -1 of fld "Whatever" to 20 b) set the textSize of char 1 to -1 of fld "Whatever" to empty set the textSize of fld "Whatever" to 20 -- 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 dfepstein at comcast.net Mon Sep 21 18:55:32 2020 From: dfepstein at comcast.net (David Epstein) Date: Mon, 21 Sep 2020 18:55:32 -0400 Subject: Updating a menubar button on Mac Message-ID: I can use a ?mouseEnter? handler to update a menu button?s contents just before the user displays that menu. But if that menu button is part of the stack?s menubar group on a Mac, the Mac menu does not seem to receive the mouseEnter message and the menu is not updated. Is there a workaround? Thank you! David Epstein From devin_asay at byu.edu Mon Sep 21 19:49:56 2020 From: devin_asay at byu.edu (Devin Asay) Date: Mon, 21 Sep 2020 23:49:56 +0000 Subject: Updating a menubar button on Mac In-Reply-To: References: Message-ID: <5FFA70CB-300B-4E6D-BFD9-310DA435C6AC@byu.edu> Populate it on mouseDown? I?ve done this lots, but mainly with option menus. > On Sep 21, 2020, at 4:55 PM, David Epstein via use-livecode wrote: > > I can use a ?mouseEnter? handler to update a menu button?s contents just before the user displays that menu. But if that menu button is part of the stack?s menubar group on a Mac, the Mac menu does not seem to receive the mouseEnter message and the menu is not updated. Is there a workaround? Thank you! > > David Epstein > _______________________________________________ > use-livecode mailing list > use-livecode 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 Director Office of Digital Humanities Brigham Young University From jacque at hyperactivesw.com Mon Sep 21 20:55:38 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Mon, 21 Sep 2020 19:55:38 -0500 Subject: Updating a menubar button on Mac In-Reply-To: References: Message-ID: <174b34f1310.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> When the menu is placed into the system menu on Macs the buttons no longer receive messages but the group does, so update everything at once on mouseDown in the group script. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 21, 2020 5:57:52 PM David Epstein via use-livecode wrote: > I can use a ?mouseEnter? handler to update a menu button?s contents just > before the user displays that menu. But if that menu button is part of the > stack?s menubar group on a Mac, the Mac menu does not seem to receive the > mouseEnter message and the menu is not updated. Is there a workaround? > Thank you! > > David Epstein > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Mon Sep 21 22:18:06 2020 From: brian at milby7.com (Brian Milby) Date: Mon, 21 Sep 2020 22:18:06 -0400 Subject: Create image from SVG widget In-Reply-To: References: Message-ID: <4BA9816A-3749-4129-B6FA-A172ACC2A88E@milby7.com> You do not need a file, but you do need additional code. I found a handler from a Sep 2018 thread that wraps a path to form the input needed for the compile. LC Mark mentioned an internal call that could enhance the process but I didn?t see any code that leveraged it. Let me take a crack at it and see what I come up with. Sent from my iPhone > On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode wrote: > > ?Hi Brian > >> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode : >> >> This may be what you're looking for: >> >> put drawingSvgCompile(tFileText) into tDrawing >> set the text of image "svgImage" to tDrawing >> http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024 >> The stack in the forum post will let you see the difference in how a >> particular svg file is rendered in the browser widget, as a SVG path >> (widget), and as a SVG Compiled Drawing (image). There is some additional >> code available that will translate the path (effectively trim extra space >> around the image) that I have not incorporated. > > thank you! > > But I thought we could do this from a SVG widget without the need of a .svg FILE. > Was I dreaming? > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > 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 brian at milby7.com Mon Sep 21 23:38:55 2020 From: brian at milby7.com (Brian Milby) Date: Mon, 21 Sep 2020 23:38:55 -0400 Subject: Create image from SVG widget In-Reply-To: <4BA9816A-3749-4129-B6FA-A172ACC2A88E@milby7.com> References: <4BA9816A-3749-4129-B6FA-A172ACC2A88E@milby7.com> Message-ID: Here's a link to the post in the archives: http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html I could get close, but still needed to work out a way to translate the path to improve upon what was already discussed. (I can get the actual bounding box, but it doesn't really help with eliminating the need to use the cropIt handler.) On Mon, Sep 21, 2020 at 10:18 PM Brian Milby wrote: > You do not need a file, but you do need additional code. I found a > handler from a Sep 2018 thread that wraps a path to form the input needed > for the compile. LC Mark mentioned an internal call that could enhance the > process but I didn?t see any code that leveraged it. Let me take a crack > at it and see what I come up with. > > Sent from my iPhone > > > On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > ?Hi Brian > > > >> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode < > use-livecode at lists.runrev.com>: > >> > >> This may be what you're looking for: > >> > >> put drawingSvgCompile(tFileText) into tDrawing > >> set the text of image "svgImage" to tDrawing > >> http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024 > >> The stack in the forum post will let you see the difference in how a > >> particular svg file is rendered in the browser widget, as a SVG path > >> (widget), and as a SVG Compiled Drawing (image). There is some > additional > >> code available that will translate the path (effectively trim extra > space > >> around the image) that I have not incorporated. > > > > thank you! > > > > But I thought we could do this from a SVG widget without the need of a > .svg FILE. > > Was I dreaming? > > > > Best > > > > Klaus > > > > -- > > Klaus Major > > https://www.major-k.de > > 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 klaus at major-k.de Tue Sep 22 04:08:13 2020 From: klaus at major-k.de (Klaus major-k) Date: Tue, 22 Sep 2020 10:08:13 +0200 Subject: Create image from SVG widget In-Reply-To: References: <4BA9816A-3749-4129-B6FA-A172ACC2A88E@milby7.com> Message-ID: <137E73BC-C984-4CC5-89A6-487AEA7C8696@major-k.de> Hi Brian, > Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode : > > Here's a link to the post in the archives: > http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html > > I could get close, but still needed to work out a way to translate the path > to improve upon what was already discussed. (I can get the actual bounding > box, but it doesn't really help with eliminating the need to use the cropIt > handler.) thank you very much, will take a look! > On Mon, Sep 21, 2020 at 10:18 PM Brian Milby wrote: > >> You do not need a file, but you do need additional code. I found a >> handler from a Sep 2018 thread that wraps a path to form the input needed >> for the compile. LC Mark mentioned an internal call that could enhance the >> process but I didn?t see any code that leveraged it. Let me take a crack >> at it and see what I come up with. >> >> Sent from my iPhone >> ... >>> >>>> This may be what you're looking for: >>>> >>>> put drawingSvgCompile(tFileText) into tDrawing >>>> set the text of image "svgImage" to tDrawing >>>> http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024 >>>> The stack in the forum post will let you see the difference in how a >>>> particular svg file is rendered in the browser widget, as a SVG path >>>> (widget), and as a SVG Compiled Drawing (image). There is some >> additional >>>> code available that will translate the path (effectively trim extra >> space >>>> around the image) that I have not incorporated. >>> >>> thank you! >>> >>> But I thought we could do this from a SVG widget without the need of a >> .svg FILE. >>> Was I dreaming? Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From rdimola at evergreeninfo.net Tue Sep 22 15:09:53 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Tue, 22 Sep 2020 15:09:53 -0400 Subject: https put url not working first time Message-ID: <007401d69113$f6e42000$e4ac6000$@net> I'm doing a: put url (https://somewhere.com/someFolder/file.ext) into url ("file:someLocalPath/file.ext") 90% of the time the first try fails but then all similar attempts work 100% correctly after that. When it fails the result is empty and the local file has a zero length. Has anyone seen this? LC 9.6.1 business. tsNet is active Thanks Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net From jacque at hyperactivesw.com Tue Sep 22 18:48:42 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Tue, 22 Sep 2020 17:48:42 -0500 Subject: Converting from unicode to ASCII Message-ID: I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. We are now translating some stacks to other languages which require unicode text. AWS recommends not using accented characters in file names, so we need to translate the clicktext into plain ASCII. Is there a good way to do that without using a lookup table or metadata? The file names doesn't need to make sense syntactically. For example, l?Acad?mie fran?aise -> lAcademiefrancaise.livecode ...or similar, whatever works. The user will never see the file name. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From devin_asay at byu.edu Tue Sep 22 18:58:54 2020 From: devin_asay at byu.edu (Devin Asay) Date: Tue, 22 Sep 2020 22:58:54 +0000 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: Hi Jacque, Have you looked at the normalizeText function? I?m not sure that would help, but maybe it?s a start. But it that doesn?t help, and if nobody ever sees the filenames, why not just loop through the string and delete anything that?s not in ASCII range? Devin > On Sep 22, 2020, at 4:48 PM, J. Landman Gay via use-livecode wrote: > > I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. > > We are now translating some stacks to other languages which require unicode text. AWS recommends not using accented characters in file names, so we need to translate the clicktext into plain ASCII. > > Is there a good way to do that without using a lookup table or metadata? The file names doesn't need to make sense syntactically. For example, > > l?Acad?mie fran?aise -> lAcademiefrancaise.livecode > > ...or similar, whatever works. The user will never see the file name. > > -- > 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 Devin Asay Director Office of Digital Humanities Brigham Young University From paul at researchware.com Tue Sep 22 19:09:53 2020 From: paul at researchware.com (Paul Dupuis) Date: Tue, 22 Sep 2020 19:09:53 -0400 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: <845c22da-1d5c-30af-8016-c8bec71e7fef@researchware.com> On 9/22/2020 6:58 PM, Devin Asay via use-livecode wrote: > But it that doesn?t help, and if nobody ever sees the filenames, why not just loop through the string and delete anything that?s not in ASCII range? Well, if the name is in Chinese,? you would delete the entire name. From ahsoftware at sonic.net Tue Sep 22 19:22:05 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 22 Sep 2020 16:22:05 -0700 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: <9c9657d1-6ec1-0917-cfb2-4e349383632f@sonic.net> On 9/22/20 3:48 PM, J. Landman Gay via use-livecode wrote: > I have a stack with an index. When a user clicks a line, a handler uses > the clicktext to create a file name which is always the clicktext plus > the ".livecode" extension. The stack is then downloaded from an AWS > server and displayed. > > We are now translating some stacks to other languages which require > unicode text. AWS recommends not using accented characters in file > names, so we need to translate the clicktext into plain ASCII. > > Is there a good way to do that without using a lookup table or metadata? > The file names doesn't need to make sense syntactically. For example, > > ?? l?Acad?mie fran?aise -> lAcademiefrancaise.livecode > > ...or similar, whatever works. The user will never see the file name. > Is this just a temporary filename (not long-term storage)? In that case why use the clicktext at all? Can you use tempname() to create and retrieve the stack? Or better yet uuid()? -- Mark Wieder ahsoftware at gmail.com From rdimola at evergreeninfo.net Tue Sep 22 19:28:33 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Tue, 22 Sep 2020 19:28:33 -0400 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: <009901d69138$192ffde0$4b8ff9a0$@net> How about converting the non ascii characters into to base 64 ascii? This could produce really long filenames. I guess you could truncate if needed. Also the filename would make no sense at all if it was all non ascii. 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 J. Landman Gay via use-livecode Sent: Tuesday, September 22, 2020 6:49 PM To: LiveCode Mailing List Cc: J. Landman Gay Subject: Converting from unicode to ASCII I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. We are now translating some stacks to other languages which require unicode text. AWS recommends not using accented characters in file names, so we need to translate the clicktext into plain ASCII. Is there a good way to do that without using a lookup table or metadata? The file names doesn't need to make sense syntactically. For example, l?Acad?mie fran?aise -> lAcademiefrancaise.livecode ...or similar, whatever works. The user will never see the file name. -- 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 From bobsneidar at iotecdigital.com Tue Sep 22 19:42:30 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 22 Sep 2020 23:42:30 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <9c9657d1-6ec1-0917-cfb2-4e349383632f@sonic.net> References: <9c9657d1-6ec1-0917-cfb2-4e349383632f@sonic.net> Message-ID: <4AF79CDF-868D-4923-A0BD-D45CEAECA3F6@iotecdigital.com> There?s a tempname() function??? Ohhh fun!! Bob S On Sep 22, 2020, at 4:22 PM, Mark Wieder via use-livecode > wrote: Can you use tempname() to create and retrieve the stack? From sundown.pacifier at icloud.com Tue Sep 22 19:58:15 2020 From: sundown.pacifier at icloud.com (John Balgenorth) Date: Tue, 22 Sep 2020 16:58:15 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <4AF79CDF-868D-4923-A0BD-D45CEAECA3F6@iotecdigital.com> References: <4AF79CDF-868D-4923-A0BD-D45CEAECA3F6@iotecdigital.com> Message-ID: You could easily convert it to HEX but that would make the file name exactly twice as long. JB > On Sep 22, 2020, at 4:43 PM, Bob Sneidar via use-livecode wrote: > > ?There?s a tempname() function??? Ohhh fun!! > > Bob S > > > On Sep 22, 2020, at 4:22 PM, Mark Wieder via use-livecode > wrote: > > Can you use tempname() to create and retrieve the stack? > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Tue Sep 22 22:58:51 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Tue, 22 Sep 2020 21:58:51 -0500 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> Combining responses: "NormalizeText" always returns unicode for all four of its variations, so no go. And as Paul pointed out, if the language is Chinese, deleting all non-ascii characters would leave nothing. On the other hand, we are only converting to Roman languages right now, so this might be a good option for a while. > Is this just a temporary filename (not long-term storage)? No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. There are currently hundreds of them with more added frequently. That's why I'm looking for a solution that doesn't involve changing all the file names, because renaming and re-uploading all those files would be way too much work. I hadn't thought about HEX or base64. Those might be options. It would involve more work on my client's end though, as she'd need to run each file through a name conversion before uploading. Still thinking about this. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From ahsoftware at sonic.net Tue Sep 22 23:42:09 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 22 Sep 2020 20:42:09 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> Message-ID: On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: >> Is this just a temporary filename (not long-term storage)? > > No, the stacks are uploaded to AWS and remain there, retrieved from the > server on request. There are currently hundreds of them with more added > frequently. That's why I'm looking for a solution that doesn't involve > changing all the file names, because renaming and re-uploading all those > files would be way too much work. How do the files get retrieved? Is there a database or something similar that stores the filenames? You could still use UUID filenames from now on and not have to mess with the existing ones. -- Mark Wieder ahsoftware at gmail.com From jacque at hyperactivesw.com Wed Sep 23 02:10:42 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 23 Sep 2020 01:10:42 -0500 Subject: Converting from unicode to ASCII In-Reply-To: References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> Message-ID: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> On 9/22/20 10:42 PM, Mark Wieder via use-livecode wrote: > On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: > >>> Is this just a temporary filename (not long-term storage)? >> >> No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. >> There are currently hundreds of them with more added frequently. That's why I'm looking for a >> solution that doesn't involve changing all the file names, because renaming and re-uploading >> all those files would be way too much work. > > How do the files get retrieved? Is there a database or something similar that stores the > filenames? You could still use UUID filenames from now on and not have to mess with the > existing ones. I may have misled you. When I said the files were permanent, I meant they stay on the server until they get changed, which is fairly regular. They aren't stored on the user's machine where tempfile would be, they are downloaded as needed and only kept in memory. Basically, stacks are named based on a FileMaker database that spits out text files listing various properties and content that our app needs to know. Stacks are created by a tool I wrote that merges those text files with a stack template to populate the content. The stack name in the text file is not only used to create the file name but also appears in several other places within the stack (menus, popdown buttons, labels, etc.) The file name is created by munging the name string. I'm looking for a way to create non-unicode file names based on the string that comes out of the database. There's more to it than that; the server runs a cron job hourly that indexes all its files and creates AWS secure URLs for each. The app downloads that lookup file on demand. When the user selects a name from a list, the selection is munged to match the server name and the download URL is obtained from the cron job's lookup file. We don't have a field in the database for a file name. We set up the system this way so we could change names when needed, which happens whenever the content and distribution of the material changes. Stacks are updated and replaced, sometimes split into two stacks, sometimes combined, sometimes rebuilt from scratch. As long as the FM text files contain the right string, the app can create the server filename. But the file name needs to be readily identifiable so we can manage the replacements on the server easily. If file names were UUIDs, wouldn't we still need a way to match the user's selection to a UUID? When we set this up, we didn't know we were going to go multi-lingual. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From richmondmathewson at gmail.com Wed Sep 23 02:19:11 2020 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Wed, 23 Sep 2020 09:19:11 +0300 Subject: Converting from unicode to ASCII In-Reply-To: References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> Message-ID: Personally I think deleting everything that is not inwith the ASCII range is potentially a bit dangerous [suppose ALL the letters in the title are not inwith the ASCII range], so I would favour using some sort of lookup table/substitution list. Certainly letters such as accented 'e' can just be replaced by a 'common or garden e', but, consider Cyrillic for instance. Of course a lot of this has to do with what sort of source files you are using [Hmong, anyone?]. Most alphabetic languages have a standardise Latin transliteration standard and that is best adhered to, so, for instance: ??????? (in Bulgarian Cyrillic), comes across as 'Richmand' [OK, OK, OK, it's hilarious, but that's what you get when a transliteration standard is worked out by a committee of people who couldn't tie their own shoelaces (that's why they sit in committees)]. Certainly, however WONKY a Latin transliteration scheme maybe both phonetically and in general, that should NOT need to be considered when it comes to file names. On Wed, Sep 23, 2020 at 6:43 AM Mark Wieder via use-livecode < use-livecode at lists.runrev.com> wrote: > On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: > > >> Is this just a temporary filename (not long-term storage)? > > > > No, the stacks are uploaded to AWS and remain there, retrieved from the > > server on request. There are currently hundreds of them with more added > > frequently. That's why I'm looking for a solution that doesn't involve > > changing all the file names, because renaming and re-uploading all those > > files would be way too much work. > > How do the files get retrieved? Is there a database or something similar > that stores the filenames? You could still use UUID filenames from now > on and not have to mess with the existing ones. > > -- > 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 > -- This communication may be unlawfully collected and stored by the Agents of a large number of governments in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you believe you have received this communication in error, please delete it immediately. From richmondmathewson at gmail.com Wed Sep 23 02:22:08 2020 From: richmondmathewson at gmail.com (Richmond Mathewson) Date: Wed, 23 Sep 2020 09:22:08 +0300 Subject: Converting from unicode to ASCII In-Reply-To: References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> Message-ID: "This communication may be unlawfully collected and stored by the Agents of a large number of governments in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting,disseminating, or otherwise using it. If you believe you have received this communication in error, please delete it immediately." Well, after my last posting the Bulgarian government will want my guts for garters . . . but as the idea of the totally corrupt government wearing garters made out of my intestines is hilarious . . . On Wed, Sep 23, 2020 at 9:19 AM Richmond Mathewson < richmondmathewson at gmail.com> wrote: > Personally I think deleting everything that is not inwith the ASCII range > is potentially a bit dangerous [suppose ALL the letters > in the title are not inwith the ASCII range], so I would favour using some > sort of lookup table/substitution list. Certainly letters such > as accented 'e' can just be replaced by a 'common or garden e', but, > consider Cyrillic for instance. Of course a lot of this has to > do with what sort of source files you are using [Hmong, anyone?]. > > Most alphabetic languages have a standardise Latin transliteration > standard and that is best adhered to, so, for instance: > > ??????? (in Bulgarian Cyrillic), comes across as 'Richmand' [OK, OK, OK, > it's hilarious, but that's what you get when a > transliteration standard is worked out by a committee of people who > couldn't tie their own shoelaces (that's why they sit in > committees)]. > > Certainly, however WONKY a Latin transliteration scheme maybe both > phonetically and in general, that should NOT need to > be considered when it comes to file names. > > On Wed, Sep 23, 2020 at 6:43 AM Mark Wieder via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: >> >> >> Is this just a temporary filename (not long-term storage)? >> > >> > No, the stacks are uploaded to AWS and remain there, retrieved from the >> > server on request. There are currently hundreds of them with more added >> > frequently. That's why I'm looking for a solution that doesn't involve >> > changing all the file names, because renaming and re-uploading all >> those >> > files would be way too much work. >> >> How do the files get retrieved? Is there a database or something similar >> that stores the filenames? You could still use UUID filenames from now >> on and not have to mess with the existing ones. >> >> -- >> 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 >> > > > -- > > This communication may be unlawfully collected and stored by the Agents > of a large number of governments in secret. The parties to this email do > not consent to the retrieving or storing of this communication and any > related metadata, as well as printing, copying, re-transmitting, > disseminating, or otherwise using it. If you believe you have received > this communication in error, please delete it immediately. > > -- This communication may be unlawfully collected and stored by the Agents of a large number of governments in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you believe you have received this communication in error, please delete it immediately. From klaus at major-k.de Wed Sep 23 03:18:46 2020 From: klaus at major-k.de (Klaus major-k) Date: Wed, 23 Sep 2020 09:18:46 +0200 Subject: Create image from SVG widget In-Reply-To: <137E73BC-C984-4CC5-89A6-487AEA7C8696@major-k.de> References: <4BA9816A-3749-4129-B6FA-A172ACC2A88E@milby7.com> <137E73BC-C984-4CC5-89A6-487AEA7C8696@major-k.de> Message-ID: Hi all, FYI: I just created an enhancement request to make drawingSVGCompile also work internally with a widget: > Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode : > Hi Brian, >> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode : >> >> Here's a link to the post in the archives: >> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html >> >> I could get close, but still needed to work out a way to translate the path >> to improve upon what was already discussed. (I can get the actual bounding >> box, but it doesn't really help with eliminating the need to use the cropIt >> handler.) > ... Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From scott at elementarysoftware.com Wed Sep 23 07:26:20 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Wed, 23 Sep 2020 04:26:20 -0700 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: What about just converting to UTF8. Wouldn?t that coerce it into ASCII? ? Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com > On Sep 22, 2020, at 3:48 PM, J. Landman Gay via use-livecode wrote: > > I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. > > We are now translating some stacks to other languages which require unicode text. AWS recommends not using accented characters in file names, so we need to translate the clicktext into plain ASCII. > > Is there a good way to do that without using a lookup table or metadata? The file names doesn't need to make sense syntactically. For example, > > l?Acad?mie fran?aise -> lAcademiefrancaise.livecode > > ...or similar, whatever works. The user will never see the file name. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From iphonelagi at gmail.com Wed Sep 23 07:35:23 2020 From: iphonelagi at gmail.com (Lagi Pittas) Date: Wed, 23 Sep 2020 12:35:23 +0100 Subject: Converting from unicode to ASCII In-Reply-To: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> Message-ID: Assuming all the languages are latin type alphabets (no chinese, Japanese , Sanskrit ;-) ) (but see later for a fix?) I would replace the charactes like the E with umlout/cedilla and other dicritics with the "naked" character but for others that can't remove them BUT add to the end of the filename string the #&999 code from this list https://en.wikipedia.org/wiki/Cedilla#Similar_diacritics to the end of the filename. This would make sure that each filename will be unique if you have a filename that is close to another. You could even add a number that refers to the position in the string where that character was. so instead of #&123 you would put #&5123 which means the character was in the fifth position. This means that (assuming not chinese) the temporary file name will give a hint as to the original name and you could still recreate the original unicode name from the numbers placed at the end. It would need a little playing with but I'm sure it could work. On the chinese (and Sansrit?) question the temporary file name would be made up of #&123#&321#&435 etc without needing the positional number alluded to before as all of the original strings would be removed. It should also work exactly the same way with Bulgarian and again you can use the numbers (#&123) to recreate the original filename. Regards Lagi On Wed, 23 Sep 2020 at 07:11, J. Landman Gay via use-livecode < use-livecode at lists.runrev.com> wrote: > On 9/22/20 10:42 PM, Mark Wieder via use-livecode wrote: > > On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: > > > >>> Is this just a temporary filename (not long-term storage)? > >> > >> No, the stacks are uploaded to AWS and remain there, retrieved from the > server on request. > >> There are currently hundreds of them with more added frequently. That's > why I'm looking for a > >> solution that doesn't involve changing all the file names, because > renaming and re-uploading > >> all those files would be way too much work. > > > > How do the files get retrieved? Is there a database or something similar > that stores the > > filenames? You could still use UUID filenames from now on and not have > to mess with the > > existing ones. > > I may have misled you. When I said the files were permanent, I meant they > stay on the server > until they get changed, which is fairly regular. They aren't stored on the > user's machine where > tempfile would be, they are downloaded as needed and only kept in memory. > > Basically, stacks are named based on a FileMaker database that spits out > text files listing > various properties and content that our app needs to know. Stacks are > created by a tool I wrote > that merges those text files with a stack template to populate the > content. The stack name in > the text file is not only used to create the file name but also appears in > several other places > within the stack (menus, popdown buttons, labels, etc.) The file name is > created by munging the > name string. I'm looking for a way to create non-unicode file names based > on the string that > comes out of the database. > > There's more to it than that; the server runs a cron job hourly that > indexes all its files and > creates AWS secure URLs for each. The app downloads that lookup file on > demand. When the user > selects a name from a list, the selection is munged to match the server > name and the download > URL is obtained from the cron job's lookup file. > > We don't have a field in the database for a file name. We set up the > system this way so we > could change names when needed, which happens whenever the content and > distribution of the > material changes. Stacks are updated and replaced, sometimes split into > two stacks, sometimes > combined, sometimes rebuilt from scratch. As long as the FM text files > contain the right > string, the app can create the server filename. But the file name needs to > be readily > identifiable so we can manage the replacements on the server easily. If > file names were UUIDs, > wouldn't we still need a way to match the user's selection to a UUID? > > When we set this up, we didn't know we were going to go multi-lingual. > > -- > 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 > -- KIndest Regards Lagi From brian at milby7.com Wed Sep 23 08:12:43 2020 From: brian at milby7.com (Brian Milby) Date: Wed, 23 Sep 2020 08:12:43 -0400 Subject: Create image from SVG widget In-Reply-To: References: Message-ID: <3B81E067-2025-45B7-BD0A-8704FAD9337E@milby7.com> It doesn?t require an actual file, just an XML document. I posted LCB code to convert the SVG path to what is needed for the compile. It will require an engine change or LCB to get the path translated to remove top/left extra space. I think the best way would be to update one of the LCB libraries to include my handler and the add a handler to the drawing library that uses it to do the compile. Now that I?m writing/thinking, it might could be done inside the LCB code with a call to the compile script. Sent from my iPhone > On Sep 23, 2020, at 3:19 AM, Klaus major-k via use-livecode wrote: > > ?Hi all, > > FYI: > I just created an enhancement request to make drawingSVGCompile also work > internally with a widget: > >> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode : >> Hi Brian, >>>> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode : >>> >>> Here's a link to the post in the archives: >>> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html >>> >>> I could get close, but still needed to work out a way to translate the path >>> to improve upon what was already discussed. (I can get the actual bounding >>> box, but it doesn't really help with eliminating the need to use the cropIt >>> handler.) >> ... > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > 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 klaus at major-k.de Wed Sep 23 08:17:35 2020 From: klaus at major-k.de (Klaus major-k) Date: Wed, 23 Sep 2020 14:17:35 +0200 Subject: Create image from SVG widget In-Reply-To: <3B81E067-2025-45B7-BD0A-8704FAD9337E@milby7.com> References: <3B81E067-2025-45B7-BD0A-8704FAD9337E@milby7.com> Message-ID: <2886285A-8D5A-427D-AEC8-A816D3220761@major-k.de> Hi Brian, > Am 23.09.2020 um 14:12 schrieb Brian Milby via use-livecode : > > It doesn?t require an actual file, just an XML document. yes, I understood that already. 8-) > I posted LCB code to convert the SVG path to what is needed for the compile. It will require an engine change or LCB to get the path translated to remove top/left extra space. > I think the best way would be to update one of the LCB libraries to include my handler and the add a handler to the drawing library that uses it to do the compile. > Now that I?m writing/thinking, it might could be done inside the LCB code with a call to the compile script. Thank you, but LCB is still a complete mistery to me and that ain't gonna change in the near future... > Sent from my iPhone >> ... >> FYI: >> I just created an enhancement request to make drawingSVGCompile also work >> internally with a widget: >> >>> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode : >>> Hi Brian, >>>>> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode : >>>> Here's a link to the post in the archives: >>>> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html Best Klaus -- Klaus Major https://www.major-k.de klaus at major-k.de From brian at milby7.com Wed Sep 23 09:21:59 2020 From: brian at milby7.com (Brian Milby) Date: Wed, 23 Sep 2020 09:21:59 -0400 Subject: Create image from SVG widget In-Reply-To: <2886285A-8D5A-427D-AEC8-A816D3220761@major-k.de> References: <2886285A-8D5A-427D-AEC8-A816D3220761@major-k.de> Message-ID: <2DE717F8-71A3-4797-B662-B3020F001B7E@milby7.com> If it is placed in a library that is distributed with the IDE, then you wouldn?t need to worry about the LCB side of it. If it is easy enough to translate a path in the compile code, LCB wouldn?t be needed at all. I just didn?t spend enough time to figure it out. Sent from my iPhone > On Sep 23, 2020, at 8:18 AM, Klaus major-k via use-livecode wrote: > > ?Hi Brian, > >> Am 23.09.2020 um 14:12 schrieb Brian Milby via use-livecode : >> >> It doesn?t require an actual file, just an XML document. > > yes, I understood that already. 8-) > >> I posted LCB code to convert the SVG path to what is needed for the compile. It will require an engine change or LCB to get the path translated to remove top/left extra space. >> I think the best way would be to update one of the LCB libraries to include my handler and the add a handler to the drawing library that uses it to do the compile. >> Now that I?m writing/thinking, it might could be done inside the LCB code with a call to the compile script. > > Thank you, but LCB is still a complete mistery to me and that ain't gonna change in the near future... > >> Sent from my iPhone >>> ... >>> FYI: >>> I just created an enhancement request to make drawingSVGCompile also work >>> internally with a widget: >>> >>>> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode : >>>> Hi Brian, >>>>>> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode : >>>>> Here's a link to the post in the archives: >>>>> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > 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 paul at researchware.com Wed Sep 23 10:16:17 2020 From: paul at researchware.com (Paul Dupuis) Date: Wed, 23 Sep 2020 10:16:17 -0400 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: On 9/22/2020 6:48 PM, J. Landman Gay via use-livecode wrote: > I have a stack with an index. When a user clicks a line, a handler > uses the clicktext to create a file name which is always the clicktext > plus the ".livecode" extension. The stack is then downloaded from an > AWS server and displayed. > > We are now translating some stacks to other languages which require > unicode text. AWS recommends not using accented characters in file > names, so we need to translate the clicktext into plain ASCII. > > Is there a good way to do that without using a lookup table or > metadata? The file names doesn't need to make sense syntactically. For > example, > > ?? l?Acad?mie fran?aise -> lAcademiefrancaise.livecode > > ...or similar, whatever works. The user will never see the file name. > You should probably use the same model as LiveCOde uses to match files names returned from the files("detailed-utf8") function: urlEncode(textEncode(normalizeText(,"NFC"),"utf8")) Converts: Russian-????????-Lipsum.docx To: Russian-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9-Lipsum.docx For what your doing, I think that using: urlEncode(textEncode(,"utf8")) -> gets and textDecode(urlDecode(),"utf8") -> gets should be enough. From bobsneidar at iotecdigital.com Wed Sep 23 10:52:18 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 14:52:18 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> Message-ID: <6654E222-11AB-4DCC-B94B-65240FD3E952@iotecdigital.com> You could extract the filename part of the path returned by tempfile() and use that anywhere. That would require something to track the visible name linked to the stored filename tho?. Bob S On Sep 22, 2020, at 11:10 PM, J. Landman Gay via use-livecode > wrote: On 9/22/20 10:42 PM, Mark Wieder via use-livecode wrote: On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: Is this just a temporary filename (not long-term storage)? No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. There are currently hundreds of them with more added frequently. That's why I'm looking for a solution that doesn't involve changing all the file names, because renaming and re-uploading all those files would be way too much work. How do the files get retrieved? Is there a database or something similar that stores the filenames? You could still use UUID filenames from now on and not have to mess with the existing ones. I may have misled you. When I said the files were permanent, I meant they stay on the server until they get changed, which is fairly regular. They aren't stored on the user's machine where tempfile would be, they are downloaded as needed and only kept in memory. From ambassador at fourthworld.com Wed Sep 23 11:03:44 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 23 Sep 2020 08:03:44 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> References: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> Message-ID: <2913bfbc-574e-6efc-0532-1bc41c3927cd@fourthworld.com> J. Landman Gay write: > I'm looking for a way to create non-unicode file names > based on the string that comes out of the database. Ah, public clouds... Amazon's S3 docs say just encoding in UTF-8 should suffice, but then they also list a lot of characters they consider "special", but common usage considers them not so special at all, so conflicts like this are apparently abundant. One workaround for their storage name limitations I've seen used elsewhere is hash-based names, giving you a string that is plain ASCII, of a fixed and usable length, and is derived from the file name so systems don't need to maintain a lookup table to find the file based on a given string. This will give you a 40-char string in plain ol' ASCII unique to the input: function CleanHash s get binaryDecode("h*", sha1Digest(s), tHash) return tHash end CleanHash e.g.: get CleanHash("MyFile.txt") ...returns: d9275b8f757ce47c240d276c1e1192dae8585eba > ...When the user selects a name from a list, the selection is munged > to match the server name and the download URL is obtained from the > cron job's lookup file. > > We don't have a field in the database for a file name. Since a hash is derived from the file name, you don't need to maintain a lookup table as you would with an arbitrary string like UUID. If I understand your problem correctly, that file identification need only be in one direction, just add the hash as part of your existing munge and you're pretty much done. -- 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 Wed Sep 23 11:08:12 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 15:08:12 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <2913bfbc-574e-6efc-0532-1bc41c3927cd@fourthworld.com> References: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> <2913bfbc-574e-6efc-0532-1bc41c3927cd@fourthworld.com> Message-ID: <2AAFAEE0-EC6E-44BD-8E71-1AF8761C2D45@iotecdigital.com> Will binaryEncode get you back to the filename? Bob S On Sep 23, 2020, at 8:03 AM, Richard Gaskin via use-livecode > wrote: J. Landman Gay write: > I'm looking for a way to create non-unicode file names > based on the string that comes out of the database. Ah, public clouds... Amazon's S3 docs say just encoding in UTF-8 should suffice, but then they also list a lot of characters they consider "special", but common usage considers them not so special at all, so conflicts like this are apparently abundant. One workaround for their storage name limitations I've seen used elsewhere is hash-based names, giving you a string that is plain ASCII, of a fixed and usable length, and is derived from the file name so systems don't need to maintain a lookup table to find the file based on a given string. This will give you a 40-char string in plain ol' ASCII unique to the input: function CleanHash s get binaryDecode("h*", sha1Digest(s), tHash) return tHash end CleanHash e.g.: get CleanHash("MyFile.txt") ...returns: d9275b8f757ce47c240d276c1e1192dae8585eba From bobsneidar at iotecdigital.com Wed Sep 23 11:09:04 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 15:09:04 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <2AAFAEE0-EC6E-44BD-8E71-1AF8761C2D45@iotecdigital.com> References: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> <2913bfbc-574e-6efc-0532-1bc41c3927cd@fourthworld.com> <2AAFAEE0-EC6E-44BD-8E71-1AF8761C2D45@iotecdigital.com> Message-ID: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> Duh. That was a stupid question. How do you get back to the filename? Bob S On Sep 23, 2020, at 8:08 AM, Bob Sneidar > wrote: Will binaryEncode get you back to the filename? Bob S On Sep 23, 2020, at 8:03 AM, Richard Gaskin via use-livecode > wrote: J. Landman Gay write: > I'm looking for a way to create non-unicode file names > based on the string that comes out of the database. Ah, public clouds... Amazon's S3 docs say just encoding in UTF-8 should suffice, but then they also list a lot of characters they consider "special", but common usage considers them not so special at all, so conflicts like this are apparently abundant. One workaround for their storage name limitations I've seen used elsewhere is hash-based names, giving you a string that is plain ASCII, of a fixed and usable length, and is derived from the file name so systems don't need to maintain a lookup table to find the file based on a given string. This will give you a 40-char string in plain ol' ASCII unique to the input: function CleanHash s get binaryDecode("h*", sha1Digest(s), tHash) return tHash end CleanHash e.g.: get CleanHash("MyFile.txt") ...returns: d9275b8f757ce47c240d276c1e1192dae8585eba From ambassador at fourthworld.com Wed Sep 23 14:26:58 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 23 Sep 2020 11:26:58 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> Message-ID: <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> If I understand her problem correctly, file identification need only be in one direction. As far as I can tell from the description, everything that needs to determine which file to access does so by using a string from which the hashed file name can be derived. That she already has a munger to derive the file name seems to reinforce that. My only suggestion was to change how the existing munger works to satisfy the two problem areas identified: that names not be too long, and that any munger not remove so many characters as to make the file name non-unique or empty. In some respects the benefits of a hash in this case are similar to using a UUID. But UUID is arbitrary and therefore requires establishing and maintaining a lookup table. In contrast, a hash is directly derivable from the file name, providing the same benefit as UUID for this case but without the need for a lookup table. Like the old saying goes, "There are two hard problems in computer science: cache invalidation, and naming things". Lookup tables are effectively a form of cache, a secondary replication of data, very useful at times but best avoided unless absolutely necessary. - Richard Gaskin Fourth World Systems Bob Sneidar bobsneidar at iotecdigital.com > How do you get back to the filename? > On Sep 23, 2020, at 8:03 AM, Richard Gaskin wrote: > >> One workaround for their storage name limitations I've seen used >> elsewhere is hash-based names, giving you a string that is plain >> ASCII, of a fixed and usable length, and is derived from the file >> name so systems don't need to maintain a lookup table to find the >> file based on a given string. >> >> This will give you a 40-char string in plain ol' ASCII unique to the >> input: >> >> function CleanHash s >> get binaryDecode("h*", sha1Digest(s), tHash) >> return tHash >> end CleanHash >> >> e.g.: >> >> get CleanHash("MyFile.txt") >> >> ...returns: >> >> d9275b8f757ce47c240d276c1e1192dae8585eba >> >>> ...When the user selects a name from a list, the selection is munged >>> to match the server name and the download URL is obtained from the >>> cron job's lookup file. >>> >>> We don't have a field in the database for a file name. >> >> Since a hash is derived from the file name, you don't need to >> maintain a lookup table as you would with an arbitrary string like >> UUID. > >> If I understand your problem correctly, that file identification need >> only be in one direction, just add the hash as part of your existing >> munge and you're pretty much done. >> >> -- >> Richard Gaskin From bobsneidar at iotecdigital.com Wed Sep 23 14:40:45 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 18:40:45 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> Message-ID: <67AE76A9-EBEE-4876-8E8D-56E31544ECA1@iotecdigital.com> Understood, but if it were reversible, it would eliminate the necessity of a lookup table as an intermediary. Bob S > On Sep 23, 2020, at 11:26 AM, Richard Gaskin via use-livecode wrote: > > If I understand her problem correctly, file identification need only be in one direction. > > As far as I can tell from the description, everything that needs to determine which file to access does so by using a string from which the hashed file name can be derived. > > That she already has a munger to derive the file name seems to reinforce that. > > My only suggestion was to change how the existing munger works to satisfy the two problem areas identified: that names not be too long, and that any munger not remove so many characters as to make the file name non-unique or empty. > > In some respects the benefits of a hash in this case are similar to using a UUID. But UUID is arbitrary and therefore requires establishing and maintaining a lookup table. In contrast, a hash is directly derivable from the file name, providing the same benefit as UUID for this case but without the need for a lookup table. > > Like the old saying goes, "There are two hard problems in computer science: cache invalidation, and naming things". > > Lookup tables are effectively a form of cache, a secondary replication of data, very useful at times but best avoided unless absolutely necessary. > > > - Richard Gaskin > Fourth World Systems > > > > Bob Sneidar bobsneidar at iotecdigital.com > > > How do you get back to the filename? > > > On Sep 23, 2020, at 8:03 AM, Richard Gaskin wrote: > > > >> One workaround for their storage name limitations I've seen used > >> elsewhere is hash-based names, giving you a string that is plain > >> ASCII, of a fixed and usable length, and is derived from the file > >> name so systems don't need to maintain a lookup table to find the > >> file based on a given string. > >> > >> This will give you a 40-char string in plain ol' ASCII unique to the > >> input: > >> > >> function CleanHash s > >> get binaryDecode("h*", sha1Digest(s), tHash) > >> return tHash > >> end CleanHash > >> > >> e.g.: > >> > >> get CleanHash("MyFile.txt") > >> > >> ...returns: > >> > >> d9275b8f757ce47c240d276c1e1192dae8585eba > >> > >>> ...When the user selects a name from a list, the selection is munged > >>> to match the server name and the download URL is obtained from the > >>> cron job's lookup file. > >>> > >>> We don't have a field in the database for a file name. > >> > >> Since a hash is derived from the file name, you don't need to > >> maintain a lookup table as you would with an arbitrary string like > >> UUID. > > > >> If I understand your problem correctly, that file identification need > >> only be in one direction, just add the hash as part of your existing > >> munge and you're pretty much done. > >> > >> -- > >> Richard Gaskin > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 23 14:47:21 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 23 Sep 2020 11:47:21 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <67AE76A9-EBEE-4876-8E8D-56E31544ECA1@iotecdigital.com> References: <67AE76A9-EBEE-4876-8E8D-56E31544ECA1@iotecdigital.com> Message-ID: <001d1ca7-d860-c039-64ed-5932a9f2bfd4@fourthworld.com> No lookup table is needed at all if the relationship between the original string and the resulting munged file name never needs to also work the other direction. If bidirectional derivation is needed, given the limitations imposed by AWS' naming limitations I would see no way to avoid requiring a lookup table. But so far I haven't read anything requiring this to work in both directions. Did I miss something? Does she also rely on an unmunger function? -- Richard Gaskin Fourth World Systems Bob Sneidar wrote: > Understood, but if it were reversible, it would eliminate the necessity of a lookup table as an intermediary. > > Bob S > > >> On Sep 23, 2020, at 11:26 AM, Richard Gaskin via use-livecode wrote: >> >> If I understand her problem correctly, file identification need only be in one direction. >> >> As far as I can tell from the description, everything that needs to determine which file to access does so by using a string from which the hashed file name can be derived. >> >> That she already has a munger to derive the file name seems to reinforce that. >> >> My only suggestion was to change how the existing munger works to satisfy the two problem areas identified: that names not be too long, and that any munger not remove so many characters as to make the file name non-unique or empty. >> >> In some respects the benefits of a hash in this case are similar to using a UUID. But UUID is arbitrary and therefore requires establishing and maintaining a lookup table. In contrast, a hash is directly derivable from the file name, providing the same benefit as UUID for this case but without the need for a lookup table. >> >> Like the old saying goes, "There are two hard problems in computer science: cache invalidation, and naming things". >> >> Lookup tables are effectively a form of cache, a secondary replication of data, very useful at times but best avoided unless absolutely necessary. >> >> >> - Richard Gaskin >> Fourth World Systems From markclark at mac.com Wed Sep 23 15:28:11 2020 From: markclark at mac.com (Mark Clark) Date: Wed, 23 Sep 2020 14:28:11 -0500 Subject: Livecode S3 library for AWS compatible object store Message-ID: <25B65CF8-EC56-4878-B502-C28286CE3181@mac.com> Hello, I have been away from LC for a while and noticed that there is now an AWSS3 library. Looks great and simple. However, this seems from a cursory read to be actually tied to AWS vs a more generic S3 wrapper allowing arbitrary endpoints. Is there a mechanism to point this at S3 compatible storage systems in addition to the actual ($$$) Amazon? Specifically I am interested in minio (minio.io ) and cloudian connectivity. I have been using shell to access object but it would be much nicer to do this all within LC.TIA, hope this isn?t a frequently asked/answered question. Mark From jacque at hyperactivesw.com Wed Sep 23 15:30:10 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 23 Sep 2020 14:30:10 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <001d1ca7-d860-c039-64ed-5932a9f2bfd4@fourthworld.com> References: <67AE76A9-EBEE-4876-8E8D-56E31544ECA1@iotecdigital.com> <001d1ca7-d860-c039-64ed-5932a9f2bfd4@fourthworld.com> Message-ID: On 9/23/20 1:47 PM, Richard Gaskin via use-livecode wrote: > But so far I haven't read anything requiring this to work in both directions.? Did I miss > something?? Does she also rely on an unmunger function? No, you're correct, I only need the conversion to go one-way. The cron job creates complex URLs a mile long. The lookup file it creates has this format: Textual_Criticism.livecode https://dqmm28l5t1itz.cloudfront.net/1.0/livecode/Textual_Criticism.livecode?Expires=1554403453&Signature=ETEOPBOvK0FPbgw1OYHJwP~GQX6zJsNIjXybhs4Tu9JG8FG6pNh1ck4zzb7POsSZD6GY-ON~sKIBmPNaSyIW6~LUSx6FqG2Lhq5sDDb4KlF7dP3hYNpXNciP6cc4fdyi6CoS1hPmHoGj8GkMBuCuRQd7AepSK0t0FD2mxaPdwp6bZiIzN3I6z91DgeSZxGkeO7gBX2whRfCvlJOOnZLdQMyOJLz4XUMwRVC39xMtyug57Hqie6MLgh7JXm9PuQ4NEjuKS7o~1plgsZv190lFSH0i~WYiJ76MIOeZr1~gylKNB1Jhb1h12FYuif0EHg9uAQxGDJb4LzA9BENipNZbww__&Key-Pair-Id=APKAINQSYWCWHU2UGIVA I download the cron lookup file early after startup. When I need to get a file from the server, I replace spaces with underscores in the name string and add the extension. Then I use lineoffset to find the file in a list of hundreds and extract its URL to retrieve the stack. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Wed Sep 23 15:51:05 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 19:51:05 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <001d1ca7-d860-c039-64ed-5932a9f2bfd4@fourthworld.com> References: <67AE76A9-EBEE-4876-8E8D-56E31544ECA1@iotecdigital.com> <001d1ca7-d860-c039-64ed-5932a9f2bfd4@fourthworld.com> Message-ID: <22F77099-C6BF-4BA6-AF63-73458E66B8C6@iotecdigital.com> Yes I understand that I was thinking of using the method for something I need. Bob S On Sep 23, 2020, at 11:47 AM, Richard Gaskin via use-livecode > wrote: No lookup table is needed at all if the relationship between the original string and the resulting munged file name never needs to also work the other direction. From jacque at hyperactivesw.com Wed Sep 23 15:59:01 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 23 Sep 2020 14:59:01 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> Message-ID: On 9/23/20 1:26 PM, Richard Gaskin via use-livecode wrote: > My only suggestion was to change how the existing munger works to satisfy the two problem areas > identified: that names not be too long, and that any munger not remove so many characters as to > make the file name non-unique or empty. There's one more consideration though. The file name must be recognizable so that it can be replaced or updated on the server easily by a human. Hashes, UUIDs, html entity numbers, HEX, etc. would all be workable if that weren't the case. But consider the case where my client has made a few edits to the text in a stack and wants to replace the existing one. With descriptive names, the file is easy to find in the AWS bucket. But comparing long sequences of indecipherable text is cumbersome. I'm drifting toward the idea of removing non-ascii characters. That might satisfy all requirements, at least for now. We don't do Sanskrit or Chinese yet. Or alternately I could bite the bullet and convert my build tool to insert metadata into the clickable lists. That isn't terribly difficult, I was just wondering if there was a different way using what we already have. Devin, Paul and Scott suggested variations on the "removal" approach. I haven't tested much, but it looks like converting to UTF8 will quickly remove any non-ascii characters. Duplication of file names is unlikely given the way various product files are separately stored on AWS. But I'm still pondering. When I first asked the question, I wondered if there was a quick way to do what I want, though I didn't expect much. What I got back from this amazing list is a wealth of ideas and a very interesting discussion. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From iphonelagi at gmail.com Wed Sep 23 16:17:44 2020 From: iphonelagi at gmail.com (Lagi Pittas) Date: Wed, 23 Sep 2020 21:17:44 +0100 Subject: Converting from unicode to ASCII In-Reply-To: References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> Message-ID: Hi Jacq, Since you don't do Chinese then I think what I suggested would work except for bulgarian and other non latin alphabets. (which you could use a translation table for). It also is compatible with all the previous names as the extract and tagging on the end will only happen with new unicode file names. Since most names will only have a maximum of 3 or 4 diacritics or non ascii characters within them (big assumption) - removing the non ascii but tagging their #&codes on the end with a positional value gives you the readable filename and the uniqueness in 1 hit - or am i missing something? Lagi On Wed, 23 Sep 2020 at 20:59, J. Landman Gay via use-livecode < use-livecode at lists.runrev.com> wrote: > On 9/23/20 1:26 PM, Richard Gaskin via use-livecode wrote: > > My only suggestion was to change how the existing munger works to > satisfy the two problem areas > > identified: that names not be too long, and that any munger not remove > so many characters as to > > make the file name non-unique or empty. > > There's one more consideration though. The file name must be recognizable > so that it can be > replaced or updated on the server easily by a human. Hashes, UUIDs, html > entity numbers, HEX, > etc. would all be workable if that weren't the case. > > But consider the case where my client has made a few edits to the text in > a stack and wants to > replace the existing one. With descriptive names, the file is easy to find > in the AWS bucket. > But comparing long sequences of indecipherable text is cumbersome. > > I'm drifting toward the idea of removing non-ascii characters. That might > satisfy all > requirements, at least for now. We don't do Sanskrit or Chinese yet. Or > alternately I could > bite the bullet and convert my build tool to insert metadata into the > clickable lists. That > isn't terribly difficult, I was just wondering if there was a different > way using what we > already have. > > Devin, Paul and Scott suggested variations on the "removal" approach. I > haven't tested much, > but it looks like converting to UTF8 will quickly remove any non-ascii > characters. Duplication > of file names is unlikely given the way various product files are > separately stored on AWS. > > But I'm still pondering. When I first asked the question, I wondered if > there was a quick way > to do what I want, though I didn't expect much. What I got back from this > amazing list is a > wealth of ideas and a very interesting discussion. > > -- > 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 > -- KIndest Regards Lagi From ambassador at fourthworld.com Wed Sep 23 17:51:25 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 23 Sep 2020 14:51:25 -0700 Subject: Converting from unicode to ASCII In-Reply-To: References: Message-ID: <19513f43-67c4-1480-162c-61aeb5128fe3@fourthworld.com> For an ongoing need like that on a substantial project, I'd automate it: She works on her master copy, then presses a button. Done. The button saves the stack, copies it to the munged name, and uploads it for her, even verifying the integrity of the upload afterward (machines don't mind the extra work). -- Richard Gaskin Fourth World Systems J. Landman Gay wrote: > On 9/23/20 1:26 PM, Richard Gaskin via use-livecode wrote: >> My only suggestion was to change how the existing munger works to satisfy the two problem areas >> identified: that names not be too long, and that any munger not remove so many characters as to >> make the file name non-unique or empty. > > There's one more consideration though. The file name must be recognizable so that it can be > replaced or updated on the server easily by a human. Hashes, UUIDs, html entity numbers, HEX, > etc. would all be workable if that weren't the case. > > But consider the case where my client has made a few edits to the text in a stack and wants to > replace the existing one. With descriptive names, the file is easy to find in the AWS bucket. > But comparing long sequences of indecipherable text is cumbersome. > > I'm drifting toward the idea of removing non-ascii characters. That might satisfy all > requirements, at least for now. We don't do Sanskrit or Chinese yet. Or alternately I could > bite the bullet and convert my build tool to insert metadata into the clickable lists. That > isn't terribly difficult, I was just wondering if there was a different way using what we > already have. > > Devin, Paul and Scott suggested variations on the "removal" approach. I haven't tested much, > but it looks like converting to UTF8 will quickly remove any non-ascii characters. Duplication > of file names is unlikely given the way various product files are separately stored on AWS. > > But I'm still pondering. When I first asked the question, I wondered if there was a quick way > to do what I want, though I didn't expect much. What I got back from this amazing list is a > wealth of ideas and a very interesting discussion. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com From bobsneidar at iotecdigital.com Wed Sep 23 18:24:38 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 23 Sep 2020 22:24:38 +0000 Subject: Converting from unicode to ASCII In-Reply-To: <19513f43-67c4-1480-162c-61aeb5128fe3@fourthworld.com> References: <19513f43-67c4-1480-162c-61aeb5128fe3@fourthworld.com> Message-ID: <802262EB-5BB5-4406-AD47-D0D6C705BC73@iotecdigital.com> FYI I have a rudimentary document storage system developed where I can ?check out? a document from my app so that no one else can check it out, which downloads the file from it?s repository into a temp folder. The user can then edit or work with the file, then check it in. It RETAINS the versions and detects if the metadata of the file has changed (date time modified) then imports a new copy if it has under an incrementing version number. Thing is, right now I am pulling those files from a mySQL database, and so I have to limit the size of the binary. I have a way of sending and receiving files and data securely via socket agents, I just need to implement it. That would allow me to migrate all the mySQL storage off to real file storage, and would eliminate the size restriction. Right now I am reticent to develop it because things are so slow at work, and I?m not sure they would want to use it anyway. But if anyone was interested in such a thing, I would feel more motivated. Bob S On Sep 23, 2020, at 2:51 PM, Richard Gaskin via use-livecode > wrote: For an ongoing need like that on a substantial project, I'd automate it: She works on her master copy, then presses a button. Done. The button saves the stack, copies it to the munged name, and uploads it for her, even verifying the integrity of the upload afterward (machines don't mind the extra work). -- Richard Gaskin Fourth World Systems From monte at appisle.net Wed Sep 23 18:24:24 2020 From: monte at appisle.net (Monte Goulding) Date: Thu, 24 Sep 2020 08:24:24 +1000 Subject: Livecode S3 library for AWS compatible object store In-Reply-To: <25B65CF8-EC56-4878-B502-C28286CE3181@mac.com> References: <25B65CF8-EC56-4878-B502-C28286CE3181@mac.com> Message-ID: Hi Mark If you would like to create an enhancement request at quality.livecode.com we can see what we can do. If it?s just a matter of changing the host (currently hard coded as s3[-].amazonaws.com ) then it?s a relatively trivial patch. FWIW I just opened this issue after reminding myself how we build the endpoint https://quality.livecode.com/show_bug.cgi?id=22917 Cheers Monte > On 24 Sep 2020, at 5:28 am, Mark Clark via use-livecode wrote: > > Hello, I have been away from LC for a while and noticed that there is now an AWSS3 library. Looks great and simple. However, this seems from a cursory read to be actually tied to AWS vs a more generic S3 wrapper allowing arbitrary endpoints. Is there a mechanism to point this at S3 compatible storage systems in addition to the actual ($$$) Amazon? Specifically I am interested in minio (minio.io ) and cloudian connectivity. I have been using shell to access object but it would be much nicer to do this all within LC.TIA, hope this isn?t a frequently asked/answered question. > > 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 From ahsoftware at sonic.net Wed Sep 23 18:25:12 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Wed, 23 Sep 2020 15:25:12 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> Message-ID: On 9/22/20 11:10 PM, J. Landman Gay via use-livecode wrote: > There's more to it than that; the server runs a cron job hourly that > indexes all its files and creates AWS secure URLs for each. The app > downloads that lookup file on demand. When the user selects a name from > a list, the selection is munged to match the server name and the > download URL is obtained from the cron job's lookup file. LOL. This is starting to remind me of Hal Draper's classic "Ms Fnd in a Lbry". Been out of print since 1985, but online: https://folk.universitetetioslo.no/knuthe/kuriosa/draper.pdf -- Mark Wieder ahsoftware at gmail.com From matthias_livecode_150811 at m-r-d.de Wed Sep 23 19:38:55 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 24 Sep 2020 01:38:55 +0200 Subject: Some problems with an old stack that gets regular updates Message-ID: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> Hello, i have some problems with a stack which i update very often. The stack was created 4 or 5 years ago, maybe even some more years ago. The gets regular updates as my time allows. In Standalone Settings i have set the option to manually select inclusions. I am working with LC 9.6.1, but tried also with 9.6.0 and 9.5.1 on Mac OS 10.14.6 1. I've added some code to call a url using put URL "https:......" into tInfo This works in the IDE, but not in the standalone, although i have selected INTERNET and SSL&Encryption to be included in the standalone In the standalone the URL is not fetched and tInfo always is empty. I tried also with http:// instead of https:// but also without success. Tried with tsNet and without. Trying this with a new stack works w/o problems. 2. Trying to use the remote debugger, regardless if in a "real" standalone" or using the test button, does not work. The debugger is not initiated, although i have set red breakpoints and even used the Breakpoint keyword in the script and selected RemoteDebugger to be included in Standalone Settings. Trying to use the Remote Debugger with a newer stack works w/o a problem. Did anyone else ever ran into any of these problems with an older stack. Or does anyone have an idea what might cause this? What i noticed is, that in the cRevGeneral Property Set of the stack there is a property stackfileversion with a value of 5.5. But changing this or removing that property completely does not help either. Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code From jacque at hyperactivesw.com Wed Sep 23 19:50:45 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 23 Sep 2020 18:50:45 -0500 Subject: Converting from unicode to ASCII In-Reply-To: References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> Message-ID: <174bd606408.27e3.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Heh. Now you understand why I didn't want another lookup table. :) -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 23, 2020 5:27:06 PM Mark Wieder via use-livecode wrote: > On 9/22/20 11:10 PM, J. Landman Gay via use-livecode wrote: > >> There's more to it than that; the server runs a cron job hourly that >> indexes all its files and creates AWS secure URLs for each. The app >> downloads that lookup file on demand. When the user selects a name from >> a list, the selection is munged to match the server name and the >> download URL is obtained from the cron job's lookup file. > > > LOL. This is starting to remind me of Hal Draper's classic > "Ms Fnd in a Lbry". Been out of print since 1985, but online: > > https://folk.universitetetioslo.no/knuthe/kuriosa/draper.pdf > > -- > 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 ahsoftware at sonic.net Wed Sep 23 19:59:11 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Wed, 23 Sep 2020 16:59:11 -0700 Subject: Converting from unicode to ASCII In-Reply-To: <174bd606408.27e3.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <91719763-a22a-c2ba-77ea-3b6a1adbaca1@hyperactivesw.com> <5a6521ef-f66d-b4e8-24c6-9a6ed2aea15a@hyperactivesw.com> <174bd606408.27e3.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <0164ab60-6a0f-9ac4-cc45-1d8811f967c9@sonic.net> On 9/23/20 4:50 PM, J. Landman Gay via use-livecode wrote: > Heh. Now you understand why I didn't want another lookup table. > > :) OTOH, one of the cardinal rules of data design is *not* to use real data as an index into data. YMMV. -- Mark Wieder ahsoftware at gmail.com From dave.cragg at lacscentre.co.uk Thu Sep 24 02:58:41 2020 From: dave.cragg at lacscentre.co.uk (Dave Cragg) Date: Thu, 24 Sep 2020 07:58:41 +0100 Subject: Converting from unicode to ASCII In-Reply-To: References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> Message-ID: <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> Jacqueline, You said earlier you don't have a field in the database for the file name. But does the database table have a unique numerical ID field for each record? If so, could you strip out the non-ASCII characters and then append the numerical ID to the file name? > On 23 Sep 2020, at 20:59, J. Landman Gay via use-livecode wrote: > > I'm drifting toward the idea of removing non-ascii characters. That might satisfy all requirements, at least for now. We don't do Sanskrit or Chinese yet. Or alternately I could bite the bullet and convert my build tool to insert metadata into the clickable lists. That isn't terribly difficult, I was just wondering if there was a different way using what we already have. > From jacque at hyperactivesw.com Thu Sep 24 11:57:33 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 24 Sep 2020 10:57:33 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <19513f43-67c4-1480-162c-61aeb5128fe3@fourthworld.com> References: <19513f43-67c4-1480-162c-61aeb5128fe3@fourthworld.com> Message-ID: <174c0d585c8.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> It's all automated already except for the uploading. The file organization on AWS is complex and the stacks don't all go in the same place. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 23, 2020 4:53:36 PM Richard Gaskin via use-livecode wrote: > For an ongoing need like that on a substantial project, I'd automate it: > > She works on her master copy, then presses a button. Done. > > The button saves the stack, copies it to the munged name, and uploads it > for her, even verifying the integrity of the upload afterward (machines > don't mind the extra work). > > -- > Richard Gaskin > Fourth World Systems > > > J. Landman Gay wrote: >> On 9/23/20 1:26 PM, Richard Gaskin via use-livecode wrote: >>> My only suggestion was to change how the existing munger works to satisfy >>> the two problem areas >>> identified: that names not be too long, and that any munger not remove so >>> many characters as to >>> make the file name non-unique or empty. >> >> There's one more consideration though. The file name must be recognizable >> so that it can be >> replaced or updated on the server easily by a human. Hashes, UUIDs, html >> entity numbers, HEX, >> etc. would all be workable if that weren't the case. >> >> But consider the case where my client has made a few edits to the text in a >> stack and wants to >> replace the existing one. With descriptive names, the file is easy to find >> in the AWS bucket. >> But comparing long sequences of indecipherable text is cumbersome. >> >> I'm drifting toward the idea of removing non-ascii characters. That might >> satisfy all >> requirements, at least for now. We don't do Sanskrit or Chinese yet. Or >> alternately I could >> bite the bullet and convert my build tool to insert metadata into the >> clickable lists. That >> isn't terribly difficult, I was just wondering if there was a different way >> using what we >> already have. >> >> Devin, Paul and Scott suggested variations on the "removal" approach. I >> haven't tested much, >> but it looks like converting to UTF8 will quickly remove any non-ascii >> characters. Duplication >> of file names is unlikely given the way various product files are >> separately stored on AWS. >> >> But I'm still pondering. When I first asked the question, I wondered if >> there was a quick way >> to do what I want, though I didn't expect much. What I got back from this >> amazing list is a >> wealth of ideas and a very interesting discussion. >> >> -- >> 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 From jacque at hyperactivesw.com Thu Sep 24 12:12:12 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 24 Sep 2020 11:12:12 -0500 Subject: Some problems with an old stack that gets regular updates In-Reply-To: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> References: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> Message-ID: <174c0e2ef60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I haven't had the internet problem but I went a whole year once where I couldn't get remote debugging to work. I never did figure out why. Then it started to work again by itself. I never thought to check the stack file version. You could Save As with the latest LC version and see if that helps. I always include both the internet library and TSNet when I need internet connections. Did you try using both? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 23, 2020 6:40:58 PM matthias rebbe via use-livecode wrote: > Hello, > > i have some problems with a stack which i update very often. The stack was > created 4 or 5 years ago, maybe even some more years ago. The gets regular > updates as my time allows. > > In Standalone Settings i have set the option to manually select inclusions. > I am working with LC 9.6.1, but tried also with 9.6.0 and 9.5.1 on Mac OS > 10.14.6 > > 1. I've added some code to call a url using > put URL "https:......" into tInfo > > This works in the IDE, but not in the standalone, although i have selected > INTERNET and SSL&Encryption to be included in the standalone > In the standalone the URL is not fetched and tInfo always is empty. I tried > also with http:// instead of https:// but also without success. > Tried with tsNet and without. > > Trying this with a new stack works w/o problems. > > > 2. Trying to use the remote debugger, regardless if in a "real" > standalone" or using the test button, does not work. The debugger is not > initiated, although i have set red breakpoints and even used the Breakpoint > keyword in the script and selected RemoteDebugger to be included in > Standalone Settings. > > Trying to use the Remote Debugger with a newer stack works w/o a problem. > > > Did anyone else ever ran into any of these problems with an older stack. Or > does anyone have an idea what might cause this? > > What i noticed is, that in the cRevGeneral Property Set of the stack there > is a property stackfileversion with a value of 5.5. > But changing this or removing that property completely does not help either. > > > Regards, > Matthias > > > > - > Matthias Rebbe > Life Is Too Short For Boring Code > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Thu Sep 24 12:14:22 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 24 Sep 2020 11:14:22 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> Message-ID: <174c0e4eb30.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I'm pretty sure each record has an ID. This would be for ensuring unique file names, right? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 24, 2020 2:00:50 AM Dave Cragg via use-livecode wrote: > Jacqueline, > > You said earlier you don't have a field in the database for the file name. > But does the database table have a unique numerical ID field for each > record? If so, could you strip out the non-ASCII characters and then > append the numerical ID to the file name? > >> On 23 Sep 2020, at 20:59, J. Landman Gay via use-livecode >> wrote: >> >> I'm drifting toward the idea of removing non-ascii characters. That might >> satisfy all requirements, at least for now. We don't do Sanskrit or Chinese >> yet. Or alternately I could bite the bullet and convert my build tool to >> insert metadata into the clickable lists. That isn't terribly difficult, I >> was just wondering if there was a different way using what we already have. >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dave.cragg at lacscentre.co.uk Thu Sep 24 12:26:28 2020 From: dave.cragg at lacscentre.co.uk (Dave Cragg) Date: Thu, 24 Sep 2020 17:26:28 +0100 Subject: Converting from unicode to ASCII In-Reply-To: References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> <174c0e4eb30.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <53259254-CDC8-46C7-A2F5-D7181735417B@lacscentre.co.uk> That's what I was thinking. So the filename for " l?Acad?mie fran?aise" might becomes something like lAcadmiefranaise_1234.livecode. Kind of readable, but guaranteed unique. (And also allows identifying the database record from the filename if that is needed.) (Apologies if this appears twice.) > > I'm pretty sure each record has an ID. This would be for ensuring unique file names, right? > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On September 24, 2020 2:00:50 AM Dave Cragg via use-livecode wrote: > >> Jacqueline, >> >> You said earlier you don't have a field in the database for the file name. But does the database table have a unique numerical ID field for each record? If so, could you strip out the non-ASCII characters and then append the numerical ID to the file name? >> >>> On 23 Sep 2020, at 20:59, J. Landman Gay via use-livecode wrote: >>> >>> I'm drifting toward the idea of removing non-ascii characters. That might satisfy all requirements, at least for now. We don't do Sanskrit or Chinese yet. Or alternately I could bite the bullet and convert my build tool to insert metadata into the clickable lists. That isn't terribly difficult, I was just wondering if there was a different way using what we already have. >>> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Thu Sep 24 12:54:01 2020 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 24 Sep 2020 17:54:01 +0100 Subject: Converting from unicode to ASCII In-Reply-To: <53259254-CDC8-46C7-A2F5-D7181735417B@lacscentre.co.uk> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> <174c0e4eb30.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <53259254-CDC8-46C7-A2F5-D7181735417B@lacscentre.co.uk> Message-ID: <82b5c3c9-6df3-7df9-f90f-a839076e454b@tweedly.net> You could even decide that, rather than strip out non-ascii characters, you would convert (reduce?) each one to a canonical equivalent (where there is one), and hence instead of l?Acad?mie fran?aise ---> lAcadmiefranaise_1234.livecode it would become l?Acad?mie fran?aise ---> lAcademiefrancaise_1234.livecode Marginally more readable, and much more typeable :-) Alex. On 24/09/2020 17:26, Dave Cragg via use-livecode wrote: > > That's what I was thinking. So the filename for " l?Acad?mie fran?aise" might becomes something like lAcadmiefranaise_1234.livecode. Kind of readable, but guaranteed unique. (And also allows identifying the database record from the filename if that is needed.) > > (Apologies if this appears twice.) > >> I'm pretty sure each record has an ID. This would be for ensuring unique file names, right? >> >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On September 24, 2020 2:00:50 AM Dave Cragg via use-livecode wrote: >> >>> Jacqueline, >>> >>> You said earlier you don't have a field in the database for the file name. But does the database table have a unique numerical ID field for each record? If so, could you strip out the non-ASCII characters and then append the numerical ID to the file name? >>> >>>> On 23 Sep 2020, at 20:59, J. Landman Gay via use-livecode wrote: >>>> >>>> I'm drifting toward the idea of removing non-ascii characters. That might satisfy all requirements, at least for now. We don't do Sanskrit or Chinese yet. Or alternately I could bite the bullet and convert my build tool to insert metadata into the clickable lists. That isn't terribly difficult, I was just wondering if there was a different way using what we already have. >>>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 jacque at hyperactivesw.com Thu Sep 24 13:09:49 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 24 Sep 2020 12:09:49 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <82b5c3c9-6df3-7df9-f90f-a839076e454b@tweedly.net> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> <174c0e4eb30.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <53259254-CDC8-46C7-A2F5-D7181735417B@lacscentre.co.uk> <82b5c3c9-6df3-7df9-f90f-a839076e454b@tweedly.net> Message-ID: <174c117ab60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> That's what I was hoping for when I started this thread, and it was suggested (without the ID) a while back, but then I'd need another lookup table. Probably one for each language. My original goal was to get the canonical version directly from LC somehow. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 24, 2020 11:56:09 AM Alex Tweedly via use-livecode wrote: > You could even decide that, rather than strip out non-ascii characters, > you would convert (reduce?) each one to a canonical equivalent (where > there is one), and hence instead of > > l?Acad?mie fran?aise ---> lAcadmiefranaise_1234.livecode > > it would become > > l?Acad?mie fran?aise ---> lAcademiefrancaise_1234.livecode > > Marginally more readable, and much more typeable :-) > > Alex. > > > > On 24/09/2020 17:26, Dave Cragg via use-livecode wrote: >> >> That's what I was thinking. So the filename for " l?Acad?mie fran?aise" >> might becomes something like lAcadmiefranaise_1234.livecode. Kind of >> readable, but guaranteed unique. (And also allows identifying the database >> record from the filename if that is needed.) >> >> (Apologies if this appears twice.) >> >>> I'm pretty sure each record has an ID. This would be for ensuring unique >>> file names, right? >>> >>> -- >>> Jacqueline Landman Gay | jacque at hyperactivesw.com >>> HyperActive Software | http://www.hyperactivesw.com >>> On September 24, 2020 2:00:50 AM Dave Cragg via use-livecode >>> wrote: >>> >>>> Jacqueline, >>>> >>>> You said earlier you don't have a field in the database for the file name. >>>> But does the database table have a unique numerical ID field for each >>>> record? If so, could you strip out the non-ASCII characters and then >>>> append the numerical ID to the file name? >>>> >>>>> On 23 Sep 2020, at 20:59, J. Landman Gay via use-livecode >>>>> wrote: >>>>> >>>>> I'm drifting toward the idea of removing non-ascii characters. That might >>>>> satisfy all requirements, at least for now. We don't do Sanskrit or Chinese >>>>> yet. Or alternately I could bite the bullet and convert my build tool to >>>>> insert metadata into the clickable lists. That isn't terribly difficult, I >>>>> was just wondering if there was a different way using what we already have. >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 ambassador at fourthworld.com Thu Sep 24 14:33:09 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 24 Sep 2020 11:33:09 -0700 Subject: Back to School: Raspberry Pi fork? Message-ID: <657dc690-49c3-8fbd-0ae2-b46f21f374b5@fourthworld.com> I had yet another conversation this morning with a colleague who would love to use LC in his school district, but the two crasher bugs prevent him from doing so. Now he's had no choice but to start looking into kid-friendly Python environments. We have that conversation every year. This was the sixth time we've had it. Surely somewhere in our community or beyond it we can find the resources to bring the LC Community build for Raspberry Pi up to 9.6.1. Who can we hire, and how much would it cost? If we can find the resource, I'll bet we can come up with the money to pay for that programmer's time. -- 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 markclark at mac.com Thu Sep 24 15:07:04 2020 From: markclark at mac.com (Mark Clark) Date: Thu, 24 Sep 2020 14:07:04 -0500 Subject: use-livecode Digest, Vol 204, Issue 24 In-Reply-To: References: Message-ID: <01B9CD2F-023A-46EB-9ADA-E1E173453D13@mac.com> Thanks for the tip. I did file a request but it lists as a bug not an enhancement. Maybe I did something wrong, sorry about that. Posted as # 22919 I think it is mostly just allowing a selectable host IP or FQDN. Many third party object stores with S3 compatibility also default to Region: us-east-1, though that might need to be selectable as well? Mark > On Sep 24, 2020, at 11:00 AM, use-livecode-request at lists.runrev.com wrote: > > Hi Mark > > If you would like to create an enhancement request at quality.livecode.com > we can see what we can do. If it?s just a matter of changing the host (currently hard coded as s3[-].amazonaws.com >) then it?s a relatively trivial patch. FWIW I just opened this issue after reminding myself how we build the endpoint https://quality.livecode.com/show_bug.cgi?id=22917 > > Cheers > > Monte From matthias_livecode_150811 at m-r-d.de Thu Sep 24 15:26:11 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 24 Sep 2020 21:26:11 +0200 Subject: Some problems with an old stack that gets regular updates In-Reply-To: <174c0e2ef60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> <174c0e2ef60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <3DE9BBBA-03E5-4938-B361-F253F8F85A78@m-r-d.de> Jacque, thanks for your answer. I tried 'Save As' already, but interestingly the value of the stackfileversion property remains unchanged. I've tried all variations. Including tsNet and Internet, only tsNet and also just Internet after disabling tsNet using dispatch "revunloadlibrary" to stack tsnetliburl Regarding the remote debugger... First i thought a protected substack (Zygodact register stack) would cause this. But even without the sub tack i do not get Remote Debugger working. - Matthias Rebbe Life Is Too Short For Boring Code > Am 24.09.2020 um 18:12 schrieb J. Landman Gay via use-livecode : > > I haven't had the internet problem but I went a whole year once where I couldn't get remote debugging to work. I never did figure out why. Then it started to work again by itself. I never thought to check the stack file version. You could Save As with the latest LC version and see if that helps. > > I always include both the internet library and TSNet when I need internet connections. Did you try using both? > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On September 23, 2020 6:40:58 PM matthias rebbe via use-livecode wrote: > >> Hello, >> >> i have some problems with a stack which i update very often. The stack was created 4 or 5 years ago, maybe even some more years ago. The gets regular updates as my time allows. >> >> In Standalone Settings i have set the option to manually select inclusions. I am working with LC 9.6.1, but tried also with 9.6.0 and 9.5.1 on Mac OS 10.14.6 >> >> 1. I've added some code to call a url using >> put URL "https:......" into tInfo >> >> This works in the IDE, but not in the standalone, although i have selected INTERNET and SSL&Encryption to be included in the standalone >> In the standalone the URL is not fetched and tInfo always is empty. I tried also with http:// instead of https:// but also without success. >> Tried with tsNet and without. >> >> Trying this with a new stack works w/o problems. >> >> >> 2. Trying to use the remote debugger, regardless if in a "real" standalone" or using the test button, does not work. The debugger is not initiated, although i have set red breakpoints and even used the Breakpoint keyword in the script and selected RemoteDebugger to be included in Standalone Settings. >> >> Trying to use the Remote Debugger with a newer stack works w/o a problem. >> >> >> Did anyone else ever ran into any of these problems with an older stack. Or does anyone have an idea what might cause this? >> >> What i noticed is, that in the cRevGeneral Property Set of the stack there is a property stackfileversion with a value of 5.5. >> But changing this or removing that property completely does not help either. >> >> >> Regards, >> Matthias >> >> >> >> - >> Matthias Rebbe >> Life Is Too Short For Boring Code >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 ahsoftware at sonic.net Thu Sep 24 15:32:59 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Thu, 24 Sep 2020 12:32:59 -0700 Subject: Back to School: Raspberry Pi fork? In-Reply-To: <657dc690-49c3-8fbd-0ae2-b46f21f374b5@fourthworld.com> References: <657dc690-49c3-8fbd-0ae2-b46f21f374b5@fourthworld.com> Message-ID: <7126f9ee-26dd-0334-08fe-d62d075c092d@sonic.net> On 9/24/20 11:33 AM, Richard Gaskin via use-livecode wrote: > I had yet another conversation this morning with a colleague who would > love to use LC in his school district, but the two crasher? bugs prevent > him from doing so. Now he's had no choice but to start looking into > kid-friendly Python environments. > > We have that conversation every year. This was the sixth time we've had it. > > Surely somewhere in our community or beyond it we can find the resources > to bring the LC Community build for Raspberry Pi up to 9.6.1. > > Who can we hire, and how much would it cost? > > If we can find the resource, I'll bet we can come up with the money to > pay for that programmer's time. > Especially given that the future seems to be ARM. https://stackoverflow.blog/2020/09/21/nvidia-has-acquired-arm-what-does-this-mean-for-the-future-of-ai-edge-computing-and-the-people-who-write-software-for-these-chips/?cb=1 -- Mark Wieder ahsoftware at gmail.com From paul at researchware.com Thu Sep 24 16:53:26 2020 From: paul at researchware.com (Paul Dupuis) Date: Thu, 24 Sep 2020 16:53:26 -0400 Subject: Accessing files on a local network file server - BEST PRACTICE? Message-ID: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> This question may have an obvious answer, but I am brain dead today, so here goes: I have a app installed with some customers in a Windows network environment. They have all their laptops set so that their Home directories are on a local network server. So, where as on a local laptop, specialFolderPath("documents") might return "C:/Users//Documents" as the path, for them specialFolderPath("documents") returns something like "//s1.somedomain.com/mountPoint//Documents" We save a number of folders and files in the user's Documents folder. In some cases, if the file is not present (i.e. if there is a file tFile is false) we regenerate the file from a default. Sometime, the server is offline or the user is disconnected from the network. What is a good way to differentiate between: 1) one of these files is not present so must be regenerated, i.e if there is not a file (specialFolderPath("documents")&slash&tFilename) then ? -- regenerate the file tFile at location specialFolderPath("documents") Versus 2) The Server (//s1.somedomain.com/ is disconnected to down? So that in case (1) , we regenerate the file and in case (2) we present a warning that the server is disconnected or down? Mu gut says this should be simple, but I just can not wrap my brain around it today. From jacque at hyperactivesw.com Thu Sep 24 17:20:04 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 24 Sep 2020 16:20:04 -0500 Subject: Some problems with an old stack that gets regular updates In-Reply-To: <3DE9BBBA-03E5-4938-B361-F253F8F85A78@m-r-d.de> References: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> <174c0e2ef60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <3DE9BBBA-03E5-4938-B361-F253F8F85A78@m-r-d.de> Message-ID: <174c1fccba0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> The ability to preserve the original stack file version is a setting in Preferences. I have that turned on too. You can either turn it off, or override it in the Save dialog by choosing a version from the pop up button at the bottom of the dialog. I also looked at system prefs when trying to resolve the problem to make sure LC was permitted to use internet or sockets or whatever Apple calls it, I can't remember exactly. That didn't fix it though. Like you, I also asked on the list here but no one knew the answer. I know that's not much help. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 24, 2020 2:28:21 PM matthias rebbe via use-livecode wrote: > Jacque, > > thanks for your answer. > > I tried 'Save As' already, but interestingly the value of the > stackfileversion property remains unchanged. > > I've tried all variations. Including tsNet and Internet, only tsNet and > also just Internet after disabling tsNet using > dispatch "revunloadlibrary" to stack tsnetliburl > > Regarding the remote debugger... First i thought a protected substack > (Zygodact register stack) would cause this. But even without the sub tack i > do not get Remote Debugger working. > > > > - > Matthias Rebbe > Life Is Too Short For Boring Code > >> Am 24.09.2020 um 18:12 schrieb J. Landman Gay via use-livecode >> : >> >> I haven't had the internet problem but I went a whole year once where I >> couldn't get remote debugging to work. I never did figure out why. Then it >> started to work again by itself. I never thought to check the stack file >> version. You could Save As with the latest LC version and see if that helps. >> >> I always include both the internet library and TSNet when I need internet >> connections. Did you try using both? >> >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On September 23, 2020 6:40:58 PM matthias rebbe via use-livecode >> wrote: >> >>> Hello, >>> >>> i have some problems with a stack which i update very often. The stack was >>> created 4 or 5 years ago, maybe even some more years ago. The gets regular >>> updates as my time allows. >>> >>> In Standalone Settings i have set the option to manually select inclusions. >>> I am working with LC 9.6.1, but tried also with 9.6.0 and 9.5.1 on Mac OS >>> 10.14.6 >>> >>> 1. I've added some code to call a url using >>> put URL "https:......" into tInfo >>> >>> This works in the IDE, but not in the standalone, although i have selected >>> INTERNET and SSL&Encryption to be included in the standalone >>> In the standalone the URL is not fetched and tInfo always is empty. I tried >>> also with http:// instead of https:// but also without success. >>> Tried with tsNet and without. >>> >>> Trying this with a new stack works w/o problems. >>> >>> >>> 2. Trying to use the remote debugger, regardless if in a "real" >>> standalone" or using the test button, does not work. The debugger is not >>> initiated, although i have set red breakpoints and even used the Breakpoint >>> keyword in the script and selected RemoteDebugger to be included in >>> Standalone Settings. >>> >>> Trying to use the Remote Debugger with a newer stack works w/o a problem. >>> >>> >>> Did anyone else ever ran into any of these problems with an older stack. Or >>> does anyone have an idea what might cause this? >>> >>> What i noticed is, that in the cRevGeneral Property Set of the stack there >>> is a property stackfileversion with a value of 5.5. >>> But changing this or removing that property completely does not help either. >>> >>> >>> Regards, >>> Matthias >>> >>> >>> >>> - >>> Matthias Rebbe >>> Life Is Too Short For Boring Code >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 Thu Sep 24 17:49:09 2020 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 24 Sep 2020 23:49:09 +0200 Subject: Some problems with an old stack that gets regular updates In-Reply-To: <174c1fccba0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <96D3D337-549D-4601-B12F-C7941CB533FD@m-r-d.de> <174c0e2ef60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <3DE9BBBA-03E5-4938-B361-F253F8F85A78@m-r-d.de> <174c1fccba0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: > Am 24.09.2020 um 23:20 schrieb J. Landman Gay via use-livecode : > > The ability to preserve the original stack file version is a setting in Preferences. I have that turned on too. You can either turn it off, or override it in the Save dialog by choosing a version from the pop up button at the bottom of the dialog. > Here it was not turned on. I turned it on now. > I also looked at system prefs when trying to resolve the problem to make sure LC was permitted to use internet or sockets or whatever Apple calls it, I can't remember exactly. That didn't fix it though. > It works with newer stacks and their standalones, only the old stack shows this behaviour. > Like you, I also asked on the list here but no one knew the answer. I know that's not much help. > I will bother the Pro Support tomorrow. Let's see, if they can help. Thanks again > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On September 24, 2020 2:28:21 PM matthias rebbe via use-livecode wrote: > >> Jacque, >> >> thanks for your answer. >> >> I tried 'Save As' already, but interestingly the value of the stackfileversion property remains unchanged. >> >> I've tried all variations. Including tsNet and Internet, only tsNet and also just Internet after disabling tsNet using >> dispatch "revunloadlibrary" to stack tsnetliburl >> >> Regarding the remote debugger... First i thought a protected substack (Zygodact register stack) would cause this. But even without the sub tack i do not get Remote Debugger working. >> >> >> >> - >> Matthias Rebbe >> Life Is Too Short For Boring Code >> >>> Am 24.09.2020 um 18:12 schrieb J. Landman Gay via use-livecode : >>> >>> I haven't had the internet problem but I went a whole year once where I couldn't get remote debugging to work. I never did figure out why. Then it started to work again by itself. I never thought to check the stack file version. You could Save As with the latest LC version and see if that helps. >>> >>> I always include both the internet library and TSNet when I need internet connections. Did you try using both? >>> >>> -- >>> Jacqueline Landman Gay | jacque at hyperactivesw.com >>> HyperActive Software | http://www.hyperactivesw.com >>> On September 23, 2020 6:40:58 PM matthias rebbe via use-livecode wrote: >>> >>>> Hello, >>>> >>>> i have some problems with a stack which i update very often. The stack was created 4 or 5 years ago, maybe even some more years ago. The gets regular updates as my time allows. >>>> >>>> In Standalone Settings i have set the option to manually select inclusions. I am working with LC 9.6.1, but tried also with 9.6.0 and 9.5.1 on Mac OS 10.14.6 >>>> >>>> 1. I've added some code to call a url using >>>> put URL "https:......" into tInfo >>>> >>>> This works in the IDE, but not in the standalone, although i have selected INTERNET and SSL&Encryption to be included in the standalone >>>> In the standalone the URL is not fetched and tInfo always is empty. I tried also with http:// instead of https:// but also without success. >>>> Tried with tsNet and without. >>>> >>>> Trying this with a new stack works w/o problems. >>>> >>>> >>>> 2. Trying to use the remote debugger, regardless if in a "real" standalone" or using the test button, does not work. The debugger is not initiated, although i have set red breakpoints and even used the Breakpoint keyword in the script and selected RemoteDebugger to be included in Standalone Settings. >>>> >>>> Trying to use the Remote Debugger with a newer stack works w/o a problem. >>>> >>>> >>>> Did anyone else ever ran into any of these problems with an older stack. Or does anyone have an idea what might cause this? >>>> >>>> What i noticed is, that in the cRevGeneral Property Set of the stack there is a property stackfileversion with a value of 5.5. >>>> But changing this or removing that property completely does not help either. >>>> >>>> >>>> Regards, >>>> Matthias >>>> >>>> >>>> >>>> - >>>> Matthias Rebbe >>>> Life Is Too Short For Boring Code >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 - Matthias Rebbe Life Is Too Short For Boring Code From MikeKerner at roadrunner.com Thu Sep 24 19:56:14 2020 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 24 Sep 2020 19:56:14 -0400 Subject: Hacktoberfest is coming In-Reply-To: References: <129666f2-a908-627f-ca1d-77fa3bb9a755@fourthworld.com> Message-ID: It's almost here - Hacktoberfest 2020! And now registration is open https://hacktoberfest.digitalocean.com All you have to do is register, then make a total of four pull requests to any public repo during the month of October. Pull requests can be updating LiveCode's documentation, making a contribution to any of the many liveCode related open source projects, or for that matter, any open source project on GitHub If you complete four pull requests, you will be able to choose to receive a Hacktoberfest 2020 T-shirt or have event organizers plant a tree in your name. Read the blog post here : https://www.digitalocean.com/blog/announcing-hacktoberfest-2020/ Get To HACKING On Wed, Sep 9, 2020 at 10:16 AM Mike Kerner wrote: > it's yours until you get a cease and desist letter. > > On Fri, Sep 4, 2020 at 1:06 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> That's really an old saying?? I came up with the saying People don't >> change until it hurts not to. I thought I was being pithy. >> >> Bob S >> >> >> > On Sep 3, 2020, at 13:40 , Richard Gaskin via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> > >> > Like the old saying goes, "Change occurs when the pain of changing is >> finally exceeded by the pain of not changing." >> > >> > -- >> > 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 >> > > > -- > 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 bdrunrev at gmail.com Fri Sep 25 04:10:00 2020 From: bdrunrev at gmail.com (Bernard Devlin) Date: Fri, 25 Sep 2020 09:10:00 +0100 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> Message-ID: >> So that in case (1) , we regenerate the file and in case (2) we present a warning that the server is disconnected or down? << For (2) you could save an empty file (as a flag of availability) and set it's attribute to hidden. If the file is not there when you get the files, then the folder is unavailable. Because it's a hidden file, users won't see it if they open the folder using (most) other applications (Explorer only shows such files if the 'show hidden' checkbox is ticked). This file can then be filtered out based on file name when you get the files of that folder to present to the user. It's just your internal check for folder availability. I guess there are some "net use" commands that would show which shares are available/unavailable, but it's a long time since I did that kind of system admin. To programmatically set a file attribute to hidden on Windows use the shell command to issue this "attrib +h _ServerAvailable.txt" Hope that helps. On Thu, Sep 24, 2020 at 9:54 PM Paul Dupuis via use-livecode < use-livecode at lists.runrev.com> wrote: > This question may have an obvious answer, but I am brain dead today, so > here goes: > > I have a app installed with some customers in a Windows network > environment. They have all their laptops set so that their Home > directories are on a local network server. > > So, where as on a local laptop, specialFolderPath("documents") might > return "C:/Users//Documents" as the path, for them > specialFolderPath("documents") returns something like > "//s1.somedomain.com/mountPoint//Documents" > > We save a number of folders and files in the user's Documents folder. In > some cases, if the file is not present (i.e. if there is a file tFile is > false) we regenerate the file from a default. > > Sometime, the server is offline or the user is disconnected from the > network. > > What is a good way to differentiate between: > > 1) one of these files is not present so must be regenerated, i.e > > if there is not a file (specialFolderPath("documents")&slash&tFilename) > then > -- regenerate the file tFile at location specialFolderPath("documents") > > Versus > > 2) The Server (//s1.somedomain.com/ is disconnected to down? > > So that in case (1) , we regenerate the file and in case (2) we present > a warning that the server is disconnected or down? > > Mu gut says this should be simple, but I just can not wrap my brain > around it today. > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 25 14:42:59 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 25 Sep 2020 13:42:59 -0500 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> Message-ID: I know very little about Windows network addresses, but from the example you gave, I'd check to see if (slash-delimited) item 1 of the path is a single letter followed by a colon. On 9/24/20 3:53 PM, Paul Dupuis via use-livecode wrote: > This question may have an obvious answer, but I am brain dead today, so here goes: > > I have a app installed with some customers in a Windows network environment. They have all > their laptops set so that their Home directories are on a local network server. > > So, where as on a local laptop, specialFolderPath("documents") might return > "C:/Users//Documents" as the path, for them specialFolderPath("documents") returns > something like "//s1.somedomain.com/mountPoint//Documents" > > We save a number of folders and files in the user's Documents folder. In some cases, if the > file is not present (i.e. if there is a file tFile is false) we regenerate the file from a > default. > > Sometime, the server is offline or the user is disconnected from the network. > > What is a good way to differentiate between: > > 1) one of these files is not present so must be regenerated, i.e > > if there is not a file (specialFolderPath("documents")&slash&tFilename) then > ? -- regenerate the file tFile at location specialFolderPath("documents") > > Versus > > 2) The Server (//s1.somedomain.com/ is disconnected to down? > > So that in case (1) , we regenerate the file and in case (2) we present a warning that the > server is disconnected or down? > > Mu gut says this should be simple, but I just can not wrap my brain around it today. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From paul at researchware.com Fri Sep 25 15:13:36 2020 From: paul at researchware.com (Paul Dupuis) Date: Fri, 25 Sep 2020 15:13:36 -0400 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> Message-ID: On 9/25/2020 2:42 PM, J. Landman Gay via use-livecode wrote: > I know very little about Windows network addresses, but from the > example you gave, I'd check to see if (slash-delimited) item 1 of the > path is a single letter followed by a colon. > Thanks for thought. In a Windows server environment (i.e many corporation, government agencies, etc.), computer are often set so tat their specific "User" directories (Documents, Desktop, "Home", etc.) at on a server rather than local disk. So a path to a file called "somefile.txt" is a user's Documents folder looks like: //s1.somedomain.com/mountPoint//Documents/somefile.txt The question is, if you execute the line of? LiveCode script: if there is a file "//s1.somedomain.com/mountPoint//Documents/somefile.txt" then ? -- true else ? -- false end if In the "true" case, the file is there, which means the server and network are both accessible. Yea! proceed with whatever. In the "false" case, you do not know whether the FILE is missing OR the NETWORK is disconnected or the SERVER is down. It is in the "false" case that I am looking for approaches (if there are any) to tell the difference between 1) the file is missing and 2) the network or server is down. Bernard has a suggestion of keeping an invisible file. Being hidden, it is unlike that it could be removed by intent or accident and so, if the file I am looking for "somefile.txt" does not exists, I could test for the hidden file. If that exists, I know my file is missing and the server and network are still up. If the hidden file also does not exists, the server or network is "probably" down. I could probably improve on Bernard's suggestion by testing for: if there is a folder "//s1.somedomain.com/mountPoint/" then ? -- the server is up else ? -- the server or network is down OR or the user has been fired and their account delete! end if I was hoping someone out there had actually dealt with LiveCode working with files on a Windows network server and have a definite approach. Maybe testing for the user's folder is the definitive way OR the mountPoint folder may be even better? -- Paul From bobsneidar at iotecdigital.com Fri Sep 25 17:22:28 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 21:22:28 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> Message-ID: <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> Have you tried opening the file then checking the result? Bob S > On Sep 25, 2020, at 12:13 PM, Paul Dupuis via use-livecode wrote: > > On 9/25/2020 2:42 PM, J. Landman Gay via use-livecode wrote: >> I know very little about Windows network addresses, but from the example you gave, I'd check to see if (slash-delimited) item 1 of the path is a single letter followed by a colon. >> > > Thanks for thought. > > In a Windows server environment (i.e many corporation, government agencies, etc.), computer are often set so tat their specific "User" directories (Documents, Desktop, "Home", etc.) at on a server rather than local disk. So a path to a file called "somefile.txt" is a user's Documents folder looks like: > > //s1.somedomain.com/mountPoint//Documents/somefile.txt > > The question is, if you execute the line of LiveCode script: > > if there is a file "//s1.somedomain.com/mountPoint//Documents/somefile.txt" then > -- true > else > -- false > end if > > In the "true" case, the file is there, which means the server and network are both accessible. Yea! proceed with whatever. > > In the "false" case, you do not know whether the FILE is missing OR the NETWORK is disconnected or the SERVER is down. > > It is in the "false" case that I am looking for approaches (if there are any) to tell the difference between > 1) the file is missing > and > 2) the network or server is down. > > Bernard has a suggestion of keeping an invisible file. Being hidden, it is unlike that it could be removed by intent or accident and so, if the file I am looking for "somefile.txt" does not exists, I could test for the hidden file. If that exists, I know my file is missing and the server and network are still up. If the hidden file also does not exists, the server or network is "probably" down. > > I could probably improve on Bernard's suggestion by testing for: > > if there is a folder "//s1.somedomain.com/mountPoint/" then > -- the server is up > else > -- the server or network is down OR or the user has been fired and their account delete! > end if > > I was hoping someone out there had actually dealt with LiveCode working with files on a Windows network server and have a definite approach. Maybe testing for the user's folder is the definitive way OR the mountPoint folder may be even better? > > -- Paul > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 25 17:28:40 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 21:28:40 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> Message-ID: <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> OK using your convention I cannot even open a file with the server mounted and an actual file that DOES exist! (//servername/mountpoint/pathtofile/filename) Bob S > On Sep 25, 2020, at 2:22 PM, Bob Sneidar via use-livecode wrote: > > Have you tried opening the file then checking the result? > > Bob S > > >> On Sep 25, 2020, at 12:13 PM, Paul Dupuis via use-livecode wrote: >> >> On 9/25/2020 2:42 PM, J. Landman Gay via use-livecode wrote: >>> I know very little about Windows network addresses, but from the example you gave, I'd check to see if (slash-delimited) item 1 of the path is a single letter followed by a colon. >>> >> >> Thanks for thought. >> >> In a Windows server environment (i.e many corporation, government agencies, etc.), computer are often set so tat their specific "User" directories (Documents, Desktop, "Home", etc.) at on a server rather than local disk. So a path to a file called "somefile.txt" is a user's Documents folder looks like: >> >> //s1.somedomain.com/mountPoint//Documents/somefile.txt >> >> The question is, if you execute the line of LiveCode script: >> >> if there is a file "//s1.somedomain.com/mountPoint//Documents/somefile.txt" then >> -- true >> else >> -- false >> end if >> >> In the "true" case, the file is there, which means the server and network are both accessible. Yea! proceed with whatever. >> >> In the "false" case, you do not know whether the FILE is missing OR the NETWORK is disconnected or the SERVER is down. >> >> It is in the "false" case that I am looking for approaches (if there are any) to tell the difference between >> 1) the file is missing >> and >> 2) the network or server is down. >> >> Bernard has a suggestion of keeping an invisible file. Being hidden, it is unlike that it could be removed by intent or accident and so, if the file I am looking for "somefile.txt" does not exists, I could test for the hidden file. If that exists, I know my file is missing and the server and network are still up. If the hidden file also does not exists, the server or network is "probably" down. >> >> I could probably improve on Bernard's suggestion by testing for: >> >> if there is a folder "//s1.somedomain.com/mountPoint/" then >> -- the server is up >> else >> -- the server or network is down OR or the user has been fired and their account delete! >> end if >> >> I was hoping someone out there had actually dealt with LiveCode working with files on a Windows network server and have a definite approach. Maybe testing for the user's folder is the definitive way OR the mountPoint folder may be even better? >> >> -- Paul >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Sep 25 18:12:58 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 22:12:58 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> Message-ID: <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> QUALIFIER: this is in Livecode on a Mac. Mac mount points work differently than Windows. However using the form /volumes/mountpoint/folderpath/filename I get the simple error ?Can?t open that file.? No detail about WHY I cannot open it. I can see how it would be helpful if the result contained ?path not accessible?, ?write access denied?, ?file already exists? etc. Bob S On Sep 25, 2020, at 2:28 PM, Bob Sneidar via use-livecode > wrote: OK using your convention I cannot even open a file with the server mounted and an actual file that DOES exist! (//servername/mountpoint/pathtofile/filename) Bob S From paul at researchware.com Fri Sep 25 18:24:05 2020 From: paul at researchware.com (Paul Dupuis) Date: Fri, 25 Sep 2020 18:24:05 -0400 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> Message-ID: Thanks Bob, Yes, the error messages you get on a failed file open are pretty generic. I am thinking that whether Mac or Win, the key is to check for whether there is a folder: /volumes/mountpoint/ (osx) or //server/mountpoint/ (win) For a given path tPath, I can tell if it is a windows server bu looking at the 1st two characters of tPath and if they are // then I can try t pull off //server/mountpoint and test for a folder by that name exists. However, on OSX, /volumes/mountpoint/ looks just like any local path. On 9/25/2020 6:12 PM, Bob Sneidar via use-livecode wrote: > QUALIFIER: this is in Livecode on a Mac. Mac mount points work differently than Windows. However using the form /volumes/mountpoint/folderpath/filename I get the simple error ?Can?t open that file.? No detail about WHY I cannot open it. I can see how it would be helpful if the result contained ?path not accessible?, ?write access denied?, ?file already exists? etc. > > Bob S > > > On Sep 25, 2020, at 2:28 PM, Bob Sneidar via use-livecode > wrote: > > OK using your convention I cannot even open a file with the server mounted and an actual file that DOES exist! (//servername/mountpoint/pathtofile/filename) > > 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 rdimola at evergreeninfo.net Fri Sep 25 18:56:49 2020 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Fri, 25 Sep 2020 18:56:49 -0400 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> Message-ID: <003d01d6938f$29dc7b10$7d957130$@net> On my Mac this form works to a Win 10 smb share put url ("file://volumes/shareName/folder/sub-folder/file.ext") 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 Paul Dupuis via use-livecode Sent: Friday, September 25, 2020 6:24 PM To: use-livecode at lists.runrev.com Cc: Paul Dupuis Subject: Re: Accessing files on a local network file server - BEST PRACTICE? Thanks Bob, Yes, the error messages you get on a failed file open are pretty generic. I am thinking that whether Mac or Win, the key is to check for whether there is a folder: /volumes/mountpoint/ (osx) or //server/mountpoint/ (win) For a given path tPath, I can tell if it is a windows server bu looking at the 1st two characters of tPath and if they are // then I can try t pull off //server/mountpoint and test for a folder by that name exists. However, on OSX, /volumes/mountpoint/ looks just like any local path. On 9/25/2020 6:12 PM, Bob Sneidar via use-livecode wrote: > QUALIFIER: this is in Livecode on a Mac. Mac mount points work differently than Windows. However using the form /volumes/mountpoint/folderpath/filename I get the simple error ?Can?t open that file.? No detail about WHY I cannot open it. I can see how it would be helpful if the result contained ?path not accessible?, ?write access denied?, ?file already exists? etc. > > Bob S > > > On Sep 25, 2020, at 2:28 PM, Bob Sneidar via use-livecode > wrote: > > OK using your convention I cannot even open a file with the server > mounted and an actual file that DOES exist! > (//servername/mountpoint/pathtofile/filename) > > 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 _______________________________________________ use-livecode mailing list use-livecode at 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 Sep 25 19:18:08 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 23:18:08 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <003d01d6938f$29dc7b10$7d957130$@net> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> <003d01d6938f$29dc7b10$7d957130$@net> Message-ID: <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> Unfortunately, if it fails no error is generated, and nothing is in the result or the it variable. Bob SW On Sep 25, 2020, at 3:56 PM, Ralph DiMola via use-livecode > wrote: On my Mac this form works to a Win 10 smb share put url ("file://volumes/shareName/folder/sub-folder/file.ext") Ralph DiMola IT Director Evergreen Information Services rdimola at evergreeninfo.net From bobsneidar at iotecdigital.com Fri Sep 25 19:20:37 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 23:20:37 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> <003d01d6938f$29dc7b10$7d957130$@net> <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> Message-ID: <4935579D-8EE8-4E74-99D9-BC72227FA904@iotecdigital.com> Even worse, if the mount point is mounted it does not create the file. Bob S > On Sep 25, 2020, at 4:18 PM, Bob Sneidar via use-livecode wrote: > > Unfortunately, if it fails no error is generated, and nothing is in the result or the it variable. > > Bob SW > > > On Sep 25, 2020, at 3:56 PM, Ralph DiMola via use-livecode > wrote: > > On my Mac this form works to a Win 10 smb share > > put url ("file://volumes/shareName/folder/sub-folder/file.ext") > > Ralph DiMola > IT Director > Evergreen Information Services > rdimola at evergreeninfo.net > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 25 19:21:41 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 23:21:41 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <4935579D-8EE8-4E74-99D9-BC72227FA904@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> <003d01d6938f$29dc7b10$7d957130$@net> <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> <4935579D-8EE8-4E74-99D9-BC72227FA904@iotecdigital.com> Message-ID: <7B137249-6062-42BC-B1BF-7FE6B9808652@iotecdigital.com> Hmmm. Neither does open file for read? Bob S > On Sep 25, 2020, at 4:20 PM, Bob Sneidar wrote: > > Even worse, if the mount point is mounted it does not create the file. > > Bob S > > >> On Sep 25, 2020, at 4:18 PM, Bob Sneidar via use-livecode wrote: >> >> Unfortunately, if it fails no error is generated, and nothing is in the result or the it variable. >> >> Bob SW >> >> >> On Sep 25, 2020, at 3:56 PM, Ralph DiMola via use-livecode > wrote: >> >> On my Mac this form works to a Win 10 smb share >> >> put url ("file://volumes/shareName/folder/sub-folder/file.ext") >> >> Ralph DiMola >> IT Director >> Evergreen Information Services >> rdimola at evergreeninfo.net >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 Sep 25 19:26:07 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 25 Sep 2020 23:26:07 +0000 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: <7B137249-6062-42BC-B1BF-7FE6B9808652@iotecdigital.com> References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> <003d01d6938f$29dc7b10$7d957130$@net> <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> <4935579D-8EE8-4E74-99D9-BC72227FA904@iotecdigital.com> <7B137249-6062-42BC-B1BF-7FE6B9808652@iotecdigital.com> Message-ID: After a little experimenting it appears that open file does not create a new file on OS X mount points! I can open a file that already exists but it will not create a new file. You learn something new every day! Bob S > On Sep 25, 2020, at 4:21 PM, Bob Sneidar via use-livecode wrote: > > Hmmm. Neither does open file for read? > > Bob S > > >> On Sep 25, 2020, at 4:20 PM, Bob Sneidar wrote: >> >> Even worse, if the mount point is mounted it does not create the file. >> >> Bob S >> >> >>> On Sep 25, 2020, at 4:18 PM, Bob Sneidar via use-livecode wrote: >>> >>> Unfortunately, if it fails no error is generated, and nothing is in the result or the it variable. >>> >>> Bob SW >>> >>> >>> On Sep 25, 2020, at 3:56 PM, Ralph DiMola via use-livecode > wrote: >>> >>> On my Mac this form works to a Win 10 smb share >>> >>> put url ("file://volumes/shareName/folder/sub-folder/file.ext") >>> >>> Ralph DiMola >>> IT Director >>> Evergreen Information Services >>> rdimola at evergreeninfo.net >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 Fri Sep 25 19:39:56 2020 From: paul at researchware.com (Paul Dupuis) Date: Fri, 25 Sep 2020 19:39:56 -0400 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: References: <87038a48-9315-4b4a-a38b-3c28462e1e04@researchware.com> <72EB305A-6FD9-4A04-9393-2B0BFB953F95@iotecdigital.com> <796A66DB-BB4B-4569-A3B7-F7DF493E036A@iotecdigital.com> <1AED4D5E-EA16-4371-9C4A-7F48AEF9836C@iotecdigital.com> <003d01d6938f$29dc7b10$7d957130$@net> <3868379B-7287-4000-A226-C632F8A05322@iotecdigital.com> <4935579D-8EE8-4E74-99D9-BC72227FA904@iotecdigital.com> <7B137249-6062-42BC-B1BF-7FE6B9808652@iotecdigital.com> Message-ID: Well, at least you have a server to test it on. Thank you. I am trying to resurrect a Windows 2003 Server VM and a Windows 7 VM configured to have it's home directory on the server. I just got both to run (finally) yesterday and just (at the end of teh day today) figured out what the admin password was to the 2003 server. Maybe by sometime next week, I'll be able to test some code. On 9/25/2020 7:26 PM, Bob Sneidar via use-livecode wrote: > After a little experimenting it appears that open file does not create a new file on OS X mount points! I can open a file that already exists but it will not create a new file. You learn something new every day! > > Bob S > > >> On Sep 25, 2020, at 4:21 PM, Bob Sneidar via use-livecode wrote: >> >> Hmmm. Neither does open file for read? >> >> Bob S >> >> >>> On Sep 25, 2020, at 4:20 PM, Bob Sneidar wrote: >>> >>> Even worse, if the mount point is mounted it does not create the file. >>> >>> Bob S >>> >>> >>>> On Sep 25, 2020, at 4:18 PM, Bob Sneidar via use-livecode wrote: >>>> >>>> Unfortunately, if it fails no error is generated, and nothing is in the result or the it variable. >>>> >>>> Bob SW >>>> >>>> >>>> On Sep 25, 2020, at 3:56 PM, Ralph DiMola via use-livecode > wrote: >>>> >>>> On my Mac this form works to a Win 10 smb share >>>> >>>> put url ("file://volumes/shareName/folder/sub-folder/file.ext") >>>> >>>> Ralph DiMola >>>> IT Director >>>> Evergreen Information Services >>>> rdimola at evergreeninfo.net >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 ambassador at fourthworld.com Fri Sep 25 20:38:13 2020 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 25 Sep 2020 17:38:13 -0700 Subject: Accessing files on a local network file server - BEST PRACTICE? In-Reply-To: References: Message-ID: The shell command "net use" should return a list of currently available network volumes. In LC: put shell("net use") -- 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 scott at elementarysoftware.com Sat Sep 26 01:40:22 2020 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Fri, 25 Sep 2020 22:40:22 -0700 Subject: included inclusions Message-ID: <78CF53DA-DA3B-4FE7-9F64-195C467CCAB8@elementarysoftware.com> If I have an inclusion selected in the standalone builder that only targets one operating system? and then build for an OS that can't use that inclusion, is the inclusion left out of the build or might it just be taking up space. Or does it depend on the specific inclusion as to how this is handled? -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ From jeejeestudio at gmail.com Sat Sep 26 05:07:01 2020 From: jeejeestudio at gmail.com (JeeJeeStudio) Date: Sat, 26 Sep 2020 11:07:01 +0200 Subject: Samsung Galaxy skins for Android Studio Message-ID: Here you can find Samsung Galaxy skins which you can use in Android Studio, so you can see how it looks on the real device.: https://developer.samsung.com/galaxy-emulator-skin/overview.html it's free to use as far as i could see. From brahma at hindu.org Sat Sep 26 10:04:26 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sat, 26 Sep 2020 14:04:26 +0000 Subject: I Have a Problem With a Plug-In Message-ID: <19130A00-1C97-442F-96DC-37C80EDFE324@hindu.org> I have? CollectMyStacks.rev, close itself after opens the card on opencard send "mouseUp" to button "Position IDE" in 1 seconds close this stack end opencard Now, this was a bad idea. How to get the message close this stack how to delete that? set the lockMessages to true it has no affect. BR From jacque at hyperactivesw.com Sat Sep 26 13:41:02 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 26 Sep 2020 12:41:02 -0500 Subject: I Have a Problem With a Plug-In In-Reply-To: <19130A00-1C97-442F-96DC-37C80EDFE324@hindu.org> References: <19130A00-1C97-442F-96DC-37C80EDFE324@hindu.org> Message-ID: <174cb80fbb0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Click the Messages icon in the toolbar. That will prevent the handler from running when the stack opens and you can delete the line in the script. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 26, 2020 9:06:33 AM Sannyasin Brahmanathaswami via use-livecode wrote: > I have? CollectMyStacks.rev, close itself after opens the card > > on opencard > send "mouseUp" to button "Position IDE" in 1 seconds > close this stack > end opencard > > Now, this was a bad idea. How to get the message > > close this stack > > how to delete that? > > set the lockMessages to true > > it has no affect. > > BR > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Sep 26 23:18:43 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 26 Sep 2020 22:18:43 -0500 Subject: Converting from unicode to ASCII In-Reply-To: <174c117ab60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <7EC786E8-56E9-40D7-9220-1D344E26953F@iotecdigital.com> <0901dcaa-4c72-5684-d70a-c5aabb9e5383@fourthworld.com> <565BA745-94A4-406E-9E61-16B12B88E8E3@lacscentre.co.uk> <174c0e4eb30.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <53259254-CDC8-46C7-A2F5-D7181735417B@lacscentre.co.uk> <82b5c3c9-6df3-7df9-f90f-a839076e454b@tweedly.net> <174c117ab60.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: On 9/24/20 12:09 PM, J. Landman Gay via use-livecode wrote: > My original goal was to get the canonical version directly from LC somehow. Neville Smythe contacted me privately with this brilliant solution, posted here with his consent: function stripAccents pInput local tDecomposed local tStripped replace "'" with space in pInput -- illegal in sql queries, (my requirement) -- Separate the accents from the base letters put normalizeText(pInput, "NFD") into tDecomposed repeat for each codepoint c in tDecomposed -- Copy everything but the accent marks if c="?" then put "AE" after tStripped else if c="?" then put "OE" after tStripped else if codepointProperty(c, "Diacritic") is false then put c after tStripped end if end repeat return tStripped end stripAccents This works great for my needs and is exactly what I was looking for. I had no idea we had a codepointProperty function, which makes this all possible. This will work for most European Latin alphabets with a few exceptions. Neville found that German, Polish and Dutch may not be completely compatible, there may be some others. There is a list of special characters that may need specific replacements here: For now I only need French, so I can probably omit the specific replacements. Maybe Neville will chime in if I've left out anything, he's done quite a bit of research into the problem. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From admin at FlexibleLearning.com Sun Sep 27 04:52:36 2020 From: admin at FlexibleLearning.com (FlexibleLearning.com) Date: Sun, 27 Sep 2020 09:52:36 +0100 Subject: I Have a Problem With a Plug-In Message-ID: <000601d694ab$8d4bc580$a7e35080$@FlexibleLearning.com> Assuming your openCard handler is in the script of card 1, from the message box... edit the script of cd 1 of stack " CollectMyStacks.rev" Hugh Senior > I have? CollectMyStacks.rev, close itself after opens the card > > on opencard > send "mouseUp" to button "Position IDE" in 1 seconds > close this stack > end opencard > > Now, this was a bad idea. How to get the message > > close this stack > > how to delete that? > > set the lockMessages to true > > it has no affect. > > BR From brahma at hindu.org Sun Sep 27 08:23:25 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sun, 27 Sep 2020 12:23:25 +0000 Subject: I Have a Problem With a Plug-In In-Reply-To: <174cb80fbb0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <19130A00-1C97-442F-96DC-37C80EDFE324@hindu.org> <174cb80fbb0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <17FB59B7-0047-42D8-99DE-7A300BB68FD7@hindu.org> That did it! ? J. Landman Gay wrote: Click the Messages icon in the toolbar. That will prevent the handler from running when the stack opens and you can delete the line in the script. From brahma at hindu.org Sun Sep 27 21:47:35 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 28 Sep 2020 01:47:35 +0000 Subject: Problem an Repeat Loop Message-ID: # for development local tPath repeat with x = 2 to sTotalSceneCount put line x of sImageList into tPath go to card x set the filename of sStoryImage to tPath set the itemDelimiter to ?|? put item x of sQuoteList into fld ?mainText? end repeat # I get a full line stack ?makeStoryFromDisk?: execution error at line 68 (Chunk: error in object expression), char 1 It is exactly the same as in input for behavior_story except that do not work a repeat loop? BR From tore.nilsen at me.com Mon Sep 28 01:49:15 2020 From: tore.nilsen at me.com (Tore Nilsen) Date: Mon, 28 Sep 2020 07:49:15 +0200 Subject: Problem an Repeat Loop In-Reply-To: References: Message-ID: <855E717E-2727-40EC-96F1-9150E270030E@me.com> You do not refer to any object type when you try to set the fileName of what should possibly be an image. Try this: Set the fileName of image sStoryImage to tPath Best regards Tore Nilsen > 28. sep. 2020 kl. 03:47 skrev Sannyasin Brahmanathaswami via use-livecode : > > # for development > local tPath > repeat with x = 2 to sTotalSceneCount > put line x of sImageList into tPath > go to card x > set the filename of sStoryImage to tPath > set the itemDelimiter to ?|? > put item x of sQuoteList into fld ?mainText? > end repeat > > # I get a full line > > stack ?makeStoryFromDisk?: execution error at line 68 (Chunk: error in object expression), char 1 > > It is exactly the same as in input for behavior_story except that > do not work a repeat loop? > > BR > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From livfoss at mac.com Mon Sep 28 04:44:06 2020 From: livfoss at mac.com (Graham Samuel) Date: Mon, 28 Sep 2020 10:44:06 +0200 Subject: Has anyone published an iPhone app that works on iOS 14? Message-ID: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> Sorry if this has been asked before, but a quick search of the list didn?t reveal anything, and I have only been semi-lurking lately. The subject says it all. At this point I don?t know if I can create an app in LC that runs reliably with iOS 14. I know there have been high volume grumbles from some non-LC developers that they weren?t ready when Apple started the rollout of 14 earlier than expected, but I don?t know the substance of the complaints. Anyone just sailing along with no problems? I ask because I?m about to revive an earlier app project and don?t want to crash and burn the moment I restart. Graham From brahma at hindu.org Mon Sep 28 08:42:05 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 28 Sep 2020 12:42:05 +0000 Subject: Problem an Repeat Loop In-Reply-To: <855E717E-2727-40EC-96F1-9150E270030E@me.com> References: <855E717E-2727-40EC-96F1-9150E270030E@me.com> Message-ID: <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> I use the long name of the image local sStoryImage put the long id of img "slideImage" into sStoryImage still: # for development local tPath repeat with x = 2 to sTotalSceneCount put line x of sImageList into tPath go to card x set the filename of sStoryImage to tPath set the itemDelimiter to ?|? put item x of sQuoteList into fld ?mainText? end repeat # I get a full line stack ?makeStoryFromDisk?: execution error at line 68 (Chunk: error in object expression), char 1 It is exactly the same as in input for behavior_story except that do not work a repeat loop? ? Tore Nilsen wrote: You do not refer to any object type when you try to set the fileName of what should possibly be an image. Try this: Set the fileName of image sStoryImage to tPath Best regards Tore Nilsen From brahma at hindu.org Mon Sep 28 09:02:08 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 28 Sep 2020 13:02:08 +0000 Subject: How to delete cards but card 1 Message-ID: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> repeat forever go last card delete this card end repeat I have tried everything in the manual ?? BR From paul at researchware.com Mon Sep 28 09:24:46 2020 From: paul at researchware.com (Paul Dupuis) Date: Mon, 28 Sep 2020 09:24:46 -0400 Subject: How to delete cards but card 1 In-Reply-To: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> References: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> Message-ID: repeat with i = the number of cards down to 2 ? delete card i end repeat On 9/28/2020 9:02 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > repeat forever > go last card > delete this card > end repeat > > I have tried everything in the manual > > ?? > BR > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 28 09:34:23 2020 From: paul at researchware.com (Paul Dupuis) Date: Mon, 28 Sep 2020 09:34:23 -0400 Subject: Problem an Repeat Loop In-Reply-To: <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> References: <855E717E-2727-40EC-96F1-9150E270030E@me.com> <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> Message-ID: On 9/28/2020 8:42 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > repeat with x = 2 to sTotalSceneCount > > put line x of sImageList into tPath > go to card x > set the filename of sStoryImage to tPath > set the itemDelimiter to ?|? > put item x of sQuoteList into fld ?mainText? > end repeat something like this? It might be easier to help if you explained what you are trying to do. Have all the cards in this stack been created already? i.e. do you have sTotalSceneCount cards? Does each card contain a field called "mainText" and an image called "slideImage"? set the itemDelimiter to ?|? repeat with x = 2 to sTotalSceneCount set the filename of img "slideImage" of card x to line x of sImageList set the text of fld "mainText" of card x to item x of of sQuoteList end repeat From brian at milby7.com Mon Sep 28 09:44:12 2020 From: brian at milby7.com (Brian Milby) Date: Mon, 28 Sep 2020 09:44:12 -0400 Subject: Problem an Repeat Loop In-Reply-To: <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> References: <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> Message-ID: The long ID of the image will be different for each card, so this loop won?t work as expected. Also, do you really need to go to the card? You probably could build the object reference to include the card. So you would use: image ?slideImage? of cd x fld ?mainText? of cd x Sent from my iPhone > On Sep 28, 2020, at 8:43 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > > ?I use the long name of the image > > local sStoryImage > put the long id of img "slideImage" into sStoryImage > > still: > > # for development > local tPath > repeat with x = 2 to sTotalSceneCount > > put line x of sImageList into tPath > go to card x > set the filename of sStoryImage to tPath > set the itemDelimiter to ?|? > put item x of sQuoteList into fld ?mainText? > end repeat > > # I get a full line > > stack ?makeStoryFromDisk?: execution error at line 68 (Chunk: error in object expression), char 1 > > It is exactly the same as in input for behavior_story except that > do not work a repeat loop? > > > ? Tore Nilsen wrote: > > You do not refer to any object type when you try to set the fileName of what should possibly be an image. > > Try this: > Set the fileName of image sStoryImage to tPath > > Best regards > Tore Nilsen > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Mon Sep 28 10:36:11 2020 From: brian at milby7.com (Brian Milby) Date: Mon, 28 Sep 2020 10:36:11 -0400 Subject: Has anyone published an iPhone app that works on iOS 14? In-Reply-To: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> References: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> Message-ID: There are a few apps that I?ve worked on in the store that still work in iOS 14. Siva Siva is one that you can install and test. Sent from my iPhone > On Sep 28, 2020, at 4:45 AM, Graham Samuel via use-livecode wrote: > > ?Sorry if this has been asked before, but a quick search of the list didn?t reveal anything, and I have only been semi-lurking lately. > > The subject says it all. At this point I don?t know if I can create an app in LC that runs reliably with iOS 14. I know there have been high volume grumbles from some non-LC developers that they weren?t ready when Apple started the rollout of 14 earlier than expected, but I don?t know the substance of the complaints. > > Anyone just sailing along with no problems? I ask because I?m about to revive an earlier app project and don?t want to crash and burn the moment I restart. > > Graham > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Mon Sep 28 13:27:29 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Mon, 28 Sep 2020 12:27:29 -0500 Subject: Has anyone published an iPhone app that works on iOS 14? In-Reply-To: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> References: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> Message-ID: <174d5c14800.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I have two iOS apps in the app store and they both run fine on iOS 14. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 28, 2020 3:46:13 AM Graham Samuel via use-livecode wrote: > Sorry if this has been asked before, but a quick search of the list didn?t > reveal anything, and I have only been semi-lurking lately. > > The subject says it all. At this point I don?t know if I can create an app > in LC that runs reliably with iOS 14. I know there have been high volume > grumbles from some non-LC developers that they weren?t ready when Apple > started the rollout of 14 earlier than expected, but I don?t know the > substance of the complaints. > > Anyone just sailing along with no problems? I ask because I?m about to > revive an earlier app project and don?t want to crash and burn the moment I > restart. > > Graham > _______________________________________________ > use-livecode mailing list > use-livecode at 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 livecode.org Mon Sep 28 14:13:34 2020 From: paul at livecode.org (Paul Hibbert) Date: Mon, 28 Sep 2020 11:13:34 -0700 Subject: Has anyone published an iPhone app that works on iOS 14? In-Reply-To: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> References: <0D01CF1C-2403-4A97-949B-54A06360A879@mac.com> Message-ID: <2E545E64-F299-46BA-8E62-B1E1AB443E47@livecode.org> I?ve just recently upgraded my iPhone and so ended up using iOS14, initially some apps that I had previously installed on my older iPhone would?t install on the new phone, most of them are quite old, so I rebuilt them using LC9.6.0 and Xcode 11.4. The first time I launched them they all worked fine on first launch, but none of them would launch for a second time, however, when I rebuilt them again using LC9.6.1 and Xcode 11.5 they all work fine. These are all apps that I have built for my own use and are not published through the app store. Paul > On 28Sep, 2020, at 01:44, Graham Samuel via use-livecode wrote: > > Sorry if this has been asked before, but a quick search of the list didn?t reveal anything, and I have only been semi-lurking lately. > > The subject says it all. At this point I don?t know if I can create an app in LC that runs reliably with iOS 14. I know there have been high volume grumbles from some non-LC developers that they weren?t ready when Apple started the rollout of 14 earlier than expected, but I don?t know the substance of the complaints. > > Anyone just sailing along with no problems? I ask because I?m about to revive an earlier app project and don?t want to crash and burn the moment I restart. > > Graham > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 28 16:20:38 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 28 Sep 2020 20:20:38 +0000 Subject: included inclusions In-Reply-To: <78CF53DA-DA3B-4FE7-9F64-195C467CCAB8@elementarysoftware.com> References: <78CF53DA-DA3B-4FE7-9F64-195C467CCAB8@elementarysoftware.com> Message-ID: <6BFB4F13-7DC8-4A88-9ACA-344EA06F1951@iotecdigital.com> If you manually select an inclusion that api is included in the project. I think the whole point of manual inclusions is to bypass what the engine thinks it ought to include. Bob S > On Sep 25, 2020, at 10:40 PM, scott--- via use-livecode wrote: > > If I have an inclusion selected in the standalone builder that only targets one operating system? and then build for an OS that can't use that inclusion, is the inclusion left out of the build or might it just be taking up space. Or does it depend on the specific inclusion as to how this is handled? > > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email scott at elementarysoftware.com > booth 1-360-734-4701 > ------------------------------------------------------ > > > > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 28 16:22:02 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 28 Sep 2020 20:22:02 +0000 Subject: I Have a Problem With a Plug-In In-Reply-To: <000601d694ab$8d4bc580$a7e35080$@FlexibleLearning.com> References: <000601d694ab$8d4bc580$a7e35080$@FlexibleLearning.com> Message-ID: Before launching your stack, select Suppress Messages from the Development menu. Bob S > On Sep 27, 2020, at 1:52 AM, FlexibleLearning.com via use-livecode wrote: > > Assuming your openCard handler is in the script of card 1, from the message > box... > > edit the script of cd 1 of stack " CollectMyStacks.rev" > > Hugh Senior > > >> I have? CollectMyStacks.rev, close itself after opens the card >> >> on opencard >> send "mouseUp" to button "Position IDE" in 1 seconds >> close this stack >> end opencard >> >> Now, this was a bad idea. How to get the message >> >> close this stack >> >> how to delete that? >> >> set the lockMessages to true >> >> it has no affect. >> >> BR > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sep 28 16:26:30 2020 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 28 Sep 2020 20:26:30 +0000 Subject: How to delete cards but card 1 In-Reply-To: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> References: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> Message-ID: <88A9AEDB-0788-4B4B-97CE-CD73FC75B82D@iotecdigital.com> You cannot delete a card that contains a running script unless you send in time. If you delete the last card of a stack if will create a new card as otherwise there would be no stack. So this script it seems would run forever. Bob S > On Sep 28, 2020, at 6:02 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > > repeat forever > go last card > delete this card > end repeat > > I have tried everything in the manual > > ?? > BR > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brahma at hindu.org Mon Sep 28 23:04:21 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Tue, 29 Sep 2020 03:04:21 +0000 Subject: How to delete cards but card 1 In-Reply-To: References: <1A9469EA-B55C-4BDA-937E-0F7244B038BD@hindu.org> Message-ID: <9FF39DBA-537C-4E9D-AC9C-CB1EDF71A9B1@hindu.org> You did it! Yay! BR Paul Dupuis wrote: repeat with i = the number of cards down to 2 delete card i end repeat From brahma at hindu.org Mon Sep 28 23:16:08 2020 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Tue, 29 Sep 2020 03:16:08 +0000 Subject: Problem an Repeat Loop In-Reply-To: References: <54E1D39E-8FBC-44E3-80B8-A8D0C4D7F36E@hindu.org> Message-ID: Yes! I was thinking of a one card, Sheesh.... It all worked! Paul Dupuis wrote: set the itemDelimiter to ?|? repeat with x = 2 to sTotalSceneCount set the filename of img "slideImage" of card x to line x of sImageList set the text of fld "mainText" of card x to item x of of sQuoteList end repeat ? Brian Milby wrote: image ?slideImage? of cd x fld ?mainText? of cd x From andreas.bergendal at gmail.com Tue Sep 29 16:46:47 2020 From: andreas.bergendal at gmail.com (Andreas Bergendal) Date: Tue, 29 Sep 2020 22:46:47 +0200 Subject: iOS app erratically freezing up when loading audio files Message-ID: <8032B5D5-0DF5-46AC-B430-DED04EA80DEE@gmail.com> Hi folks, I really need your help now. I?m developing a simple app for a client, to be run on iPads in an exhibition starting 8th Oct. It consists of two cards: a gallery card, with 16 photos a profile card which you go to by clicking a photo on the gallery card On the profile card this is loaded: the photo again, larger a short text in a field an audio file (mp3), which starts playing All resources are included in file folders with the app, no internet needed. The audio files are central to the app. They are recordings of people on Guernsey speaking Guernesiais, and sizes range from 1.6Mb to 2.6Mb. In iOS a player is created with mobileControlCreate, and the audio controller is visible, so the user can pause, fast fwd etc. The app design and coding is done and it works perfectly in the IDE, as Mac standalone (with standard player) and in the iOS simulator (iOS 13.3). It works on the client?s iPads too (iOS 13.6), but irregularly freezes (rarely crashes), preventing further interaction until the app is killed and restarted. The freeze occurs at (or during) ?mobileControlSet "voicePlayer", "filename", sAudioPath? In the simulator I get a crash (app quits) if I don?t put ?wait 20 ticks with messages? after setting the file path, but never a freeze. I?ve tried to give the audio loading a full second wait, in case iPads are slower than simulator, and it prevents crash but not the random freezing. The iPad user can sometimes load the same profile (or different ones, we see no pattern) 30-40 times before freeze occurs, sometimes just 3. So it doesn?t seem to have anything to do with cache build-up or so. So, has anyone experienced similar problems with playing mp3 files on iOS? Any obvious pitfalls? The frustrating thing is that I cannot reproduce the problem in simulator (it works perfectly there), and have no iPad myself to hook up for Remote debugging. So I have to try various solutions, then upload a new build to TestFlight and wait for the client?s ?Sorry, it?s still freezing randomly?? Help! Hopeful greetings, Andreas WhenInSpace From jacque at hyperactivesw.com Wed Sep 30 01:15:48 2020 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Wed, 30 Sep 2020 00:15:48 -0500 Subject: iOS app erratically freezing up when loading audio files In-Reply-To: <8032B5D5-0DF5-46AC-B430-DED04EA80DEE@gmail.com> References: <8032B5D5-0DF5-46AC-B430-DED04EA80DEE@gmail.com> Message-ID: <174dd7023a0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Some video problems can be solved by setting the filename of the player to empty, waiting a few milliseconds, and then setting the new filename. I'm not sure it will work in this case but it's worth a try. Also, if you aren't using the latest version of LC, try that. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 29, 2020 3:48:55 PM Andreas Bergendal via use-livecode wrote: > Hi folks, > > I really need your help now. I?m developing a simple app for a client, to > be run on iPads in an exhibition starting 8th Oct. It consists of two cards: > a gallery card, with 16 photos > a profile card which you go to by clicking a photo on the gallery card > > On the profile card this is loaded: > the photo again, larger > a short text in a field > an audio file (mp3), which starts playing > > All resources are included in file folders with the app, no internet > needed. The audio files are central to the app. They are recordings of > people on Guernsey speaking Guernesiais, and sizes range from 1.6Mb to 2.6Mb. > > In iOS a player is created with mobileControlCreate, and the audio > controller is visible, so the user can pause, fast fwd etc. > > The app design and coding is done and it works perfectly in the IDE, as Mac > standalone (with standard player) and in the iOS simulator (iOS 13.3). > > It works on the client?s iPads too (iOS 13.6), but irregularly freezes > (rarely crashes), preventing further interaction until the app is killed > and restarted. The freeze occurs at (or during) > ?mobileControlSet "voicePlayer", "filename", sAudioPath? > > In the simulator I get a crash (app quits) if I don?t put ?wait 20 ticks > with messages? after setting the file path, but never a freeze. I?ve tried > to give the audio loading a full second wait, in case iPads are slower than > simulator, and it prevents crash but not the random freezing. > > The iPad user can sometimes load the same profile (or different ones, we > see no pattern) 30-40 times before freeze occurs, sometimes just 3. So it > doesn?t seem to have anything to do with cache build-up or so. > > So, has anyone experienced similar problems with playing mp3 files on iOS? > Any obvious pitfalls? > > The frustrating thing is that I cannot reproduce the problem in simulator > (it works perfectly there), and have no iPad myself to hook up for Remote > debugging. So I have to try various solutions, then upload a new build to > TestFlight and wait for the client?s ?Sorry, it?s still freezing randomly?? > > Help! > > Hopeful greetings, > Andreas > WhenInSpace > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From andreas.bergendal at gmail.com Wed Sep 30 02:38:54 2020 From: andreas.bergendal at gmail.com (Andreas Bergendal) Date: Wed, 30 Sep 2020 08:38:54 +0200 Subject: iOS app erratically freezing up when loading audio files Message-ID: <08F9275D-9B23-4286-A52B-A9A00F3F0E53@gmail.com> Thanks Jacqueline, I?ll try that! I use LC business 9.6.1 stable, Xcode 11.3.1 ???????????? J. Landman Gay via use-livecode Tue, 29 Sep 2020 22:17:57 -0700 Some video problems can be solved by setting the filename of the player to empty, waiting a few milliseconds, and then setting the new filename. I'm not sure it will work in this case but it's worth a try. Also, if you aren't using the latest version of LC, try that. From andreas.bergendal at gmail.com Wed Sep 30 03:30:18 2020 From: andreas.bergendal at gmail.com (Andreas Bergendal) Date: Wed, 30 Sep 2020 09:30:18 +0200 Subject: iOS app erratically freezing up when loading audio files Message-ID: <6B8D96D3-16D8-49C4-B70A-66D75A866DB9@gmail.com> Unfortunately, it didn?t work. It actually crashes the app in Simulator after doing it twice(!). On the first go, it's loading the audio file, by first setting the path to empty, then to the actual path. All is fine. Going back to gallery card, the player is stopped and deleted (as intended, mobileControlDelete). Repeating the procedure a second time (go to profile card (same or other), create new player, load the audio file) now crashes the app every time, at the stage of loading the real path. This is another flavour of strange, but a step backwards. I think we?ll try with other audio formats than mp3, to see if it makes any difference... If anyone has time, an iPad and interest in taking part in testing, I can invite you via TestFlight (my client approves). ???????????? J. Landman Gay via use-livecode Some video problems can be solved by setting the filename of the player to empty, waiting a few milliseconds, and then setting the new filename. From ahsoftware at sonic.net Wed Sep 30 13:03:51 2020 From: ahsoftware at sonic.net (Mark Wieder) Date: Wed, 30 Sep 2020 10:03:51 -0700 Subject: TIL: JSON validator Message-ID: <75e48a53-8256-c955-fdae-f2563cb27ccb@sonic.net> I've been in the DeveloperWeek conference for the last couple of days, and in a morning session today about OpenAPI I learned about an online JSON Schema validator tool. https://www.jsonschemavalidator.net/ Also, this JSON/YAML linter may be of use: https://meta.stoplight.io/docs/spectral/README.md -- Mark Wieder ahsoftware at gmail.com From neville.smythe at optusnet.com.au Wed Sep 30 22:30:32 2020 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Thu, 1 Oct 2020 12:30:32 +1000 Subject: Modal stacks cpu usage Message-ID: <15234F36-6888-41CA-BB99-D27BBA90D20D@optusnet.com.au> I have just noticed something curious. I am running LiveCode 8.1 IDE 9.6.1 on a Mac Air 2020 quad core Catalina. Typically LC cpu usage shows about 34% (presumably of 1 core). When a modal stack is opened it immediately ramps up to 99% ; the fan kicks in, and if left for a while the OS boosts the kernel_task daemon which I have been told is a protection device to prevent overheating. This has the effect of very markedly slowing down all apps as they get less cpu time. If the stack is opened in non-modal mode, cpu usage stays around 34% . I don?t understand why a modal stack should be a cpu hog, indeed it seems like a bug to me. I have a suspicion the wait with messages command may have the same effect on cpu performance, so it could be the culprit.