From gcanyon at gmail.com Thu Nov 1 03:15:37 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Thu, 1 Nov 2018 00:15:37 -0700 Subject: How to find the offset of the last instance of a repeating character in a string? In-Reply-To: References: <7FFFD522-F677-44C8-9BA4-8A0D7D818DC5@me.com> Message-ID: I was curious if using the itemDelimiter might work for this, so I wrote the below code out of curiosity; but in my quick testing with single-byte characters it was only about 30% faster than the above methods, so I didn't bother to post it. But Ben Rubinstein just posted about a terrible slow-down doing pretty much this same thing for text with unicode characters. So I ran a simple test with 8000 character long strings that start with a single unicode character, this is about 15x faster than offset() with skip. For 100,000-character lines it's about 300x faster, so it seems to be immune to the line-painter issues skip is subject to. So for what it's worth: function offsetList D,S -- returns a comma-delimited list of the offsets of D in S set the itemDel to D repeat for each item i in S add length(i) + 1 to C put C,"" after R end repeat set the itemDel to comma if char -1 of S is D then return char 1 to -2 of R put length(C) + 1 into lenC put length(R) into lenR if lenC = lenR then return 0 return char 1 to lenR - lenC - 1 of R end offsetList > From michael-kristensen at dsa-net.dk Thu Nov 1 04:55:07 2018 From: michael-kristensen at dsa-net.dk (Michael Kristensen) Date: Thu, 1 Nov 2018 09:55:07 +0100 Subject: Script works but still cast an error? Message-ID: <2E6CE8CD-438F-4405-88C0-A301EFAB9CD6@dsa-net.dk> Hi there I have a scrolling group called ?PinBoard? that holds subgroups and fields. If I place this simple script in the subgroups: on mouseEnter lock screen start editing grp PinBoard set the layer of me to top stop editing end mouseEnter ?it works very well. If I place the same script in the fields, it also work as intended but it casts an error. The offending line is: start editing grp PinBoard (can?t find background) If I check the generel menu command ?Suppress errors? it just works as I want. But I can?t figure out why it works in the subgroups but in the fields it casts an error. Thanks Michael BTW If I place: ?lock error dialogs? just under on mouseEnter, it has no effect. It still cast the same error. From keith.clarke at me.com Thu Nov 1 05:41:17 2018 From: keith.clarke at me.com (Keith Clarke) Date: Thu, 01 Nov 2018 09:41:17 +0000 Subject: How best to check if string contains any of a list of substrings? Message-ID: <518B7B06-91D4-4DF9-8DF8-EBB17A896916@me.com> Folks, What is the most efficient way to test whether a variable containing a string such as ?my test phrase? contains one of several variable substrings, such as ?est? OR ?phr? OR... ? So far I?ve tried (without luck) approaches that simplify into... put ?my test phrase? into myTestPhrase put ?*est*? & cr & ?*phr*? into tSubstrings if myTestPhrase is among the lines of tSubstrings then answer ?true? repeat for each line L in tSubstrings if myTestPhrase contains L then answer ?true? end repeat Both seem to be failing - do I have the wrong syntax or approach to the problem? TIA Keith From alex at tweedly.net Thu Nov 1 06:34:24 2018 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 1 Nov 2018 10:34:24 +0000 Subject: How best to check if string contains any of a list of substrings? In-Reply-To: <518B7B06-91D4-4DF9-8DF8-EBB17A896916@me.com> References: <518B7B06-91D4-4DF9-8DF8-EBB17A896916@me.com> Message-ID: <784e4781-f64e-f9c1-a3b6-0bc80ab06bc1@tweedly.net> Hi Keith, I think the simplest method would be (almost) your second attempt below. However, you were using "*est*" - i.e. with the '*'s before and after the phrase, which is what you would need for 'filter' but not for 'contains'. So it should work with just > put ?my test phrase? into myTestPhrase > put ?est? & cr & ?phr? into tSubstrings > > repeat for each line L in tSubstrings > if myTestPhrase contains L then answer ?true? > end repeat There's almost certainly also a way of doing it in a single pass using regex - but I'm not brave enough to go there :-) Are you expecting reallylarge strings to search ?? Or really many phrases to search for ? "beware optimizing something that is just plain fast enough already" Alex. On 01/11/2018 09:41, Keith Clarke via use-livecode wrote: > Folks, > What is the most efficient way to test whether a variable containing a string such as ?my test phrase? contains one of several variable substrings, such as ?est? OR ?phr? OR... ? > > So far I?ve tried (without luck) approaches that simplify into... > > put ?my test phrase? into myTestPhrase > put ?*est*? & cr & ?*phr*? into tSubstrings > > if myTestPhrase is among the lines of tSubstrings then answer ?true? > > repeat for each line L in tSubstrings > if myTestPhrase contains L then answer ?true? > end repeat > > Both seem to be failing - do I have the wrong syntax or approach to the problem? > > TIA > Keith > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From keith.clarke at me.com Thu Nov 1 07:02:29 2018 From: keith.clarke at me.com (Keith Clarke) Date: Thu, 01 Nov 2018 11:02:29 +0000 Subject: How best to check if string contains any of a list of substrings? In-Reply-To: <784e4781-f64e-f9c1-a3b6-0bc80ab06bc1@tweedly.net> References: <518B7B06-91D4-4DF9-8DF8-EBB17A896916@me.com> <784e4781-f64e-f9c1-a3b6-0bc80ab06bc1@tweedly.net> Message-ID: <12FE6E1E-50FE-4395-8837-1238D83BE04B@me.com> Thanks Alex - I thought the single-pass ?is among? with wildcards was a long-shot, so I?ll concentrate on debugging the list iteration using the ?contains? check. :-) The strings & sub-strings are simple - I have a large list of URLs that need to be processed differently (or ignored), based on various sub-string ?signatures? that route them into different ?buckets? in an array. The ?signatures? vary - hence my use of a list variable (derived from a field) rather than hard-coding the plain text as literals. BTW Good spot on the asterisk wildcard characters in the contains example below. This is just a typo in the email - they?re not (among the numerous bugs!) in the real code. :-) Thanks again for the steer. Best, Keith > On 1 Nov 2018, at 10:34, Alex Tweedly via use-livecode wrote: > > Hi Keith, > > I think the simplest method would be (almost) your second attempt below. However, you were using "*est*" - i.e. with the '*'s before and after the phrase, which is what you would need for 'filter' but not for 'contains'. So it should work with just > >> put ?my test phrase? into myTestPhrase >> put ?est? & cr & ?phr? into tSubstrings >> >> repeat for each line L in tSubstrings >> if myTestPhrase contains L then answer ?true? >> end repeat > There's almost certainly also a way of doing it in a single pass using regex - but I'm not brave enough to go there :-) > > Are you expecting reallylarge strings to search ? Or really many phrases to search for ? > > "beware optimizing something that is just plain fast enough already" > > Alex. > > On 01/11/2018 09:41, Keith Clarke via use-livecode wrote: >> Folks, >> What is the most efficient way to test whether a variable containing a string such as ?my test phrase? contains one of several variable substrings, such as ?est? OR ?phr? OR... ? >> >> So far I?ve tried (without luck) approaches that simplify into... >> >> put ?my test phrase? into myTestPhrase >> put ?*est*? & cr & ?*phr*? into tSubstrings >> >> if myTestPhrase is among the lines of tSubstrings then answer ?true? >> >> repeat for each line L in tSubstrings >> if myTestPhrase contains L then answer ?true? >> end repeat >> >> Both seem to be failing - do I have the wrong syntax or approach to the problem? >> >> TIA >> Keith >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 dunbarx at aol.com Thu Nov 1 09:21:29 2018 From: dunbarx at aol.com (dunbarxx) Date: Thu, 1 Nov 2018 08:21:29 -0500 (CDT) Subject: Script works but still cast an error? In-Reply-To: <2E6CE8CD-438F-4405-88C0-A301EFAB9CD6@dsa-net.dk> References: <2E6CE8CD-438F-4405-88C0-A301EFAB9CD6@dsa-net.dk> Message-ID: <1541078489991-0.post@n4.nabble.com> Hmmm. I made a group with a subgroup and some fields. I placed a "start editing..." line in one of the fields and the subgroup. No issues with either upon mouseEnter. Have you looked at "the result" in each handler? Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From andrew at midwestcoastmedia.com Thu Nov 1 09:41:55 2018 From: andrew at midwestcoastmedia.com (andrew at midwestcoastmedia.com) Date: Thu, 01 Nov 2018 13:41:55 +0000 Subject: Tab between fields on mobile device Message-ID: <20181101134155.Horde.w7xhZM6PUrSCGECkngbmbLY@ua850258.serversignin.com> I'm trying to tab from field to field in a mobile app when pressing the TAB key on a bluetooth keyboard, but having no luck in an iOS app. My "on tabKey" code works fine in the IDE but not on the iPad. After closer inspection of the dictionary, I discovered that the tabKey handler is NOT supported by iOS. My attempt to use keyDown instead is thwarted because according to that dictionary entry: "If the key pressed is the Return, Tab, Backspace, Delete, or Enter key, an arrow key, or a function key, no keyDown message is sent. Instead, the returnKey, tabKey, backspaceKey, deleteKey, enterKey, arrowKey, or functionKey message is sent." This led me to try rawKeyDown. When running in IDE this gives me a proper key code (65289) but when running in iOS I'm returned a zero. on rawKeyDown tKeyName ## THIS ATTEMPTS TO MAKE THE tabKey CODE MOBILE FRIENDLY if tKeyName = 0 or tKeyName = 65289 then tabKey else pass rawKeyDown end if end rawKeyDown The code I hacked together will force a tab for a number of other special characters (from quick tests, almost every key combo of ALT and any other key returns 0 as well). I don't need to be too flexible (this is an in-house product only running on 1 specific model of iPad Pro) but am curious if there is a better way to approach this. --Andrew Bell From james at thehales.id.au Thu Nov 1 09:54:30 2018 From: james at thehales.id.au (James Hale) Date: Fri, 2 Nov 2018 00:54:30 +1100 Subject: Docset Reader released and updates to Make Docset and Livecode.Docset Message-ID: <8C8EC35C-19CD-45B2-AC81-8CCF4735739E@thehales.id.au> One of my other stacks "Make Docset" produces a Livecode package containing the complete dictionary API as well as all the guides that ship with each version of Livecode. This package can be read by DASH compatible readers that accept user contributed sources. However not all platforms currently have such apps. I have made "Docset Reader" to fill that void. I am hoping it will be simple enough for users to make as a standalone for their platform of choice. (Note: I am making this available for personal/non commercial use.) It is available on LivecodeShare. Note: it was made with LC 9.01 I have also updated "Make Docset" to V3.3 which finally corrects all "Associations" links. The DASH user-contributed version is now at v1.7.3 and has the corrected "Associations" as well. James From MikeKerner at roadrunner.com Thu Nov 1 10:13:43 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 1 Nov 2018 10:13:43 -0400 Subject: Tab between fields on mobile device In-Reply-To: <20181101134155.Horde.w7xhZM6PUrSCGECkngbmbLY@ua850258.serversignin.com> References: <20181101134155.Horde.w7xhZM6PUrSCGECkngbmbLY@ua850258.serversignin.com> Message-ID: Instead of using tab we use enterkey, that way both hardware and on-screen keyboards work. On Thu, Nov 1, 2018 at 9:42 AM Andrew Bell via use-livecode < use-livecode at lists.runrev.com> wrote: > I'm trying to tab from field to field in a mobile app when pressing > the TAB key on a bluetooth keyboard, but having no luck in an iOS app. > My "on tabKey" code works fine in the IDE but not on the iPad. > > After closer inspection of the dictionary, I discovered that the > tabKey handler is NOT supported by iOS. My attempt to use keyDown > instead is thwarted because according to that dictionary entry: "If > the key pressed is the Return, Tab, Backspace, Delete, or Enter key, > an arrow key, or a function key, no keyDown message is sent. Instead, > the returnKey, tabKey, backspaceKey, deleteKey, enterKey, arrowKey, or > functionKey message is sent." > > This led me to try rawKeyDown. When running in IDE this gives me a > proper key code (65289) but when running in iOS I'm returned a zero. > > on rawKeyDown tKeyName > ## THIS ATTEMPTS TO MAKE THE tabKey CODE MOBILE FRIENDLY > if tKeyName = 0 or tKeyName = 65289 then > tabKey > else > pass rawKeyDown > end if > end rawKeyDown > > The code I hacked together will force a tab for a number of other > special characters (from quick tests, almost every key combo of ALT > and any other key returns 0 as well). I don't need to be too flexible > (this is an in-house product only running on 1 specific model of iPad > Pro) but am curious if there is a better way to approach this. > > --Andrew Bell > > > > > _______________________________________________ > use-livecode mailing list > use-livecode 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 Bernd.Niggemann at uni-wh.de Thu Nov 1 11:27:53 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Thu, 1 Nov 2018 15:27:53 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: Message-ID: Hi Geoff, thank you for this beautiful script. I modified it a bit to accept multi-character search string and also for case sensitivity. It definitely is a lot faster for unicode text than anything I have seen. ----------------------------- function offsetList D,S, pCase -- returns a comma-delimited list of the offsets of D in S -- pCase is a boolean for caseSensitive set the caseSensitive to pCase set the itemDel to D put the length of D into tDelimLength repeat for each item i in S add length(i) + tDelimLength to C put C - (tDelimLength - 1),"" after R end repeat set the itemDel to comma if char -1 of S is D then return char 1 to -2 of R put length(C) + 1 into lenC put length(R) into lenR if lenC = lenR then return 0 return char 1 to lenR - lenC - 1 of R end offsetList ------------------------------ Kind regards Bernd > > Date: Thu, 1 Nov 2018 00:15:37 -0700 > From: Geoff Canyon > To: How to use LiveCode > Subject: Re: How to find the offset of the last instance of a > repeating character in a string? > > I was curious if using the itemDelimiter might work for this, so I wrote > the below code out of curiosity; but in my quick testing with single-byte > characters it was only about 30% faster than the above methods, so I didn't > bother to post it. > > But Ben Rubinstein just posted about a terrible slow-down doing pretty much > this same thing for text with unicode characters. So I ran a simple test > with 8000 character long strings that start with a single unicode > character, this is about 15x faster than offset() with skip. For > 100,000-character lines it's about 300x faster, so it seems to be immune to > the line-painter issues skip is subject to. So for what it's worth: > > function offsetList D,S > -- returns a comma-delimited list of the offsets of D in S > set the itemDel to D > repeat for each item i in S > add length(i) + 1 to C > put C,"" after R > end repeat > set the itemDel to comma > if char -1 of S is D then return char 1 to -2 of R > put length(C) + 1 into lenC > put length(R) into lenR > if lenC = lenR then return 0 > return char 1 to lenR - lenC - 1 of R > end offsetList > From brahma at hindu.org Thu Nov 1 12:39:42 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 1 Nov 2018 16:39:42 +0000 Subject: Mysteries of Me References: <7CE8E54D-8B3C-44DA-8264-0D597C5D42FB@iotecdigital.com> <125E4359-B727-4DCC-876D-19628DB4A51C@iotecdigital.com> <166cadea5a8.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Bob, that make sense. But why do need those handlers? What not just use "of this stack"? Obviously, I am oblivious to the number contexts where you require: "...created handlers that return the parent card or stack of an object." I am curious what they are? BR Bob Sneidar via use-livecode wrote: > Me is resolving correctly for me in stack, card and behavior scripts attached to them. The issue I think was that you cannot seem to reference card of me in a stack script handler. So I created handlers that return the parent card or stack of an object. The object can be the long id of a card even, when getting the parent stack, and that you can use in any reference so far as I know. > > All it's doing is forcing the full card ID or stack name resolution so the parser doesn't need to use fuzzy logic. > > Bob S - From brahma at hindu.org Thu Nov 1 12:58:45 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 1 Nov 2018 16:58:45 +0000 Subject: Browser widget and mailto link. References: <26AC9FDB-DB97-4DCA-B706-58C1A06B22ED@laposte.net> Message-ID: There is a known bug in iOS 12 that breaks the javascript handlers. I had to immediately ship a version of SivaSiva app, without the "Lexicon" -- which is an HTML5 package in the app, playing the browser widget -- I believe they have fixed it, and it will get in 9.0.2 rc 1. (any day now? but I can't find the bug report...Maybe Elanor but put it in...) then your code should work on iOS 12. On 10/30/18 11:33 PM, Ludovic THEBAULT via use-livecode wrote: > I?ve made a sample stack and opened a bug : https://quality.livecode.com/show_bug.cgi?id=21666 > > It?s work on android but not on iOS (12 at least). > here a table of what it work ?x' or not ?-? after my test (livecode 8 for windows) > > iOS Android Macos Win > Widget browser - x - - > Mobile browser x x > Browser (desktop) - x -- Svasti Astu, Be Well! Brahmanathaswami Get the SivaSiva app, it's free: https://www.himalayanacademy.com/apps/sivasiva From bobsneidar at iotecdigital.com Thu Nov 1 16:02:12 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 1 Nov 2018 20:02:12 +0000 Subject: Mysteries of Me In-Reply-To: References: <7CE8E54D-8B3C-44DA-8264-0D597C5D42FB@iotecdigital.com> <125E4359-B727-4DCC-876D-19628DB4A51C@iotecdigital.com> <166cadea5a8.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <437E7BF1-29BF-4944-9FEB-43A5F32AD40D@iotecdigital.com> Well the big thing it deals with is ambiguity. I have a number of substacks which are similar, like data entry forms for different tables in the database, and these have many controls, properties and scripts in common, but also some that are unique to that particular form. If only one of these "form" stacks were allowed to be open at one time, there would be no ambiguity, but I allow multiple "forms" to be opened at the same time, and when I was using modal stacks, this presented a problem. So if at the beginning of a handler I have: put getParentCard(the long id of me) into tParentCard -- returns the long id of the parent card put getParentStack(tParentCard) into tParentStack -- returns the long id of the parent stack then I can make references like so: button "btnNew" of tParentCard the databaseSettings of tParentStack dispatch updateSettings to tParentStack with "true", "all" Even if another substack is open modally or happens to be the topstack, or if I have an older version of the same application open in Livecode, there can be no ambiguity because everything is resolving to long ids. I am no longer relying on the fuzzy logic of the parser to figure out exactly which object, card or stack I am referring to. Bob S > On Nov 1, 2018, at 09:39 , Sannyasin Brahmanathaswami via use-livecode wrote: > > Bob, that make sense. But why do need those handlers? > > What not just use "of this stack"? > > Obviously, I am oblivious to the number contexts where you require: > > "...created handlers that return the parent card or stack of an object." > > I am curious what they are? > > BR > > Bob Sneidar via use-livecode wrote: >> Me is resolving correctly for me in stack, card and behavior scripts attached to them. The issue I think was that you cannot seem to reference card of me in a stack script handler. So I created handlers that return the parent card or stack of an object. The object can be the long id of a card even, when getting the parent stack, and that you can use in any reference so far as I know. >> >> All it's doing is forcing the full card ID or stack name resolution so the parser doesn't need to use fuzzy logic. >> >> Bob S From ambassador at fourthworld.com Thu Nov 1 17:38:30 2018 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 1 Nov 2018 14:38:30 -0700 Subject: SSL with HTTPD Library? In-Reply-To: References: Message-ID: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> Stephen MacLean wrote: > I?m looking to use the HTTPD library with an SSL Cert if possible. > > Is it possible? AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS. It should be possible to fork one of them to add that, but the effort would be non-trivial. What is the usage scenario you're aiming for? Perhaps could be solved through some other means. -- 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 Thu Nov 1 19:27:19 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 1 Nov 2018 23:27:19 +0000 Subject: Mysteries of Me In-Reply-To: <437E7BF1-29BF-4944-9FEB-43A5F32AD40D@iotecdigital.com> References: <7CE8E54D-8B3C-44DA-8264-0D597C5D42FB@iotecdigital.com> <125E4359-B727-4DCC-876D-19628DB4A51C@iotecdigital.com> <166cadea5a8.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <437E7BF1-29BF-4944-9FEB-43A5F32AD40D@iotecdigital.com> Message-ID: <2CB585A9-FA57-47D0-9175-369F4148BC34@iotecdigital.com> That should have been the full path to the stack. Bob S > On Nov 1, 2018, at 13:02 , Bob Sneidar via use-livecode wrote: > > put getParentStack(tParentCard) into tParentStack -- returns the long id of the parent stack From brian at milby7.com Thu Nov 1 19:28:36 2018 From: brian at milby7.com (Brian Milby) Date: Thu, 1 Nov 2018 18:28:36 -0500 Subject: tree view hide key In-Reply-To: <342071A4-683E-4C05-A277-D3FB7BB1FDE2@iotecdigital.com> References: <342071A4-683E-4C05-A277-D3FB7BB1FDE2@iotecdigital.com> Message-ID: Well, testing any of the fixes would require you to download the widget and build it as none of the 9.1 builds are out yet. I did have an idea about manual sorting of data in a tree view. I'll need to bounce it around in my head a bit to see if it would be workable. The basic idea would be to allow sorted lists of keys to be set for a parent node that would override the default sort. Double click to put data somewhere else should work - that is a message that is passed for leaf nodes. On Wed, Oct 31, 2018 at 6:04 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > You and others have addressed a lot of the work I think, and thank you for > that by the way. One of the things I would like to see is something akin to > findRecord and findIndex in a datagrid. Of course, finding something > several levels in requires that you would need to return not just a number, > but a root node with the path to the found item, so you can reference it in > the future, getting and setting anything in the "path". > > I wanted to create a list of items with a name and value, but then I > realized I wanted to rearrange them, moving them up and down in the list. I > also wanted to be able to double-click an item and put the value into > another field. I call the feature "QuickNotes" where I have a pallette like > stack I can double click text snippets to fill in a field with text I type > often, as in a copier installation. > > In the end I used a datagrid so no big deal, but it left me wondering why > I would ever use a tree view. But as you mentioned a lot of work is being > done on it now. I cannot switch over to 9.1 yet because I made a custom > change in the datagrid behavior which allows me to nest behaviors, so until > that gets bundled into a release I cannot test any new changes (at least > not with my current project). > > Bob S > > > > On Oct 30, 2018, at 15:47 , Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > What kind of work? Here are a couple that I can think of that are not > > easily addressed: > > - Arbitrary sort would take significant changes (a couple options: 2 > part > > key [1,firstkey], [2,asecondkey] or restructuring the array format to > > something like [key][title], [key][value] where the title and optionally > > value would be displayed and keys just used for sorting). > > - Inline editing is something that LCB doesn't support. > > > > My goal is to submit a PR today that will facilitate keyboard navigation > (I > > want to add a couple properties that can be controlled from LCS which can > > handle the keypresses). > > > > Several code changes are already completed and either merged (9.1) or > > waiting review. > > - Numeric sort will now also sort the non-number entries below the > numbers > > - If you select a row that is hidden by folding, it will expand to show > the > > row > > - You can have the selected item scroll into view when selected > > - When an element is added interactively, it can be configured to > > auto-select the new element > > - You can reset the fold state to collapse the entire tree (optionally > > setting the arrayData at the same time) > > - MouseUp no longer registers as a click when the MouseDown was on a > > different row > > > > I don't see anything else in the QCC for the Tree Widget that I can > address > > at the moment. > > > > Thanks, > > Brian > > > > On Tue, Oct 30, 2018 at 5:08 PM Bob Sneidar via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> Yeah I really tried to like the tree view widget but it needs work. > >> > >> Sent from my iPhone > >> > >>> On Oct 30, 2018, at 13:38, Mike Kerner via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >>> > >>> In tree view can you hide the keys of the array? I was messing with > >> using > >>> it to display directory and subdirectory contents, but it seems that > you > >>> have to display the key, which makes some other things more difficult. > >>> _______________________________________________ > >>> use-livecode mailing list > >>> use-livecode 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 monte at appisle.net Thu Nov 1 20:02:20 2018 From: monte at appisle.net (Monte Goulding) Date: Fri, 2 Nov 2018 11:02:20 +1100 Subject: SSL with HTTPD Library? In-Reply-To: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> References: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> Message-ID: <0D0361E4-C169-41BF-B692-B17516ADA0BD@appisle.net> As it?s not documented I?m not 100% sure it works or anyone has tried it but it seems at some point `accept secure connections` was implemented. The syntax declaration for `accept` should be: accept [{ secure | datagram }] connections on port with message [{ with | without } verification] I can see for sure there is a bug meaning you can?t turn on verification using `with verification`. Really I think the command would need further enhancement to add the optional: with certificate and private key That would presume the rest of the certificate chain is in the sslCertificates I think. See reports: https://quality.livecode.com/show_bug.cgi?id=13410 https://quality.livecode.com/show_bug.cgi?id=16871 https://quality.livecode.com/show_bug.cgi?id=13681 Cheers Monte > On 2 Nov 2018, at 8:38 am, Richard Gaskin via use-livecode wrote: > > Stephen MacLean wrote: > > > I?m looking to use the HTTPD library with an SSL Cert if possible. > > > > Is it possible? > > AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS. It should be possible to fork one of them to add that, but the effort would be non-trivial. > > What is the usage scenario you're aiming for? Perhaps could be solved through some other means. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From gcanyon at gmail.com Thu Nov 1 20:04:13 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Thu, 1 Nov 2018 17:04:13 -0700 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: Message-ID: Nice! I *just* finished creating a github repository for it, and adding support for multi-char search strings, much as you did. I was coming to the list to post the update when I saw your post. Here's the GitHub link: https://github.com/gcanyon/offsetlist Here's my updated version: function offsetList D,S,pCase -- returns a comma-delimited list of the offsets of D in S set the caseSensitive to pCase is true set the itemDel to D put length(D) into dLength put 1 - dLength into C repeat for each item i in S add length(i) + dLength to C put C,"" after R end repeat set the itemDel to comma if char -dLength to -1 of S is D then return char 1 to -2 of R put length(C) + 1 into lenC put length(R) into lenR if lenC = lenR then return 0 return char 1 to lenR - lenC - 1 of R end offsetList On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Geoff, > > thank you for this beautiful script. > > I modified it a bit to accept multi-character search string and also for > case sensitivity. > > It definitely is a lot faster for unicode text than anything I have seen. > > ----------------------------- > function offsetList D,S, pCase > -- returns a comma-delimited list of the offsets of D in S > -- pCase is a boolean for caseSensitive > set the caseSensitive to pCase > set the itemDel to D > put the length of D into tDelimLength > repeat for each item i in S > add length(i) + tDelimLength to C > put C - (tDelimLength - 1),"" after R > end repeat > set the itemDel to comma > if char -1 of S is D then return char 1 to -2 of R > put length(C) + 1 into lenC > put length(R) into lenR > if lenC = lenR then return 0 > return char 1 to lenR - lenC - 1 of R > end offsetList > ------------------------------ > > Kind regards > Bernd > > > > > > > > > Date: Thu, 1 Nov 2018 00:15:37 -0700 > > From: Geoff Canyon > > To: How to use LiveCode > > Subject: Re: How to find the offset of the last instance of a > > repeating character in a string? > > > > I was curious if using the itemDelimiter might work for this, so I wrote > > the below code out of curiosity; but in my quick testing with single-byte > > characters it was only about 30% faster than the above methods, so I > didn't > > bother to post it. > > > > But Ben Rubinstein just posted about a terrible slow-down doing pretty > much > > this same thing for text with unicode characters. So I ran a simple test > > with 8000 character long strings that start with a single unicode > > character, this is about 15x faster than offset() with skip. For > > 100,000-character lines it's about 300x faster, so it seems to be immune > to > > the line-painter issues skip is subject to. So for what it's worth: > > > > function offsetList D,S > > -- returns a comma-delimited list of the offsets of D in S > > set the itemDel to D > > repeat for each item i in S > > add length(i) + 1 to C > > put C,"" after R > > end repeat > > set the itemDel to comma > > if char -1 of S is D then return char 1 to -2 of R > > put length(C) + 1 into lenC > > put length(R) into lenR > > if lenC = lenR then return 0 > > return char 1 to lenR - lenC - 1 of R > > end offsetList > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From smaclean at madmansoft.com Thu Nov 1 23:02:26 2018 From: smaclean at madmansoft.com (Stephen MacLean) Date: Thu, 1 Nov 2018 23:02:26 -0400 Subject: SSL with HTTPD Library? In-Reply-To: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> References: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> Message-ID: <33FAB28C-FEBF-4E4A-A19D-DC335178FC69@madmansoft.com> > On Nov 1, 2018, at 5:38 PM, Richard Gaskin via use-livecode wrote: > > Stephen MacLean wrote: > > > I?m looking to use the HTTPD library with an SSL Cert if possible. > > > > Is it possible? > > AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS. It should be possible to fork one of them to add that, but the effort would be non-trivial. > > What is the usage scenario you're aiming for? Perhaps could be solved through some other means. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > ____________________________________________________________________ > Ambassador at FourthWorld.com http://www.FourthWorld.com Hi Richard, Thanks for the reply. Specifically I was referring to the HTTPD Library included with LC 9. And yes, it doesn?t look like it supports SSL, as Monte points out in a later email (I?m the submitter on 16871). It?s a shame, since it?s really light, FAST, and straight forward to implement. My use case is a self-service ad sales and serving system. It would be strictly for handling JS calls and pointing to the ad image that?s served from a real web server, while recording the impression and click through. I need, as would others, this to be handled via SSL to keep browser security from yelling. I realize that there are a number of other technologies I could use, but have been enjoying building so much in LC, was hoping to keep it all in the family. Yes, I could set up an LC server instance, i do have a business license, but am disappointed that it doesn?t work with IIS / I need to run Apache under Windows, or use it on Linux. Will I do run several linux (Unbuntu) instances, I?d prefer not to add another VM. I would hope that these kinds of server uses are looked at really hard by LC. Direct server tech such as this is such natural fit for LC. LC server, can do it, but also suffers, from what I?ve read in my research, a speed penalty from CGI implementation vs direct sockets, etc. Thanks again for the reply, appreciate all you do for the LC community. If you have any suggestions, I would appreciate hearing them. Best, Steve MacLean From smaclean at madmansoft.com Thu Nov 1 23:05:07 2018 From: smaclean at madmansoft.com (Stephen MacLean) Date: Thu, 1 Nov 2018 23:05:07 -0400 Subject: SSL with HTTPD Library? In-Reply-To: <0D0361E4-C169-41BF-B692-B17516ADA0BD@appisle.net> References: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> <0D0361E4-C169-41BF-B692-B17516ADA0BD@appisle.net> Message-ID: Hi Monte, Not sure on this, or if it was implemented? I was the submitter on 16871. I agree with your enhancement to the command, pretty similar to other implementations I?ve seen. Best, Steve MacLean > On Nov 1, 2018, at 8:02 PM, Monte Goulding via use-livecode wrote: > > As it?s not documented I?m not 100% sure it works or anyone has tried it but it seems at some point `accept secure connections` was implemented. > > The syntax declaration for `accept` should be: > > accept [{ secure | datagram }] connections on port with message [{ with | without } verification] > > I can see for sure there is a bug meaning you can?t turn on verification using `with verification`. > > Really I think the command would need further enhancement to add the optional: > > with certificate and private key > > That would presume the rest of the certificate chain is in the sslCertificates I think. > > See reports: > https://quality.livecode.com/show_bug.cgi?id=13410 > https://quality.livecode.com/show_bug.cgi?id=16871 > https://quality.livecode.com/show_bug.cgi?id=13681 > > Cheers > > Monte > >> On 2 Nov 2018, at 8:38 am, Richard Gaskin via use-livecode wrote: >> >> Stephen MacLean wrote: >> >>> I?m looking to use the HTTPD library with an SSL Cert if possible. >>> >>> Is it possible? >> >> AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS. It should be possible to fork one of them to add that, but the effort would be non-trivial. >> >> What is the usage scenario you're aiming for? Perhaps could be solved through some other means. >> >> -- >> 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 > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Thu Nov 1 23:19:22 2018 From: james at thehales.id.au (James At The Hale) Date: Fri, 2 Nov 2018 14:19:22 +1100 Subject: Docset Reader released and updates to Make Docset and Livecode.Docset Message-ID: Pardon my mental hiccup in making a stack for non MacOS which looks for a file package that only exists under MacOS. I have uploaded a new version of the reader that depending on the platform looks for and moves either a file (MacOS) or folder (non MacOS). I have also altered the startup so that the stack doesn?t quit if you do not load a docset. James From MikeKerner at roadrunner.com Fri Nov 2 08:57:26 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 2 Nov 2018 08:57:26 -0400 Subject: tree view hide key In-Reply-To: References: <342071A4-683E-4C05-A277-D3FB7BB1FDE2@iotecdigital.com> Message-ID: what is the PR for this version? On Thu, Nov 1, 2018 at 7:29 PM Brian Milby via use-livecode < use-livecode at lists.runrev.com> wrote: > Well, testing any of the fixes would require you to download the widget and > build it as none of the 9.1 builds are out yet. > > I did have an idea about manual sorting of data in a tree view. I'll need > to bounce it around in my head a bit to see if it would be workable. The > basic idea would be to allow sorted lists of keys to be set for a parent > node that would override the default sort. > > Double click to put data somewhere else should work - that is a message > that is passed for leaf nodes. > > On Wed, Oct 31, 2018 at 6:04 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > You and others have addressed a lot of the work I think, and thank you > for > > that by the way. One of the things I would like to see is something akin > to > > findRecord and findIndex in a datagrid. Of course, finding something > > several levels in requires that you would need to return not just a > number, > > but a root node with the path to the found item, so you can reference it > in > > the future, getting and setting anything in the "path". > > > > I wanted to create a list of items with a name and value, but then I > > realized I wanted to rearrange them, moving them up and down in the > list. I > > also wanted to be able to double-click an item and put the value into > > another field. I call the feature "QuickNotes" where I have a pallette > like > > stack I can double click text snippets to fill in a field with text I > type > > often, as in a copier installation. > > > > In the end I used a datagrid so no big deal, but it left me wondering why > > I would ever use a tree view. But as you mentioned a lot of work is being > > done on it now. I cannot switch over to 9.1 yet because I made a custom > > change in the datagrid behavior which allows me to nest behaviors, so > until > > that gets bundled into a release I cannot test any new changes (at least > > not with my current project). > > > > Bob S > > > > > > > On Oct 30, 2018, at 15:47 , Brian Milby via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > > What kind of work? Here are a couple that I can think of that are not > > > easily addressed: > > > - Arbitrary sort would take significant changes (a couple options: 2 > > part > > > key [1,firstkey], [2,asecondkey] or restructuring the array format to > > > something like [key][title], [key][value] where the title and > optionally > > > value would be displayed and keys just used for sorting). > > > - Inline editing is something that LCB doesn't support. > > > > > > My goal is to submit a PR today that will facilitate keyboard > navigation > > (I > > > want to add a couple properties that can be controlled from LCS which > can > > > handle the keypresses). > > > > > > Several code changes are already completed and either merged (9.1) or > > > waiting review. > > > - Numeric sort will now also sort the non-number entries below the > > numbers > > > - If you select a row that is hidden by folding, it will expand to show > > the > > > row > > > - You can have the selected item scroll into view when selected > > > - When an element is added interactively, it can be configured to > > > auto-select the new element > > > - You can reset the fold state to collapse the entire tree (optionally > > > setting the arrayData at the same time) > > > - MouseUp no longer registers as a click when the MouseDown was on a > > > different row > > > > > > I don't see anything else in the QCC for the Tree Widget that I can > > address > > > at the moment. > > > > > > Thanks, > > > Brian > > > > > > On Tue, Oct 30, 2018 at 5:08 PM Bob Sneidar via use-livecode < > > > use-livecode at lists.runrev.com> wrote: > > > > > >> Yeah I really tried to like the tree view widget but it needs work. > > >> > > >> Sent from my iPhone > > >> > > >>> On Oct 30, 2018, at 13:38, Mike Kerner via use-livecode < > > >> use-livecode at lists.runrev.com> wrote: > > >>> > > >>> In tree view can you hide the keys of the array? I was messing with > > >> using > > >>> it to display directory and subdirectory contents, but it seems that > > you > > >>> have to display the key, which makes some other things more > difficult. > > >>> _______________________________________________ > > >>> use-livecode mailing list > > >>> use-livecode 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 > -- 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 brian at milby7.com Fri Nov 2 09:12:00 2018 From: brian at milby7.com (Brian Milby) Date: Fri, 2 Nov 2018 08:12:00 -0500 Subject: tree view hide key In-Reply-To: References: <342071A4-683E-4C05-A277-D3FB7BB1FDE2@iotecdigital.com> Message-ID: There are two PRs currently in progress. 6764 and 6770. Neither address the custom sort (just an idea at this point, have not gotten to the code point). Thanks, Brian On Nov 2, 2018, 7:58 AM -0500, Mike Kerner via use-livecode , wrote: > what is the PR for this version? > > On Thu, Nov 1, 2018 at 7:29 PM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Well, testing any of the fixes would require you to download the widget and > > build it as none of the 9.1 builds are out yet. > > > > I did have an idea about manual sorting of data in a tree view. I'll need > > to bounce it around in my head a bit to see if it would be workable. The > > basic idea would be to allow sorted lists of keys to be set for a parent > > node that would override the default sort. > > > > Double click to put data somewhere else should work - that is a message > > that is passed for leaf nodes. > > > > On Wed, Oct 31, 2018 at 6:04 PM Bob Sneidar via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > You and others have addressed a lot of the work I think, and thank you > > for > > > that by the way. One of the things I would like to see is something akin > > to > > > findRecord and findIndex in a datagrid. Of course, finding something > > > several levels in requires that you would need to return not just a > > number, > > > but a root node with the path to the found item, so you can reference it > > in > > > the future, getting and setting anything in the "path". > > > > > > I wanted to create a list of items with a name and value, but then I > > > realized I wanted to rearrange them, moving them up and down in the > > list. I > > > also wanted to be able to double-click an item and put the value into > > > another field. I call the feature "QuickNotes" where I have a pallette > > like > > > stack I can double click text snippets to fill in a field with text I > > type > > > often, as in a copier installation. > > > > > > In the end I used a datagrid so no big deal, but it left me wondering why > > > I would ever use a tree view. But as you mentioned a lot of work is being > > > done on it now. I cannot switch over to 9.1 yet because I made a custom > > > change in the datagrid behavior which allows me to nest behaviors, so > > until > > > that gets bundled into a release I cannot test any new changes (at least > > > not with my current project). > > > > > > Bob S > > > > > > > > > > On Oct 30, 2018, at 15:47 , Brian Milby via use-livecode < > > > use-livecode at lists.runrev.com> wrote: > > > > > > > > What kind of work? Here are a couple that I can think of that are not > > > > easily addressed: > > > > - Arbitrary sort would take significant changes (a couple options: 2 > > > part > > > > key [1,firstkey], [2,asecondkey] or restructuring the array format to > > > > something like [key][title], [key][value] where the title and > > optionally > > > > value would be displayed and keys just used for sorting). > > > > - Inline editing is something that LCB doesn't support. > > > > > > > > My goal is to submit a PR today that will facilitate keyboard > > navigation > > > (I > > > > want to add a couple properties that can be controlled from LCS which > > can > > > > handle the keypresses). > > > > > > > > Several code changes are already completed and either merged (9.1) or > > > > waiting review. > > > > - Numeric sort will now also sort the non-number entries below the > > > numbers > > > > - If you select a row that is hidden by folding, it will expand to show > > > the > > > > row > > > > - You can have the selected item scroll into view when selected > > > > - When an element is added interactively, it can be configured to > > > > auto-select the new element > > > > - You can reset the fold state to collapse the entire tree (optionally > > > > setting the arrayData at the same time) > > > > - MouseUp no longer registers as a click when the MouseDown was on a > > > > different row > > > > > > > > I don't see anything else in the QCC for the Tree Widget that I can > > > address > > > > at the moment. > > > > > > > > Thanks, > > > > Brian > > > > > > > > On Tue, Oct 30, 2018 at 5:08 PM Bob Sneidar via use-livecode < > > > > use-livecode at lists.runrev.com> wrote: > > > > > > > > > Yeah I really tried to like the tree view widget but it needs work. > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > On Oct 30, 2018, at 13:38, Mike Kerner via use-livecode < > > > > > use-livecode at lists.runrev.com> wrote: > > > > > > > > > > > > In tree view can you hide the keys of the array? I was messing with > > > > > using > > > > > > it to display directory and subdirectory contents, but it seems that > > > you > > > > > > have to display the key, which makes some other things more > > difficult. > > > > > > _______________________________________________ > > > > > > use-livecode mailing list > > > > > > use-livecode 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 > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brahma at hindu.org Fri Nov 2 10:37:23 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Fri, 2 Nov 2018 14:37:23 +0000 Subject: Mysteries of Me References: <7CE8E54D-8B3C-44DA-8264-0D597C5D42FB@iotecdigital.com> <125E4359-B727-4DCC-876D-19628DB4A51C@iotecdigital.com> <166cadea5a8.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <437E7BF1-29BF-4944-9FEB-43A5F32AD40D@iotecdigital.com> Message-ID: That make good sense I may use it some day. It would allow more handlers in a common back script/library that did the same thing (anything) when called from different modules (stacks) On 11/1/18 10:02 AM, Bob Sneidar via use-livecode wrote: > Well the big thing it deals with is ambiguity. I have a number of substacks which are similar, like data entry forms for different tables in the database, and these have many controls, properties and scripts in common, but also some that are unique to that particular form. If only one of these "form" stacks were allowed to be open at one time, there would be no ambiguity, but I allow multiple "forms" to be opened at the same time, and when I was using modal stacks, this presented a problem. So if at the beginning of a handler I have: > > put getParentCard(the long id of me) into tParentCard -- returns the long id of the parent card > put getParentStack(tParentCard) into tParentStack -- returns the long id of the parent stack > > then I can make references like so: > > button "btnNew" of tParentCard > the databaseSettings of tParentStack > dispatch updateSettings to tParentStack with "true", "all" > > Even if another substack is open modally or happens to be the topstack, or if I have an older version of the same application open in Livecode, there can be no ambiguity because everything is resolving to long ids. I am no longer relying on the fuzzy logic of the parser to figure out exactly which object, card or stack I am referring to. > > Bob S -- Svasti Astu, Be Well! Brahmanathaswami Get the SivaSiva app, it's free: https://www.himalayanacademy.com/apps/sivasiva From bobsneidar at iotecdigital.com Fri Nov 2 10:40:53 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 2 Nov 2018 14:40:53 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: Message-ID: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> It probably should be named listOffset, like itemOffset or lineOffset. Bob S > On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode wrote: > > Nice! I *just* finished creating a github repository for it, and adding > support for multi-char search strings, much as you did. I was coming to the > list to post the update when I saw your post. > > Here's the GitHub link: https://github.com/gcanyon/offsetlist > > Here's my updated version: > > function offsetList D,S,pCase > -- returns a comma-delimited list of the offsets of D in S > set the caseSensitive to pCase is true > set the itemDel to D > put length(D) into dLength > put 1 - dLength into C > repeat for each item i in S > add length(i) + dLength to C > put C,"" after R > end repeat > set the itemDel to comma > if char -dLength to -1 of S is D then return char 1 to -2 of R > put length(C) + 1 into lenC > put length(R) into lenR > if lenC = lenR then return 0 > return char 1 to lenR - lenC - 1 of R > end offsetList > > On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi Geoff, >> >> thank you for this beautiful script. >> >> I modified it a bit to accept multi-character search string and also for >> case sensitivity. >> >> It definitely is a lot faster for unicode text than anything I have seen. >> >> ----------------------------- >> function offsetList D,S, pCase >> -- returns a comma-delimited list of the offsets of D in S >> -- pCase is a boolean for caseSensitive >> set the caseSensitive to pCase >> set the itemDel to D >> put the length of D into tDelimLength >> repeat for each item i in S >> add length(i) + tDelimLength to C >> put C - (tDelimLength - 1),"" after R >> end repeat >> set the itemDel to comma >> if char -1 of S is D then return char 1 to -2 of R >> put length(C) + 1 into lenC >> put length(R) into lenR >> if lenC = lenR then return 0 >> return char 1 to lenR - lenC - 1 of R >> end offsetList >> ------------------------------ >> >> Kind regards >> Bernd >> >> >> >> >> >>> >>> Date: Thu, 1 Nov 2018 00:15:37 -0700 >>> From: Geoff Canyon >>> To: How to use LiveCode >>> Subject: Re: How to find the offset of the last instance of a >>> repeating character in a string? >>> >>> I was curious if using the itemDelimiter might work for this, so I wrote >>> the below code out of curiosity; but in my quick testing with single-byte >>> characters it was only about 30% faster than the above methods, so I >> didn't >>> bother to post it. >>> >>> But Ben Rubinstein just posted about a terrible slow-down doing pretty >> much >>> this same thing for text with unicode characters. So I ran a simple test >>> with 8000 character long strings that start with a single unicode >>> character, this is about 15x faster than offset() with skip. For >>> 100,000-character lines it's about 300x faster, so it seems to be immune >> to >>> the line-painter issues skip is subject to. So for what it's worth: >>> >>> function offsetList D,S >>> -- returns a comma-delimited list of the offsets of D in S >>> set the itemDel to D >>> repeat for each item i in S >>> add length(i) + 1 to C >>> put C,"" after R >>> end repeat >>> set the itemDel to comma >>> if char -1 of S is D then return char 1 to -2 of R >>> put length(C) + 1 into lenC >>> put length(R) into lenR >>> if lenC = lenR then return 0 >>> return char 1 to lenR - lenC - 1 of R >>> end offsetList >>> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 gcanyon at gmail.com Fri Nov 2 12:16:20 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Fri, 2 Nov 2018 09:16:20 -0700 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: All of those return a single value; I wanted to convey the concept of returning multiple values. To me listOffset implies it does the same thing as itemOffset, since items come in a list. How about: offsets -- not my favorite because it's almost indistinguishable from offset offsetsOf -- seems a tad clumsy On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > It probably should be named listOffset, like itemOffset or lineOffset. > > Bob S > > > > On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Nice! I *just* finished creating a github repository for it, and adding > > support for multi-char search strings, much as you did. I was coming to > the > > list to post the update when I saw your post. > > > > Here's the GitHub link: https://github.com/gcanyon/offsetlist > > > > Here's my updated version: > > > > function offsetList D,S,pCase > > -- returns a comma-delimited list of the offsets of D in S > > set the caseSensitive to pCase is true > > set the itemDel to D > > put length(D) into dLength > > put 1 - dLength into C > > repeat for each item i in S > > add length(i) + dLength to C > > put C,"" after R > > end repeat > > set the itemDel to comma > > if char -dLength to -1 of S is D then return char 1 to -2 of R > > put length(C) + 1 into lenC > > put length(R) into lenR > > if lenC = lenR then return 0 > > return char 1 to lenR - lenC - 1 of R > > end offsetList > > > > On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> Hi Geoff, > >> > >> thank you for this beautiful script. > >> > >> I modified it a bit to accept multi-character search string and also for > >> case sensitivity. > >> > >> It definitely is a lot faster for unicode text than anything I have > seen. > >> > >> ----------------------------- > >> function offsetList D,S, pCase > >> -- returns a comma-delimited list of the offsets of D in S > >> -- pCase is a boolean for caseSensitive > >> set the caseSensitive to pCase > >> set the itemDel to D > >> put the length of D into tDelimLength > >> repeat for each item i in S > >> add length(i) + tDelimLength to C > >> put C - (tDelimLength - 1),"" after R > >> end repeat > >> set the itemDel to comma > >> if char -1 of S is D then return char 1 to -2 of R > >> put length(C) + 1 into lenC > >> put length(R) into lenR > >> if lenC = lenR then return 0 > >> return char 1 to lenR - lenC - 1 of R > >> end offsetList > >> ------------------------------ > >> > >> Kind regards > >> Bernd > >> > >> > >> > >> > >> > >>> > >>> Date: Thu, 1 Nov 2018 00:15:37 -0700 > >>> From: Geoff Canyon > >>> To: How to use LiveCode > >>> Subject: Re: How to find the offset of the last instance of a > >>> repeating character in a string? > >>> > >>> I was curious if using the itemDelimiter might work for this, so I > wrote > >>> the below code out of curiosity; but in my quick testing with > single-byte > >>> characters it was only about 30% faster than the above methods, so I > >> didn't > >>> bother to post it. > >>> > >>> But Ben Rubinstein just posted about a terrible slow-down doing pretty > >> much > >>> this same thing for text with unicode characters. So I ran a simple > test > >>> with 8000 character long strings that start with a single unicode > >>> character, this is about 15x faster than offset() with skip. For > >>> 100,000-character lines it's about 300x faster, so it seems to be > immune > >> to > >>> the line-painter issues skip is subject to. So for what it's worth: > >>> > >>> function offsetList D,S > >>> -- returns a comma-delimited list of the offsets of D in S > >>> set the itemDel to D > >>> repeat for each item i in S > >>> add length(i) + 1 to C > >>> put C,"" after R > >>> end repeat > >>> set the itemDel to comma > >>> if char -1 of S is D then return char 1 to -2 of R > >>> put length(C) + 1 into lenC > >>> put length(R) into lenR > >>> if lenC = lenR then return 0 > >>> return char 1 to lenR - lenC - 1 of R > >>> end offsetList > >>> > >> > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode 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 Nov 2 15:16:52 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 2 Nov 2018 19:16:52 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: how about allOffsets? Bob S > On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode wrote: > > All of those return a single value; I wanted to convey the concept of > returning multiple values. To me listOffset implies it does the same thing > as itemOffset, since items come in a list. How about: > > offsets -- not my favorite because it's almost indistinguishable from offset > offsetsOf -- seems a tad clumsy > > On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> It probably should be named listOffset, like itemOffset or lineOffset. >> >> Bob S >> >> >>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> Nice! I *just* finished creating a github repository for it, and adding >>> support for multi-char search strings, much as you did. I was coming to >> the >>> list to post the update when I saw your post. >>> >>> Here's the GitHub link: https://github.com/gcanyon/offsetlist >>> >>> Here's my updated version: >>> >>> function offsetList D,S,pCase >>> -- returns a comma-delimited list of the offsets of D in S >>> set the caseSensitive to pCase is true >>> set the itemDel to D >>> put length(D) into dLength >>> put 1 - dLength into C >>> repeat for each item i in S >>> add length(i) + dLength to C >>> put C,"" after R >>> end repeat >>> set the itemDel to comma >>> if char -dLength to -1 of S is D then return char 1 to -2 of R >>> put length(C) + 1 into lenC >>> put length(R) into lenR >>> if lenC = lenR then return 0 >>> return char 1 to lenR - lenC - 1 of R >>> end offsetList >>> >>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>>> Hi Geoff, >>>> >>>> thank you for this beautiful script. >>>> >>>> I modified it a bit to accept multi-character search string and also for >>>> case sensitivity. >>>> >>>> It definitely is a lot faster for unicode text than anything I have >> seen. >>>> >>>> ----------------------------- >>>> function offsetList D,S, pCase >>>> -- returns a comma-delimited list of the offsets of D in S >>>> -- pCase is a boolean for caseSensitive >>>> set the caseSensitive to pCase >>>> set the itemDel to D >>>> put the length of D into tDelimLength >>>> repeat for each item i in S >>>> add length(i) + tDelimLength to C >>>> put C - (tDelimLength - 1),"" after R >>>> end repeat >>>> set the itemDel to comma >>>> if char -1 of S is D then return char 1 to -2 of R >>>> put length(C) + 1 into lenC >>>> put length(R) into lenR >>>> if lenC = lenR then return 0 >>>> return char 1 to lenR - lenC - 1 of R >>>> end offsetList >>>> ------------------------------ >>>> >>>> Kind regards >>>> Bernd >>>> >>>> >>>> >>>> >>>> >>>>> >>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 >>>>> From: Geoff Canyon >>>>> To: How to use LiveCode >>>>> Subject: Re: How to find the offset of the last instance of a >>>>> repeating character in a string? >>>>> >>>>> I was curious if using the itemDelimiter might work for this, so I >> wrote >>>>> the below code out of curiosity; but in my quick testing with >> single-byte >>>>> characters it was only about 30% faster than the above methods, so I >>>> didn't >>>>> bother to post it. >>>>> >>>>> But Ben Rubinstein just posted about a terrible slow-down doing pretty >>>> much >>>>> this same thing for text with unicode characters. So I ran a simple >> test >>>>> with 8000 character long strings that start with a single unicode >>>>> character, this is about 15x faster than offset() with skip. For >>>>> 100,000-character lines it's about 300x faster, so it seems to be >> immune >>>> to >>>>> the line-painter issues skip is subject to. So for what it's worth: >>>>> >>>>> function offsetList D,S >>>>> -- returns a comma-delimited list of the offsets of D in S >>>>> set the itemDel to D >>>>> repeat for each item i in S >>>>> add length(i) + 1 to C >>>>> put C,"" after R >>>>> end repeat >>>>> set the itemDel to comma >>>>> if char -1 of S is D then return char 1 to -2 of R >>>>> put length(C) + 1 into lenC >>>>> put length(R) into lenR >>>>> if lenC = lenR then return 0 >>>>> return char 1 to lenR - lenC - 1 of R >>>>> end offsetList >>>>> >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at lists.runrev.com >>>> Please visit this url to subscribe, unsubscribe and manage your >>>> subscription preferences: >>>> http://lists.runrev.com/mailman/listinfo/use-livecode >>>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From klaus at major-k.de Fri Nov 2 16:13:11 2018 From: klaus at major-k.de (Klaus major-k) Date: Fri, 2 Nov 2018 21:13:11 +0100 Subject: Sorting datagrid column with a tricj? Message-ID: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> Hi all, given a datagrid (table) with three columns C1 -> visible C2 -> visible C3 -> invisible column Is it possible to sort a datagrid by column C3, although the user has clicked the header of column C2. Know what I mean? If this is possible, any hints on how to do this are highly appreciated. Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From klaus at major-k.de Fri Nov 2 16:27:03 2018 From: klaus at major-k.de (Klaus major-k) Date: Fri, 2 Nov 2018 21:27:03 +0100 Subject: Sorting datagrid column with a tricj? In-Reply-To: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> Message-ID: <9DADE465-1842-4ACD-96DC-CFD259F250DE@major-k.de> Hi all, > Am 02.11.2018 um 21:13 schrieb Klaus major-k via use-livecode : > > Hi all, > > given a datagrid (table) with three columns > C1 -> visible > C2 -> visible > C3 -> invisible column > > Is it possible to sort a datagrid by column C3, although > the user has clicked the header of column C2. > Know what I mean? > > If this is possible, any hints on how to do this are highly appreciated. I treid this one, which works, but the header of column "C2" does not change to reflect the sort direction, it looks like inactive. Know what I mean? So any clever hints or workaround still appreciated. Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From klaus at major-k.de Fri Nov 2 16:29:38 2018 From: klaus at major-k.de (Klaus major-k) Date: Fri, 2 Nov 2018 21:29:38 +0100 Subject: Sorting datagrid column with a tricj? In-Reply-To: <9DADE465-1842-4ACD-96DC-CFD259F250DE@major-k.de> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <9DADE465-1842-4ACD-96DC-CFD259F250DE@major-k.de> Message-ID: > Am 02.11.2018 um 21:27 schrieb Klaus major-k via use-livecode : > > Hi all, > >> Am 02.11.2018 um 21:13 schrieb Klaus major-k via use-livecode : >> >> Hi all, >> >> given a datagrid (table) with three columns >> C1 -> visible >> C2 -> visible >> C3 -> invisible column >> >> Is it possible to sort a datagrid by column C3, although >> the user has clicked the header of column C2. >> Know what I mean? >> >> If this is possible, any hints on how to do this are highly appreciated. > > I tried this one, which works, but the header of column "C2" does not change > to reflect the sort direction, it looks like inactive. Know what I mean? Of course posting the script will help. 8-) ---------------------------------------------- on SortDataGridColumn pColumn if pColumn = "C2" then dispatch "SortByColumn" to me with "C3" else pass SortDataGridColumn end if end SortDataGridColumn -------------------------------------------- -- Klaus Major http://www.major-k.de klaus at major-k.de From bobsneidar at iotecdigital.com Fri Nov 2 17:14:17 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 2 Nov 2018 21:14:17 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> Message-ID: <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them. Bob S > On Nov 2, 2018, at 13:13 , Klaus major-k via use-livecode wrote: > > Hi all, > > given a datagrid (table) with three columns > C1 -> visible > C2 -> visible > C3 -> invisible column > > Is it possible to sort a datagrid by column C3, although > the user has clicked the header of column C2. > Know what I mean? > > If this is possible, any hints on how to do this are highly appreciated. > > > Best > > Klaus > > -- > Klaus Major > http://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 Fri Nov 2 17:26:43 2018 From: klaus at major-k.de (Klaus major-k) Date: Fri, 2 Nov 2018 22:26:43 +0100 Subject: Sorting datagrid column with a tricj? In-Reply-To: <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> Message-ID: <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> Hi Bob, > Am 02.11.2018 um 22:14 schrieb Bob Sneidar via use-livecode : > > There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. I was afraid of that. > If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them. We have a german app for Android and LC on Android still does not support "system date"! :-/ So I wanted to fake sorting a column with long german dates by sorting by a hidden column with an english date. Will have to roll my own with list fields. Thank you! > Bob S Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From bobsneidar at iotecdigital.com Fri Nov 2 17:42:37 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 2 Nov 2018 21:42:37 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> Message-ID: <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> In a table datagrid, can't you edit the column template so that you can control what goes into the field for that column? I think the underlying data will remain the same, but what goes into the field is what you put there. I suspect the datagrid will then sort by the underlying data, not the displayed data. I have a similar issue with SQL formatted dates, but I want to display them as long dates. I'll toy around with this and see what I come up with. Bob S > On Nov 2, 2018, at 14:26 , Klaus major-k via use-livecode wrote: > > Hi Bob, > >> Am 02.11.2018 um 22:14 schrieb Bob Sneidar via use-livecode : >> >> There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. > > I was afraid of that. > >> If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them. > > We have a german app for Android and LC on Android still does not support "system date"! :-/ > So I wanted to fake sorting a column with long german dates by sorting by a hidden column with an english date. > Will have to roll my own with list fields. > > Thank you! > >> Bob S > > Best > > Klaus > > > -- > Klaus Major > http://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 mike at golddogcoffee.com Fri Nov 2 17:48:47 2018 From: mike at golddogcoffee.com (Mike for GDC) Date: Fri, 2 Nov 2018 15:48:47 -0600 Subject: problem with mobileSetKeyboardType Message-ID: <007201d472f5$d61fcfb0$825f6f10$@golddogcoffee.com> I have not been able to get the "mobileSetKeyboardType" command to work on my android. I have tried various options, such as: on openField if the environment is "mobile" then mobileSetKeyboardType "alphabet" end if end openField and on mouseUp if the environment is "mobile" then mobileSetKeyboardType "alphabet" end if end mouseUp Neither work. All I get is the standard keyboard from the android. Any suggestions? Thanks. Mike From bobsneidar at iotecdigital.com Fri Nov 2 18:16:00 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 2 Nov 2018 22:16:00 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> Message-ID: <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> Okay, looks like this is a no go. I read from one of the datagrid lessons in reference to populating the datagrid "by hand": Important: When using this technique properties like dgData, dgText, dgDataOfIndex, etc. will no longer return values. The data grid is just displaying records from your data source. It does not store any of that data internally. What I would like to see added to the datagrid is a handler that intercepted the population of a field so what goes into the field can be custom formatted. This comes up a lot. Dates and numbers from an SQL query are unformatted, and having to go through the datagrid when populating and formatting each record's data before displaying it, and then reformatting it before pushing it back up to the database seems like more work than necessary. Bob S > On Nov 2, 2018, at 14:42 , Bob Sneidar via use-livecode wrote: > > In a table datagrid, can't you edit the column template so that you can control what goes into the field for that column? I think the underlying data will remain the same, but what goes into the field is what you put there. I suspect the datagrid will then sort by the underlying data, not the displayed data. > > I have a similar issue with SQL formatted dates, but I want to display them as long dates. I'll toy around with this and see what I come up with. > > Bob S > > >> On Nov 2, 2018, at 14:26 , Klaus major-k via use-livecode wrote: >> >> Hi Bob, >> >>> Am 02.11.2018 um 22:14 schrieb Bob Sneidar via use-livecode : >>> >>> There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. >> >> I was afraid of that. >> >>> If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them. >> >> We have a german app for Android and LC on Android still does not support "system date"! :-/ >> So I wanted to fake sorting a column with long german dates by sorting by a hidden column with an english date. >> Will have to roll my own with list fields. >> >> Thank you! >> >>> Bob S >> >> Best >> >> Klaus >> >> >> -- >> Klaus Major >> http://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 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From lists at mangomultimedia.com Fri Nov 2 18:49:18 2018 From: lists at mangomultimedia.com (Trevor DeVore) Date: Fri, 2 Nov 2018 17:49:18 -0500 Subject: Sorting datagrid column with a tricj? In-Reply-To: <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> Message-ID: On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > > What I would like to see added to the datagrid is a handler that > intercepted the population of a field so what goes into the field can be > custom formatted. This comes up a lot. Dates and numbers from an SQL query > are unformatted, and having to go through the datagrid when populating and > formatting each record's data before displaying it, and then reformatting > it before pushing it back up to the database seems like more work than > necessary. > The Data Grid already supports this. Just customize the default column behavior. Take a look at this article which truncates text that is too wide: http://lessons.livecode.com/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell -- Trevor DeVore ScreenSteps www.screensteps.com From brian at milby7.com Fri Nov 2 18:59:17 2018 From: brian at milby7.com (Brian Milby) Date: Fri, 2 Nov 2018 17:59:17 -0500 Subject: problem with mobileSetKeyboardType In-Reply-To: <007201d472f5$d61fcfb0$825f6f10$@golddogcoffee.com> References: <007201d472f5$d61fcfb0$825f6f10$@golddogcoffee.com> Message-ID: <224d4b94-c005-44dd-910d-182a5d2aa570@Spark> Are those commands being executed before the keyboard is displayed? Thanks, Brian On Nov 2, 2018, 4:49 PM -0500, Mike for GDC via use-livecode , wrote: > I have not been able to get the "mobileSetKeyboardType" command to work on > my android. I have tried various options, such as: > > > > on openField > > if the environment is "mobile" then > > mobileSetKeyboardType "alphabet" > > end if > > end openField > > > > and > > > > on mouseUp > > if the environment is "mobile" then > > mobileSetKeyboardType "alphabet" > > end if > > end mouseUp > > > > Neither work. All I get is the standard keyboard from the android. > > Any suggestions? > > > > Thanks. > > Mike > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From gcanyon at gmail.com Fri Nov 2 20:43:38 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Fri, 2 Nov 2018 17:43:38 -0700 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: I like that, changing it. Now available at https://github.com/gcanyon/alloffsets One thing I don't see how to do without significantly impacting performance is to return all offsets if there are overlapping strings. For example: allOffsets("aba","abababa") would return 1,5, when it might be reasonable to expect it to return 1,3,5. Using the offset function with numToSkip would make that easy; adapting allOffsets to do so would be harder to do cleanly I think. gc On Fri, Nov 2, 2018 at 12:17 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > how about allOffsets? > > Bob S > > > > On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > All of those return a single value; I wanted to convey the concept of > > returning multiple values. To me listOffset implies it does the same > thing > > as itemOffset, since items come in a list. How about: > > > > offsets -- not my favorite because it's almost indistinguishable from > offset > > offsetsOf -- seems a tad clumsy > > > > On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> It probably should be named listOffset, like itemOffset or lineOffset. > >> > >> Bob S > >> > >> > >>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >>> > >>> Nice! I *just* finished creating a github repository for it, and adding > >>> support for multi-char search strings, much as you did. I was coming to > >> the > >>> list to post the update when I saw your post. > >>> > >>> Here's the GitHub link: https://github.com/gcanyon/offsetlist > >>> > >>> Here's my updated version: > >>> > >>> function offsetList D,S,pCase > >>> -- returns a comma-delimited list of the offsets of D in S > >>> set the caseSensitive to pCase is true > >>> set the itemDel to D > >>> put length(D) into dLength > >>> put 1 - dLength into C > >>> repeat for each item i in S > >>> add length(i) + dLength to C > >>> put C,"" after R > >>> end repeat > >>> set the itemDel to comma > >>> if char -dLength to -1 of S is D then return char 1 to -2 of R > >>> put length(C) + 1 into lenC > >>> put length(R) into lenR > >>> if lenC = lenR then return 0 > >>> return char 1 to lenR - lenC - 1 of R > >>> end offsetList > >>> > >>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < > >>> use-livecode at lists.runrev.com> wrote: > >>> > >>>> Hi Geoff, > >>>> > >>>> thank you for this beautiful script. > >>>> > >>>> I modified it a bit to accept multi-character search string and also > for > >>>> case sensitivity. > >>>> > >>>> It definitely is a lot faster for unicode text than anything I have > >> seen. > >>>> > >>>> ----------------------------- > >>>> function offsetList D,S, pCase > >>>> -- returns a comma-delimited list of the offsets of D in S > >>>> -- pCase is a boolean for caseSensitive > >>>> set the caseSensitive to pCase > >>>> set the itemDel to D > >>>> put the length of D into tDelimLength > >>>> repeat for each item i in S > >>>> add length(i) + tDelimLength to C > >>>> put C - (tDelimLength - 1),"" after R > >>>> end repeat > >>>> set the itemDel to comma > >>>> if char -1 of S is D then return char 1 to -2 of R > >>>> put length(C) + 1 into lenC > >>>> put length(R) into lenR > >>>> if lenC = lenR then return 0 > >>>> return char 1 to lenR - lenC - 1 of R > >>>> end offsetList > >>>> ------------------------------ > >>>> > >>>> Kind regards > >>>> Bernd > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 > >>>>> From: Geoff Canyon > >>>>> To: How to use LiveCode > >>>>> Subject: Re: How to find the offset of the last instance of a > >>>>> repeating character in a string? > >>>>> > >>>>> I was curious if using the itemDelimiter might work for this, so I > >> wrote > >>>>> the below code out of curiosity; but in my quick testing with > >> single-byte > >>>>> characters it was only about 30% faster than the above methods, so I > >>>> didn't > >>>>> bother to post it. > >>>>> > >>>>> But Ben Rubinstein just posted about a terrible slow-down doing > pretty > >>>> much > >>>>> this same thing for text with unicode characters. So I ran a simple > >> test > >>>>> with 8000 character long strings that start with a single unicode > >>>>> character, this is about 15x faster than offset() with skip. For > >>>>> 100,000-character lines it's about 300x faster, so it seems to be > >> immune > >>>> to > >>>>> the line-painter issues skip is subject to. So for what it's worth: > >>>>> > >>>>> function offsetList D,S > >>>>> -- returns a comma-delimited list of the offsets of D in S > >>>>> set the itemDel to D > >>>>> repeat for each item i in S > >>>>> add length(i) + 1 to C > >>>>> put C,"" after R > >>>>> end repeat > >>>>> set the itemDel to comma > >>>>> if char -1 of S is D then return char 1 to -2 of R > >>>>> put length(C) + 1 into lenC > >>>>> put length(R) into lenR > >>>>> if lenC = lenR then return 0 > >>>>> return char 1 to lenR - lenC - 1 of R > >>>>> end offsetList > >>>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> use-livecode mailing list > >>>> use-livecode 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 irog at mac.com Fri Nov 2 21:39:51 2018 From: irog at mac.com (Roger Guay) Date: Fri, 02 Nov 2018 18:39:51 -0700 Subject: Continual iOS Simulator Problems In-Reply-To: References: Message-ID: I?m sorry for not replying sooner, but yes, it was the simulator that was not working. I did as others suggested, open the simulator in Xcode and run from there with no problem. Thanks for your help! Roger > On Oct 31, 2018, at 10:46 AM, JJS via use-livecode wrote: > > Does the emulator itself not work? > > Or does your app not run on the emulator? > > You can either hit the test button to run it on an open emulator. > > But you can also create a standalone on mac and drag the the standalone file to the emulator (or was a real device) anyway can't remember but i did drag it towards devices in Xcode > > But your Provisioning Profile is OK? > > > Op 30-10-2018 om 03:47 schreef Roger Guay via use-livecode: >> Hi Folks, >> >> I?m on a Mac with OS 10.14 and using LC 9.0.0 Indy, and I have the green square indication in LC prefs with SDK 11.2. >> >> I can?t get the simulator to work with test target set to simulator 11.2. It simply takes too long to open and then crashes if I persist. >> >> In fact, it seems to me that I?ve had this problem with the simulator not working in previous versions as well. >> >> Any help or suggestions are greatly appreciated. >> >> 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 alex at tweedly.net Fri Nov 2 22:10:36 2018 From: alex at tweedly.net (Alex Tweedly) Date: Sat, 3 Nov 2018 02:10:36 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: <098265d6-ee80-db9d-1b90-a7b73eeb4f95@tweedly.net> On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: > I like that, changing it. Now available at > https://github.com/gcanyon/alloffsets > > One thing I don't see how to do without significantly impacting performance > is to return all offsets if there are overlapping strings. For example: > > allOffsets("aba","abababa") > > would return 1,5, when it might be reasonable to expect it to return 1,3,5. > Using the offset function with numToSkip would make that easy; adapting > allOffsets to do so would be harder to do cleanly I think. > Can I suggest changing it to "someOffsets()" :-) :-) But seriously, can you not iteratively run "allofsets" ? something like .... (typed straight into email - totally untested) function allOffsets pDel, pStr ?repeat with c = 1 to 255? -- or some other upper limit ? ? ? if NOT pDel contains numtochar(c) then ? ? ?? put numtochar(c) into c ?? ? ? exit repeat ??? end if ? end repeat ? repeat forever ? ? put someOffsets(pDel, pStr) into newR ??? if the number of items in newR = 0 then exit repeat ??? repeat for each item I in newR ??? ?? put c into char I of newR ??? end repeat ??? put newR after R ? end repeat ? sort items of R numeric ? return R end alloffsets -- Alex. From alex at tweedly.net Fri Nov 2 22:44:30 2018 From: alex at tweedly.net (Alex Tweedly) Date: Sat, 3 Nov 2018 02:44:30 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <098265d6-ee80-db9d-1b90-a7b73eeb4f95@tweedly.net> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <098265d6-ee80-db9d-1b90-a7b73eeb4f95@tweedly.net> Message-ID: Oh dear - answering my own posts .... rarely a good sign :-) On 03/11/2018 02:10, Alex Tweedly via use-livecode wrote: > > On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: >> One thing I don't see how to do without significantly impacting >> performance >> is to return all offsets if there are overlapping strings. For example: >> >> allOffsets("aba","abababa") >> >> would return 1,5, when it might be reasonable to expect it to return >> 1,3,5. >> Using the offset function with numToSkip would make that easy; adapting >> allOffsets to do so would be harder to do cleanly I think. >> > Can I suggest changing it to "someOffsets()" :-) :-) > > But seriously, can you not iteratively run "allofsets" ? > Answer : NO. That doesn't work. However, there is a more efficient way that does work - but it needs to be tested before I post it. -- Alex. From brian at milby7.com Sat Nov 3 01:49:57 2018 From: brian at milby7.com (Brian Milby) Date: Sat, 3 Nov 2018 00:49:57 -0500 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <098265d6-ee80-db9d-1b90-a7b73eeb4f95@tweedly.net> Message-ID: Here is something... probably needs some optimization function allOffsets2 D,S,pCase local dLength, C, R -- returns a comma-delimited list of the offsets of D in S set the caseSensitive to pCase is true set the itemDel to D put length(D) into dLength put 1 - dLength into C if dLength > 1 then local n, i, j, D2, L2 put 0 into n repeat with i = 2 to dLength if char i to -1 of D is char 1 to -i of D then add 1 to n put char (1-i) to -1 of D into D2[n] put i-1 into L2[n] end if end repeat end if repeat for each item i in S if C > 0 and n > 0 then repeat with j = 1 to n if i&D begins with D2[j] then put C+L2[j],"" after R end if end repeat end if add length(i) + dLength to C put C,"" after R end repeat set the itemDel to comma delete char -1 of R if item -1 of R > len(S) then if the number of items of R is 1 then return 0 else delete item -1 of R end if end if if char -dLength to -1 of S is D then return R end if repeat with j = n down to 1 if char -len(D2[j]) to -1 of S is D2[j] then delete item -1 of R end if end repeat return R end allOffsets2 I think a couple of private functions would be good. One for 0 overlap, one for a single overlap, then a final general one for any number of overlaps (the core of the above). After the loop that generates D2/L2 I would branch based on n to avoid the additional comparisons inside the loop. On Fri, Nov 2, 2018 at 9:45 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > Oh dear - answering my own posts .... rarely a good sign :-) > > > On 03/11/2018 02:10, Alex Tweedly via use-livecode wrote: > > > > On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: > >> One thing I don't see how to do without significantly impacting > >> performance > >> is to return all offsets if there are overlapping strings. For example: > >> > >> allOffsets("aba","abababa") > >> > >> would return 1,5, when it might be reasonable to expect it to return > >> 1,3,5. > >> Using the offset function with numToSkip would make that easy; adapting > >> allOffsets to do so would be harder to do cleanly I think. > >> > > Can I suggest changing it to "someOffsets()" :-) :-) > > > > But seriously, can you not iteratively run "allofsets" ? > > > Answer : NO. That doesn't work. > However, there is a more efficient way that does work - but it needs to > be tested before I post it. > > -- Alex. > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From General.2018 at outlook.com Sat Nov 3 06:30:59 2018 From: General.2018 at outlook.com (General 2018) Date: Sat, 3 Nov 2018 10:30:59 +0000 Subject: Window Tablet Rotations Message-ID: Hi , Is there a way to fix rotation to landscape on Windows Tablet ? Regards Camm Regards EasyObd From klaus at major-k.de Sat Nov 3 06:41:00 2018 From: klaus at major-k.de (Klaus major-k) Date: Sat, 3 Nov 2018 11:41:00 +0100 Subject: Sorting datagrid column with a tricj? In-Reply-To: <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> Message-ID: <31112D86-0400-45A6-BA85-D30956A7815A@major-k.de> Hi Bob, > Am 02.11.2018 um 22:42 schrieb Bob Sneidar via use-livecode : > > In a table datagrid, can't you edit the column template so that you can control what goes into the field for that column? I think the underlying data will remain the same, but what goes into the field is what you put there. I suspect the datagrid will then sort by the underlying data, not the displayed data. > > I have a similar issue with SQL formatted dates, but I want to display them as long dates. I'll toy around with this and see what I come up with. > > Bob S thank you, I think I found a woraround for me. Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From andrew at midwestcoastmedia.com Sat Nov 3 07:56:00 2018 From: andrew at midwestcoastmedia.com (andrew at midwestcoastmedia.com) Date: Sat, 03 Nov 2018 11:56:00 +0000 Subject: problem with mobileSetKeyboardType In-Reply-To: Message-ID: <20181103115600.Horde.k39A0xFNLMKAPPH37kP5mVQ@ua850258.serversignin.com> I think that code is based off a documentation bug because "alphabet" is not a listed parameter in the dictionary (even though it is the first example shown after the listed parameters). I use: The mobile keyboard won't activate unless a field has focus and the "default" keyboard is already the alphabetic keyboard. What do you mean by it's not working? What keyboard are you trying to see vs what you are seeing? --Andrew Bell > 1. problem with mobileSetKeyboardType (Mike for GDC) > From: "Mike for GDC" > To: > Subject: problem with mobileSetKeyboardType > Message-ID: <007201d472f5$d61fcfb0$825f6f10$@golddogcoffee.com> > Content-Type: text/plain; charset="us-ascii" > > I have not been able to get the "mobileSetKeyboardType" command to work on > my android. I have tried various options, such as: > > > > on openField > if the environment is "mobile" then > mobileSetKeyboardType "alphabet" > end if > end openField > > > and > > > on mouseUp > if the environment is "mobile" then > mobileSetKeyboardType "alphabet" > end if > end mouseUp > > > > Neither work. All I get is the standard keyboard from the android. > Any suggestions? > From sean at pidigital.co.uk Sat Nov 3 08:18:48 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sat, 3 Nov 2018 12:18:48 +0000 Subject: problem with mobileSetKeyboardType In-Reply-To: <20181103115600.Horde.k39A0xFNLMKAPPH37kP5mVQ@ua850258.serversignin.com> References: <20181103115600.Horde.k39A0xFNLMKAPPH37kP5mVQ@ua850258.serversignin.com> Message-ID: Hi Mike It?s not a good idea putting it into an openField handler as this is often as or after the keyboard has already opened. Setting it in the mouseDown will catch it earlier. Or setting transverse to false until a mouseDown/Up which first sets the keyboardType then sets its transverse to true and focus to it. (Set the transverse back to false on exitFocus). Perhaps this is how the docs should be updated to accommodate this behaviour - as well as double checking the handling of ?alphabet?. Sean Cole Pi Digital > On 3 Nov 2018, at 11:56, Andrew Bell via use-livecode wrote: > > I think that code is based off a documentation bug because "alphabet" is not a listed parameter in the dictionary (even though it is the first example shown after the listed parameters). I use: > > The mobile keyboard won't activate unless a field has focus and the "default" keyboard is already the alphabetic keyboard. What do you mean by it's not working? What keyboard are you trying to see vs what you are seeing? > > --Andrew Bell > > >> 1. problem with mobileSetKeyboardType (Mike for GDC) > >> From: "Mike for GDC" >> To: >> Subject: problem with mobileSetKeyboardType >> Message-ID: <007201d472f5$d61fcfb0$825f6f10$@golddogcoffee.com> >> Content-Type: text/plain; charset="us-ascii" >> >> I have not been able to get the "mobileSetKeyboardType" command to work on >> my android. I have tried various options, such as: >> >> >> >> on openField >> if the environment is "mobile" then >> mobileSetKeyboardType "alphabet" >> end if >> end openField >> >> >> and >> >> >> on mouseUp >> if the environment is "mobile" then >> mobileSetKeyboardType "alphabet" >> end if >> end mouseUp >> >> >> >> Neither work. All I get is the standard keyboard from the android. >> Any suggestions? >> > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Nov 3 09:29:37 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sat, 3 Nov 2018 13:29:37 +0000 Subject: LiveCode Pseudo Captcha? References: <41F6DBF1-DF93-43E3-9089-94E91BA3A67A@major-k.de> <60AE728F-1A34-43D5-9625-506366F18741@all-auctions.com> Message-ID: Using LiveCode server, I created 10 questions with obvious answers and call them randomly Does Cow two or four Feet (type 2 or 4) ______ Can a baby fly an airplane? (type "yes" or "no") ________ Can whales climb trees? (type "yes" or "no") The color of grass is orange or green (type "orange" or "green" ________ data validation on back end is easy, it assumes a minimum typing skill, for the longer answers, but then, they have that, or they could not fill in the form That works well here, forms not hacked in 6 years. (some form on web for 6 years or more) BR On 10/31/18 10:11 AM, Rick Harrison via use-livecode wrote: > Nice! > > I had also toyed with the idea of > radio buttons for multiple choice > questions and answers combined > perhaps with a date picker. > > Any other ideas? > > Thanks, > > Rick -- Svasti Astu, Be Well! Brahmanathaswami Get the SivaSiva app, it's free: https://www.himalayanacademy.com/apps/sivasiva From alex at tweedly.net Sat Nov 3 09:32:57 2018 From: alex at tweedly.net (Alex Tweedly) Date: Sat, 3 Nov 2018 13:32:57 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Hi Geoff, unfortunately the impact of overlapping delimiter strings is more severe than simply not finding them. The code on github gets the wrong answer if there is an overlapping string at the very end of the search string, e.g. alloffsets("aaaa", "aaaaaaaaa")??? wrongly gives? 1,5,10 I suspect the test for if char -dLength to -1 of S is D then return char 1 to -2 of R should be (something like) if item -1 of S is empty then return char 1 to -2 of R but to be honest, I'm not 10% certain of that. Alex. On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: > I like that, changing it. Now available at > https://github.com/gcanyon/alloffsets > > One thing I don't see how to do without significantly impacting performance > is to return all offsets if there are overlapping strings. For example: > > allOffsets("aba","abababa") > > would return 1,5, when it might be reasonable to expect it to return 1,3,5. > Using the offset function with numToSkip would make that easy; adapting > allOffsets to do so would be harder to do cleanly I think. > > gc > > On Fri, Nov 2, 2018 at 12:17 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> how about allOffsets? >> >> Bob S >> >> >>> On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> All of those return a single value; I wanted to convey the concept of >>> returning multiple values. To me listOffset implies it does the same >> thing >>> as itemOffset, since items come in a list. How about: >>> >>> offsets -- not my favorite because it's almost indistinguishable from >> offset >>> offsetsOf -- seems a tad clumsy >>> >>> On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>>> It probably should be named listOffset, like itemOffset or lineOffset. >>>> >>>> Bob S >>>> >>>> >>>>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < >>>> use-livecode at lists.runrev.com> wrote: >>>>> Nice! I *just* finished creating a github repository for it, and adding >>>>> support for multi-char search strings, much as you did. I was coming to >>>> the >>>>> list to post the update when I saw your post. >>>>> >>>>> Here's the GitHub link: https://github.com/gcanyon/offsetlist >>>>> >>>>> Here's my updated version: >>>>> >>>>> function offsetList D,S,pCase >>>>> -- returns a comma-delimited list of the offsets of D in S >>>>> set the caseSensitive to pCase is true >>>>> set the itemDel to D >>>>> put length(D) into dLength >>>>> put 1 - dLength into C >>>>> repeat for each item i in S >>>>> add length(i) + dLength to C >>>>> put C,"" after R >>>>> end repeat >>>>> set the itemDel to comma >>>>> if char -dLength to -1 of S is D then return char 1 to -2 of R >>>>> put length(C) + 1 into lenC >>>>> put length(R) into lenR >>>>> if lenC = lenR then return 0 >>>>> return char 1 to lenR - lenC - 1 of R >>>>> end offsetList >>>>> >>>>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < >>>>> use-livecode at lists.runrev.com> wrote: >>>>> >>>>>> Hi Geoff, >>>>>> >>>>>> thank you for this beautiful script. >>>>>> >>>>>> I modified it a bit to accept multi-character search string and also >> for >>>>>> case sensitivity. >>>>>> >>>>>> It definitely is a lot faster for unicode text than anything I have >>>> seen. >>>>>> ----------------------------- >>>>>> function offsetList D,S, pCase >>>>>> -- returns a comma-delimited list of the offsets of D in S >>>>>> -- pCase is a boolean for caseSensitive >>>>>> set the caseSensitive to pCase >>>>>> set the itemDel to D >>>>>> put the length of D into tDelimLength >>>>>> repeat for each item i in S >>>>>> add length(i) + tDelimLength to C >>>>>> put C - (tDelimLength - 1),"" after R >>>>>> end repeat >>>>>> set the itemDel to comma >>>>>> if char -1 of S is D then return char 1 to -2 of R >>>>>> put length(C) + 1 into lenC >>>>>> put length(R) into lenR >>>>>> if lenC = lenR then return 0 >>>>>> return char 1 to lenR - lenC - 1 of R >>>>>> end offsetList >>>>>> ------------------------------ >>>>>> >>>>>> Kind regards >>>>>> Bernd >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 >>>>>>> From: Geoff Canyon >>>>>>> To: How to use LiveCode >>>>>>> Subject: Re: How to find the offset of the last instance of a >>>>>>> repeating character in a string? >>>>>>> >>>>>>> I was curious if using the itemDelimiter might work for this, so I >>>> wrote >>>>>>> the below code out of curiosity; but in my quick testing with >>>> single-byte >>>>>>> characters it was only about 30% faster than the above methods, so I >>>>>> didn't >>>>>>> bother to post it. >>>>>>> >>>>>>> But Ben Rubinstein just posted about a terrible slow-down doing >> pretty >>>>>> much >>>>>>> this same thing for text with unicode characters. So I ran a simple >>>> test >>>>>>> with 8000 character long strings that start with a single unicode >>>>>>> character, this is about 15x faster than offset() with skip. For >>>>>>> 100,000-character lines it's about 300x faster, so it seems to be >>>> immune >>>>>> to >>>>>>> the line-painter issues skip is subject to. So for what it's worth: >>>>>>> >>>>>>> function offsetList D,S >>>>>>> -- returns a comma-delimited list of the offsets of D in S >>>>>>> set the itemDel to D >>>>>>> repeat for each item i in S >>>>>>> add length(i) + 1 to C >>>>>>> put C,"" after R >>>>>>> end repeat >>>>>>> set the itemDel to comma >>>>>>> if char -1 of S is D then return char 1 to -2 of R >>>>>>> put length(C) + 1 into lenC >>>>>>> put length(R) into lenR >>>>>>> if lenC = lenR then return 0 >>>>>>> return char 1 to lenR - lenC - 1 of R >>>>>>> end offsetList >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> use-livecode mailing list >>>>>> use-livecode 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 harrison at all-auctions.com Sat Nov 3 10:17:22 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Sat, 3 Nov 2018 10:17:22 -0400 Subject: LiveCode Pseudo Captcha? In-Reply-To: References: <41F6DBF1-DF93-43E3-9089-94E91BA3A67A@major-k.de> <60AE728F-1A34-43D5-9625-506366F18741@all-auctions.com> Message-ID: <72A5CA56-D10D-4599-B310-020C7E429796@all-auctions.com> Hi Sannyasin, I like your questions! I decided that a pull-down menu for answers to questions might be something a computer would find difficult to do as the position for the answer is different each time. Thank you for the suggestions. Rick > On Nov 3, 2018, at 9:29 AM, Sannyasin Brahmanathaswami via use-livecode wrote: > > Using LiveCode server, I created 10 questions with obvious answers and > call them randomly > > Does Cow two or four Feet (type 2 or 4) ______ > Can a baby fly an airplane? (type "yes" or "no") ________ > Can whales climb trees? (type "yes" or "no") > The color of grass is orange or green (type "orange" or "green" ________ > > data validation on back end is easy, it assumes a minimum typing skill, > for the longer answers, but then, they have that, or they could not fill > in the form > > That works well here, forms not hacked in 6 years. (some form on web for > 6 years or more) > > BR > > > On 10/31/18 10:11 AM, Rick Harrison via use-livecode wrote: >> Nice! >> >> I had also toyed with the idea of >> radio buttons for multiple choice >> questions and answers combined >> perhaps with a date picker. >> >> Any other ideas? >> >> Thanks, >> >> Rick > > > -- > Svasti Astu, Be Well! > Brahmanathaswami > > Get the SivaSiva app, it's free: > https://www.himalayanacademy.com/apps/sivasiva > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Sat Nov 3 10:17:43 2018 From: brian at milby7.com (Brian Milby) Date: Sat, 3 Nov 2018 09:17:43 -0500 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: Good catch Alex. My code was closer, but didn't handle repeating characters correctly. Here is an updated version. function allOffsets2 D,S,pCase local dLength, C, R -- returns a comma-delimited list of the offsets of D in S set the caseSensitive to pCase is true set the itemDel to D put length(D) into dLength put 1 - dLength into C if dLength > 1 then local n, i, j, D2, L2 put 0 into n repeat with i = 2 to dLength if char i to -1 of D is char 1 to -i of D then add 1 to n put char (1-i) to -1 of D into D2[n] put i-1 into L2[n] end if end repeat end if repeat for each item i in S if C > 0 and n > 0 then repeat with j = 1 to n if i&D begins with D2[j] then put C+L2[j],"" after R end if end repeat end if add length(i) + dLength to C put C,"" after R end repeat set the itemDel to comma delete char -1 of R if item -1 of R > len(S) then if the number of items of R is 1 then return 0 else delete item -1 of R end if end if if len(i) > 0 then repeat with j = n down to len(i)+1 if char -len(D2[j]) to -1 of S is D2[j] then delete item -1 of R end if end repeat end if return R end allOffsets2 On Sat, Nov 3, 2018 at 8:33 AM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Geoff, > > unfortunately the impact of overlapping delimiter strings is more severe > than simply not finding them. The code on github gets the wrong answer > if there is an overlapping string at the very end of the search string, > e.g. > > alloffsets("aaaa", "aaaaaaaaa") wrongly gives 1,5,10 > > I suspect the test for > > if char -dLength to -1 of S is D then return char 1 to -2 of R > should be (something like) > if item -1 of S is empty then return char 1 to -2 of R > but to be honest, I'm not 10% certain of that. > > Alex. > > > > On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: > > I like that, changing it. Now available at > > https://github.com/gcanyon/alloffsets > > > > One thing I don't see how to do without significantly impacting > performance > > is to return all offsets if there are overlapping strings. For example: > > > > allOffsets("aba","abababa") > > > > would return 1,5, when it might be reasonable to expect it to return > 1,3,5. > > Using the offset function with numToSkip would make that easy; adapting > > allOffsets to do so would be harder to do cleanly I think. > > > > gc > > > > On Fri, Nov 2, 2018 at 12:17 PM Bob Sneidar via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> how about allOffsets? > >> > >> Bob S > >> > >> > >>> On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >>> All of those return a single value; I wanted to convey the concept of > >>> returning multiple values. To me listOffset implies it does the same > >> thing > >>> as itemOffset, since items come in a list. How about: > >>> > >>> offsets -- not my favorite because it's almost indistinguishable from > >> offset > >>> offsetsOf -- seems a tad clumsy > >>> > >>> On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < > >>> use-livecode at lists.runrev.com> wrote: > >>> > >>>> It probably should be named listOffset, like itemOffset or lineOffset. > >>>> > >>>> Bob S > >>>> > >>>> > >>>>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < > >>>> use-livecode at lists.runrev.com> wrote: > >>>>> Nice! I *just* finished creating a github repository for it, and > adding > >>>>> support for multi-char search strings, much as you did. I was coming > to > >>>> the > >>>>> list to post the update when I saw your post. > >>>>> > >>>>> Here's the GitHub link: https://github.com/gcanyon/offsetlist > >>>>> > >>>>> Here's my updated version: > >>>>> > >>>>> function offsetList D,S,pCase > >>>>> -- returns a comma-delimited list of the offsets of D in S > >>>>> set the caseSensitive to pCase is true > >>>>> set the itemDel to D > >>>>> put length(D) into dLength > >>>>> put 1 - dLength into C > >>>>> repeat for each item i in S > >>>>> add length(i) + dLength to C > >>>>> put C,"" after R > >>>>> end repeat > >>>>> set the itemDel to comma > >>>>> if char -dLength to -1 of S is D then return char 1 to -2 of R > >>>>> put length(C) + 1 into lenC > >>>>> put length(R) into lenR > >>>>> if lenC = lenR then return 0 > >>>>> return char 1 to lenR - lenC - 1 of R > >>>>> end offsetList > >>>>> > >>>>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < > >>>>> use-livecode at lists.runrev.com> wrote: > >>>>> > >>>>>> Hi Geoff, > >>>>>> > >>>>>> thank you for this beautiful script. > >>>>>> > >>>>>> I modified it a bit to accept multi-character search string and also > >> for > >>>>>> case sensitivity. > >>>>>> > >>>>>> It definitely is a lot faster for unicode text than anything I have > >>>> seen. > >>>>>> ----------------------------- > >>>>>> function offsetList D,S, pCase > >>>>>> -- returns a comma-delimited list of the offsets of D in S > >>>>>> -- pCase is a boolean for caseSensitive > >>>>>> set the caseSensitive to pCase > >>>>>> set the itemDel to D > >>>>>> put the length of D into tDelimLength > >>>>>> repeat for each item i in S > >>>>>> add length(i) + tDelimLength to C > >>>>>> put C - (tDelimLength - 1),"" after R > >>>>>> end repeat > >>>>>> set the itemDel to comma > >>>>>> if char -1 of S is D then return char 1 to -2 of R > >>>>>> put length(C) + 1 into lenC > >>>>>> put length(R) into lenR > >>>>>> if lenC = lenR then return 0 > >>>>>> return char 1 to lenR - lenC - 1 of R > >>>>>> end offsetList > >>>>>> ------------------------------ > >>>>>> > >>>>>> Kind regards > >>>>>> Bernd > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 > >>>>>>> From: Geoff Canyon > >>>>>>> To: How to use LiveCode > >>>>>>> Subject: Re: How to find the offset of the last instance of a > >>>>>>> repeating character in a string? > >>>>>>> > >>>>>>> I was curious if using the itemDelimiter might work for this, so I > >>>> wrote > >>>>>>> the below code out of curiosity; but in my quick testing with > >>>> single-byte > >>>>>>> characters it was only about 30% faster than the above methods, so > I > >>>>>> didn't > >>>>>>> bother to post it. > >>>>>>> > >>>>>>> But Ben Rubinstein just posted about a terrible slow-down doing > >> pretty > >>>>>> much > >>>>>>> this same thing for text with unicode characters. So I ran a simple > >>>> test > >>>>>>> with 8000 character long strings that start with a single unicode > >>>>>>> character, this is about 15x faster than offset() with skip. For > >>>>>>> 100,000-character lines it's about 300x faster, so it seems to be > >>>> immune > >>>>>> to > >>>>>>> the line-painter issues skip is subject to. So for what it's worth: > >>>>>>> > >>>>>>> function offsetList D,S > >>>>>>> -- returns a comma-delimited list of the offsets of D in S > >>>>>>> set the itemDel to D > >>>>>>> repeat for each item i in S > >>>>>>> add length(i) + 1 to C > >>>>>>> put C,"" after R > >>>>>>> end repeat > >>>>>>> set the itemDel to comma > >>>>>>> if char -1 of S is D then return char 1 to -2 of R > >>>>>>> put length(C) + 1 into lenC > >>>>>>> put length(R) into lenR > >>>>>>> if lenC = lenR then return 0 > >>>>>>> return char 1 to lenR - lenC - 1 of R > >>>>>>> end offsetList > >>>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> use-livecode mailing list > >>>>>> use-livecode 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 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Sat Nov 3 12:27:39 2018 From: brian at milby7.com (Brian Milby) Date: Sat, 3 Nov 2018 11:27:39 -0500 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: I've posted a binary stack version that includes my version. I cloned and made a "bwm" branch in my clone. Here's the direct link to the script with the posted code (updated to use private functions): https://github.com/bwmilby/alloffsets/blob/bwm/bwm/allOffsets_Scripts/stack_allOffsets_button_id_1009.livecodescript The binary stack can be found here: https://github.com/bwmilby/alloffsets/tree/bwm/bwm There are 3 button across the top. The first is Geoff's version. The second is my combined version. The third is the one with private functions added. The first button replaces the results field. The second and third add their results to the results field. The top field is the string to find (needle), the second is the string to search (haystack), the third is for the results. Everything is in a background group so you can add cards for unique searches. On Sat, Nov 3, 2018 at 9:17 AM Brian Milby wrote: > Good catch Alex. My code was closer, but didn't handle repeating > characters correctly. Here is an updated version. > > function allOffsets2 D,S,pCase > local dLength, C, R > -- returns a comma-delimited list of the offsets of D in S > set the caseSensitive to pCase is true > set the itemDel to D > put length(D) into dLength > put 1 - dLength into C > > if dLength > 1 then > local n, i, j, D2, L2 > put 0 into n > repeat with i = 2 to dLength > if char i to -1 of D is char 1 to -i of D then > add 1 to n > put char (1-i) to -1 of D into D2[n] > put i-1 into L2[n] > end if > end repeat > end if > > repeat for each item i in S > if C > 0 and n > 0 then > repeat with j = 1 to n > if i&D begins with D2[j] then > put C+L2[j],"" after R > end if > end repeat > end if > add length(i) + dLength to C > put C,"" after R > end repeat > set the itemDel to comma > delete char -1 of R > > if item -1 of R > len(S) then > if the number of items of R is 1 then > return 0 > else > delete item -1 of R > end if > end if > > if len(i) > 0 then > repeat with j = n down to len(i)+1 > if char -len(D2[j]) to -1 of S is D2[j] then > delete item -1 of R > end if > end repeat > end if > return R > end allOffsets2 > > > On Sat, Nov 3, 2018 at 8:33 AM Alex Tweedly via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi Geoff, >> >> unfortunately the impact of overlapping delimiter strings is more severe >> than simply not finding them. The code on github gets the wrong answer >> if there is an overlapping string at the very end of the search string, >> e.g. >> >> alloffsets("aaaa", "aaaaaaaaa") wrongly gives 1,5,10 >> >> I suspect the test for >> >> if char -dLength to -1 of S is D then return char 1 to -2 of R >> should be (something like) >> if item -1 of S is empty then return char 1 to -2 of R >> but to be honest, I'm not 10% certain of that. >> >> Alex. >> >> >> >> On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote: >> > I like that, changing it. Now available at >> > https://github.com/gcanyon/alloffsets >> > >> > One thing I don't see how to do without significantly impacting >> performance >> > is to return all offsets if there are overlapping strings. For example: >> > >> > allOffsets("aba","abababa") >> > >> > would return 1,5, when it might be reasonable to expect it to return >> 1,3,5. >> > Using the offset function with numToSkip would make that easy; adapting >> > allOffsets to do so would be harder to do cleanly I think. >> > >> > gc >> > >> > On Fri, Nov 2, 2018 at 12:17 PM Bob Sneidar via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > >> >> how about allOffsets? >> >> >> >> Bob S >> >> >> >> >> >>> On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode < >> >> use-livecode at lists.runrev.com> wrote: >> >>> All of those return a single value; I wanted to convey the concept of >> >>> returning multiple values. To me listOffset implies it does the same >> >> thing >> >>> as itemOffset, since items come in a list. How about: >> >>> >> >>> offsets -- not my favorite because it's almost indistinguishable from >> >> offset >> >>> offsetsOf -- seems a tad clumsy >> >>> >> >>> On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < >> >>> use-livecode at lists.runrev.com> wrote: >> >>> >> >>>> It probably should be named listOffset, like itemOffset or >> lineOffset. >> >>>> >> >>>> Bob S >> >>>> >> >>>> >> >>>>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < >> >>>> use-livecode at lists.runrev.com> wrote: >> >>>>> Nice! I *just* finished creating a github repository for it, and >> adding >> >>>>> support for multi-char search strings, much as you did. I was >> coming to >> >>>> the >> >>>>> list to post the update when I saw your post. >> >>>>> >> >>>>> Here's the GitHub link: https://github.com/gcanyon/offsetlist >> >>>>> >> >>>>> Here's my updated version: >> >>>>> >> >>>>> function offsetList D,S,pCase >> >>>>> -- returns a comma-delimited list of the offsets of D in S >> >>>>> set the caseSensitive to pCase is true >> >>>>> set the itemDel to D >> >>>>> put length(D) into dLength >> >>>>> put 1 - dLength into C >> >>>>> repeat for each item i in S >> >>>>> add length(i) + dLength to C >> >>>>> put C,"" after R >> >>>>> end repeat >> >>>>> set the itemDel to comma >> >>>>> if char -dLength to -1 of S is D then return char 1 to -2 of R >> >>>>> put length(C) + 1 into lenC >> >>>>> put length(R) into lenR >> >>>>> if lenC = lenR then return 0 >> >>>>> return char 1 to lenR - lenC - 1 of R >> >>>>> end offsetList >> >>>>> >> >>>>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < >> >>>>> use-livecode at lists.runrev.com> wrote: >> >>>>> >> >>>>>> Hi Geoff, >> >>>>>> >> >>>>>> thank you for this beautiful script. >> >>>>>> >> >>>>>> I modified it a bit to accept multi-character search string and >> also >> >> for >> >>>>>> case sensitivity. >> >>>>>> >> >>>>>> It definitely is a lot faster for unicode text than anything I have >> >>>> seen. >> >>>>>> ----------------------------- >> >>>>>> function offsetList D,S, pCase >> >>>>>> -- returns a comma-delimited list of the offsets of D in S >> >>>>>> -- pCase is a boolean for caseSensitive >> >>>>>> set the caseSensitive to pCase >> >>>>>> set the itemDel to D >> >>>>>> put the length of D into tDelimLength >> >>>>>> repeat for each item i in S >> >>>>>> add length(i) + tDelimLength to C >> >>>>>> put C - (tDelimLength - 1),"" after R >> >>>>>> end repeat >> >>>>>> set the itemDel to comma >> >>>>>> if char -1 of S is D then return char 1 to -2 of R >> >>>>>> put length(C) + 1 into lenC >> >>>>>> put length(R) into lenR >> >>>>>> if lenC = lenR then return 0 >> >>>>>> return char 1 to lenR - lenC - 1 of R >> >>>>>> end offsetList >> >>>>>> ------------------------------ >> >>>>>> >> >>>>>> Kind regards >> >>>>>> Bernd >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 >> >>>>>>> From: Geoff Canyon >> >>>>>>> To: How to use LiveCode >> >>>>>>> Subject: Re: How to find the offset of the last instance of a >> >>>>>>> repeating character in a string? >> >>>>>>> >> >>>>>>> I was curious if using the itemDelimiter might work for this, so I >> >>>> wrote >> >>>>>>> the below code out of curiosity; but in my quick testing with >> >>>> single-byte >> >>>>>>> characters it was only about 30% faster than the above methods, >> so I >> >>>>>> didn't >> >>>>>>> bother to post it. >> >>>>>>> >> >>>>>>> But Ben Rubinstein just posted about a terrible slow-down doing >> >> pretty >> >>>>>> much >> >>>>>>> this same thing for text with unicode characters. So I ran a >> simple >> >>>> test >> >>>>>>> with 8000 character long strings that start with a single unicode >> >>>>>>> character, this is about 15x faster than offset() with skip. For >> >>>>>>> 100,000-character lines it's about 300x faster, so it seems to be >> >>>> immune >> >>>>>> to >> >>>>>>> the line-painter issues skip is subject to. So for what it's >> worth: >> >>>>>>> >> >>>>>>> function offsetList D,S >> >>>>>>> -- returns a comma-delimited list of the offsets of D in S >> >>>>>>> set the itemDel to D >> >>>>>>> repeat for each item i in S >> >>>>>>> add length(i) + 1 to C >> >>>>>>> put C,"" after R >> >>>>>>> end repeat >> >>>>>>> set the itemDel to comma >> >>>>>>> if char -1 of S is D then return char 1 to -2 of R >> >>>>>>> put length(C) + 1 into lenC >> >>>>>>> put length(R) into lenR >> >>>>>>> if lenC = lenR then return 0 >> >>>>>>> return char 1 to lenR - lenC - 1 of R >> >>>>>>> end offsetList >> >>>>>>> >> >>>>>> >> >>>>>> _______________________________________________ >> >>>>>> use-livecode mailing list >> >>>>>> use-livecode 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 >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 Sun Nov 4 00:31:48 2018 From: james at thehales.id.au (James Hale) Date: Sun, 4 Nov 2018 15:31:48 +1100 Subject: How to update a css file when using the Browser widget Message-ID: <9465CFE9-FDEE-4965-BFE4-016AFB925152@thehales.id.au> Recently I have been exploring modifying a css file so as to change the appearance of an html file being displayed in the browser widget. Simply, I thought. Load a page that uses a css file. Modify the css file and rewrite it to disk. Re-load the page from before, assuming it would use the newly modified css settings. It doesn't work. The html page continues to use the css from before. This is even after closing and removing the stack from memory and reopening it. I even tried deleting and re-creating the widget to see if this "refreshed" the css. No. Finally I quit and relaunched LC. On reopening the stack and reloading the page the new CSS was being read. It would appear the css is being cached by LC and not the widget. Has anyone else come across this before and if so, did you find a solution/workaround? Context: I want to be able to change the font-size displayed in the browser. The pages being displayed all use the same external css. I thought that by changing the font-size definition with the css and saving it back to disk, a reload of the page would use the new setting. This works with desktop browsers. James From brian at milby7.com Sun Nov 4 00:37:48 2018 From: brian at milby7.com (Brian Milby) Date: Sat, 3 Nov 2018 23:37:48 -0500 Subject: How to update a css file when using the Browser widget In-Reply-To: <9465CFE9-FDEE-4965-BFE4-016AFB925152@thehales.id.au> References: <9465CFE9-FDEE-4965-BFE4-016AFB925152@thehales.id.au> Message-ID: Is this on Mac? I've seen it when working on the LC Dictionary (where I was messing with the CSS). I don't think it is LC, but rather Safari (WebKit). I think that I recall that reloads were easier on Windows. I did not find a solution other than restarting the IDE that I can recall, but would also be interested in a way around it. On Sat, Nov 3, 2018 at 11:32 PM James Hale via use-livecode < use-livecode at lists.runrev.com> wrote: > Recently I have been exploring modifying a css file so as to change the > appearance of an html file being displayed in the browser widget. > > Simply, I thought. > > Load a page that uses a css file. > > Modify the css file and rewrite it to disk. > > Re-load the page from before, assuming it would use the newly modified css > settings. > > It doesn't work. > The html page continues to use the css from before. > This is even after closing and removing the stack from memory and > reopening it. > > I even tried deleting and re-creating the widget to see if this > "refreshed" the css. > > No. Finally I quit and relaunched LC. > > On reopening the stack and reloading the page the new CSS was being read. > > It would appear the css is being cached by LC and not the widget. > > Has anyone else come across this before and if so, did you find a > solution/workaround? > > Context: I want to be able to change the font-size displayed in the > browser. The pages being displayed all use the same external css. I thought > that by changing the font-size definition with the css and saving it back > to disk, a reload of the page would use the new setting. This works with > desktop browsers. > > > James > > > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 4 00:55:19 2018 From: james at thehales.id.au (James Hale) Date: Sun, 4 Nov 2018 15:55:19 +1100 Subject: How to update a css file when using the Browser widget Message-ID: <6FDE756A-CE92-4619-9C01-90E668F126AD@thehales.id.au> Further exploring from my previous post. Making a standalone of the stack. Simply reloading the html page still does not use the modified css (as was the case in the IDE) But, deleting the browser widget and recreating it before loading the page and the modified css is recognised. So the deletion/creation will work but can only be seen in a standalone which is a pain, but not a deal breaker. Still, it would be nice to know what's going on. James From revdev at pdslabs.net Sun Nov 4 01:24:45 2018 From: revdev at pdslabs.net (Phil Davis) Date: Sat, 3 Nov 2018 23:24:45 -0700 Subject: How to update a css file when using the Browser widget In-Reply-To: <6FDE756A-CE92-4619-9C01-90E668F126AD@thehales.id.au> References: <6FDE756A-CE92-4619-9C01-90E668F126AD@thehales.id.au> Message-ID: <57eab340-b829-8b61-94a7-63a8b7e82a70@pdslabs.net> Hi James, Maybe putting a parameter after the URL for the reload would make the widget think it's worthy of a complete reload. like so: https://my.big.site.com?12345 Haven't tried it, just thought of it. Phil Davis On 11/3/18 9:55 PM, James Hale via use-livecode wrote: > Further exploring from my previous post. > Making a standalone of the stack. > Simply reloading the html page still does not use the modified css (as was the case in the IDE) > But, deleting the browser widget and recreating it before loading the page and the modified css is recognised. > > So the deletion/creation will work but can only be seen in a standalone which is a pain, but not a deal breaker. > > Still, it would be nice to know what's going on. > > James > > > > > _______________________________________________ > use-livecode mailing list > use-livecode 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 From james at thehales.id.au Sun Nov 4 08:43:48 2018 From: james at thehales.id.au (James Hale) Date: Mon, 5 Nov 2018 00:43:48 +1100 Subject: How to update a css file when using the Browser widget Message-ID: <5FF2EC87-762E-4B34-B3E4-A59410D29D87@thehales.id.au> @brian - yes I am on a Mac. I wondered if it was webkit too. However Safari performs as expected. I load the page in Safari, then change the css and then reload the page in Safari (using the reload button in the address field) and the page reloads using the modified css. @Phil - no joy with the extra argument either. I went one step further and made a second different page and differently called css. I then loaded my first page. Changed the css. Loaded the second page (which called a third, differently named css) and then reloaded my original page. It loaded but still used the original (but no longer present) css. And I tried this with both normal load and widget deletion/recreation too. This is one sticky css! James From hh at hyperhh.de Sun Nov 4 11:10:44 2018 From: hh at hyperhh.de (hh) Date: Sun, 4 Nov 2018 17:10:44 +0100 Subject: How to update a css file when using the Browser widget Message-ID: <7F6A492F-8B35-49F4-A40F-1C8662C0402D@hyperhh.de> To disable caching of an input css file (or js script file) this works with every browser: Either change the file name of the input file or add a counter value (or timestamp) to the filename, for example From hh at hyperhh.de Sun Nov 4 11:50:38 2018 From: hh at hyperhh.de (hh) Date: Sun, 4 Nov 2018 17:50:38 +0100 Subject: How to update a css file when using the Browser widget Message-ID: <35A0748C-3D13-4C3A-8AFB-E1573EF1EA91@hyperhh.de> > James H. wrote: > Context: I want to be able to change the font-size displayed > in the browser. The pages being displayed all use the same > external css. I thought that by changing the font-size > definition with the css and saving it back to disk, a reload > of the page would use the new setting. This works with > desktop browsers. Say you have the font-size declaration in the css for body. Then script, for example: do "document.body.style.fontSize = '110%';" in widget "Browser" I use this technique (essentially) in hhTextEditBasic, see http://livecodeshare.runrev.com/stack/860 From gcanyon at gmail.com Sun Nov 4 13:40:49 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sun, 4 Nov 2018 10:40:49 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: Alex, good catch! The code below and at https://github.com/gcanyon/alloffsets now puts a stop character after the string to prevent the error you found. I also added a "with overlaps" option. I think this is correct, and about as efficient as possible, but thanks to anyone who finds a bug or a faster way. gc function allOffsets D,S,pCase,pWithOverlaps -- returns a comma-delimited list of the offsets of D in S set the caseSensitive to pCase is true put length(D) into dLength put numtochar(chartonum(char -1 of D) mod 2 + 1) after S if pWithOverlaps then repeat with i = 1 to dLength - 1 if not (char i + 1 to -1 of D is char 1 to dLength - i of D) then next repeat put char -i to -1 of D into OV[i] put i & cr after kList end repeat end if set the itemDel to D put 1 - dLength into C if pWithOverlaps then repeat for each item i in S repeat for each line K in kList if char 1 to K of (i & D) is OV[K] then put (C + K),"" after R end repeat add length(i) + dLength to C put C,"" after R end repeat else repeat for each item i in S add length(i) + dLength to C put C,"" after R end repeat end if set the itemDel to comma repeat until item 1 of R > 0 delete item 1 of R end repeat delete item -1 of R if R is empty then return 0 else return char 1 to -2 of R end allOffsets From brian at milby7.com Sun Nov 4 19:01:55 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 4 Nov 2018 18:01:55 -0600 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: Logic matches my solution. I also validated my solution using just the offset function. Speed hit for with overlap is similar. One possible optimization: put kList is not empty into pWithOverlaps If with overlaps was requested but the source delimiter did not contain any overlaps, then the extra loops are skipped. Adding a character to the end is clever. I'll need to incorporate that and see what it does to my method. My take on the code updates is here: https://github.com/bwmilby/alloffsets/blob/bwm/bwm/allOffsets_Scripts/stack_allOffsets_button_id_1026.livecodescript Stack and index of scripts here: https://github.com/bwmilby/alloffsets/tree/bwm/bwm On Sun, Nov 4, 2018 at 12:42 PM Geoff Canyon via use-livecode < use-livecode at lists.runrev.com> wrote: > Alex, good catch! The code below and at > https://github.com/gcanyon/alloffsets now puts a stop character after the > string to prevent the error you found. I also added a "with overlaps" > option. I think this is correct, and about as efficient as possible, but > thanks to anyone who finds a bug or a faster way. > > gc > > > function allOffsets D,S,pCase,pWithOverlaps > -- returns a comma-delimited list of the offsets of D in S > set the caseSensitive to pCase is true > put length(D) into dLength > put numtochar(chartonum(char -1 of D) mod 2 + 1) after S > if pWithOverlaps then > repeat with i = 1 to dLength - 1 > if not (char i + 1 to -1 of D is char 1 to dLength - i of D) then > next repeat > put char -i to -1 of D into OV[i] > put i & cr after kList > end repeat > end if > set the itemDel to D > put 1 - dLength into C > if pWithOverlaps then > repeat for each item i in S > repeat for each line K in kList > if char 1 to K of (i & D) is OV[K] then put (C + K),"" after R > end repeat > add length(i) + dLength to C > put C,"" after R > end repeat > else > repeat for each item i in S > add length(i) + dLength to C > put C,"" after R > end repeat > end if > set the itemDel to comma > repeat until item 1 of R > 0 > delete item 1 of R > end repeat > delete item -1 of R > if R is empty then return 0 else return char 1 to -2 of R > end allOffsets > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 4 19:33:41 2018 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 4 Nov 2018 16:33:41 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> On 11/4/18 10:40 AM, Geoff Canyon via use-livecode wrote: > I also added a "with overlaps" option. My problem with the pWithOverlaps parameter is that is requires a priori knowledge of the data being consumed. If you already know there are overlaps then you'd set the parameter to true. If you don't know whether or not there are overlaps, then you'd need to set it to true so you don't miss anything (aside, of course, for the trivial case where you don't care whether or not there are overlaps - is there a use case for this?). The only time you would set it to false is after you've already determined that there are no overlaps, and the time spent on that would probably more than offset the extra processing in the function. -- Mark Wieder ahsoftware at gmail.com From brian at milby7.com Sun Nov 4 19:45:15 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 4 Nov 2018 18:45:15 -0600 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> Message-ID: <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> My updated solution always looks for overlap but if none are found it uses optimized versions of the search (private functions instead of inside the main function). I special case for no overlap and a single overlap in the delimiter. It is about the same speed as Geoff?s. Thanks, Brian On Nov 4, 2018, 6:34 PM -0600, Mark Wieder via use-livecode , wrote: > On 11/4/18 10:40 AM, Geoff Canyon via use-livecode wrote: > > I also added a "with overlaps" option. > > My problem with the pWithOverlaps parameter is that is requires a priori > knowledge of the data being consumed. If you already know there are > overlaps then you'd set the parameter to true. If you don't know whether > or not there are overlaps, then you'd need to set it to true so you > don't miss anything (aside, of course, for the trivial case where you > don't care whether or not there are overlaps - is there a use case for > this?). > > The only time you would set it to false is after you've already > determined that there are no overlaps, and the time spent on that would > probably more than offset the extra processing in the function. > > -- > 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 gcanyon at gmail.com Sun Nov 4 21:49:51 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sun, 4 Nov 2018 18:49:51 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: On Sun, Nov 4, 2018 at 4:34 PM Mark Wieder via use-livecode < use-livecode at lists.runrev.com> wrote: > On 11/4/18 10:40 AM, Geoff Canyon via use-livecode wrote: > > I also added a "with overlaps" option. > > My problem with the pWithOverlaps parameter is that is requires a priori > knowledge of the data being consumed. If you already know there are > overlaps then you'd set the parameter to true. If you don't know whether > or not there are overlaps, then you'd need to set it to true so you > don't miss anything (aside, of course, for the trivial case where you > don't care whether or not there are overlaps - is there a use case for > this?). > > The only time you would set it to false is after you've already > determined that there are no overlaps, and the time spent on that would > probably more than offset the extra processing in the function. I'm not sure I agree that it would be so unlikely to know that overlaps won't occur (or that it's unreasonable to not want them). If I'm looking for every instance of "romeo" in romeo and juliet, then obviously I'm not expecting, nor do I want, overlaps. Likewise, overlaps can only occur if the search string allows for them, so "romeo" makes it impossible from the get go That said, it seems reasonable to default overlaps to true rather than false. I'll set it up that way when I add the modification below. On Sun, Nov 4, 2018 at 4:02 PM Brian Milby via use-livecode < use-livecode at lists.runrev.com> wrote: > > put kList is not empty into pWithOverlaps > Good point -- I suppose it also makes sense (albeit that the speed improvement would be trivial) to not bother even building kList if the term to be found is a single character. gc From ahsoftware at sonic.net Sun Nov 4 22:11:18 2018 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 4 Nov 2018 19:11:18 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> Message-ID: <3dcc276c-219b-e2c0-3db0-4d1cdcdc4c7a@sonic.net> On 11/4/18 6:49 PM, Geoff Canyon via use-livecode wrote: > I'm not sure I agree that it would be so unlikely to know that overlaps > won't occur (or that it's unreasonable to not want them). If I'm looking > for every instance of "romeo" in romeo and juliet, then obviously I'm not > expecting, nor do I want, overlaps. Sure, but in that case you'd be better off using the faster 'offset' function. Or do you mean every instance of 'romeo' in the play itself? There I can see why you'd want to set it to false for speed. My point isn't really whether pOverlaps should default to true or false, but that you need detailed knowledge of the corpus of data before calling the function. If you're looking for 'romeo' in pText, would you set pOverlaps to true or to false? -- Mark Wieder ahsoftware at gmail.com From bobsneidar at iotecdigital.com Sun Nov 4 22:41:49 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 03:41:49 +0000 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> Message-ID: <3BA7310B-6249-47A3-B312-3BB97EE55F5A@iotecdigital.com> Simply add 1 to the last offset pointer. If after the first iteration you return 1, then set the charsToSkip to 2 instead of offset + len(searchString) if you take my meaning. Bob S > On Nov 2, 2018, at 17:43 , Geoff Canyon via use-livecode wrote: > > I like that, changing it. Now available at > https://github.com/gcanyon/alloffsets > > One thing I don't see how to do without significantly impacting performance > is to return all offsets if there are overlapping strings. For example: > > allOffsets("aba","abababa") > > would return 1,5, when it might be reasonable to expect it to return 1,3,5. > Using the offset function with numToSkip would make that easy; adapting > allOffsets to do so would be harder to do cleanly I think. > > gc > > On Fri, Nov 2, 2018 at 12:17 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> how about allOffsets? >> >> Bob S >> >> >>> On Nov 2, 2018, at 09:16 , Geoff Canyon via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>> >>> All of those return a single value; I wanted to convey the concept of >>> returning multiple values. To me listOffset implies it does the same >> thing >>> as itemOffset, since items come in a list. How about: >>> >>> offsets -- not my favorite because it's almost indistinguishable from >> offset >>> offsetsOf -- seems a tad clumsy >>> >>> On Fri, Nov 2, 2018 at 7:41 AM Bob Sneidar via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>>> It probably should be named listOffset, like itemOffset or lineOffset. >>>> >>>> Bob S >>>> >>>> >>>>> On Nov 1, 2018, at 17:04 , Geoff Canyon via use-livecode < >>>> use-livecode at lists.runrev.com> wrote: >>>>> >>>>> Nice! I *just* finished creating a github repository for it, and adding >>>>> support for multi-char search strings, much as you did. I was coming to >>>> the >>>>> list to post the update when I saw your post. >>>>> >>>>> Here's the GitHub link: https://github.com/gcanyon/offsetlist >>>>> >>>>> Here's my updated version: >>>>> >>>>> function offsetList D,S,pCase >>>>> -- returns a comma-delimited list of the offsets of D in S >>>>> set the caseSensitive to pCase is true >>>>> set the itemDel to D >>>>> put length(D) into dLength >>>>> put 1 - dLength into C >>>>> repeat for each item i in S >>>>> add length(i) + dLength to C >>>>> put C,"" after R >>>>> end repeat >>>>> set the itemDel to comma >>>>> if char -dLength to -1 of S is D then return char 1 to -2 of R >>>>> put length(C) + 1 into lenC >>>>> put length(R) into lenR >>>>> if lenC = lenR then return 0 >>>>> return char 1 to lenR - lenC - 1 of R >>>>> end offsetList >>>>> >>>>> On Thu, Nov 1, 2018 at 8:28 AM Niggemann, Bernd via use-livecode < >>>>> use-livecode at lists.runrev.com> wrote: >>>>> >>>>>> Hi Geoff, >>>>>> >>>>>> thank you for this beautiful script. >>>>>> >>>>>> I modified it a bit to accept multi-character search string and also >> for >>>>>> case sensitivity. >>>>>> >>>>>> It definitely is a lot faster for unicode text than anything I have >>>> seen. >>>>>> >>>>>> ----------------------------- >>>>>> function offsetList D,S, pCase >>>>>> -- returns a comma-delimited list of the offsets of D in S >>>>>> -- pCase is a boolean for caseSensitive >>>>>> set the caseSensitive to pCase >>>>>> set the itemDel to D >>>>>> put the length of D into tDelimLength >>>>>> repeat for each item i in S >>>>>> add length(i) + tDelimLength to C >>>>>> put C - (tDelimLength - 1),"" after R >>>>>> end repeat >>>>>> set the itemDel to comma >>>>>> if char -1 of S is D then return char 1 to -2 of R >>>>>> put length(C) + 1 into lenC >>>>>> put length(R) into lenR >>>>>> if lenC = lenR then return 0 >>>>>> return char 1 to lenR - lenC - 1 of R >>>>>> end offsetList >>>>>> ------------------------------ >>>>>> >>>>>> Kind regards >>>>>> Bernd >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>> Date: Thu, 1 Nov 2018 00:15:37 -0700 >>>>>>> From: Geoff Canyon >>>>>>> To: How to use LiveCode >>>>>>> Subject: Re: How to find the offset of the last instance of a >>>>>>> repeating character in a string? >>>>>>> >>>>>>> I was curious if using the itemDelimiter might work for this, so I >>>> wrote >>>>>>> the below code out of curiosity; but in my quick testing with >>>> single-byte >>>>>>> characters it was only about 30% faster than the above methods, so I >>>>>> didn't >>>>>>> bother to post it. >>>>>>> >>>>>>> But Ben Rubinstein just posted about a terrible slow-down doing >> pretty >>>>>> much >>>>>>> this same thing for text with unicode characters. So I ran a simple >>>> test >>>>>>> with 8000 character long strings that start with a single unicode >>>>>>> character, this is about 15x faster than offset() with skip. For >>>>>>> 100,000-character lines it's about 300x faster, so it seems to be >>>> immune >>>>>> to >>>>>>> the line-painter issues skip is subject to. So for what it's worth: >>>>>>> >>>>>>> function offsetList D,S >>>>>>> -- returns a comma-delimited list of the offsets of D in S >>>>>>> set the itemDel to D >>>>>>> repeat for each item i in S >>>>>>> add length(i) + 1 to C >>>>>>> put C,"" after R >>>>>>> end repeat >>>>>>> set the itemDel to comma >>>>>>> if char -1 of S is D then return char 1 to -2 of R >>>>>>> put length(C) + 1 into lenC >>>>>>> put length(R) into lenR >>>>>>> if lenC = lenR then return 0 >>>>>>> return char 1 to lenR - lenC - 1 of R >>>>>>> end offsetList >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> use-livecode mailing list >>>>>> use-livecode 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 bobsneidar at iotecdigital.com Sun Nov 4 22:44:31 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 03:44:31 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> Message-ID: <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> Thanks Trevor. I perused the lessons and the documentation but could not find anything that might aid me in this. I will have a look at that lesson! Bob S > On Nov 2, 2018, at 15:49 , Trevor DeVore via use-livecode wrote: > > On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> >> What I would like to see added to the datagrid is a handler that >> intercepted the population of a field so what goes into the field can be >> custom formatted. This comes up a lot. Dates and numbers from an SQL query >> are unformatted, and having to go through the datagrid when populating and >> formatting each record's data before displaying it, and then reformatting >> it before pushing it back up to the database seems like more work than >> necessary. >> > > The Data Grid already supports this. Just customize the default column > behavior. Take a look at this article which truncates text that is too wide: > > http://lessons.livecode.com/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell > > -- > Trevor DeVore > ScreenSteps > www.screensteps.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 Sun Nov 4 23:01:25 2018 From: ahsoftware at sonic.net (Mark Wieder) Date: Sun, 4 Nov 2018 20:01:25 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> Message-ID: <458ecc35-1610-1de8-33c2-8b3bf2212e83@sonic.net> On 11/4/18 4:45 PM, Brian Milby via use-livecode wrote: > My updated solution always looks for overlap but if none are found it uses optimized versions of the search (private functions instead of inside the main function). I special case for no overlap and a single overlap in the delimiter. It is about the same speed as Geoff?s. Nice. I tried to get tricky and replace that 'replace with' loop with a 'repeat for each' loop, but ended up about 20% slower. Not at all what I expected. -- Mark Wieder ahsoftware at gmail.com From brian at milby7.com Sun Nov 4 23:07:13 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 4 Nov 2018 22:07:13 -0600 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <458ecc35-1610-1de8-33c2-8b3bf2212e83@sonic.net> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> <458ecc35-1610-1de8-33c2-8b3bf2212e83@sonic.net> Message-ID: <4bc98a45-3400-4afe-b877-29205a8797a3@Spark> I?m working on an update to the stack now. Moving buttons to the left side to make it easier to add more. Thanks, Brian On Nov 4, 2018, 10:02 PM -0600, Mark Wieder via use-livecode , wrote: > On 11/4/18 4:45 PM, Brian Milby via use-livecode wrote: > > My updated solution always looks for overlap but if none are found it uses optimized versions of the search (private functions instead of inside the main function). I special case for no overlap and a single overlap in the delimiter. It is about the same speed as Geoff?s. > > Nice. I tried to get tricky and replace that 'replace with' loop with a > 'repeat for each' loop, but ended up about 20% slower. Not at all what I > expected. > > -- > 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 brian at milby7.com Sun Nov 4 23:56:20 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 4 Nov 2018 22:56:20 -0600 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <4bc98a45-3400-4afe-b877-29205a8797a3@Spark> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> <458ecc35-1610-1de8-33c2-8b3bf2212e83@sonic.net> <4bc98a45-3400-4afe-b877-29205a8797a3@Spark> Message-ID: Here's an image of the stack in my fork of the repo: https://github.com/bwmilby/alloffsets/blob/bwm/bwm/stack_allOffsets_card_id_1018.png On Sun, Nov 4, 2018 at 10:07 PM Brian Milby wrote: > I?m working on an update to the stack now. Moving buttons to the left side > to make it easier to add more. > > Thanks, > Brian > On Nov 4, 2018, 10:02 PM -0600, Mark Wieder via use-livecode < > use-livecode at lists.runrev.com>, wrote: > > On 11/4/18 4:45 PM, Brian Milby via use-livecode wrote: > > My updated solution always looks for overlap but if none are found it uses > optimized versions of the search (private functions instead of inside the > main function). I special case for no overlap and a single overlap in the > delimiter. It is about the same speed as Geoff?s. > > > Nice. I tried to get tricky and replace that 'replace with' loop with a > 'repeat for each' loop, but ended up about 20% slower. Not at all what I > expected. > > -- > 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 gcanyon at gmail.com Mon Nov 5 04:29:33 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 5 Nov 2018 01:29:33 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <3BA7310B-6249-47A3-B312-3BB97EE55F5A@iotecdigital.com> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <3BA7310B-6249-47A3-B312-3BB97EE55F5A@iotecdigital.com> Message-ID: On Sun, Nov 4, 2018 at 7:42 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Simply add 1 to the last offset pointer. If after the first iteration you > return 1, then set the charsToSkip to 2 instead of offset + > len(searchString) if you take my meaning. > > Bob S > The method we're using avoids charsToSkip because it suffers mightily with multi-byte characters. But the latest updates handle overlapping results, see other posts in this thread. From gcanyon at gmail.com Mon Nov 5 04:36:10 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 5 Nov 2018 01:36:10 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <3dcc276c-219b-e2c0-3db0-4d1cdcdc4c7a@sonic.net> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <3dcc276c-219b-e2c0-3db0-4d1cdcdc4c7a@sonic.net> Message-ID: On Sun, Nov 4, 2018 at 7:11 PM Mark Wieder via use-livecode < use-livecode at lists.runrev.com> wrote: > > If you're looking for 'romeo' in pText, would you set pOverlaps to true > or to false? I'd set it to false, there's no way for "romeo" to overlap. But even if I were looking for "radar", which could overlap, I'd set it to false if I were searching an english text document, because there's no word "radaradar". But as I said, I've switched it to default to finding overlaps. From gcanyon at gmail.com Mon Nov 5 04:40:55 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 5 Nov 2018 01:40:55 -0800 Subject: How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon) In-Reply-To: <4bc98a45-3400-4afe-b877-29205a8797a3@Spark> References: <4C20133B-165C-437E-888B-96EA9EB991DC@iotecdigital.com> <1dde7fc0-5948-c90c-7fc2-5d1a0f811c1b@tweedly.net> <2ff14f74-6ea7-1945-1b13-ba3b4fc215fc@sonic.net> <88924470-b32a-4d4f-9b22-0b0ed4dcc9d6@Spark> <458ecc35-1610-1de8-33c2-8b3bf2212e83@sonic.net> <4bc98a45-3400-4afe-b877-29205a8797a3@Spark> Message-ID: I've updated my GitHub to the following, which adopts Brian's "starts with" (I can't count how many times I've had to re-remember that "starts with" is faster than comparing to char 1 through ) and added minor optimizations to the wrapping-up code. gc function allOffsets D,S,pCase,pNoOverlaps -- returns a comma-delimited list of the offsets of D in S set the caseSensitive to pCase is true put length(D) into dLength put pNoOverlaps and dLength > 1 into pNoOverlaps put numtochar(chartonum(char -1 of D) mod 2 + 1) after S if not pNoOverlaps then repeat with i = 1 to dLength - 1 if not (char i + 1 to -1 of D is char 1 to dLength - i of D) then next repeat put char -i to -1 of D into OV[i] put i & cr after kList end repeat end if set the itemDel to D put 1 - dLength into C if pNoOverlaps or kList is empty then repeat for each item i in S add length(i) + dLength to C put C,"" after R end repeat else repeat for each item i in S repeat for each line K in kList if i & D begins with OV[K] then put (C + K),"" after R end repeat add length(i) + dLength to C put C,"" after R end repeat end if set the itemDel to comma repeat with i = 1 to 99999999999 if item i of R > 0 then exit repeat end repeat delete item 1 to i - 1 of R if R begins with C then return 0 return char 1 to -3 - length(C) of R end allOffsets From james at thehales.id.au Mon Nov 5 08:49:10 2018 From: james at thehales.id.au (James Hale) Date: Tue, 6 Nov 2018 00:49:10 +1100 Subject: How to update a css file when using the Browser widget Message-ID: hh wrote: > Say you have the font-size declaration in the css for body. > > Then script, for example: > do "document.body.style.fontSize = '110%';" in widget "Browser" Brilliant! Thank you so much Hermann. Putting the script in a button worked like a charm Putting it in the handler that loads the page sort of works. putting in an "on browserDocumentLoadComplete" handler works, full stop. James From panos.merakos at livecode.com Mon Nov 5 10:24:23 2018 From: panos.merakos at livecode.com (panagiotis merakos) Date: Mon, 5 Nov 2018 17:24:23 +0200 Subject: [ANN] This Week in LiveCode 153 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 #153 here: https://goo.gl/T9FBCV 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 you 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 bobsneidar at iotecdigital.com Mon Nov 5 11:15:37 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 16:15:37 +0000 Subject: Is this right? ColumnBehavior Message-ID: <915779AD-11EE-4092-8BD8-D50ADE17EC8D@iotecdigital.com> In the script of the behavior for columns in the datagrid library, I see this: on ResetData -- Sent when column data is being emptied because the control is no longer being used to display data set the text me to empty end ResetData Shouldn't that be "the text OF me"?? Will that even compile?? Bob S From bobsneidar at iotecdigital.com Mon Nov 5 12:03:13 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 17:03:13 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> Message-ID: Hi Trevor. Just a heads up, I followed those instructions in the lesson to the letter. It broke my datagrid. It would no longer populate and I could not select a row by clicking on it. It may have to do with the new dg behavior heirarchy. I could see that someone else was having difficulty as late as last Friday, although it looks like it's a different issue. I'll poke around with it and see if I can figure out why, but it looks to me that the new behavior object is not getting any messages sent to it. Bob S > On Nov 4, 2018, at 19:44 , Bob Sneidar via use-livecode wrote: > > Thanks Trevor. I perused the lessons and the documentation but could not find anything that might aid me in this. I will have a look at that lesson! > > Bob S > > >> On Nov 2, 2018, at 15:49 , Trevor DeVore via use-livecode wrote: >> >> On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> >>> What I would like to see added to the datagrid is a handler that >>> intercepted the population of a field so what goes into the field can be >>> custom formatted. This comes up a lot. Dates and numbers from an SQL query >>> are unformatted, and having to go through the datagrid when populating and >>> formatting each record's data before displaying it, and then reformatting >>> it before pushing it back up to the database seems like more work than >>> necessary. >>> >> >> The Data Grid already supports this. Just customize the default column >> behavior. Take a look at this article which truncates text that is too wide: >> >> http://lessons.livecode.com/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell >> >> -- >> Trevor DeVore >> ScreenSteps >> www.screensteps.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 bobsneidar at iotecdigital.com Mon Nov 5 12:12:15 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 17:12:15 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> Message-ID: <49E4ADAA-2419-46DE-846A-EFD00763E3CF@iotecdigital.com> I think at some point the way this needs to work is to send fillInData message to the script of the datagrid. Most LC devs see the datagrid as a complex magical black box kind of object, and are reticent to pull it apart or copy bits of it to other places to get it to do something different. If fillInData were sent to the datagrid after it was done doing it's thing, it would be much cleaner. I'm going to try to edit the default column behavior to do just that, and if I can get it to work, I'll submit a change request. Bob S > On Nov 4, 2018, at 19:44 , Bob Sneidar via use-livecode wrote: > > Thanks Trevor. I perused the lessons and the documentation but could not find anything that might aid me in this. I will have a look at that lesson! > > Bob S > > >> On Nov 2, 2018, at 15:49 , Trevor DeVore via use-livecode wrote: >> >> On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> >>> What I would like to see added to the datagrid is a handler that >>> intercepted the population of a field so what goes into the field can be >>> custom formatted. This comes up a lot. Dates and numbers from an SQL query >>> are unformatted, and having to go through the datagrid when populating and >>> formatting each record's data before displaying it, and then reformatting >>> it before pushing it back up to the database seems like more work than >>> necessary. >>> >> >> The Data Grid already supports this. Just customize the default column >> behavior. Take a look at this article which truncates text that is too wide: >> >> http://lessons.livecode.com/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell >> >> -- >> Trevor DeVore >> ScreenSteps >> www.screensteps.com From lists at mangomultimedia.com Mon Nov 5 12:22:56 2018 From: lists at mangomultimedia.com (Trevor DeVore) Date: Mon, 5 Nov 2018 11:22:56 -0600 Subject: Sorting datagrid column with a tricj? In-Reply-To: References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> Message-ID: On Mon, Nov 5, 2018 at 11:03 AM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Trevor. > > Just a heads up, I followed those instructions in the lesson to the > letter. It broke my datagrid. It would no longer populate and I could not > select a row by clicking on it. > > It may have to do with the new dg behavior heirarchy. I could see that > someone else was having difficulty as late as last Friday, although it > looks like it's a different issue. I would suggest submitting a note on the article letting the team know. You are probably right about the new dg behavior changes breaking it. I know it used to work as that is how I always customized how columns display data when it was simply a matter of reformatting the text. -- Trevor DeVore ScreenSteps From bobsneidar at iotecdigital.com Mon Nov 5 12:43:47 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 5 Nov 2018 17:43:47 +0000 Subject: Sorting datagrid column with a tricj? In-Reply-To: References: <8C3D0F6E-F6A0-4202-BAE4-4BDCC21240EC@major-k.de> <578F8378-41AD-4872-82C2-B500CDA7ACA9@iotecdigital.com> <4308EC2C-21EA-4826-A2EB-CF6E7FD768C6@major-k.de> <3F039229-A21E-4DBA-BC97-08332BAB1B04@iotecdigital.com> <09176070-79D5-4660-84A8-B0777D6F3B50@iotecdigital.com> <41792922-9F71-4D3C-A52A-C94D815A563C@iotecdigital.com> Message-ID: Hi Trevor. Actually I came up with a fairly elegant solution which is quite simple. In the column behavior script I added some code: on FillInData pData -- This message is sent when the Data Grid needs to populate -- this template with the column data. pData is the value to be displayed. set the text of the long ID of me to pData ## temp workaround for -- Sly Labs! Custom Column Formatting dispatch customFillInData to me with pData, the dgColumn of me end FillInData Of course, I had to edit the permissions of the folder containing the behavior script, as well as the script only stack itself so I could save the changes. Next I added this to my datagrid: on customFillInData pData, pColumn switch pColumn case "lastupdate" put the text of the target into tColumnValue if tColumnValue is not empty then \ set the text of the target to \ formatDate(word 1 of tColumnValue, "abbr date") && word 2 of tColumnValue -- formatDate() is my own function which converts any date to one of several custom formats LC does not use break end switch end customFillInData Not only does this work famously, but it does not affect the underlying data. It only updates the value in the datagrid field. This can be built upon to create datagrids which have a spreadsheet-like field formatting while the underlying data is the raw value. You could even store equasions and then resolve the equasions in the display, just like a spreadsheet. I'll have to figure out how to reformat going the other direction, so that editing the displayed data will store the raw value and not the displayed value. Anyone wanna chime in on this method before I submit a change request? Bob S > On Nov 5, 2018, at 09:22 , Trevor DeVore via use-livecode wrote: > > On Mon, Nov 5, 2018 at 11:03 AM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi Trevor. >> >> Just a heads up, I followed those instructions in the lesson to the >> letter. It broke my datagrid. It would no longer populate and I could not >> select a row by clicking on it. >> >> It may have to do with the new dg behavior heirarchy. I could see that >> someone else was having difficulty as late as last Friday, although it >> looks like it's a different issue. > > > I would suggest submitting a note on the article letting the team know. You > are probably right about the new dg behavior changes breaking it. I know it > used to work as that is how I always customized how columns display data > when it was simply a matter of reformatting the text. > > -- > Trevor DeVore > ScreenSteps > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From lists at mangomultimedia.com Tue Nov 6 00:15:53 2018 From: lists at mangomultimedia.com (Trevor DeVore) Date: Mon, 5 Nov 2018 23:15:53 -0600 Subject: [Hacktoberfest] Improving Hi-DPI support on Windows as a Community In-Reply-To: References: Message-ID: On Thu, Oct 11, 2018 at 10:40 AM Trevor DeVore wrote: > I'm aware of the following limitations and bugs around Hi-DPI support on > Windows: > > 1. The `screenPixelScales` reports the pixelScale of the primary monitor > for all attached monitors. For example, if you have a Windows 10 computer > with two monitors attached and the primary monitor is set to displays at > 100% (1.0 pixelScale) and a second monitor at 200% (2.0 pixelScale) then > the `screenPixelScales` returns `1.0\n1.0` when it should return `1.0\n2.0`. > > https://quality.livecode.com/show_bug.cgi?id=19542 > An update for anyone interested. Today I finished setting up a build environment for LiveCode Community on Windows and I started doing some testing. Fixing `the screenPixelScales` issue was actually really easy. It was just a matter of adding some XML to the engine/standalone manifests. You can see what I've changed so far at the following url. It compares a branch I created to the LiveCode develop-9.0 branch: https://github.com/livecode/livecode/compare/develop-9.0...trevordevore:tkd-dpiawareness?expand=1 The next item of business is to update `the screenPixelScale of stack tStack`. It currently returns the wrong value on secondary displays. I'm guessing it involves switching to GetDpiForWindow() in the code. Another to-do item is that the WM_DPICHANGED message needs to be handled and do something like call `MCDispatch::reopen_stack_windows()`. -- Trevor DeVore ScreenSteps www.screensteps.com > From keith.clarke at me.com Tue Nov 6 04:10:59 2018 From: keith.clarke at me.com (Keith Clarke) Date: Tue, 06 Nov 2018 09:10:59 +0000 Subject: Do javascript function in browser widget? Message-ID: Folks, I?ve found a few examples of simple inline script injection to the browser widget, such as do "document.body.style.background = ?red';" in widget "Browser? Is it possible to inject a multi-line javascript function - with variables definition, loops, etc - in this fashion or would the function need to be injected into the page within the browser as markup and then called from a one-line script from LiveCode? Thanks & regards, Keith From andre at andregarzia.com Tue Nov 6 05:38:32 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Tue, 6 Nov 2018 10:38:32 +0000 Subject: Do javascript function in browser widget? In-Reply-To: References: Message-ID: Keith, If you're in control of the HTML used in the widget, then I'd advise you to build functions inside the HTML and just call them from LC instead of executing script directly, such as: ---- in the html ---- ? ? ... ?? ? ? ?... ? ------------------- Then in the LC part you can do something like: ? do "paintItRed()" in widget "Browser" Which is more readable. Also, the body of the function inside the HTML can be as complex as you want. Now, if you're not in control of the HTML, I'd opt for some out-of-the-box strategy where you have the LC HTTPD library serving the JS content and then use the LC "do .. in widget" form to add a new > > > > > > ... > > > > > > ------------------- > > > Then in the LC part you can do something like: > > > do "paintItRed()" in widget "Browser" > > > Which is more readable. Also, the body of the function inside the HTML can be as complex as you want. Now, if you're not in control of the HTML, I'd opt for some out-of-the-box strategy where you have the LC HTTPD library serving the JS content and then use the LC "do .. in widget" form to add a new tags right before . Set (another) javascriptHandler of the widget to "jsNotify" and script in the widget or card, for example: on jsNotify v put the seconds && v into fld "info" end jsNotify Don't use an alert here: You will also get the alert when you scroll a little bit up from the bottom. This small indeterminate region is also influenced by the horizontal scrollbar of the browser widget (which you can't control). Related: http://forums.livecode.com/viewtopic.php?p=152156#p152156 http://forums.livecode.com/viewtopic.php?p=156745#p156745 p.s. Answering is easier in the forum, especially if your questions become more complicated (as soon as the browser widget has won you over). From james at thehales.id.au Thu Nov 8 08:42:56 2018 From: james at thehales.id.au (James Hale) Date: Fri, 9 Nov 2018 00:42:56 +1100 Subject: How to tell if the page displayed in the Browser widget has scrolled Message-ID: Many thanks Hermann. I can follow this (logic wise) as well as the forum links you provided. But I didn't quite follow the implementation. For now I will put it on the "it would be nice but not required" list, else I will not finish. And yes, I will ask on the forum should I have a potentially long thread. I have been on the use list since its inception in 2001 so it is automatically my first point of call. James From hh at hyperhh.de Thu Nov 8 10:55:56 2018 From: hh at hyperhh.de (hh) Date: Thu, 8 Nov 2018 16:55:56 +0100 Subject: How to tell if the page displayed in the Browser widget has scrolled Message-ID: James. You are looking for difficulties that are not present. A. Do once: A1. put into widget's or card's script (this is a javaScriptHandler): on jsNotify v put the seconds &": "& v into fld "info" -- or your action end jsNotify A2. From a button or msg (or use the property inspector): put the javaScriptHandlers of widget "browser" into jsh if jsh is not empty then put cr & "jsNotify" after jsh else put "jsNotify" into jsh set the javaScriptHandlers of widget "browser" to jsh B. Do once for every new loaded page, no matter where from (say http://livecode.com), for example from a button: put "window.onscroll = function() { " & \ "if (window.innerHeight + window.pageYOffset >= " & \ "document.body.offsetHeight) " & \ "liveCode.jsNotify('I am at the bottom'); };" into js do js in widget "Browser" Then scroll the browser widget to bottom and watch your field "info". From andre at andregarzia.com Thu Nov 8 11:26:53 2018 From: andre at andregarzia.com (Andre Garzia) Date: Thu, 8 Nov 2018 16:26:53 +0000 Subject: SSL with HTTPD Library? In-Reply-To: References: Message-ID: Stephen, If this is to be accessed from a server as in, you have a server running some LC code that will reply to whatever needs to make that request the you can use a "reverse proxy" in front of the LC server process such as caddy or even just point a cloudflare instance to it and point your domain to cloudflare. I dont know what the use case is here but be aware that LC behind caddy, apache or nginx will run circles around a LC desktop app serving stuff using any of the available HTTPd libraries (including my own). Om om Andre On Tue, Oct 30, 2018, 16:04 Stephen MacLean via use-livecode < use-livecode at lists.runrev.com wrote: > Hi All, > > I?m looking to use the HTTPD library with an SSL Cert if possible. > > Is it possible? > > TIA, > > Steve MacLean > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Thu Nov 8 11:35:46 2018 From: tom at makeshyft.com (Tom Glod) Date: Thu, 8 Nov 2018 11:35:46 -0500 Subject: How to tell if the page displayed in the Browser widget has scrolled In-Reply-To: References: Message-ID: Hermann.... you are a rockstar. I will use this method also. Thank you. On Thu, Nov 8, 2018 at 10:55 AM, hh via use-livecode < use-livecode at lists.runrev.com> wrote: > James. > > You are looking for difficulties that are not present. > > A. Do once: > > A1. put into widget's or card's script > (this is a javaScriptHandler): > > on jsNotify v > put the seconds &": "& v into fld "info" -- or your action > end jsNotify > > A2. From a button or msg (or use the property inspector): > > put the javaScriptHandlers of widget "browser" into jsh > if jsh is not empty then put cr & "jsNotify" after jsh > else put "jsNotify" into jsh > set the javaScriptHandlers of widget "browser" to jsh > > B. Do once for every new loaded page, no matter where from > (say http://livecode.com), for example from a button: > > put "window.onscroll = function() { " & \ > "if (window.innerHeight + window.pageYOffset >= " & \ > "document.body.offsetHeight) " & \ > "liveCode.jsNotify('I am at the bottom'); };" into js > do js in widget "Browser" > > Then scroll the browser widget to bottom and watch your field "info". > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From tom at makeshyft.com Thu Nov 8 11:36:15 2018 From: tom at makeshyft.com (Tom Glod) Date: Thu, 8 Nov 2018 11:36:15 -0500 Subject: [Hacktoberfest] Improving Hi-DPI support on Windows as a Community In-Reply-To: References: Message-ID: Thanks everyone for your efforts on this and other bugs. On Tue, Nov 6, 2018 at 12:10 PM, Trevor DeVore via use-livecode < use-livecode at lists.runrev.com> wrote: > On Mon, Nov 5, 2018 at 11:15 PM Trevor DeVore > wrote: > > > On Thu, Oct 11, 2018 at 10:40 AM Trevor DeVore < > lists at mangomultimedia.com> > > wrote: > > > >> I'm aware of the following limitations and bugs around Hi-DPI support on > >> Windows: > >> > >> 1. The `screenPixelScales` reports the pixelScale of the primary monitor > >> for all attached monitors. For example, if you have a Windows 10 > computer > >> with two monitors attached and the primary monitor is set to displays at > >> 100% (1.0 pixelScale) and a second monitor at 200% (2.0 pixelScale) then > >> the `screenPixelScales` returns `1.0\n1.0` when it should return > `1.0\n2.0`. > >> > >> https://quality.livecode.com/show_bug.cgi?id=19542 > >> > > > > An update for anyone interested. Today I finished setting up a build > > environment for LiveCode Community on Windows and I started doing some > > testing. Fixing `the screenPixelScales` issue was actually really easy. > It > > was just a matter of adding some XML to the engine/standalone manifests. > > You can see what I've changed so far at the following url. It compares a > > branch I created to the LiveCode develop-9.0 branch: > > > > > > https://github.com/livecode/livecode/compare/develop-9.0.. > .trevordevore:tkd-dpiawareness?expand=1 > > > > The next item of business is to update `the screenPixelScale of stack > > tStack`. It currently returns the wrong value on secondary displays. I'm > > guessing it involves switching to GetDpiForWindow() in the code. > > > > There isn't actually a `screenPixelScale` property for a stack so ignore > the comment above. > > I have done a fair bit of testing and further research. I've updated the > bug report with my notes: > > https://quality.livecode.com/show_bug.cgi?id=19542#c6 > > If anyone feels they can jump in and provide some additional coding or > testing it would be great. > > -- > Trevor DeVore > ScreenSteps > www.screensteps.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 Thu Nov 8 21:31:35 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Fri, 9 Nov 2018 02:31:35 +0000 Subject: Trouble with Android Keystore alias/password Message-ID: It been a long time since I built a standalone for Google Play. In the SA settings panel I choose Sign with My Key -- browser for the #######.keystore file -- it loads fine save the stack and build to standalone Please provide alias for the keystore -- ###### enter it -- I have it well documented Please provide the keystore password -- ####### enter it Error: There was an error while saving the Standalone A BRpplication no password provided for keystore --------- Well, if I had given wrong alias I would expect a different message. "That is not an alias for this keystore" Or, if I has given a wrong password, one would expect "The password is incorrect" But instead it says no password provided? BR From jacque at hyperactivesw.com Thu Nov 8 22:48:23 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 08 Nov 2018 21:48:23 -0600 Subject: Trouble with Android Keystore alias/password In-Reply-To: References: Message-ID: <166f695c370.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Did you try to paste the password? It doesn't work, you have to type it very slowly...one...letter...at...a...time. Pretend you never learned to touch type. Who knows what it's doing in between keystrokes. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 8, 2018 8:33:39 PM Sannyasin Brahmanathaswami via use-livecode wrote: > It been a long time since I built a standalone for Google Play. > > In the SA settings panel I choose > > Sign with My Key > -- browser for the #######.keystore file > -- it loads fine > > save the stack and build to standalone > > Please provide alias for the keystore > -- ###### enter it -- I have it well documented > > Please provide the keystore password > -- ####### enter it > > Error: > > There was an error while saving the > Standalone A > > BRpplication > no password provided for keystore > > --------- > Well, if I had given wrong alias I would expect a different message. > "That is not an alias for this keystore" > > Or, if I has given a wrong password, one would expect > "The password is incorrect" > > But instead it says no password provided? > > 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 keith.clarke at me.com Fri Nov 9 04:02:18 2018 From: keith.clarke at me.com (Keith Clarke) Date: Fri, 09 Nov 2018 09:02:18 +0000 Subject: Where is the declarative border color setting in the property inspector? Message-ID: <49E8616E-66FC-48FE-9641-9E0633A8EA84@me.com> Folks, Am I missing something - has border color been removed from the Property Inspector?s ?colors? tab or has one always had to code this? Thanks, Keith From panos.merakos at livecode.com Fri Nov 9 05:02:07 2018 From: panos.merakos at livecode.com (panagiotis merakos) Date: Fri, 9 Nov 2018 12:02:07 +0200 Subject: [ANN] Release 9.0.2 RC-1 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.0.2 RC-1. Getting the Release =================== You can get the release at https://downloads.livecode.com/livecode/ or via the automatic updater. Release Contents ================ LiveCode 9.0.2 RC-1 comes with more than 80 bugfixes. Several crashes have been fixed, and dozens of Dictionary entries have been corrected and enhanced. Special thanks to the community members for this, who have been very active during the Hacktoberfest this month. In addition, LiveCode 9.0.2 RC-1 includes: - support for building with Xcode 10, using iOS 12 SDK - new tsNet and mergExt builds - fixes for a couple of bugs present only on iOS 12 Known issues ================ - The Browser widget's native layer is not shown in some Linux distros with Cinnamon window manager. - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit LTS yet. The full release notes are available from: http://downloads.livecode.com/livecode/9_0_2/LiveCodeNotes-9_0_2_rc_1.pdf Feedback ======== Please report any bugs encountered on our BugZilla at http://quality.livecode.com/ We have a forum available for discussing LiveCode Builder at http://forums.livecode.com/viewforum.php?f=93 Have fun! The LiveCode Team -- From Bernd.Niggemann at uni-wh.de Fri Nov 9 06:13:21 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Fri, 9 Nov 2018 11:13:21 +0000 Subject: Where is the declarative border color setting in the property In-Reply-To: References: Message-ID: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> Keith, depending on your settings in Preferences -> General -> "Description of option" or "Name of Livecode Property" border color will show up in Properties Inspector in tab "Colors" as "Border/grid Color" or "borderColor" Kind regards Bernd > Date: Fri, 09 Nov 2018 09:02:18 +0000 > From: Keith Clarke > Folks, > Am I missing something - has border color been removed from the Property Inspector?s ?colors? tab or has one always had to code this? > Thanks, > Keith From keith.clarke at me.com Fri Nov 9 06:26:48 2018 From: keith.clarke at me.com (Keith Clarke) Date: Fri, 09 Nov 2018 11:26:48 +0000 Subject: Where is the declarative border color setting in the property In-Reply-To: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> Message-ID: Thanks Bernd. That?s exactly what I was expecting, but see neither - 'Border fill' is the only Border color property I see in the list?!? Could I have accidentally set something to hide this? Best, Keith > On 9 Nov 2018, at 11:13, Niggemann, Bernd via use-livecode wrote: > > Keith, > > depending on your settings in Preferences -> General -> "Description of option" or "Name of Livecode Property" border color will show up in Properties Inspector in tab "Colors" as > > "Border/grid Color" or "borderColor" > > Kind regards > Bernd > > >> Date: Fri, 09 Nov 2018 09:02:18 +0000 >> From: Keith Clarke > >> Folks, >> Am I missing something - has border color been removed from the Property Inspector?s ?colors? tab or has one always had to code this? >> Thanks, >> Keith > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From Bernd.Niggemann at uni-wh.de Fri Nov 9 06:41:25 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Fri, 9 Nov 2018 11:41:25 +0000 Subject: Where is the declarative border color setting in the property In-Reply-To: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> Message-ID: <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> Keith, I see "Border fill" when the preference setting is "Description of option" for a field. For an image I see "Border/grid Color" with the same setting. Since I always have "Name of Livecode Property" set in Preferences I never noticed the difference. Anyhow the tooltip shows the alternative option Kind regards Bernd Thanks Bernd. That?s exactly what I was expecting, but see neither - 'Border fill' is the only Border color property I see in the list?!? Could I have accidentally set something to hide this? Best, Keith Am 09.11.2018 um 12:13 schrieb berndnig >: Keith, depending on your settings in Preferences -> General -> "Description of option" or "Name of Livecode Property" border color will show up in Properties Inspector in tab "Colors" as "Border/grid Color" or "borderColor" Kind regards Bernd Date: Fri, 09 Nov 2018 09:02:18 +0000 From: Keith Clarke Folks, Am I missing something - has border color been removed from the Property Inspector?s ?colors? tab or has one always had to code this? Thanks, Keith From keith.clarke at me.com Fri Nov 9 06:56:39 2018 From: keith.clarke at me.com (Keith Clarke) Date: Fri, 09 Nov 2018 11:56:39 +0000 Subject: Where is the declarative border color setting in the property In-Reply-To: <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> Message-ID: D?Oh - of course, in LC the basic 'border fill' = CSS ?border: color' (as shown in the clearly 'not-quite-idiot-proof' tool-tip!). Thanks! Sorry to waste your time - I?m jumping between LC, Javascript and CSS and my Babel Fish has clearly fallen asleep or out? https://www.youtube.com/watch?v=YWqHkYtREAE ?boy am I glad the weekend is fast-approaching! :-) Best, Keith > On 9 Nov 2018, at 11:41, Niggemann, Bernd via use-livecode wrote: > > Keith, > > I see "Border fill" when the preference setting is "Description of option" for a field. For an image I see "Border/grid Color" with the same setting. > > Since I always have "Name of Livecode Property" set in Preferences I never noticed the difference. > > Anyhow the tooltip shows the alternative option > > Kind regards > > Bernd > > > Thanks Bernd. That?s exactly what I was expecting, but see neither - 'Border > fill' is the only Border color property I see in the list?!? > > Could I have accidentally set something to hide this? > Best, > Keith > > > Am 09.11.2018 um 12:13 schrieb berndnig >: > > Keith, > > depending on your settings in Preferences -> General -> "Description of option" or "Name of Livecode Property" border color will show up in Properties Inspector in tab "Colors" as > > "Border/grid Color" or "borderColor" > > Kind regards > Bernd > > > Date: Fri, 09 Nov 2018 09:02:18 +0000 > From: Keith Clarke > > Folks, > Am I missing something - has border color been removed from the Property Inspector?s ?colors? tab or has one always had to code this? > Thanks, > Keith > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Fri Nov 9 08:43:51 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Fri, 9 Nov 2018 13:43:51 +0000 Subject: Trouble with Android Keystore alias/password References: <166f695c370.285b.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: On 11/8/18 5:48 PM, J. Landman Gay via use-livecode wrote: > Did you try to paste the password? It doesn't work, you have to type it > very slowly...one...letter...at...a...time. Pretend you never learned to > touch type. > > Who knows what it's doing in between keystrokes. Ahh, ok Perhaps it was "divine grace" because 9.02 RC 1, came out today Hopefully ready for production -- of course, we cannot say that, (RC1) but I need bug fixes in apps right away. BR From james at thehales.id.au Fri Nov 9 09:45:09 2018 From: james at thehales.id.au (James Hale) Date: Sat, 10 Nov 2018 01:45:09 +1100 Subject: How to tell if the page displayed in the Browser widget has scrolle Message-ID: <3679B757-5B7F-406D-9255-9A85592EC50F@thehales.id.au> Hi Hermann, Thanks for your patience :-) I did as you suggested but no dice. I added the jsNotify handler to the widget script. I put the jsNotify call into the javascript handlers of the widget. I then checked that they were indeed there, they were. I added the "window.onscroll" function definition to the same handler I use to adjust the font-size of the page being displayed as I know that works there. but when I load a page, nothing happens when I scroll to the bottom. I tried with jsNotify putting into a field and just putting. Still no joy. I even found an example closer to what I want to do (with the call to jsNotify in place)... https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_navbar_hide_scroll So I see that this function works. Just apparently not in the current widget browser. Well at least on my Mac. Does one of your samples stacks have something like this? Maybe I could compare and try to see what is different in mine? James From bobsneidar at iotecdigital.com Fri Nov 9 10:55:23 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 9 Nov 2018 15:55:23 +0000 Subject: Where is the declarative border color setting in the property In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> Message-ID: I love that movie. That face when the Babel Fish goes in is priceless. Bob S > On Nov 9, 2018, at 03:56 , Keith Clarke via use-livecode wrote: > > D?Oh - of course, in LC the basic 'border fill' = CSS ?border: color' (as shown in the clearly 'not-quite-idiot-proof' tool-tip!). Thanks! > > Sorry to waste your time - I?m jumping between LC, Javascript and CSS and my Babel Fish has clearly fallen asleep or out? https://www.youtube.com/watch?v=YWqHkYtREAE > > ?boy am I glad the weekend is fast-approaching! :-) > Best, > Keith From harrison at all-auctions.com Fri Nov 9 11:13:08 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Fri, 9 Nov 2018 11:13:08 -0500 Subject: LC/macOS App Store In-Reply-To: <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> Message-ID: <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> Dear LiveCoders, I am using LiveCode Indy 9.0.1, Xcode 9.3, and macOS 10.13.6 High Sierra. I have an old LC 32 bit iOS app that was removed from the App Store because it was 32 bit. I was so mad at Apple for screwing me on it that I stayed away from it for quite a while. Recently I decided that I would try to update it as a macOS app. After doing my conversion it was time to get back into creating profiles etc. I created a brand new profile for it and added the name mac as a suffix. I tried to use the OSXPackageMaker by Pi Digital, but it doesn?t find the new profile I just created. When I looked in Xcode 9.3 it told me that my brand new profile was Deprecated! After looking all over the internet the suggestion is to let Xcode automatically manage everything. Yet our LiveCode environment seems to encourage a manual process. I have looked at: http://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store https://www.raywenderlich.com/120-how-to-submit-an-app-to-apple-from-no-account-to-app-store-part-1 Mac AppStore Checklist.txt Everything is one hot mess now! I don?t know how we can possibly expect anyone new to LiveCode is going to find their way successfully through the jungle that has been created without adequate up-to-date step by step instructions with images. This somehow needs to become a part of the LC review and update cycle. Anyway, should I let Xcode automatically manage my profiles? Other suggestions? Whatever happened to the good old days when one could just create a standalone, zip it, and upload it to some distribution website? Boy do I ever miss the good old days! Thanks in advance! Rick From hh at hyperhh.de Fri Nov 9 11:25:31 2018 From: hh at hyperhh.de (hh) Date: Fri, 9 Nov 2018 17:25:31 +0100 Subject: How to tell if the page displayed in the Browser widget has scrolle Message-ID: > James H. wrote: > I added the "window.onscroll" function definition to the > same handler I use to adjust the font-size of the page > being displayed as I know that works there. Did you add it separated by ";"? For the command do js in widget "Browser" *** the string js is not allowed to contain a CR. *** > I even found an example closer to what I want to do > (with the call to jsNotify in place)... > > https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_navbar_hide_scroll > > So I see that this function works. Just apparently not in > the current widget browser. Well at least on my Mac. This works here. Did you use the whole htmltext, especially also the CSS? The javaScript there can not work without the CSS... From jjs at krutt.org Fri Nov 9 11:59:42 2018 From: jjs at krutt.org (JJS) Date: Fri, 9 Nov 2018 17:59:42 +0100 Subject: FCM Push Notification Icon no longer appearing as expected Message-ID: <5cd9eb13-f84e-a656-2cf7-ac9a18275525@krutt.org> Hi, anyone noticed that the FCM (GCM) Push Notification icon does not appear anymore in the status bar on Android when a notification is received? It's now a standard white square as if it was not configured correct. Except nothing has changed to the code or the used PNG at standalone settings. Can anyone confirm? Thanks! Sphere From ahsoftware at sonic.net Fri Nov 9 11:59:59 2018 From: ahsoftware at sonic.net (Mark Wieder) Date: Fri, 9 Nov 2018 08:59:59 -0800 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: Message-ID: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> On 11/9/18 2:02 AM, panagiotis merakos via use-livecode wrote: > Dear list members, > > We are pleased to announce the release of LiveCode 9.0.2 RC-1. > > > Getting the Release > =================== > You can get the release at https://downloads.livecode.com/livecode/ or via > the automatic updater. Don't know what changed behind the scenes, but these now download in under a minute, vs the previous half hour or so. Props to the webmaster. -- Mark Wieder ahsoftware at gmail.com From andre at andregarzia.com Fri Nov 9 12:04:11 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Fri, 9 Nov 2018 17:04:11 +0000 Subject: LiveCoders from London, lets meet! Message-ID: Hey Friends, Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. Cheers andre From ingar.roggen at sosiologi.uio.no Fri Nov 9 12:06:11 2018 From: ingar.roggen at sosiologi.uio.no (Ingar Roggen) Date: Fri, 9 Nov 2018 17:06:11 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: <418940D3-E3B7-4FBC-9275-9DAED9EE5813@sosiologi.uio.no> Why not in Oslo? Sendt fra min iPhone > 9. nov. 2018 kl. 18:04 skrev Andre Alves Garzia via use-livecode : > > Hey Friends, > > Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. > > Cheers > > andre > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Fri Nov 9 12:09:59 2018 From: alex at tweedly.net (Alex Tweedly) Date: Fri, 9 Nov 2018 17:09:59 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: <418940D3-E3B7-4FBC-9275-9DAED9EE5813@sosiologi.uio.no> References: <418940D3-E3B7-4FBC-9275-9DAED9EE5813@sosiologi.uio.no> Message-ID: <96589772-3e52-2988-26c2-7769ed444033@tweedly.net> Hey - Edinburgh is (roughly) half-way between, how about there :-) On 09/11/2018 17:06, Ingar Roggen via use-livecode wrote: > Why not in Oslo? > > Sendt fra min iPhone > >> 9. nov. 2018 kl. 18:04 skrev Andre Alves Garzia via use-livecode : >> >> Hey Friends, >> >> Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. >> >> Cheers >> >> andre >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 kaveh at rivervalleytechnologies.com Fri Nov 9 12:31:32 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Fri, 9 Nov 2018 17:31:32 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: Hi Andre I had no idea you were in London. I'm game :-) Kaveh On Fri, 9 Nov 2018 at 17:04, Andre Alves Garzia via use-livecode < use-livecode at lists.runrev.com> wrote: > Hey Friends, > > Who here is from London or nearby and would be interested in regular > meetups? We could meet once a month or so in a pub or quieter setting. I > am thinking of informal meet & drink, chatting. > > Cheers > > andre > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From keith.clarke at me.com Fri Nov 9 12:44:32 2018 From: keith.clarke at me.com (Keith Clarke) Date: Fri, 09 Nov 2018 17:44:32 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> Andre, I?m based near London and would be happy to meet in Town & buy you a beer. :-) Best, Keith > On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: > > Hey Friends, > > Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. > > Cheers > > andre > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jjs at krutt.org Fri Nov 9 13:19:55 2018 From: jjs at krutt.org (JJS) Date: Fri, 9 Nov 2018 19:19:55 +0100 Subject: LiveCoders from London, lets meet! In-Reply-To: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> References: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> Message-ID: <64a1a452-5b6a-f18b-b01b-d4f265062aa8@krutt.org> I have to go with a boat then few hours.... So i'll stay home and get a beer from my fridge Op 9-11-2018 om 18:44 schreef Keith Clarke via use-livecode: > Andre, I?m based near London and would be happy to meet in Town & buy you a beer. :-) > Best, > Keith > >> On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: >> >> Hey Friends, >> >> Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. >> >> Cheers >> >> andre >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Fri Nov 9 14:42:17 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Fri, 9 Nov 2018 19:42:17 +0000 Subject: [ANN] Release 9.0.2 RC-1 References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> Message-ID: Fantastic job! I looked at the 80 bug fixes, amazing.... I am already on Mohaje (10.14) and the latest Xcode in the App store is 10.1 Just to fun (from the release note, it would should not work) tried stalling Xcode under Preferences/Mobile and, right, it did not work. Got the old invalid SDK message The chosen folder in not a valid iOS SDK The Selected Xcode must have an iOS SDK among 8.2 9.2 10.2 11.2 12.0 So I went back and chose the Xcode 9.4 I was using with 9.0.1 (stable) And got the same message. Oh well, I will release Android first... then I will go off to dig up Xcode 10 from Apple downloads Anything else we need to know? BR On 11/9/18 7:01 AM, Mark Wieder via use-livecode wrote: > On 11/9/18 2:02 AM, panagiotis merakos via use-livecode wrote: >> Dear list members, >> >> We are pleased to announce the release of LiveCode 9.0.2 RC-1. >> >> From kee.nethery at elloco.com Fri Nov 9 14:43:38 2018 From: kee.nethery at elloco.com (kee nethery) Date: Fri, 9 Nov 2018 11:43:38 -0800 Subject: LC/macOS App Store In-Reply-To: <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> Message-ID: Did you try this checklist? If you did and it didn?t work, please let me know so I can fix it. Kee Nethery http://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store From paul at livecode.org Fri Nov 9 14:50:12 2018 From: paul at livecode.org (Paul Hibbert) Date: Fri, 9 Nov 2018 11:50:12 -0800 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> Message-ID: <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> Thank you for testing and letting us know, I was just about to upgrade my Xcode too, so you saved me wasting another 5GB download, I really appreciate that, as it saves my limited monthly bandwidth. I?ll go get Xcode 10.0 now. :) Paul > On Nov 9, 2018, at 11:42, Sannyasin Brahmanathaswami via use-livecode wrote: > > Fantastic job! I looked at the 80 bug fixes, amazing.... > > I am already on Mohaje (10.14) and the latest Xcode in the App store is 10.1 > > Just to fun (from the release note, it would should not work) tried > stalling Xcode under Preferences/Mobile and, right, it did not work. > Got the old invalid SDK message > > The chosen folder in not a valid iOS SDK > The Selected Xcode must have an iOS SDK > among > 8.2 > 9.2 > 10.2 > 11.2 > 12.0 > > So I went back and chose the Xcode 9.4 I was using with 9.0.1 (stable) > > And got the same message. > > Oh well, I will release Android first... > > then I will go off to dig up Xcode 10 from Apple downloads > > Anything else we need to know? > > BR > > > > > > > > > On 11/9/18 7:01 AM, Mark Wieder via use-livecode wrote: >> On 11/9/18 2:02 AM, panagiotis merakos via use-livecode wrote: >>> Dear list members, >>> >>> We are pleased to announce the release of LiveCode 9.0.2 RC-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 Paul paul at livecode.org Mac OS Sierra 10.12.1 From merakosp at gmail.com Fri Nov 9 14:55:50 2018 From: merakosp at gmail.com (panagiotis merakos) Date: Fri, 9 Nov 2018 21:55:50 +0200 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> Message-ID: Paul, if you are on Sierra you need xcode 9.2 if I remember correctly. It is in the release notes. I am not in a computer right now so I cannot check. Regards Panos On Fri, Nov 9, 2018, 21:50 Paul Hibbert via use-livecode < use-livecode at lists.runrev.com wrote: > Thank you for testing and letting us know, I was just about to upgrade my > Xcode too, so you saved me wasting another 5GB download, I really > appreciate that, as it saves my limited monthly bandwidth. > > I?ll go get Xcode 10.0 now. :) > > Paul > > > On Nov 9, 2018, at 11:42, Sannyasin Brahmanathaswami via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Fantastic job! I looked at the 80 bug fixes, amazing.... > > > > I am already on Mohaje (10.14) and the latest Xcode in the App store is > 10.1 > > > > Just to fun (from the release note, it would should not work) tried > > stalling Xcode under Preferences/Mobile and, right, it did not work. > > Got the old invalid SDK message > > > > The chosen folder in not a valid iOS SDK > > The Selected Xcode must have an iOS SDK > > among > > 8.2 > > 9.2 > > 10.2 > > 11.2 > > 12.0 > > > > So I went back and chose the Xcode 9.4 I was using with 9.0.1 (stable) > > > > And got the same message. > > > > Oh well, I will release Android first... > > > > then I will go off to dig up Xcode 10 from Apple downloads > > > > Anything else we need to know? > > > > BR > > > > > > > > > > > > > > > > > > On 11/9/18 7:01 AM, Mark Wieder via use-livecode wrote: > >> On 11/9/18 2:02 AM, panagiotis merakos via use-livecode wrote: > >>> Dear list members, > >>> > >>> We are pleased to announce the release of LiveCode 9.0.2 RC-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 > > > > Paul > paul at livecode.org > > Mac OS Sierra 10.12.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 tom at makeshyft.com Fri Nov 9 15:02:41 2018 From: tom at makeshyft.com (Tom Glod) Date: Fri, 9 Nov 2018 15:02:41 -0500 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> Message-ID: yes! great job with the bug-fixes ....... i can say that the engine is more solid and stable than ever. thank you all On Fri, Nov 9, 2018 at 2:55 PM, panagiotis merakos via use-livecode < use-livecode at lists.runrev.com> wrote: > Paul, if you are on Sierra you need xcode 9.2 if I remember correctly. It > is in the release notes. I am not in a computer right now so I cannot > check. > > Regards > Panos > > On Fri, Nov 9, 2018, 21:50 Paul Hibbert via use-livecode < > use-livecode at lists.runrev.com wrote: > > > Thank you for testing and letting us know, I was just about to upgrade my > > Xcode too, so you saved me wasting another 5GB download, I really > > appreciate that, as it saves my limited monthly bandwidth. > > > > I?ll go get Xcode 10.0 now. :) > > > > Paul > > > > > On Nov 9, 2018, at 11:42, Sannyasin Brahmanathaswami via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > > Fantastic job! I looked at the 80 bug fixes, amazing.... > > > > > > I am already on Mohaje (10.14) and the latest Xcode in the App store is > > 10.1 > > > > > > Just to fun (from the release note, it would should not work) tried > > > stalling Xcode under Preferences/Mobile and, right, it did not work. > > > Got the old invalid SDK message > > > > > > The chosen folder in not a valid iOS SDK > > > The Selected Xcode must have an iOS SDK > > > among > > > 8.2 > > > 9.2 > > > 10.2 > > > 11.2 > > > 12.0 > > > > > > So I went back and chose the Xcode 9.4 I was using with 9.0.1 (stable) > > > > > > And got the same message. > > > > > > Oh well, I will release Android first... > > > > > > then I will go off to dig up Xcode 10 from Apple downloads > > > > > > Anything else we need to know? > > > > > > BR > > > > > > > > > > > > > > > > > > > > > > > > > > > On 11/9/18 7:01 AM, Mark Wieder via use-livecode wrote: > > >> On 11/9/18 2:02 AM, panagiotis merakos via use-livecode wrote: > > >>> Dear list members, > > >>> > > >>> We are pleased to announce the release of LiveCode 9.0.2 RC-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 > > > > > > > > Paul > > paul at livecode.org > > > > Mac OS Sierra 10.12.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 hlowe at me.com Fri Nov 9 15:04:43 2018 From: hlowe at me.com (hlowe) Date: Fri, 9 Nov 2018 14:04:43 -0600 (CST) Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> Message-ID: <1541793883966-0.post@n4.nabble.com> I am using Mac OS 10.14.1. Downloaded LC 9.0.2 RC-1 and also installed the latest version of Xcode (10.1) as I need to test our iOS app with the new iOS devices available in the simulator. I am getting the message that LC requires iOS SDK between 8.2 and 12.0, though iOS 12.1 is the latest version. Back to Xcode 10.0? Henry -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From harrison at all-auctions.com Fri Nov 9 15:17:11 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Fri, 9 Nov 2018 15:17:11 -0500 Subject: LC/macOS App Store In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> Message-ID: <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> Hi Kee, If you had read far enough down on my original message you would have seen that I have looked at that lesson. One of the important things it says is: To upload to the App Store you need an Apple Developer account and corresponding developer certificates. This article does not cover that process. (I think we should include that important step if possible.) I will attempt to work through it one more time anyway, and get back to you after I?m sure I have wasted enough time and energy. Thanks, Rick > On Nov 9, 2018, at 2:43 PM, kee nethery via use-livecode wrote: > > Did you try this checklist? If you did and it didn?t work, please let me know so I can fix it. > > Kee Nethery > > http://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From stephen at barncard.com Fri Nov 9 15:32:59 2018 From: stephen at barncard.com (Stephen Barncard) Date: Fri, 9 Nov 2018 12:32:59 -0800 Subject: LiveCoders from London, lets meet! In-Reply-To: <64a1a452-5b6a-f18b-b01b-d4f265062aa8@krutt.org> References: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> <64a1a452-5b6a-f18b-b01b-d4f265062aa8@krutt.org> Message-ID: Andre - If I were ANYWHERE in the EU I would love the opportunity to meet up with you anytime! but I'm stuck in (a nice part of) Trumpland.... -- Stephen Barncard - Sebastopol Ca. USA - mixstream.org On Fri, Nov 9, 2018 at 10:20 AM JJS via use-livecode < use-livecode at lists.runrev.com> wrote: > I have to go with a boat then few hours.... > > So i'll stay home and get a beer from my fridge > > > Op 9-11-2018 om 18:44 schreef Keith Clarke via use-livecode: > > Andre, I?m based near London and would be happy to meet in Town & buy > you a beer. :-) > > Best, > > Keith > > > >> On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> > >> Hey Friends, > >> > >> Who here is from London or nearby and would be interested in regular > meetups? We could meet once a month or so in a pub or quieter setting. I am > thinking of informal meet & drink, chatting. > >> > >> Cheers > >> > >> andre > >> > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode 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 kee.nethery at elloco.com Fri Nov 9 15:44:46 2018 From: kee.nethery at elloco.com (kee nethery) Date: Fri, 9 Nov 2018 12:44:46 -0800 Subject: LC/macOS App Store In-Reply-To: <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> Message-ID: The URL to start the enrollment process to be an Apple Developer is https://developer.apple.com/programs/enroll/ Will add that to the lesson, thanks Kee > On Nov 9, 2018, at 12:17 PM, Rick Harrison via use-livecode wrote: > > Hi Kee, > > If you had read far enough down on my original message you > would have seen that I have looked at that lesson. > > One of the important things it says is: > To upload to the App Store you need an Apple Developer > account and corresponding developer certificates. This article > does not cover that process. > > (I think we should include that important step if possible.) > > I will attempt to work through it one more time anyway, > and get back to you after I?m sure I have wasted enough > time and energy. > > Thanks, > > Rick > > > >> On Nov 9, 2018, at 2:43 PM, kee nethery via use-livecode wrote: >> >> Did you try this checklist? If you did and it didn?t work, please let me know so I can fix it. >> >> Kee Nethery >> >> http://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 jjs at krutt.org Fri Nov 9 16:02:56 2018 From: jjs at krutt.org (JJS) Date: Fri, 9 Nov 2018 22:02:56 +0100 Subject: FCM Push Notification Icon no longer appearing as expected In-Reply-To: <5cd9eb13-f84e-a656-2cf7-ac9a18275525@krutt.org> References: <5cd9eb13-f84e-a656-2cf7-ac9a18275525@krutt.org> Message-ID: Well after some searching. It seems that it has to do with the targetting LC does now at sdk26, and thus makes a standard square notification with a white circle in it. Google says an notification has to be white. And edit an icon at 400% 129x192px. a 100% icon is 48px. If target <21 then the notification will have original colors. My target was Jelly Bean 4.1 = API 16, so before targetting API26 it was working ok. But Google enforces it to target the sdk26. according an answer also here: https://stackoverflow.com/questions/28387602/notification-bar-icon-turns-white-in-android-5-lollipop So probably too bad: I do like colored notification icons more than the sad white ones. Back to the drawing table and create ugly white icons... Op 9-11-2018 om 17:59 schreef JJS via use-livecode: > Hi, > > anyone noticed that the FCM (GCM) Push Notification icon does not > appear anymore in the status bar on Android when a notification is > received? > > It's now a standard white square as if it was not configured correct. > > Except nothing has changed to the code or the used PNG at standalone > settings. > > > Can anyone confirm? > > Thanks! > > Sphere > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Fri Nov 9 17:27:36 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Fri, 9 Nov 2018 17:27:36 -0500 Subject: LC/macOS App Store In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> Message-ID: Hi Kee, Thanks for that. Although I?ve been down that lane for sometime now. Why Apple keeps making things worse and worse instead of the other way around I don?t know. In principle, I believe that no LiveCoder should ever have to be subjected to using the Terminal. Ideally we should have a stack that pulls everything together for our LiveCode users so they don?t have to even touch it. I will let you know what I find out if anything. Rick > On Nov 9, 2018, at 3:44 PM, kee nethery via use-livecode wrote: > > The URL to start the enrollment process to be an Apple Developer is > https://developer.apple.com/programs/enroll/ > > Will add that to the lesson, thanks > Kee > >> On Nov 9, 2018, at 12:17 PM, Rick Harrison via use-livecode wrote: >> >> Hi Kee, >> >> If you had read far enough down on my original message you >> would have seen that I have looked at that lesson. >> >> One of the important things it says is: >> To upload to the App Store you need an Apple Developer >> account and corresponding developer certificates. This article >> does not cover that process. >> >> (I think we should include that important step if possible.) >> >> I will attempt to work through it one more time anyway, >> and get back to you after I?m sure I have wasted enough >> time and energy. >> >> Thanks, >> >> Rick >> >> >> >>> On Nov 9, 2018, at 2:43 PM, kee nethery via use-livecode wrote: >>> >>> Did you try this checklist? If you did and it didn?t work, please let me know so I can fix it. >>> >>> Kee Nethery >>> >>> http://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store >>> >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 Nov 9 17:49:12 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 9 Nov 2018 22:49:12 +0000 Subject: LC/macOS App Store In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> Message-ID: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> It's funny you should say that. Long ago when the first Apple MacIntoshes came out, I fell in love with the GUI simply because I could use a computer without having to type in commands. For years, I would not even work with a PC, because all their was to work with was DOS, and even when Windows came out, it was really DOS pretending to be a GUI. Later, when I went from being a hobbyist to doing real IT for a living, I was soooo exasperated with PCs because reformatting a hard drive was an evening's work, especially if the manufacturer wasn't real clear about how many sectors, blocks, etc in the sticker on the drive! But I always had Macs to look to, where I could say, "See? NO COMMAND LINE! THAT's how to do computing nowadays!" Now, even with all the advances Microsoft has made in their OS, some things can *only* be done from a command line, and I think this is just laziness on the part of developers. Apple seems to have fallen in to this developer malaise, where it's easier to just write some terminal code and tell people, "Just type this command..." People cannot remember commands, especially not terminal commands, with all the arguments and caveats and different ways to put it all together. Apple used to be, "The computer for the rest of us." Now it's just another computer. Bob S > On Nov 9, 2018, at 14:27 , Rick Harrison via use-livecode wrote: > > Hi Kee, > > Thanks for that. Although I?ve been down that > lane for sometime now. Why Apple keeps > making things worse and worse instead of > the other way around I don?t know. > > In principle, I believe that no LiveCoder should > ever have to be subjected to using the Terminal. > Ideally we should have a stack that pulls everything > together for our LiveCode users so they don?t have > to even touch it. > > I will let you know what I find out if anything. > > Rick From mkoob at rogers.com Fri Nov 9 18:11:14 2018 From: mkoob at rogers.com (Martin Koob) Date: Fri, 9 Nov 2018 17:11:14 -0600 (CST) Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> Message-ID: <1541805074478-0.post@n4.nabble.com> For the last several releases the automatic updater doesn't work for me. It starts downloading then seems to stall about half way and then gives a message that it has failed. I then download directly and it downloaded just fine. Is anyone else experiencing this? Martin Koob -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From kee.nethery at elloco.com Fri Nov 9 21:29:21 2018 From: kee.nethery at elloco.com (kee nethery) Date: Fri, 9 Nov 2018 18:29:21 -0800 Subject: LC/macOS App Store In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> Message-ID: <883A9311-D192-4D16-80E2-03BBF38ADFD8@elloco.com> I agree that the LiveCode Application Builder should handle all the details. The stacks that others have built work great ? until they don?t. That?s why my instructions are all Terminal based. If something errors out, you can see the error and perhaps deal with it. When everything is hidden behind a stack, making it work is more difficult, in my opinion. Kee > On Nov 9, 2018, at 2:27 PM, Rick Harrison via use-livecode wrote: > > Hi Kee, > > Thanks for that. Although I?ve been down that > lane for sometime now. Why Apple keeps > making things worse and worse instead of > the other way around I don?t know. > > In principle, I believe that no LiveCoder should > ever have to be subjected to using the Terminal. > Ideally we should have a stack that pulls everything > together for our LiveCode users so they don?t have > to even touch it. > > I will let you know what I find out if anything. > > Rick From andre at andregarzia.com Sat Nov 10 06:01:03 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Sat, 10 Nov 2018 11:01:03 +0000 Subject: the beauty of the command line tools (a side note from Re: LC/macOS App Store) In-Reply-To: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> Message-ID: Bob, I am hijacking this thread to express some personal opinions about the terminal, it is not related to the topic of the original message but a different perspective on the subject you brought up on your reply. When I first for my mac (A G3 running Mac OS 8.x) and started developing for it, my first thought was: "Where is the terminal?!", the lack of terminal was one of the main reason I struggled with development in the mac for some time because, IMHO there is a beauty to terminal tools that is no longer available to the current incarnation of macOS (but was present in earlier versions, more about it later). The main advantage for terminal tools is composability, which is at the heart of the UNIX philosophy and remember (the current) "macOS is UNIX". Having little tools that compose with one another to execute whatever workflow you need. You generate certificates with one tool, you sign binaries with another, you pipe the result of one command into the other and with some clever scripting you automate your whole flow. The power of UNIX is this toolbox of little tools and the scripting that goes on top of them to compose them into pieces more powerful and featureful than each individual component. Thats why in the terminal you can use a single line to post something to a web API server, get a response, decode it, parse its JSON reply, reason about it and extract data, just by piping from "curl" to "jq" to "awk" or "grep" or "wc" or whatever you need. GUI tools don't compose. You need to ship new tools to add more features or you need to update the current ones. Doing web stuff on classic MacOS was tricky as I couldn't rely on my usual toolset of little UNIX gizmos (I learned about MPW and other stuff later). The solution to make GUI tools composable is AppleScript of course, and I know many who are reading this email thought about that when reading the second paragraph. With AppleScript we could have all the convenience of GUI, the kind of easy and amazing UX that Bob was talking about, and yet be composable thus making each GUI tool more capable than its features alone. And for a while, this was fantastic but AppleScript is no longer in favor at Apple and most Third-Party developers seem to have forgotten it. Each power-user oriented app that allows scripting appears to be shipping a different solution, so the dream of AppleScript is lost, it was also never cross-platform, but the little rusty UNIX toolkit still works, almost 60 years later, and it is cross-platform-ish. So the Terminal allows Apple and others to reuse good tools from GNU, *BSD and others and build the workflow they need. Little terminal tools are the only way to automation these days, all the other solutions require more buy-in from 3rd party developers or reinventing the wheel. Thats why it pays of to learn just a bit of terminal stuff, so that you too can build those little composable things, so that you too can benefit from 60 years of little tools that do the job. Still, I miss AppleScript, and Frontier, and DreamCard, and MacOS Classic... Om om andre PS: I am no longer a Apple user, so if by any chance AppleScript is back, I am not aware of it, sorry. On 11/9/2018 10:49 PM, Bob Sneidar via use-livecode wrote: > It's funny you should say that. Long ago when the first Apple MacIntoshes came out, I fell in love with the GUI simply because I could use a computer without having to type in commands. For years, I would not even work with a PC, because all their was to work with was DOS, and even when Windows came out, it was really DOS pretending to be a GUI. > > Later, when I went from being a hobbyist to doing real IT for a living, I was soooo exasperated with PCs because reformatting a hard drive was an evening's work, especially if the manufacturer wasn't real clear about how many sectors, blocks, etc in the sticker on the drive! But I always had Macs to look to, where I could say, "See? NO COMMAND LINE! THAT's how to do computing nowadays!" > > Now, even with all the advances Microsoft has made in their OS, some things can *only* be done from a command line, and I think this is just laziness on the part of developers. Apple seems to have fallen in to this developer malaise, where it's easier to just write some terminal code and tell people, "Just type this command..." > > People cannot remember commands, especially not terminal commands, with all the arguments and caveats and different ways to put it all together. Apple used to be, "The computer for the rest of us." Now it's just another computer. > > Bob S > > >> On Nov 9, 2018, at 14:27 , Rick Harrison via use-livecode wrote: >> >> Hi Kee, >> >> Thanks for that. Although I?ve been down that >> lane for sometime now. Why Apple keeps >> making things worse and worse instead of >> the other way around I don?t know. >> >> In principle, I believe that no LiveCoder should >> ever have to be subjected to using the Terminal. >> Ideally we should have a stack that pulls everything >> together for our LiveCode users so they don?t have >> to even touch it. >> >> I will let you know what I find out if anything. >> >> Rick > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From andre at andregarzia.com Sat Nov 10 06:09:06 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Sat, 10 Nov 2018 11:09:06 +0000 Subject: SSL with HTTPD Library? In-Reply-To: References: <736dd72d-1447-f6cd-ff75-90884fc179a5@fourthworld.com> <33FAB28C-FEBF-4E4A-A19D-DC335178FC69@madmansoft.com> Message-ID: Aloha Swami and all, That "speed penality" is not theoretical at all. It is very real and the reason why most of the cutting-edge web ecosystem moved away from CGI. The main technical appeal of NodeJS, WSGI, OpenResty, and others is that they are FAST, non-blocking and don't require new process spawning for each connection. The one reason we don't notice this problem in our work and in most of the work our community does is that we're not working in the scale where it becomes a problem. We don't have enough users to make process spawning an issue. But, that is a problem at scale, a very real problem and it is very easy to quantify once you measure the amount of requests per seconds you're able to handle, there is a point where you can't handle as much requests as you need to make your web service responsive and thats when such issues become very real. There are mitigations with the modern web patterns such as PWAs which will cache most of the front-end stuff onto the client thus making the server load much lighter if you have recurring users. Yes, RevIgniter is wonderful and LC Server is quite nice tool too, I really like them both and they have a use case which is very clear, but don't believe that just because it works for our scale, that the problems of larger players are theoretical. Also, people paying for servers based on CPU usage can benefit a lot from other approaches as smaller servers can handle larger loads. Cheers andre On 11/7/2018 11:18 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > On 11/1/18 5:02 PM, Stephen MacLean via use-livecode wrote: >> LC server, can do it, but also suffers, from what I?ve read in my research, a speed penalty from CGI implementation vs direct sockets, etc. > Well that "speed penality" is theoretical. Our web site > > https://www.himalayanacademy.com > > uses Livacode server, and for all "gorilla dust" about LC's one thread, > open multiple CGIs, and how it is "old fashioned" > > I don't ever see a speed penalty. Of course RevIgniter is beautifully > executed, thanks to Ralf Bitter. > > Brahmanathaswami > Get the SivaSiva app, it's free: > https://www.himalayanacademy.com/apps/sivasiva > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Nov 10 07:18:35 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sat, 10 Nov 2018 12:18:35 +0000 Subject: the beauty of the command line tools (a side note from Re: LC/macOS App Store) In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> Message-ID: Hi Just to follow on from Andre, you can of course also run terminal scripts from LC. That?s exactly what I did in the aforementioned OSX Package Maker (soon to be reissued as the iOS/macOS Package Maker). You ?could? make a GUI for every terminal command available including every nuance and parameter. Indeed, Apple could do this for ?every? Unix/Terminal command. But can you imagine the complaints that would come with it with regards bloat ware. But in addition to this is the thought that terminal stuff, much like LC stuff, can combine multiple commands and functions together into one line of script. Can you imagine if LC was entirely GUI based. Of course not as it would make it somewhat impractical. Not to say that it is impossible as is demonstrated by the Unreal Engine coding environment (which is pretty cool actually, albeit a bit cumbersome). Take, also the simplicity of copy/paste that would not be possible in a gui. All apple have to do is give an example of a line of script where we replace out the various parameters to suit our circumstance. I say Bravo to Apple for making this still available and a common standard for ?us? (bearing in mind this kind of stuff is aimed at coders/developers who are used to it as opposed to the ?grannies and grandpas? who barely use a mouse let alone the keyboard). Sorry I was unable to sort out the Package maker before this. As some of you are aware I went through a pretty severe emotional hiccup midway through this year. Kee (whom I let down the most) managed to pick up a lot of the slack producing the guide for us all. No doubt Apple will continue to make changes to the way things are done. But that is the nature of Soft wares. They are not rigid and inflexible. It is a good thing. As much as it is a pain, there?s nearly always a resultant gain. Go with it, adapt, and evolve. That?s progress! All the best to you all. Sean Cole Pi Digital > On 10 Nov 2018, at 11:01, Andre Alves Garzia via use-livecode wrote: > > Bob, > > I am hijacking this thread to express some personal opinions about the terminal, it is not related to the topic of the original message but a different perspective on the subject you brought up on your reply. > > When I first for my mac (A G3 running Mac OS 8.x) and started developing for it, my first thought was: "Where is the terminal?!", the lack of terminal was one of the main reason I struggled with development in the mac for some time because, IMHO there is a beauty to terminal tools that is no longer available to the current incarnation of macOS (but was present in earlier versions, more about it later). > > The main advantage for terminal tools is composability, which is at the heart of the UNIX philosophy and remember (the current) "macOS is UNIX". Having little tools that compose with one another to execute whatever workflow you need. You generate certificates with one tool, you sign binaries with another, you pipe the result of one command into the other and with some clever scripting you automate your whole flow. The power of UNIX is this toolbox of little tools and the scripting that goes on top of them to compose them into pieces more powerful and featureful than each individual component. Thats why in the terminal you can use a single line to post something to a web API server, get a response, decode it, parse its JSON reply, reason about it and extract data, just by piping from "curl" to "jq" to "awk" or "grep" or "wc" or whatever you need. > > GUI tools don't compose. You need to ship new tools to add more features or you need to update the current ones. Doing web stuff on classic MacOS was tricky as I couldn't rely on my usual toolset of little UNIX gizmos (I learned about MPW and other stuff later). > > The solution to make GUI tools composable is AppleScript of course, and I know many who are reading this email thought about that when reading the second paragraph. With AppleScript we could have all the convenience of GUI, the kind of easy and amazing UX that Bob was talking about, and yet be composable thus making each GUI tool more capable than its features alone. And for a while, this was fantastic but AppleScript is no longer in favor at Apple and most Third-Party developers seem to have forgotten it. Each power-user oriented app that allows scripting appears to be shipping a different solution, so the dream of AppleScript is lost, it was also never cross-platform, but the little rusty UNIX toolkit still works, almost 60 years later, and it is cross-platform-ish. So the Terminal allows Apple and others to reuse good tools from GNU, *BSD and others and build the workflow they need. > > Little terminal tools are the only way to automation these days, all the other solutions require more buy-in from 3rd party developers or reinventing the wheel. Thats why it pays of to learn just a bit of terminal stuff, so that you too can build those little composable things, so that you too can benefit from 60 years of little tools that do the job. > > Still, I miss AppleScript, and Frontier, and DreamCard, and MacOS Classic... > > Om om > > andre > > PS: I am no longer a Apple user, so if by any chance AppleScript is back, I am not aware of it, sorry. > >> On 11/9/2018 10:49 PM, Bob Sneidar via use-livecode wrote: >> It's funny you should say that. Long ago when the first Apple MacIntoshes came out, I fell in love with the GUI simply because I could use a computer without having to type in commands. For years, I would not even work with a PC, because all their was to work with was DOS, and even when Windows came out, it was really DOS pretending to be a GUI. >> >> Later, when I went from being a hobbyist to doing real IT for a living, I was soooo exasperated with PCs because reformatting a hard drive was an evening's work, especially if the manufacturer wasn't real clear about how many sectors, blocks, etc in the sticker on the drive! But I always had Macs to look to, where I could say, "See? NO COMMAND LINE! THAT's how to do computing nowadays!" >> >> Now, even with all the advances Microsoft has made in their OS, some things can *only* be done from a command line, and I think this is just laziness on the part of developers. Apple seems to have fallen in to this developer malaise, where it's easier to just write some terminal code and tell people, "Just type this command..." >> >> People cannot remember commands, especially not terminal commands, with all the arguments and caveats and different ways to put it all together. Apple used to be, "The computer for the rest of us." Now it's just another computer. >> >> Bob S >> >> >>> On Nov 9, 2018, at 14:27 , Rick Harrison via use-livecode wrote: >>> >>> Hi Kee, >>> >>> Thanks for that. Although I?ve been down that >>> lane for sometime now. Why Apple keeps >>> making things worse and worse instead of >>> the other way around I don?t know. >>> >>> In principle, I believe that no LiveCoder should >>> ever have to be subjected to using the Terminal. >>> Ideally we should have a stack that pulls everything >>> together for our LiveCode users so they don?t have >>> to even touch it. >>> >>> I will let you know what I find out if anything. >>> >>> Rick >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 jjs at krutt.org Sat Nov 10 06:28:57 2018 From: jjs at krutt.org (JJS) Date: Sat, 10 Nov 2018 12:28:57 +0100 Subject: the beauty of the command line tools (a side note from Re: LC/macOS App Store) In-Reply-To: References: <5C00FBDE-368A-4579-B1DF-8D9DD13A84C4@uni-wh.de> <61040C33-8C02-4A9E-8987-331166A3F5CE@uni-wh.de> <84DD1DFE-2675-4BCA-A57C-5D22F7708E35@all-auctions.com> <57EF0FBB-8DAB-4D2A-B5BA-AF1080E7F16B@all-auctions.com> <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> Message-ID: <3cf3ce42-7112-50fc-475d-5994e470a864@krutt.org> In the release notes of LC is a line that states: LC is actually a command line tool. Op 10-11-2018 om 13:18 schreef Pi Digital via use-livecode: > Hi > > Just to follow on from Andre, you can of course also run terminal scripts from LC. That?s exactly what I did in the aforementioned OSX Package Maker (soon to be reissued as the iOS/macOS Package Maker). You ?could? make a GUI for every terminal command available including every nuance and parameter. Indeed, Apple could do this for ?every? Unix/Terminal command. But can you imagine the complaints that would come with it with regards bloat ware. > > But in addition to this is the thought that terminal stuff, much like LC stuff, can combine multiple commands and functions together into one line of script. Can you imagine if LC was entirely GUI based. Of course not as it would make it somewhat impractical. Not to say that it is impossible as is demonstrated by the Unreal Engine coding environment (which is pretty cool actually, albeit a bit cumbersome). > > Take, also the simplicity of copy/paste that would not be possible in a gui. All apple have to do is give an example of a line of script where we replace out the various parameters to suit our circumstance. I say Bravo to Apple for making this still available and a common standard for ?us? (bearing in mind this kind of stuff is aimed at coders/developers who are used to it as opposed to the ?grannies and grandpas? who barely use a mouse let alone the keyboard). > > Sorry I was unable to sort out the Package maker before this. As some of you are aware I went through a pretty severe emotional hiccup midway through this year. Kee (whom I let down the most) managed to pick up a lot of the slack producing the guide for us all. > > No doubt Apple will continue to make changes to the way things are done. But that is the nature of Soft wares. They are not rigid and inflexible. It is a good thing. As much as it is a pain, there?s nearly always a resultant gain. Go with it, adapt, and evolve. That?s progress! > > All the best to you all. > > Sean Cole > Pi Digital > >> On 10 Nov 2018, at 11:01, Andre Alves Garzia via use-livecode wrote: >> >> Bob, >> >> I am hijacking this thread to express some personal opinions about the terminal, it is not related to the topic of the original message but a different perspective on the subject you brought up on your reply. >> >> When I first for my mac (A G3 running Mac OS 8.x) and started developing for it, my first thought was: "Where is the terminal?!", the lack of terminal was one of the main reason I struggled with development in the mac for some time because, IMHO there is a beauty to terminal tools that is no longer available to the current incarnation of macOS (but was present in earlier versions, more about it later). >> >> The main advantage for terminal tools is composability, which is at the heart of the UNIX philosophy and remember (the current) "macOS is UNIX". Having little tools that compose with one another to execute whatever workflow you need. You generate certificates with one tool, you sign binaries with another, you pipe the result of one command into the other and with some clever scripting you automate your whole flow. The power of UNIX is this toolbox of little tools and the scripting that goes on top of them to compose them into pieces more powerful and featureful than each individual component. Thats why in the terminal you can use a single line to post something to a web API server, get a response, decode it, parse its JSON reply, reason about it and extract data, just by piping from "curl" to "jq" to "awk" or "grep" or "wc" or whatever you need. >> >> GUI tools don't compose. You need to ship new tools to add more features or you need to update the current ones. Doing web stuff on classic MacOS was tricky as I couldn't rely on my usual toolset of little UNIX gizmos (I learned about MPW and other stuff later). >> >> The solution to make GUI tools composable is AppleScript of course, and I know many who are reading this email thought about that when reading the second paragraph. With AppleScript we could have all the convenience of GUI, the kind of easy and amazing UX that Bob was talking about, and yet be composable thus making each GUI tool more capable than its features alone. And for a while, this was fantastic but AppleScript is no longer in favor at Apple and most Third-Party developers seem to have forgotten it. Each power-user oriented app that allows scripting appears to be shipping a different solution, so the dream of AppleScript is lost, it was also never cross-platform, but the little rusty UNIX toolkit still works, almost 60 years later, and it is cross-platform-ish. So the Terminal allows Apple and others to reuse good tools from GNU, *BSD and others and build the workflow they need. >> >> Little terminal tools are the only way to automation these days, all the other solutions require more buy-in from 3rd party developers or reinventing the wheel. Thats why it pays of to learn just a bit of terminal stuff, so that you too can build those little composable things, so that you too can benefit from 60 years of little tools that do the job. >> >> Still, I miss AppleScript, and Frontier, and DreamCard, and MacOS Classic... >> >> Om om >> >> andre >> >> PS: I am no longer a Apple user, so if by any chance AppleScript is back, I am not aware of it, sorry. >> >>> On 11/9/2018 10:49 PM, Bob Sneidar via use-livecode wrote: >>> It's funny you should say that. Long ago when the first Apple MacIntoshes came out, I fell in love with the GUI simply because I could use a computer without having to type in commands. For years, I would not even work with a PC, because all their was to work with was DOS, and even when Windows came out, it was really DOS pretending to be a GUI. >>> >>> Later, when I went from being a hobbyist to doing real IT for a living, I was soooo exasperated with PCs because reformatting a hard drive was an evening's work, especially if the manufacturer wasn't real clear about how many sectors, blocks, etc in the sticker on the drive! But I always had Macs to look to, where I could say, "See? NO COMMAND LINE! THAT's how to do computing nowadays!" >>> >>> Now, even with all the advances Microsoft has made in their OS, some things can *only* be done from a command line, and I think this is just laziness on the part of developers. Apple seems to have fallen in to this developer malaise, where it's easier to just write some terminal code and tell people, "Just type this command..." >>> >>> People cannot remember commands, especially not terminal commands, with all the arguments and caveats and different ways to put it all together. Apple used to be, "The computer for the rest of us." Now it's just another computer. >>> >>> Bob S >>> >>> >>>> On Nov 9, 2018, at 14:27 , Rick Harrison via use-livecode wrote: >>>> >>>> Hi Kee, >>>> >>>> Thanks for that. Although I?ve been down that >>>> lane for sometime now. Why Apple keeps >>>> making things worse and worse instead of >>>> the other way around I don?t know. >>>> >>>> In principle, I believe that no LiveCoder should >>>> ever have to be subjected to using the Terminal. >>>> Ideally we should have a stack that pulls everything >>>> together for our LiveCode users so they don?t have >>>> to even touch it. >>>> >>>> I will let you know what I find out if anything. >>>> >>>> Rick >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 andre at andregarzia.com Sat Nov 10 07:52:22 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Sat, 10 Nov 2018 12:52:22 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: <96589772-3e52-2988-26c2-7769ed444033@tweedly.net> References: <418940D3-E3B7-4FBC-9275-9DAED9EE5813@sosiologi.uio.no> <96589772-3e52-2988-26c2-7769ed444033@tweedly.net> Message-ID: <8ab923c2-7e17-7476-9630-b032337e73cc@andregarzia.com> I hope to be there soon! :D haven't been there in years! On 11/9/2018 5:09 PM, Alex Tweedly via use-livecode wrote: > Hey - Edinburgh is (roughly) half-way between, how about there :-) > > > On 09/11/2018 17:06, Ingar Roggen via use-livecode wrote: >> Why not in Oslo? >> >> Sendt fra min iPhone >> >>> 9. nov. 2018 kl. 18:04 skrev Andre Alves Garzia via use-livecode >>> : >>> >>> Hey Friends, >>> >>> Who here is from London or nearby and would be interested in regular >>> meetups? We could meet once a month or so in a pub or quieter >>> setting. I am thinking of informal meet & drink, chatting. >>> >>> Cheers >>> >>> andre >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 andre at andregarzia.com Sat Nov 10 07:53:34 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Sat, 10 Nov 2018 12:53:34 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> References: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> Message-ID: <0ed7ec50-2277-9722-02eb-c6873cf0891f@andregarzia.com> Keith, Thats awesome! I think we should create a little meetup page and set a date! Andre PS: Buying you a beer as well :-) On 11/9/2018 5:44 PM, Keith Clarke via use-livecode wrote: > Andre, I?m based near London and would be happy to meet in Town & buy you a beer. :-) > Best, > Keith > >> On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: >> >> Hey Friends, >> >> Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. >> >> Cheers >> >> andre >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 andre at andregarzia.com Sat Nov 10 07:54:30 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Sat, 10 Nov 2018 12:54:30 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> <64a1a452-5b6a-f18b-b01b-d4f265062aa8@krutt.org> Message-ID: I hope you come this way soon Stephen :-D Are you going to the next conf in San Jose? Cheers andre On 11/9/2018 8:32 PM, Stephen Barncard via use-livecode wrote: > Andre - If I were ANYWHERE in the EU I would love the opportunity to meet > up with you anytime! > but I'm stuck in (a nice part of) Trumpland.... > -- > Stephen Barncard - Sebastopol Ca. USA - > mixstream.org > > > On Fri, Nov 9, 2018 at 10:20 AM JJS via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I have to go with a boat then few hours.... >> >> So i'll stay home and get a beer from my fridge >> >> >> Op 9-11-2018 om 18:44 schreef Keith Clarke via use-livecode: >>> Andre, I?m based near London and would be happy to meet in Town & buy >> you a beer. :-) >>> Best, >>> Keith >>> >>>> On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>>> Hey Friends, >>>> >>>> Who here is from London or nearby and would be interested in regular >> meetups? We could meet once a month or so in a pub or quieter setting. I am >> thinking of informal meet & drink, chatting. >>>> Cheers >>>> >>>> andre >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 sean at pidigital.co.uk Sat Nov 10 08:05:13 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sat, 10 Nov 2018 13:05:13 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: <639785E4-D6F9-4E67-A12A-5C7555BC5E6F@me.com> <64a1a452-5b6a-f18b-b01b-d4f265062aa8@krutt.org> Message-ID: <5FD9A47C-777E-4F81-9E06-59C19C79FDC6@pidigital.co.uk> Assuming you mean London, UK, I?d be able to occasionally if the dates are ok. I?m in Chatham, North Kent so it?s only 40mins away by train. Sean Cole Pi Digital > On 10 Nov 2018, at 12:54, Andre Alves Garzia via use-livecode wrote: > > I hope you come this way soon Stephen :-D Are you going to the next conf in San Jose? > > Cheers > > andre > >> On 11/9/2018 8:32 PM, Stephen Barncard via use-livecode wrote: >> Andre - If I were ANYWHERE in the EU I would love the opportunity to meet >> up with you anytime! >> but I'm stuck in (a nice part of) Trumpland.... >> -- >> Stephen Barncard - Sebastopol Ca. USA - >> mixstream.org >> >> >> On Fri, Nov 9, 2018 at 10:20 AM JJS via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> I have to go with a boat then few hours.... >>> >>> So i'll stay home and get a beer from my fridge >>> >>> >>> Op 9-11-2018 om 18:44 schreef Keith Clarke via use-livecode: >>>> Andre, I?m based near London and would be happy to meet in Town & buy >>> you a beer. :-) >>>> Best, >>>> Keith >>>> >>>>> On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>>>> Hey Friends, >>>>> >>>>> Who here is from London or nearby and would be interested in regular >>> meetups? We could meet once a month or so in a pub or quieter setting. I am >>> thinking of informal meet & drink, chatting. >>>>> Cheers >>>>> >>>>> andre >>>>> >>>>> >>>>> _______________________________________________ >>>>> use-livecode mailing list >>>>> use-livecode 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 sean at pidigital.co.uk Sat Nov 10 08:06:45 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sat, 10 Nov 2018 13:06:45 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: <76C80EC8-D730-4061-9483-59FA589BB08A@pidigital.co.uk> Assuming you mean London, UK, I?d be able to occasionally if the dates are ok. I?m in Chatham, North Kent so it?s only 40mins away by train. Sean Cole Pi Digital > On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: > > Hey Friends, > > Who here is from London or nearby and would be interested in regular meetups? We could meet once a month or so in a pub or quieter setting. I am thinking of informal meet & drink, chatting. > > Cheers > > andre From Bernd.Niggemann at uni-wh.de Sat Nov 10 08:12:44 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 10 Nov 2018 13:12:44 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: Message-ID: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> This is a little late but there was a discussion about the slowness of simple offset() when dealing with text that contains Unicode characters. Geoff Canyon and Brian Milby found a faster solution by setting the itemDelimiter to the search string. They even provided a way to find the position of substrings in the search string which the offset() command does by design. Here I propose a variant of the offset() form that uses UTF16 to search, easily adaptable to UTF32 if necessary. To test (as in Brian's testStack) add a unicode character to the text to be searched e.g. at the end. Just any non-ASCII character to see the speed penalty of simple offset(). I used ? (Icelandic d) or use any chinese character. Kind regards Bernd ------------------------------------------- function allOffsets pDelim, pString, pCaseSensitive local tNewPos, tPos, tResult put textEncode(pDelim,"UTF16") into pDelim put textEncode(pString,"UTF16") into pString set the caseSensitive to pCaseSensitive is true put 0 into tPos repeat forever put offset(pDelim, pString, tPos) into tNewPos if tNewPos = 0 then exit repeat add tNewPos to tPos put tPos div 2 + tPos mod 2,"" after tResult end repeat if tResult is empty then return 0 else return char 1 to -2 of tResult end allOffsets ----------------------------------------- From thatkeith at mac.com Sat Nov 10 09:13:13 2018 From: thatkeith at mac.com (Keith Martin) Date: Sat, 10 Nov 2018 14:13:13 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: Hi Andre, I'm based in London ? I live in Mitcham/Tooting and I work in Elephant & Castle. I'm game! k On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: > Hey Friends, > > Who here is from London or nearby and would be interested in regular > meetups? We could meet once a month or so in a pub or quieter setting. > I am thinking of informal meet & drink, chatting. > > Cheers > > andre > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Nov 10 09:59:37 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sat, 10 Nov 2018 14:59:37 +0000 Subject: [ANN] Release 9.0.2 RC-1 References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> Message-ID: @ henry Most Apple developers know this but I stumbled on the procedure so many times I thought I would help Panos, FWIW, https://developer.apple.com/download/more/ filter the list to iOS (side panel) 1) get Xcode 10.0 2) also Command_Line_Tools_macOS_10.14_for_Xcode_10.dmg It seems when you install manually like this, Xcode does not prompt to "install additional components" because, if you already downloaded from the store, and got the prompt and installed them, (my guess is that) the system thinks "Oh he got everything." But, upon building a standalone you will have troubles. Because you did not get tools to the current version of Xcode that you installed manually. So download these for Xcode 10 and install Next, be sure to run from the command line sudo xcode-select --switch /Applications/Xcode.app [or-your-path] It works! I got installed a standalone on iOS 12.1 from Mojave. And the Javascript handlers are working again in an HTML5 installation on a browser "Widget" ! BR On 11/9/18 10:04 AM, hlowe via use-livecode wrote: > I am using Mac OS 10.14.1. Downloaded LC 9.0.2 RC-1 and also installed the > latest version of Xcode (10.1) as I need to test our iOS app with the new > iOS devices available in the simulator. I am getting the message that LC > requires iOS SDK between 8.2 and 12.0, though iOS 12.1 is the latest > version. Back to Xcode 10.0? > > Henry -s free: https://www.himalayanacademy.com/apps/sivasiva From richmondmathewson at gmail.com Sat Nov 10 13:01:46 2018 From: richmondmathewson at gmail.com (Richmond) Date: Sat, 10 Nov 2018 20:01:46 +0200 Subject: put the openStacks Message-ID: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> So . . . If I type * put the openStacks into fld "STAX"* in the *messageBox* (assuming that I have an open stack containing a listField called "STAX") I get a lovely list of . . . wait for it . . . the open stacks. However (8.1.9) if I have a button on that stack containing *on mouseUp put the openStacks into fld "STAX" end mouseUp* the thing does not work. Any bright ideas about where I'm going wrong? Richmond. From ambassador at fourthworld.com Sat Nov 10 14:08:54 2018 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 10 Nov 2018 11:08:54 -0800 Subject: LC/macOS App Store In-Reply-To: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> Message-ID: <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> Bob Sneidar wrote: > People cannot remember commands, especially not terminal commands, > with all the arguments and caveats and different ways to put it all > together. For end-users, the awareness of that principle is very powerful. But where are we, here in this discussion? On a mailing list for programmers using a rich language with 3,000+ tokens to memorize. :) Just as LiveCode is the way we build applications, Terminal is the way we manage our systems. Locally, you can get away with never automating anything in bash (though why wouldn't a programmer want to take advantage of automation?). But for working with servers, bash is the lingua franca of sysadmin, the foundation of efficient work to handle all the essentials and also make systems more robust, secure, and redeployable. Besides, most servers have no GUI, so Terminal is your only UI. As programmers, we like the expressiveness of text and the opportunity to learn. -- 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 gcanyon at gmail.com Sat Nov 10 14:30:11 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sat, 10 Nov 2018 11:30:11 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> Message-ID: This is faster -- under some circumstances, much faster! Any idea why textEncoding suddenly fixes everything? On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < use-livecode at lists.runrev.com> wrote: > This is a little late but there was a discussion about the slowness of > simple offset() when dealing with text that contains Unicode characters. > > Geoff Canyon and Brian Milby found a faster solution by setting the > itemDelimiter to the search string. > They even provided a way to find the position of substrings in the search > string which the offset() command does by design. > > Here I propose a variant of the offset() form that uses UTF16 to search, > easily adaptable to UTF32 if necessary. > > To test (as in Brian's testStack) add a unicode character to the text to > be searched e.g. at the end. Just any non-ASCII character to see the speed > penalty of simple offset(). I used ? (Icelandic d) or use any chinese > character. > > > Kind regards > Bernd > > ------------------------------------------- > function allOffsets pDelim, pString, pCaseSensitive > local tNewPos, tPos, tResult > > put textEncode(pDelim,"UTF16") into pDelim > put textEncode(pString,"UTF16") into pString > > set the caseSensitive to pCaseSensitive is true > put 0 into tPos > repeat forever > put offset(pDelim, pString, tPos) into tNewPos > if tNewPos = 0 then exit repeat > add tNewPos to tPos > put tPos div 2 + tPos mod 2,"" after tResult > end repeat > if tResult is empty then return 0 > else return char 1 to -2 of tResult > end allOffsets > ----------------------------------------- > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Nov 10 14:41:03 2018 From: richmondmathewson at gmail.com (Richmond) Date: Sat, 10 Nov 2018 21:41:03 +0200 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> Message-ID: I don't know who told you that ? was an Icelandic d. The ? is called the "eth", and was used in Anglo-Saxon interchangeably with the thorn to represent the 2 sounds that are now represented in English by the digraph th. As such Icelandic has retained the eth sign. In Icelandic the /d/ sound is represented by the letter d. Richmond. On 10.11.18 ?. 21:30 ?., Geoff Canyon via use-livecode wrote: > This is faster -- under some circumstances, much faster! Any idea why > textEncoding suddenly fixes everything? > > On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> This is a little late but there was a discussion about the slowness of >> simple offset() when dealing with text that contains Unicode characters. >> >> Geoff Canyon and Brian Milby found a faster solution by setting the >> itemDelimiter to the search string. >> They even provided a way to find the position of substrings in the search >> string which the offset() command does by design. >> >> Here I propose a variant of the offset() form that uses UTF16 to search, >> easily adaptable to UTF32 if necessary. >> >> To test (as in Brian's testStack) add a unicode character to the text to >> be searched e.g. at the end. Just any non-ASCII character to see the speed >> penalty of simple offset(). I used ? (Icelandic d) or use any chinese >> character. >> >> >> Kind regards >> Bernd >> >> ------------------------------------------- >> function allOffsets pDelim, pString, pCaseSensitive >> local tNewPos, tPos, tResult >> >> put textEncode(pDelim,"UTF16") into pDelim >> put textEncode(pString,"UTF16") into pString >> >> set the caseSensitive to pCaseSensitive is true >> put 0 into tPos >> repeat forever >> put offset(pDelim, pString, tPos) into tNewPos >> if tNewPos = 0 then exit repeat >> add tNewPos to tPos >> put tPos div 2 + tPos mod 2,"" after tResult >> end repeat >> if tResult is empty then return 0 >> else return char 1 to -2 of tResult >> end allOffsets >> ----------------------------------------- >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 jjs at krutt.org Sat Nov 10 14:45:47 2018 From: jjs at krutt.org (JJS) Date: Sat, 10 Nov 2018 20:45:47 +0100 Subject: LC/macOS App Store In-Reply-To: <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> Message-ID: By the way. In Mojave i got a a message "you are running a 32bit program" (the livecode ide). Within a certain amount of time it's going to "force"? to use 64bit programs Op 10-11-2018 om 20:08 schreef Richard Gaskin via use-livecode: > Bob Sneidar wrote: > > > People cannot remember commands, especially not terminal commands, > > with all the arguments and caveats and different ways to put it all > > together. > > For end-users, the awareness of that principle is very powerful. > > But where are we, here in this discussion?? On a mailing list for > programmers using a rich language with 3,000+ tokens to memorize. :) > > Just as LiveCode is the way we build applications, Terminal is the way > we manage our systems. > > Locally, you can get away with never automating anything in bash > (though why wouldn't a programmer want to take advantage of automation?). > > But for working with servers, bash is the lingua franca of sysadmin, > the foundation of efficient work to handle all the essentials and also > make systems more robust, secure, and redeployable. > > Besides, most servers have no GUI, so Terminal is your only UI. > > As programmers, we like the expressiveness of text and the opportunity > to learn. > > -- > ?Richard Gaskin > ?Fourth World Systems > ?Software Design and Development for the Desktop, Mobile, and the Web > ?____________________________________________________________________ > ?Ambassador at FourthWorld.com http://www.FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jjs at krutt.org Sat Nov 10 14:53:45 2018 From: jjs at krutt.org (JJS) Date: Sat, 10 Nov 2018 20:53:45 +0100 Subject: FCM Push Notification Icon no longer appearing as expected In-Reply-To: References: <5cd9eb13-f84e-a656-2cf7-ac9a18275525@krutt.org> Message-ID: <3642769e-e06d-af93-96f7-c7d98ad91fd2@krutt.org> Yes! I changed the notification icon to a white one at 192x192 px. And now it is turning up again. Although i liked a colourful one more. At least it works. No one is using push notifications on mobile?? Op 9-11-2018 om 22:02 schreef JJS via use-livecode: > Well after some searching. > > It seems that it has to do with the targetting LC does now at sdk26, > and thus makes a standard square notification with a white circle in it. > > Google says an notification has to be white. And edit an icon at 400% > 129x192px. a 100% icon is 48px. > > If target <21 then the notification will have original colors. My > target was Jelly Bean 4.1 = API 16, so before targetting API26 it was > working ok. But Google enforces it to target the sdk26. > > according an answer also here: > https://stackoverflow.com/questions/28387602/notification-bar-icon-turns-white-in-android-5-lollipop > > So probably too bad: I do like colored notification icons more than > the sad white ones. > > Back to the drawing table and create ugly white icons... > > > Op 9-11-2018 om 17:59 schreef JJS via use-livecode: >> Hi, >> >> anyone noticed that the FCM (GCM) Push Notification icon does not >> appear anymore in the status bar on Android when a notification is >> received? >> >> It's now a standard white square as if it was not configured correct. >> >> Except nothing has changed to the code or the used PNG at standalone >> settings. >> >> >> Can anyone confirm? >> >> Thanks! >> >> Sphere >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Bernd.Niggemann at uni-wh.de Sat Nov 10 15:12:52 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 10 Nov 2018 20:12:52 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> Message-ID: <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> I figured that the slowdown was due to UTF8, for each char it has to test if it is a compounded character. So I just tried with utf16 figuring, that now it just compares at the byte-level. As it turned out it was indeed faster. Now I don't understand unicode but as I understand for some languages/signs/characters you need UTF32 to display them correctly. I may be wrong on that. But if it is true then the overhead to use UTF32 in textEncoding only adds a small amount to processing time. The nice thing is that UTF16 and UTF32 textencoding also support caseSensitivity. ByteOffset() for UTF16 is probably always case-sensitive, but only saves a small amount of processing time. Also, LC apparently has to turn ASCII into UTF8 as soon as there is one non-ASCII character in the source text. In my naive understanding LC could internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 is in the source. Would make obsolete this workaround. This is just how I "think" it works, the explanation may be all wrong. Kind regards Bernd Am 10.11.2018 um 20:30 schrieb Geoff Canyon >: This is faster -- under some circumstances, much faster! Any idea why textEncoding suddenly fixes everything? On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode > wrote: This is a little late but there was a discussion about the slowness of simple offset() when dealing with text that contains Unicode characters. Geoff Canyon and Brian Milby found a faster solution by setting the itemDelimiter to the search string. They even provided a way to find the position of substrings in the search string which the offset() command does by design. Here I propose a variant of the offset() form that uses UTF16 to search, easily adaptable to UTF32 if necessary. To test (as in Brian's testStack) add a unicode character to the text to be searched e.g. at the end. Just any non-ASCII character to see the speed penalty of simple offset(). I used ? (Icelandic d) or use any chinese character. Kind regards Bernd ------------------------------------------- function allOffsets pDelim, pString, pCaseSensitive local tNewPos, tPos, tResult put textEncode(pDelim,"UTF16") into pDelim put textEncode(pString,"UTF16") into pString set the caseSensitive to pCaseSensitive is true put 0 into tPos repeat forever put offset(pDelim, pString, tPos) into tNewPos if tNewPos = 0 then exit repeat add tNewPos to tPos put tPos div 2 + tPos mod 2,"" after tResult end repeat if tResult is empty then return 0 else return char 1 to -2 of tResult end allOffsets ----------------------------------------- _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sat Nov 10 15:25:48 2018 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 10 Nov 2018 12:25:48 -0800 Subject: LC/macOS App Store In-Reply-To: References: Message-ID: JJS wrote: > In Mojave i got a a message "you are running a 32bit program" (the > livecode ide). > > Within a certain amount of time it's going to "force" to use 64bit > programs Yep, and the team has come through: several months ago they delivered v9.0, which now allows standalone building for 64-bit macOS systems. It's now even better with v9.0.2rc1 released yesterday: https://downloads.livecode.com/livecode/ -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ____________________________________________________________________ Ambassador at FourthWorld.com http://www.FourthWorld.com From jacque at hyperactivesw.com Sat Nov 10 16:04:09 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 10 Nov 2018 15:04:09 -0600 Subject: put the openStacks In-Reply-To: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> References: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> Message-ID: <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Does the mouseUp trigger at all? -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 10, 2018 12:03:51 PM Richmond via use-livecode wrote: > So . . . > > If I type > * > put the openStacks into fld "STAX"* > > in the *messageBox* (assuming that I have an open stack containing a > listField called "STAX") > > I get a lovely list of . . . wait for it . . . the open stacks. > > However (8.1.9) if I have a button on that stack containing > > *on mouseUp > put the openStacks into fld "STAX" > end mouseUp* > > the thing does not work. > > Any bright ideas about where I'm going wrong? > > Richmond. > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Sat Nov 10 15:21:10 2018 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sat, 10 Nov 2018 12:21:10 -0800 Subject: SSL with HTTPD Library? In-Reply-To: References: Message-ID: Sannyasin Brahmanathaswami wrote: > On 11/1/18 5:02 PM, Stephen MacLean via use-livecode wrote: >> LC server, can do it, but also suffers, from what I?ve read in my >> research, a speed penalty from CGI implementation vs direct sockets, >> etc. > > Well that "speed penality" is theoretical. Our web site > > https://www.himalayanacademy.com > > uses Livacode server, and for all "gorilla dust" about LC's one > thread, open multiple CGIs, and how it is "old fashioned" In addition to Andre's comments earlier this morning, there is another, perhaps more fundamental, difference between your setup and lcHTTPd: You're still using Apache for most of the heavy lifting. Consider the two setups, each with requests for different media types: LC Server with .lc files: Internet -> Apache -> LC Server LC Server with images/CSS/everything that isn't .lc: Internet -> Apache lcHTTPd with LC scripts: Internet -> LC lcHTTPd with images/CSS/everything that isn't LC: Internet -> LC With LC Server, Apache handles all socket I/O and most file I/O. Indeed, it's handling ALL file I/O for most media types, except the relatively small subset of requests for .lc files where it still handles the reading of the requested .lc script but from there any further file I/O is of course up to your script. With lcHTTPd, it must handle everything: all socket and file I/O, in addition to whatever your script needs to do. In short: LC Server is a CGI that works in conjunction with dedicated HTTPd software like Apache. lcHTTPd does what LC Server does AND ALSO attempts to replace the role of Apache for managing I/O and serving static files. LC is a great language, and as Node.js and NGinX show us, being single-threaded need not necessarily be a drawback. But Apache, Node.js, and NGinX are written in languages compiled to machine code, and by large teams focused on honing the engine for the one specific set of tasks an HTTP broker needs to accomplish. A scripted solution in a more general purpose tool like LC is unlikely to compete favorably. There is a role for custom HTTP handling, but with so many great tools available that are specialized for that task the use cases where choosing LC for that may be optimal are few. The HTTPd lib included with LC is designed for one good use case: local testing. But for remote servers that need to handle public loads, better to do what you're doing: use Apache (or other dedicated HTTP broker) to handle the I/O, and use LC for the dynamic application-specific stuff where LC really shines. -- 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 sean at pidigital.co.uk Sat Nov 10 16:41:50 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sat, 10 Nov 2018 21:41:50 +0000 Subject: LC/macOS App Store In-Reply-To: References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> Message-ID: <9D178A5E-4460-4B5D-839B-3BBAB8C55241@pidigital.co.uk> https://downloads.livecode.com/livecode/9_0_0/LiveCodeNotes-9_0_0.pdf#page32 To quote: > The IDE is now 64-bit by default on Mac > Moreover, the "Build for Mac OS X 64-bit" is checked by default on newly created stacks in the standalone settings for OS X. Existing stacks will retain their current settings. Check your settings perhaps. You can double check by going to Apple>AboutThisMac>SystemReport(button)>Software>Applications>LiveCode 9.0.2> and look at 64-bit to see if it says yes. If it does, nothing to worry about. Sean Cole Pi Digital > On 10 Nov 2018, at 19:45, JJS via use-livecode wrote: > > By the way. > > In Mojave i got a a message "you are running a 32bit program" (the livecode ide). > > Within a certain amount of time it's going to "force" to use 64bit programs From richmondmathewson at gmail.com Sat Nov 10 17:02:15 2018 From: richmondmathewson at gmail.com (Richmond) Date: Sun, 11 Nov 2018 00:02:15 +0200 Subject: put the openStacks In-Reply-To: <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: ??? Well the mouseUp did trigger AFTER I pulled a mouseUp from "higher up the tree"; and, Thanks, Jacque, I do deserve to be kicked for that one. All "rather" silly really. http://forums.livecode.com/viewtopic.php?f=6&t=31740#p173118 Richmond. On 10.11.18 ?. 23:04 ?., J. Landman Gay via use-livecode wrote: > Does the mouseUp trigger at all? > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On November 10, 2018 12:03:51 PM Richmond via use-livecode > wrote: > >> So . . . >> >> If I type >> * >> put the openStacks into fld "STAX"* >> >> in the *messageBox* (assuming that I have an open stack containing a >> listField called "STAX") >> >> I get a lovely list of . . . wait for it . . . the open stacks. >> >> However (8.1.9) if I have a button on that stack containing >> >> *on mouseUp >> put the openStacks into fld "STAX" >> end mouseUp* >> >> the thing does not work. >> >> Any bright ideas about where I'm going wrong? >> >> Richmond. >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Nov 10 17:38:04 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 10 Nov 2018 16:38:04 -0600 Subject: put the openStacks In-Reply-To: References: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <166ffc664e0.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Well you wouldn't be our Richmond if you weren't occasionally silly, but I'd be glad to kick you next time we meet if you like. :) -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 10, 2018 4:04:17 PM Richmond via use-livecode wrote: > Well the mouseUp did trigger AFTER I pulled a mouseUp from "higher > up the tree"; and, Thanks, Jacque, > I do deserve to be kicked for that one. > > All "rather" silly really. > > http://forums.livecode.com/viewtopic.php?f=6&t=31740#p173118 > > Richmond. > > On 10.11.18 ?. 23:04 ?., J. Landman Gay via use-livecode wrote: >> Does the mouseUp trigger at all? >> -- >> Jacqueline Landman Gay | jacque at hyperactivesw.com >> HyperActive Software | http://www.hyperactivesw.com >> On November 10, 2018 12:03:51 PM Richmond via use-livecode >> wrote: >> >>> So . . . >>> >>> If I type >>> * >>> put the openStacks into fld "STAX"* >>> >>> in the *messageBox* (assuming that I have an open stack containing a >>> listField called "STAX") >>> >>> I get a lovely list of . . . wait for it . . . the open stacks. >>> >>> However (8.1.9) if I have a button on that stack containing >>> >>> *on mouseUp >>> put the openStacks into fld "STAX" >>> end mouseUp* >>> >>> the thing does not work. >>> >>> Any bright ideas about where I'm going wrong? >>> >>> Richmond. >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 gcanyon at gmail.com Sat Nov 10 18:00:32 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sat, 10 Nov 2018 15:00:32 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> Message-ID: Unfortunately, I just discovered that your solution doesn't produce correct results. If I get the offsets of "aaaaaaaaaa" in "??aa??aaaaaaaaaaaaa??aaaa", My code (and Brian Milby's) will return: 7,8,9,10 Your code will return: 9,10,11,12 As I understand it, textEncode transforms unicode text into binary data, which has the effect of speeding things up because LC is no longer dealing with variable-byte-length characters, just the underlying (fixed-length) binary data that makes them up. Hence the above discrepancy. At least I think so. Maybe there's a way to fix it? gc On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd wrote: > I figured that the slowdown was due to UTF8, for each char it has to test > if it is a compounded character. So I just tried with utf16 figuring, that > now it just compares at the byte-level. > > As it turned out it was indeed faster. > > Now I don't understand unicode but as I understand for some > languages/signs/characters you need UTF32 to display them correctly. I may > be wrong on that. But if it is true then the overhead to use UTF32 in > textEncoding only adds a small amount to processing time. > > The nice thing is that UTF16 and UTF32 textencoding also support > caseSensitivity. ByteOffset() for UTF16 is probably always case-sensitive, > but only saves a small amount of processing time. > > Also, LC apparently has to turn ASCII into UTF8 as soon as there is one > non-ASCII character in the source text. In my naive understanding LC could > internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 > is in the source. Would make obsolete this workaround. > > > This is just how I "think" it works, the explanation may be all wrong. > > Kind regards > > Bernd > > Am 10.11.2018 um 20:30 schrieb Geoff Canyon : > > This is faster -- under some circumstances, much faster! Any idea why > textEncoding suddenly fixes everything? > > On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> This is a little late but there was a discussion about the slowness of >> simple offset() when dealing with text that contains Unicode characters. >> >> Geoff Canyon and Brian Milby found a faster solution by setting the >> itemDelimiter to the search string. >> They even provided a way to find the position of substrings in the search >> string which the offset() command does by design. >> >> Here I propose a variant of the offset() form that uses UTF16 to search, >> easily adaptable to UTF32 if necessary. >> >> To test (as in Brian's testStack) add a unicode character to the text to >> be searched e.g. at the end. Just any non-ASCII character to see the speed >> penalty of simple offset(). I used ? (Icelandic d) or use any chinese >> character. >> >> >> Kind regards >> Bernd >> >> ------------------------------------------- >> function allOffsets pDelim, pString, pCaseSensitive >> local tNewPos, tPos, tResult >> >> put textEncode(pDelim,"UTF16") into pDelim >> put textEncode(pString,"UTF16") into pString >> >> set the caseSensitive to pCaseSensitive is true >> put 0 into tPos >> repeat forever >> put offset(pDelim, pString, tPos) into tNewPos >> if tNewPos = 0 then exit repeat >> add tNewPos to tPos >> put tPos div 2 + tPos mod 2,"" after tResult >> end repeat >> if tResult is empty then return 0 >> else return char 1 to -2 of tResult >> end allOffsets >> ----------------------------------------- >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > From Bernd.Niggemann at uni-wh.de Sat Nov 10 19:05:45 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sun, 11 Nov 2018 00:05:45 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> Message-ID: That is what I alluded to, UTF is a wild country and I don't know my ways, try ----------------------------- function allOffsets pDelim, pString, pCaseSensitive local tNewPos, tPos, tResult put textEncode(pDelim,"UTF32") into pDelim put textEncode(pString,"UTF32") into pString set the caseSensitive to pCaseSensitive is true put 0 into tPos repeat forever put offset(pDelim, pString, tPos) into tNewPos if tNewPos = 0 then exit repeat add tNewPos to tPos put tPos div 4 + tPos mod 4,"" after tResult end repeat if tResult is empty then return 0 else return char 1 to -2 of tResult end allOffsets ---------------------------------- It teaches me to use UTF32 to be on the safe side, thank you. But that should take care of it. Kind regards Bernd Unfortunately, I just discovered that your solution doesn't produce correct results. If I get the offsets of "aaaaaaaaaa" in "??aa??aaaaaaaaaaaaa??aaaa", My code (and Brian Milby's) will return: 7,8,9,10 Your code will return: 9,10,11,12 As I understand it, textEncode transforms unicode text into binary data, which has the effect of speeding things up because LC is no longer dealing with variable-byte-length characters, just the underlying (fixed-length) binary data that makes them up. Hence the above discrepancy. At least I think so. Maybe there's a way to fix it? gc Am 11.11.2018 um 00:00 schrieb Geoff Canyon >: Unfortunately, I just discovered that your solution doesn't produce correct results. If I get the offsets of "aaaaaaaaaa" in "??aa??aaaaaaaaaaaaa??aaaa", My code (and Brian Milby's) will return: 7,8,9,10 Your code will return: 9,10,11,12 As I understand it, textEncode transforms unicode text into binary data, which has the effect of speeding things up because LC is no longer dealing with variable-byte-length characters, just the underlying (fixed-length) binary data that makes them up. Hence the above discrepancy. At least I think so. Maybe there's a way to fix it? gc On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd > wrote: I figured that the slowdown was due to UTF8, for each char it has to test if it is a compounded character. So I just tried with utf16 figuring, that now it just compares at the byte-level. As it turned out it was indeed faster. Now I don't understand unicode but as I understand for some languages/signs/characters you need UTF32 to display them correctly. I may be wrong on that. But if it is true then the overhead to use UTF32 in textEncoding only adds a small amount to processing time. The nice thing is that UTF16 and UTF32 textencoding also support caseSensitivity. ByteOffset() for UTF16 is probably always case-sensitive, but only saves a small amount of processing time. Also, LC apparently has to turn ASCII into UTF8 as soon as there is one non-ASCII character in the source text. In my naive understanding LC could internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 is in the source. Would make obsolete this workaround. This is just how I "think" it works, the explanation may be all wrong. Kind regards Bernd Am 10.11.2018 um 20:30 schrieb Geoff Canyon >: This is faster -- under some circumstances, much faster! Any idea why textEncoding suddenly fixes everything? On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode > wrote: This is a little late but there was a discussion about the slowness of simple offset() when dealing with text that contains Unicode characters. Geoff Canyon and Brian Milby found a faster solution by setting the itemDelimiter to the search string. They even provided a way to find the position of substrings in the search string which the offset() command does by design. Here I propose a variant of the offset() form that uses UTF16 to search, easily adaptable to UTF32 if necessary. To test (as in Brian's testStack) add a unicode character to the text to be searched e.g. at the end. Just any non-ASCII character to see the speed penalty of simple offset(). I used ? (Icelandic d) or use any chinese character. Kind regards Bernd ------------------------------------------- function allOffsets pDelim, pString, pCaseSensitive local tNewPos, tPos, tResult put textEncode(pDelim,"UTF16") into pDelim put textEncode(pString,"UTF16") into pString set the caseSensitive to pCaseSensitive is true put 0 into tPos repeat forever put offset(pDelim, pString, tPos) into tNewPos if tNewPos = 0 then exit repeat add tNewPos to tPos put tPos div 2 + tPos mod 2,"" after tResult end repeat if tResult is empty then return 0 else return char 1 to -2 of tResult end allOffsets ---------------------------------------- From Bernd.Niggemann at uni-wh.de Sat Nov 10 19:43:26 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sun, 11 Nov 2018 00:43:26 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> Message-ID: <2FD616D3-B092-48E1-8FB3-FBD15C56362B@uni-wh.de> Hi Richmond Richmond via use-livecode Sat, 10 Nov 2018 11:42:50 -0800 >I don't know who told you that ? was an Icelandic d. No one told me, I just made it up from the appearance of the letter. I do know though that Sunnudagu (Sunday) is different from Bar?ar (a male first name) >The ? is called the "eth", and was used in Anglo-Saxon interchangeably with thethorn to represent the 2 sounds that are now represented in English by As such Icelandic has retained the eth sign. >In Icelandic the /d/ sound is represented by the letter d. thank you for this very interesting information. But I think that the actual topic of this thread could also interest the author of the famous "DevaWriter", may be only on a tangent. Kind regards Bernd From hlowe at me.com Sat Nov 10 20:07:19 2018 From: hlowe at me.com (hlowe) Date: Sat, 10 Nov 2018 19:07:19 -0600 (CST) Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> Message-ID: <1541898439598-0.post@n4.nabble.com> Thanks @BR. Henry -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From sean at pidigital.co.uk Sat Nov 10 23:15:09 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Sun, 11 Nov 2018 04:15:09 +0000 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> Message-ID: <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Perhaps we should get a simplified version of this into every release note from here on in. It will save a whole heap of hunting around for them. Sean Cole Pi Digital > On 10 Nov 2018, at 14:59, Sannyasin Brahmanathaswami via use-livecode wrote: > > https://developer.apple.com/download/more/ > > filter the list to iOS (side panel) > > 1) get Xcode 10.0 > 2) also Command_Line_Tools_macOS_10.14_for_Xcode_10.dmg > > It seems when you install manually like this, Xcode does not prompt to > "install additional components" because, if you already downloaded from > the store, and got the prompt and installed them, (my guess is that) the > system thinks "Oh he got everything." > > But, upon building a standalone you will have troubles. Because you did > not get tools to the current version of Xcode that you installed > manually. So download these for Xcode 10 and install > > Next, be sure to run from the command line > > sudo xcode-select --switch /Applications/Xcode.app [or-your-path] From brian at milby7.com Sat Nov 10 23:54:12 2018 From: brian at milby7.com (Brian Milby) Date: Sat, 10 Nov 2018 22:54:12 -0600 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> Message-ID: The correct formula for UTF16 should be: put tPos div 2 + 1,"" after tResult The correct formula for UTF32 should be: put tPos div 4 + 1,"" after tResult If you go to card #6 of my stack that is on GitHub, it has the first chapter of John that I copied from the internet. I added a single UTF(8?) character to it so get the results that are listed (last char of the first visible line). Making the change is dramatic. Offset takes 65k ms. Geoff's code and my code take 6k ms. Converting to UTF16 first and using offset takes 519 ms. And note that the timings include those 2 calls to convert the variables to UTF16. Now, if I take Geoff's sample that didn't work, I get the same incorrect results. The problem is that some of those characters end up needing 2 UTF16 codepoints to represent them. (I hope I'm using the correct terminology.) So, the safe solution is to always use UTF32. Speed looks to be close between them. On my largest text example, UTF16 took 448ms and UTF32 took 584ms. I'll update my stack and push an update to my repo so others can check out the new code. On Sat, Nov 10, 2018 at 6:05 PM Niggemann, Bernd wrote: > That is what I alluded to, > UTF is a wild country and I don't know my ways, > try > ----------------------------- > function allOffsets pDelim, pString, pCaseSensitive > local tNewPos, tPos, tResult > > put textEncode(pDelim,"UTF32") into pDelim > put textEncode(pString,"UTF32") into pString > > set the caseSensitive to pCaseSensitive is true > put 0 into tPos > repeat forever > put offset(pDelim, pString, tPos) into tNewPos > if tNewPos = 0 then exit repeat > add tNewPos to tPos > put tPos div 4 + tPos mod 4,"" after tResult > end repeat > if tResult is empty then return 0 > else return char 1 to -2 of tResult > end allOffsets > ---------------------------------- > > It teaches me to use UTF32 to be on the safe side, thank you. > But that should take care of it. > > Kind regards > Bernd > > > Unfortunately, I just discovered that your solution doesn't produce correct > results. If I get the offsets of "aaaaaaaaaa" in > "??aa??aaaaaaaaaaaaa??aaaa", > > My code (and Brian Milby's) will return: 7,8,9,10 > > Your code will return: 9,10,11,12 > > As I understand it, textEncode transforms unicode text into binary data, > which has the effect of speeding things up because LC is no longer dealing > with variable-byte-length characters, just the underlying (fixed-length) > binary data that makes them up. Hence the above discrepancy. At least I > think so. Maybe there's a way to fix it? > > gc > > > > Am 11.11.2018 um 00:00 schrieb Geoff Canyon : > > Unfortunately, I just discovered that your solution doesn't produce > correct results. If I get the offsets of "aaaaaaaaaa" in > "??aa??aaaaaaaaaaaaa??aaaa", > > My code (and Brian Milby's) will return: 7,8,9,10 > > Your code will return: 9,10,11,12 > > As I understand it, textEncode transforms unicode text into binary data, > which has the effect of speeding things up because LC is no longer dealing > with variable-byte-length characters, just the underlying (fixed-length) > binary data that makes them up. Hence the above discrepancy. At least I > think so. Maybe there's a way to fix it? > > gc > > On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd < > Bernd.Niggemann at uni-wh.de> wrote: > >> I figured that the slowdown was due to UTF8, for each char it has to test >> if it is a compounded character. So I just tried with utf16 figuring, that >> now it just compares at the byte-level. >> >> As it turned out it was indeed faster. >> >> Now I don't understand unicode but as I understand for some >> languages/signs/characters you need UTF32 to display them correctly. I may >> be wrong on that. But if it is true then the overhead to use UTF32 in >> textEncoding only adds a small amount to processing time. >> >> The nice thing is that UTF16 and UTF32 textencoding also support >> caseSensitivity. ByteOffset() for UTF16 is probably always case-sensitive, >> but only saves a small amount of processing time. >> >> Also, LC apparently has to turn ASCII into UTF8 as soon as there is one >> non-ASCII character in the source text. In my naive understanding LC could >> internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 >> is in the source. Would make obsolete this workaround. >> >> >> This is just how I "think" it works, the explanation may be all wrong. >> >> Kind regards >> >> Bernd >> >> Am 10.11.2018 um 20:30 schrieb Geoff Canyon : >> >> This is faster -- under some circumstances, much faster! Any idea why >> textEncoding suddenly fixes everything? >> >> On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >>> This is a little late but there was a discussion about the slowness of >>> simple offset() when dealing with text that contains Unicode characters. >>> >>> Geoff Canyon and Brian Milby found a faster solution by setting the >>> itemDelimiter to the search string. >>> They even provided a way to find the position of substrings in the >>> search string which the offset() command does by design. >>> >>> Here I propose a variant of the offset() form that uses UTF16 to search, >>> easily adaptable to UTF32 if necessary. >>> >>> To test (as in Brian's testStack) add a unicode character to the text to >>> be searched e.g. at the end. Just any non-ASCII character to see the speed >>> penalty of simple offset(). I used ? (Icelandic d) or use any chinese >>> character. >>> >>> >>> Kind regards >>> Bernd >>> >>> ------------------------------------------- >>> function allOffsets pDelim, pString, pCaseSensitive >>> local tNewPos, tPos, tResult >>> >>> put textEncode(pDelim,"UTF16") into pDelim >>> put textEncode(pString,"UTF16") into pString >>> >>> set the caseSensitive to pCaseSensitive is true >>> put 0 into tPos >>> repeat forever >>> put offset(pDelim, pString, tPos) into tNewPos >>> if tNewPos = 0 then exit repeat >>> add tNewPos to tPos >>> put tPos div 2 + tPos mod 2,"" after tResult >>> end repeat >>> if tResult is empty then return 0 >>> else return char 1 to -2 of tResult >>> end allOffsets >>> ---------------------------------------- >>> >> > From gcanyon at gmail.com Sun Nov 11 02:50:14 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sat, 10 Nov 2018 23:50:14 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> Message-ID: One thing I don't get is how (not) caseSensitive gets handled? Once the text is all binary data, is the engine really still able to look at the binary values for "A" and "a" and treat them as the same? On Sat, Nov 10, 2018 at 8:54 PM Brian Milby via use-livecode < use-livecode at lists.runrev.com> wrote: > The correct formula for UTF16 should be: > put tPos div 2 + 1,"" after tResult > > The correct formula for UTF32 should be: > put tPos div 4 + 1,"" after tResult > > If you go to card #6 of my stack that is on GitHub, it has the first > chapter of John that I copied from the internet. I added a single UTF(8?) > character to it so get the results that are listed (last char of the first > visible line). > > Making the change is dramatic. Offset takes 65k ms. Geoff's code and my > code take 6k ms. Converting to UTF16 first and using offset takes 519 ms. > And note that the timings include those 2 calls to convert the variables to > UTF16. > > Now, if I take Geoff's sample that didn't work, I get the same incorrect > results. The problem is that some of those characters end up needing 2 > UTF16 codepoints to represent them. (I hope I'm using the correct > terminology.) > > So, the safe solution is to always use UTF32. Speed looks to be close > between them. On my largest text example, UTF16 took 448ms and UTF32 took > 584ms. > > I'll update my stack and push an update to my repo so others can check out > the new code. > > On Sat, Nov 10, 2018 at 6:05 PM Niggemann, Bernd < > Bernd.Niggemann at uni-wh.de> > wrote: > > > That is what I alluded to, > > UTF is a wild country and I don't know my ways, > > try > > ----------------------------- > > function allOffsets pDelim, pString, pCaseSensitive > > local tNewPos, tPos, tResult > > > > put textEncode(pDelim,"UTF32") into pDelim > > put textEncode(pString,"UTF32") into pString > > > > set the caseSensitive to pCaseSensitive is true > > put 0 into tPos > > repeat forever > > put offset(pDelim, pString, tPos) into tNewPos > > if tNewPos = 0 then exit repeat > > add tNewPos to tPos > > put tPos div 4 + tPos mod 4,"" after tResult > > end repeat > > if tResult is empty then return 0 > > else return char 1 to -2 of tResult > > end allOffsets > > ---------------------------------- > > > > It teaches me to use UTF32 to be on the safe side, thank you. > > But that should take care of it. > > > > Kind regards > > Bernd > > > > > > Unfortunately, I just discovered that your solution doesn't produce > correct > > results. If I get the offsets of "aaaaaaaaaa" in > > "??aa??aaaaaaaaaaaaa??aaaa", > > > > My code (and Brian Milby's) will return: 7,8,9,10 > > > > Your code will return: 9,10,11,12 > > > > As I understand it, textEncode transforms unicode text into binary data, > > which has the effect of speeding things up because LC is no longer > dealing > > with variable-byte-length characters, just the underlying (fixed-length) > > binary data that makes them up. Hence the above discrepancy. At least I > > think so. Maybe there's a way to fix it? > > > > gc > > > > > > > > Am 11.11.2018 um 00:00 schrieb Geoff Canyon : > > > > Unfortunately, I just discovered that your solution doesn't produce > > correct results. If I get the offsets of "aaaaaaaaaa" in > > "??aa??aaaaaaaaaaaaa??aaaa", > > > > My code (and Brian Milby's) will return: 7,8,9,10 > > > > Your code will return: 9,10,11,12 > > > > As I understand it, textEncode transforms unicode text into binary data, > > which has the effect of speeding things up because LC is no longer > dealing > > with variable-byte-length characters, just the underlying (fixed-length) > > binary data that makes them up. Hence the above discrepancy. At least I > > think so. Maybe there's a way to fix it? > > > > gc > > > > On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd < > > Bernd.Niggemann at uni-wh.de> wrote: > > > >> I figured that the slowdown was due to UTF8, for each char it has to > test > >> if it is a compounded character. So I just tried with utf16 figuring, > that > >> now it just compares at the byte-level. > >> > >> As it turned out it was indeed faster. > >> > >> Now I don't understand unicode but as I understand for some > >> languages/signs/characters you need UTF32 to display them correctly. I > may > >> be wrong on that. But if it is true then the overhead to use UTF32 in > >> textEncoding only adds a small amount to processing time. > >> > >> The nice thing is that UTF16 and UTF32 textencoding also support > >> caseSensitivity. ByteOffset() for UTF16 is probably always > case-sensitive, > >> but only saves a small amount of processing time. > >> > >> Also, LC apparently has to turn ASCII into UTF8 as soon as there is one > >> non-ASCII character in the source text. In my naive understanding LC > could > >> internally switch to UTF16/32 for offset() as soon as it realizes that > UTF8 > >> is in the source. Would make obsolete this workaround. > >> > >> > >> This is just how I "think" it works, the explanation may be all wrong. > >> > >> Kind regards > >> > >> Bernd > >> > >> Am 10.11.2018 um 20:30 schrieb Geoff Canyon : > >> > >> This is faster -- under some circumstances, much faster! Any idea why > >> textEncoding suddenly fixes everything? > >> > >> On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >> > >>> This is a little late but there was a discussion about the slowness of > >>> simple offset() when dealing with text that contains Unicode > characters. > >>> > >>> Geoff Canyon and Brian Milby found a faster solution by setting the > >>> itemDelimiter to the search string. > >>> They even provided a way to find the position of substrings in the > >>> search string which the offset() command does by design. > >>> > >>> Here I propose a variant of the offset() form that uses UTF16 to > search, > >>> easily adaptable to UTF32 if necessary. > >>> > >>> To test (as in Brian's testStack) add a unicode character to the text > to > >>> be searched e.g. at the end. Just any non-ASCII character to see the > speed > >>> penalty of simple offset(). I used ? (Icelandic d) or use any chinese > >>> character. > >>> > >>> > >>> Kind regards > >>> Bernd > >>> > >>> ------------------------------------------- > >>> function allOffsets pDelim, pString, pCaseSensitive > >>> local tNewPos, tPos, tResult > >>> > >>> put textEncode(pDelim,"UTF16") into pDelim > >>> put textEncode(pString,"UTF16") into pString > >>> > >>> set the caseSensitive to pCaseSensitive is true > >>> put 0 into tPos > >>> repeat forever > >>> put offset(pDelim, pString, tPos) into tNewPos > >>> if tNewPos = 0 then exit repeat > >>> add tNewPos to tPos > >>> put tPos div 2 + tPos mod 2,"" after tResult > >>> end repeat > >>> if tResult is empty then return 0 > >>> else return char 1 to -2 of tResult > >>> end allOffsets > >>> ---------------------------------------- > >>> > >> > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 11 04:12:48 2018 From: richmondmathewson at gmail.com (Richmond) Date: Sun, 11 Nov 2018 11:12:48 +0200 Subject: put the openStacks In-Reply-To: <166ffc664e0.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <166ffc664e0.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Um, that kicking might prove mutual; or even, dare I say it, into a free-for-all melee among quite a few people. Richmond. On 11.11.18 ?. 0:38 ?., J. Landman Gay via use-livecode wrote: > Well you wouldn't be our Richmond if you weren't occasionally silly, > but I'd be glad to kick you next time we meet if you like. :) > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On November 10, 2018 4:04:17 PM Richmond via use-livecode > wrote: > >> ?? Well the mouseUp did trigger AFTER I pulled a mouseUp from "higher >> up the tree"; and, Thanks, Jacque, >> I do deserve to be kicked for that one. >> >> All "rather" silly really. >> >> http://forums.livecode.com/viewtopic.php?f=6&t=31740#p173118 >> >> Richmond. >> >> On 10.11.18 ?. 23:04 ?., J. Landman Gay via use-livecode wrote: >>> Does the mouseUp trigger at all? >>> -- >>> Jacqueline Landman Gay | jacque at hyperactivesw.com >>> HyperActive Software | http://www.hyperactivesw.com >>> On November 10, 2018 12:03:51 PM Richmond via use-livecode >>> wrote: >>> >>>> So . . . >>>> >>>> If I type >>>> * >>>> put the openStacks into fld "STAX"* >>>> >>>> in the *messageBox* (assuming that I have an open stack containing a >>>> listField called "STAX") >>>> >>>> I get a lovely list of . . . wait for it . . . the open stacks. >>>> >>>> However (8.1.9) if I have a button on that stack containing >>>> >>>> *on mouseUp >>>> put the openStacks into fld "STAX" >>>> end mouseUp* >>>> >>>> the thing does not work. >>>> >>>> Any bright ideas about where I'm going wrong? >>>> >>>> Richmond. >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 jbv at souslelogo.com Sun Nov 11 04:17:19 2018 From: jbv at souslelogo.com (jbv) Date: Sun, 11 Nov 2018 10:17:19 +0100 Subject: https, 301 redirection and get URL Message-ID: Hi list, I am updating an old standalone for a client of mine who has just migrated his domain to HTTPS. There is also a permanent redirection 301 from http to https in the htaccess file. The standalone uses numerous commands in the form get URL "http://www.mydomain.com/irev/myScript.lc" which I am updating to get URL "https://www.mydomain.com/irev/myScript.lc" The problem is that both forms return empty when the 301 redirection is on; otoh everything works fine when the 301 redirection is removed from the htaccess file. I haven't found any post nor any relevant tutorial on the LC list or forum. So my question is : how can I update all those "get URL" commands with a 301 redirection in htaccess ? Thanks in advance. jbv From kaveh at rivervalleytechnologies.com Sun Nov 11 04:40:35 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Sun, 11 Nov 2018 09:40:35 +0000 Subject: Regex replacements (\1, \2) not matching Message-ID: What am I missing? I put in message box: put replacetext("one two", "(.+) (.+)", "\2 \1") I get result: "\2 \1" rather than: "two one" -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From jjs at krutt.org Sun Nov 11 06:25:02 2018 From: jjs at krutt.org (JJS) Date: Sun, 11 Nov 2018 12:25:02 +0100 Subject: LC/macOS App Store In-Reply-To: <9D178A5E-4460-4B5D-839B-3BBAB8C55241@pidigital.co.uk> References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> <9D178A5E-4460-4B5D-839B-3BBAB8C55241@pidigital.co.uk> Message-ID: <800a7a29-910c-7aaa-aa08-51ed9e80fd11@krutt.org> Yes i know the standalone can be 64bit. I also know how to check in Macos if a program is 64bit. I was talking about the IDE itself. That's 32-bit. Op 10-11-2018 om 22:41 schreef Pi Digital via use-livecode: > https://downloads.livecode.com/livecode/9_0_0/LiveCodeNotes-9_0_0.pdf#page32 > > To quote: >> The IDE is now 64-bit by default on Mac >> Moreover, the "Build for Mac OS X 64-bit" is checked by default on newly created stacks in the standalone settings for OS X. Existing stacks will retain their current settings. > > Check your settings perhaps. You can double check by going to Apple>AboutThisMac>SystemReport(button)>Software>Applications>LiveCode 9.0.2> and look at 64-bit to see if it says yes. If it does, nothing to worry about. > > Sean Cole > Pi Digital > >> On 10 Nov 2018, at 19:45, JJS via use-livecode wrote: >> >> By the way. >> >> In Mojave i got a a message "you are running a 32bit program" (the livecode ide). >> >> Within a certain amount of time it's going to "force" to use 64bit programs > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 11 08:59:11 2018 From: sean at pidigital.co.uk (Sean Cole (Pi)) Date: Sun, 11 Nov 2018 13:59:11 +0000 Subject: LC/macOS App Store In-Reply-To: <800a7a29-910c-7aaa-aa08-51ed9e80fd11@krutt.org> References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> <9D178A5E-4460-4B5D-839B-3BBAB8C55241@pidigital.co.uk> <800a7a29-910c-7aaa-aa08-51ed9e80fd11@krutt.org> Message-ID: The release notes for 9.0.0 stable state otherwise as quoted below referring directly to the IDE, not Standalones. > To quote: >> The *IDE* is now 64-bit by default on Mac I also checked on my versions here and it is definitely 64bit so I?m not sure why your machine is not saying the same. Try this script for the file path to your LC ide in the terminal. lipo -info /Applications/LiveCode\ Indy\ 9.0.2\ \(rc\ 1\).app/Contents/MacOS/LiveCode-Indy For me it shows: are: i386 x86_64 Demonstrating both 32 and 64 bit. The IDE itself is just a rev script that runs within the LC overall environment so would not be 64 or 32 bit itself. Sean On Sun, 11 Nov 2018 at 11:25, JJS via use-livecode < use-livecode at lists.runrev.com> wrote: > Yes i know the standalone can be 64bit. > > I also know how to check in Macos if a program is 64bit. > > I was talking about the IDE itself. That's 32-bit. > > > Op 10-11-2018 om 22:41 schreef Pi Digital via use-livecode: > > > https://downloads.livecode.com/livecode/9_0_0/LiveCodeNotes-9_0_0.pdf#page32 > > > > To quote: > >> The IDE is now 64-bit by default on Mac > >> Moreover, the "Build for Mac OS X 64-bit" is checked by default on > newly created stacks in the standalone settings for OS X. Existing stacks > will retain their current settings. > > > > Check your settings perhaps. You can double check by going to > Apple>AboutThisMac>SystemReport(button)>Software>Applications>LiveCode > 9.0.2> and look at 64-bit to see if it says yes. If it does, nothing to > worry about. > > > > Sean Cole > > Pi Digital > > > >> On 10 Nov 2018, at 19:45, JJS via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> > >> By the way. > >> > >> In Mojave i got a a message "you are running a 32bit program" (the > livecode ide). > >> > >> Within a certain amount of time it's going to "force" to use 64bit > programs > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 james at thehales.id.au Sun Nov 11 09:17:01 2018 From: james at thehales.id.au (James At The Hale) Date: Mon, 12 Nov 2018 01:17:01 +1100 Subject: Regex replacements (\1, \2) not matching Message-ID: Kaveh, You are not missing anything. LC?s implementation of REGEX is. It can?t use back referencing in replacement strings. > What am I missing? I put in message box: > put replacetext("one two", "(.+) (.+)", "\2 \1") > I get result: > "\2 \1" > rather than: > "two one" James From sean at pidigital.co.uk Sun Nov 11 09:21:48 2018 From: sean at pidigital.co.uk (Sean Cole (Pi)) Date: Sun, 11 Nov 2018 14:21:48 +0000 Subject: Regex replacements (\1, \2) not matching In-Reply-To: References: Message-ID: Hey Kaveh, To break down your request you are searching if the string "one two" matches the pattern "(.+) (.+)" which it does as there are two word with a space between that can have at least 2 characters per word (. = any character, + = and extra character of that type, in this case 'any'). As it does match that pattern, replaceText simply swaps out the "one two" for exactly the string you have asked it to replace it with, namely "\2 \1" verbatim. The replacement string cannot itself be a regex pattern which is what I think you are trying to do here. The regEx part in the middle of the function is just a pattern to match to and not a method to reorganise the content of the search string, which is unfortunate. You would need a slightly longer script to achieve this. A repeat loop using 'put "2,1" into tSortOrder'; put trueword (item x of tSortOrder) of tOldString into word x of tNewString' would do what you want in simple terms. Sean On Sun, 11 Nov 2018 at 09:40, Kaveh Bazargan via use-livecode < use-livecode at lists.runrev.com> wrote: > What am I missing? I put in message box: > > put replacetext("one two", "(.+) (.+)", "\2 \1") > > I get result: > > "\2 \1" > > rather than: > > "two one" > > > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jjs at krutt.org Sun Nov 11 08:28:48 2018 From: jjs at krutt.org (JJS) Date: Sun, 11 Nov 2018 14:28:48 +0100 Subject: LC/macOS App Store In-Reply-To: References: <4DF343A3-8BF3-4EEE-BB31-35F377DC69F8@iotecdigital.com> <9af195ff-3516-7a4a-f4e0-b34b4ceb3509@fourthworld.com> <9D178A5E-4460-4B5D-839B-3BBAB8C55241@pidigital.co.uk> <800a7a29-910c-7aaa-aa08-51ed9e80fd11@krutt.org> Message-ID: Yep, you're correct. It says 64bit. I must have been blind. thanks! Op 11-11-2018 om 14:59 schreef Sean Cole (Pi) via use-livecode: > The release notes for 9.0.0 stable state otherwise as quoted below > referring directly to the IDE, not Standalones. >> To quote: >>> The *IDE* is now 64-bit by default on Mac > I also checked on my versions here and it is definitely 64bit so I?m not > sure why your machine is not saying the same. > > Try this script for the file path to your LC ide in the terminal. > > lipo -info /Applications/LiveCode\ Indy\ 9.0.2\ \(rc\ > 1\).app/Contents/MacOS/LiveCode-Indy > > > For me it shows: > > are: i386 x86_64 > > Demonstrating both 32 and 64 bit. > The IDE itself is just a rev script that runs within the LC overall > environment so would not be 64 or 32 bit itself. > > Sean > > > On Sun, 11 Nov 2018 at 11:25, JJS via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Yes i know the standalone can be 64bit. >> >> I also know how to check in Macos if a program is 64bit. >> >> I was talking about the IDE itself. That's 32-bit. >> >> >> Op 10-11-2018 om 22:41 schreef Pi Digital via use-livecode: >> https://downloads.livecode.com/livecode/9_0_0/LiveCodeNotes-9_0_0.pdf#page32 >>> To quote: >>>> The IDE is now 64-bit by default on Mac >>>> Moreover, the "Build for Mac OS X 64-bit" is checked by default on >> newly created stacks in the standalone settings for OS X. Existing stacks >> will retain their current settings. >>> Check your settings perhaps. You can double check by going to >> Apple>AboutThisMac>SystemReport(button)>Software>Applications>LiveCode >> 9.0.2> and look at 64-bit to see if it says yes. If it does, nothing to >> worry about. >>> Sean Cole >>> Pi Digital >>> >>>> On 10 Nov 2018, at 19:45, JJS via use-livecode < >> use-livecode at lists.runrev.com> wrote: >>>> By the way. >>>> >>>> In Mojave i got a a message "you are running a 32bit program" (the >> livecode ide). >>>> Within a certain amount of time it's going to "force" to use 64bit >> programs >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 kaveh at rivervalleytechnologies.com Sun Nov 11 10:26:13 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Sun, 11 Nov 2018 15:26:13 +0000 Subject: Regex replacements (\1, \2) not matching In-Reply-To: References: Message-ID: Thank you both for your comments. My jaw dropped that I had not noticed that before!! I need to do a lot of text manipulation, so hopefully I can do that with LiveCode's friendly and powerful text chunk features. On Sun, 11 Nov 2018 at 14:22, Sean Cole (Pi) via use-livecode < use-livecode at lists.runrev.com> wrote: > Hey Kaveh, > > To break down your request you are searching if the string "one two" > matches the pattern "(.+) (.+)" which it does as there are two word with a > space between that can have at least 2 characters per word (. = any > character, + = and extra character of that type, in this case 'any'). As it > does match that pattern, replaceText simply swaps out the "one two" for > exactly the string you have asked it to replace it with, namely "\2 \1" > verbatim. > > The replacement string cannot itself be a regex pattern which is what I > think you are trying to do here. The regEx part in the middle of the > function is just a pattern to match to and not a method to reorganise the > content of the search string, which is unfortunate. You would need a > slightly longer script to achieve this. A repeat loop using 'put "2,1" into > tSortOrder'; put trueword (item x of tSortOrder) of tOldString into word x > of tNewString' would do what you want in simple terms. > > Sean > > > On Sun, 11 Nov 2018 at 09:40, Kaveh Bazargan via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > What am I missing? I put in message box: > > > > put replacetext("one two", "(.+) (.+)", "\2 \1") > > > > I get result: > > > > "\2 \1" > > > > rather than: > > > > "two one" > > > > > > > > -- > > Kaveh Bazargan > > Director > > River Valley Technologies ? > Twitter > > ? LinkedIn > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From jbv at souslelogo.com Sun Nov 11 10:26:33 2018 From: jbv at souslelogo.com (jbv) Date: Sun, 11 Nov 2018 16:26:33 +0100 Subject: [solved] Re: https, 301 redirection and get URL In-Reply-To: References: Message-ID: Hello again, As a follow-up to this thread : if anyone's interested, the problem was that the permanent redirection was set to port 80; after removing that line from the htaccess file, everything started working like a charm. Best. On Sun, November 11, 2018 10:17 am, jbv via use-livecode wrote: > Hi list, > I am updating an old standalone for a client of mine who has > just migrated his domain to HTTPS. There is also a permanent redirection > 301 from http to https in the htaccess file. > > > The standalone uses numerous commands in the form > get URL "http://www.mydomain.com/irev/myScript.lc" which I am updating to > get URL "https://www.mydomain.com/irev/myScript.lc" > > The problem is that both forms return empty when the 301 > redirection is on; otoh everything works fine when the 301 redirection is > removed from the htaccess file. > > I haven't found any post nor any relevant tutorial on > the LC list or forum. So my question is : how can I update all those "get > URL" commands with a 301 redirection > in htaccess ? > > Thanks in advance. > jbv > > > _______________________________________________ > use-livecode mailing list use-livecode at lists.runrev.com Please visit this > url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > From brian at milby7.com Sun Nov 11 11:34:20 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 11 Nov 2018 10:34:20 -0600 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> Message-ID: <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> I just posted an updated stack with the UTF16 and UTF32 offset variants. I did change the search on the first card to ?The? and the counts remained the same so case folding does work for ASCII values. ?I would need some other test text to check other cases where Unicode case folding would be expected to work. ?I?m not surprised that it works for ASCII values since UTF16/32 will just pad with null bytes which will not impact the case folding logic. This afternoon I think I?ll add a way to turn on/off case sensitive per card. ?I also want to script running tests on a single card and all cards. Thanks, Brian On Nov 11, 2018, 1:51 AM -0600, Geoff Canyon via use-livecode , wrote: > One thing I don't get is how (not) caseSensitive gets handled? Once the > text is all binary data, is the engine really still able to look at the > binary values for "A" and "a" and treat them as the same? > > On Sat, Nov 10, 2018 at 8:54 PM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > The correct formula for UTF16 should be: > > put tPos div 2 + 1,"" after tResult > > > > The correct formula for UTF32 should be: > > put tPos div 4 + 1,"" after tResult > > > > If you go to card #6 of my stack that is on GitHub, it has the first > > chapter of John that I copied from the internet. I added a single UTF(8?) > > character to it so get the results that are listed (last char of the first > > visible line). > > > > Making the change is dramatic. Offset takes 65k ms. Geoff's code and my > > code take 6k ms. Converting to UTF16 first and using offset takes 519 ms. > > And note that the timings include those 2 calls to convert the variables to > > UTF16. > > > > Now, if I take Geoff's sample that didn't work, I get the same incorrect > > results. The problem is that some of those characters end up needing 2 > > UTF16 codepoints to represent them. (I hope I'm using the correct > > terminology.) > > > > So, the safe solution is to always use UTF32. Speed looks to be close > > between them. On my largest text example, UTF16 took 448ms and UTF32 took > > 584ms. > > > > I'll update my stack and push an update to my repo so others can check out > > the new code. > > > > On Sat, Nov 10, 2018 at 6:05 PM Niggemann, Bernd < > > Bernd.Niggemann at uni-wh.de> > > wrote: > > > > > That is what I alluded to, > > > UTF is a wild country and I don't know my ways, > > > try > > > ----------------------------- > > > function allOffsets pDelim, pString, pCaseSensitive > > > local tNewPos, tPos, tResult > > > > > > put textEncode(pDelim,"UTF32") into pDelim > > > put textEncode(pString,"UTF32") into pString > > > > > > set the caseSensitive to pCaseSensitive is true > > > put 0 into tPos > > > repeat forever > > > put offset(pDelim, pString, tPos) into tNewPos > > > if tNewPos = 0 then exit repeat > > > add tNewPos to tPos > > > put tPos div 4 + tPos mod 4,"" after tResult > > > end repeat > > > if tResult is empty then return 0 > > > else return char 1 to -2 of tResult > > > end allOffsets > > > ---------------------------------- > > > > > > It teaches me to use UTF32 to be on the safe side, thank you. > > > But that should take care of it. > > > > > > Kind regards > > > Bernd > > > > > > > > > Unfortunately, I just discovered that your solution doesn't produce > > correct > > > results. If I get the offsets of "aaaaaaaaaa" in > > > "??aa??aaaaaaaaaaaaa??aaaa", > > > > > > My code (and Brian Milby's) will return: 7,8,9,10 > > > > > > Your code will return: 9,10,11,12 > > > > > > As I understand it, textEncode transforms unicode text into binary data, > > > which has the effect of speeding things up because LC is no longer > > dealing > > > with variable-byte-length characters, just the underlying (fixed-length) > > > binary data that makes them up. Hence the above discrepancy. At least I > > > think so. Maybe there's a way to fix it? > > > > > > gc > > > > > > > > > > > > Am 11.11.2018 um 00:00 schrieb Geoff Canyon : > > > > > > Unfortunately, I just discovered that your solution doesn't produce > > > correct results. If I get the offsets of "aaaaaaaaaa" in > > > "??aa??aaaaaaaaaaaaa??aaaa", > > > > > > My code (and Brian Milby's) will return: 7,8,9,10 > > > > > > Your code will return: 9,10,11,12 > > > > > > As I understand it, textEncode transforms unicode text into binary data, > > > which has the effect of speeding things up because LC is no longer > > dealing > > > with variable-byte-length characters, just the underlying (fixed-length) > > > binary data that makes them up. Hence the above discrepancy. At least I > > > think so. Maybe there's a way to fix it? > > > > > > gc > > > > > > On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd < > > > Bernd.Niggemann at uni-wh.de> wrote: > > > > > > > I figured that the slowdown was due to UTF8, for each char it has to > > test > > > > if it is a compounded character. So I just tried with utf16 figuring, > > that > > > > now it just compares at the byte-level. > > > > > > > > As it turned out it was indeed faster. > > > > > > > > Now I don't understand unicode but as I understand for some > > > > languages/signs/characters you need UTF32 to display them correctly. I > > may > > > > be wrong on that. But if it is true then the overhead to use UTF32 in > > > > textEncoding only adds a small amount to processing time. > > > > > > > > The nice thing is that UTF16 and UTF32 textencoding also support > > > > caseSensitivity. ByteOffset() for UTF16 is probably always > > case-sensitive, > > > > but only saves a small amount of processing time. > > > > > > > > Also, LC apparently has to turn ASCII into UTF8 as soon as there is one > > > > non-ASCII character in the source text. In my naive understanding LC > > could > > > > internally switch to UTF16/32 for offset() as soon as it realizes that > > UTF8 > > > > is in the source. Would make obsolete this workaround. > > > > > > > > > > > > This is just how I "think" it works, the explanation may be all wrong. > > > > > > > > Kind regards > > > > > > > > Bernd > > > > > > > > Am 10.11.2018 um 20:30 schrieb Geoff Canyon : > > > > > > > > This is faster -- under some circumstances, much faster! Any idea why > > > > textEncoding suddenly fixes everything? > > > > > > > > On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode < > > > > use-livecode at lists.runrev.com> wrote: > > > > > > > > > This is a little late but there was a discussion about the slowness of > > > > > simple offset() when dealing with text that contains Unicode > > characters. > > > > > > > > > > Geoff Canyon and Brian Milby found a faster solution by setting the > > > > > itemDelimiter to the search string. > > > > > They even provided a way to find the position of substrings in the > > > > > search string which the offset() command does by design. > > > > > > > > > > Here I propose a variant of the offset() form that uses UTF16 to > > search, > > > > > easily adaptable to UTF32 if necessary. > > > > > > > > > > To test (as in Brian's testStack) add a unicode character to the text > > to > > > > > be searched e.g. at the end. Just any non-ASCII character to see the > > speed > > > > > penalty of simple offset(). I used ? (Icelandic d) or use any chinese > > > > > character. > > > > > > > > > > > > > > > Kind regards > > > > > Bernd > > > > > > > > > > ------------------------------------------- > > > > > function allOffsets pDelim, pString, pCaseSensitive > > > > > local tNewPos, tPos, tResult > > > > > > > > > > put textEncode(pDelim,"UTF16") into pDelim > > > > > put textEncode(pString,"UTF16") into pString > > > > > > > > > > set the caseSensitive to pCaseSensitive is true > > > > > put 0 into tPos > > > > > repeat forever > > > > > put offset(pDelim, pString, tPos) into tNewPos > > > > > if tNewPos = 0 then exit repeat > > > > > add tNewPos to tPos > > > > > put tPos div 2 + tPos mod 2,"" after tResult > > > > > end repeat > > > > > if tResult is empty then return 0 > > > > > else return char 1 to -2 of tResult > > > > > end allOffsets > > > > > ---------------------------------------- > > > > > > > > > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 brian at milby7.com Sun Nov 11 19:19:46 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 11 Nov 2018 18:19:46 -0600 Subject: How to find offsets in Unicode Text fast In-Reply-To: <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> Message-ID: I just pushed an updated binary stack that adds check boxes for case sensitive and no overlaps. These settings are per card so separate tests can be performed each way. Of note, the search for "The" in John 1 is quite a bit faster if case sensitive is true. Also, if case sensitive is true, then the Offset method is just as fast as the one Geoff developed - even without converting to UTF16/32. My code can be found here: https://github.com/bwmilby/alloffsets/tree/bwm/bwm Thanks, Brian From brian at milby7.com Mon Nov 12 00:00:09 2018 From: brian at milby7.com (Brian Milby) Date: Sun, 11 Nov 2018 23:00:09 -0600 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> Message-ID: I just tried one additional test. Search for "??" within "aa??????aa". (On a Mac keyboard, the characters are made with A, Option-A, and Shift-Option-A.) The Offset UTF16 version does not return the correct result if case sensitive is false (returns the same value as if it were true: 3,7). Every other version correctly performs the case folding (3,4,5,6,7). From james at thehales.id.au Mon Nov 12 00:18:42 2018 From: james at thehales.id.au (James Hale) Date: Mon, 12 Nov 2018 16:18:42 +1100 Subject: Regex replacements (\1, \2) not matching Message-ID: <5588341A-8205-4614-90CC-80290890597A@thehales.id.au> You can do quite a lot with LC's chunk expressions as well as with the matchtext and matchchunk functions. If you are willing to put a bit of time using these functions and arrays you can pretty much make up for LC's shortcomings in this area. If you have an Indy or Business license of LC then you might also want to look at Thierry's "SunnYrex" . even if you choose not to use that Thierry himself (who is on the list) is extremely generous with his time in answering questions about regex and how to use it in LC. James From kaveh at rivervalleytechnologies.com Mon Nov 12 03:20:46 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 12 Nov 2018 08:20:46 +0000 Subject: Regex replacements (\1, \2) not matching In-Reply-To: <5588341A-8205-4614-90CC-80290890597A@thehales.id.au> References: <5588341A-8205-4614-90CC-80290890597A@thehales.id.au> Message-ID: Thanks James I am using the community edition of LiveCode, but I remember that Thierry has been v helpful in the past. I just found a similar question I asked 4 years ago and he put lots of time in explaining: https://forums.livecode.com/viewtopic.php?t=21157 I will review that because I have a feeling it has the answers I need. :-) On Mon, 12 Nov 2018 at 05:19, James Hale via use-livecode < use-livecode at lists.runrev.com> wrote: > > You can do quite a lot with LC's chunk expressions as well as with the > matchtext and matchchunk functions. > > If you are willing to put a bit of time using these functions and arrays > you can pretty much make up for LC's shortcomings in this area. > > If you have an Indy or Business license of LC then you might also want to > look at Thierry's "SunnYrex" . > even if you choose not to use that Thierry himself (who is on the list) is > extremely generous with his time in answering questions about regex and how > to use it in LC. > > James > > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From merakosp at gmail.com Mon Nov 12 03:40:08 2018 From: merakosp at gmail.com (panagiotis merakos) Date: Mon, 12 Nov 2018 10:40:08 +0200 Subject: Regex replacements (\1, \2) not matching In-Reply-To: References: <5588341A-8205-4614-90CC-80290890597A@thehales.id.au> Message-ID: Hello all, There is an enhancement request about it: https://quality.livecode.com/show_bug.cgi?id=21534 Best regards, Panos -- On Mon, Nov 12, 2018 at 10:21 AM Kaveh Bazargan via use-livecode < use-livecode at lists.runrev.com> wrote: > Thanks James > > I am using the community edition of LiveCode, but I remember that Thierry > has been v helpful in the past. I just found a similar question I asked 4 > years ago and he put lots of time in explaining: > > https://forums.livecode.com/viewtopic.php?t=21157 > > I will review that because I have a feeling it has the answers I need. :-) > > > On Mon, 12 Nov 2018 at 05:19, James Hale via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > > You can do quite a lot with LC's chunk expressions as well as with the > > matchtext and matchchunk functions. > > > > If you are willing to put a bit of time using these functions and arrays > > you can pretty much make up for LC's shortcomings in this area. > > > > If you have an Indy or Business license of LC then you might also want to > > look at Thierry's "SunnYrex" . > > even if you choose not to use that Thierry himself (who is on the list) > is > > extremely generous with his time in answering questions about regex and > how > > to use it in LC. > > > > James > > > > > > > > > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From revolution at derbrill.de Mon Nov 12 04:23:29 2018 From: revolution at derbrill.de (Malte Pfaff-Brill) Date: Mon, 12 Nov 2018 10:23:29 +0100 Subject: .PID file in C:\Users\*\AppData\Local\._LiveCode_\ In-Reply-To: References: Message-ID: Hi, Does anybody know what causes files to be created in C:\Users\*\AppData\Local\._LiveCode_\ for a standalone under Windows 7? Does this have something to do with the creation of UUIDs? Can the creation of those files be avoided? Cheers! Malte From andre at andregarzia.com Mon Nov 12 04:53:26 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Mon, 12 Nov 2018 09:53:26 +0000 Subject: .PID file in C:\Users\*\AppData\Local\._LiveCode_\ In-Reply-To: References: Message-ID: <29b85a62-0f94-6a19-8890-24cdb840efa0@andregarzia.com> Malte, I have no idea, but I am running the IDE here and I have two of those files in that folder. Since they are named PID, I suspect that they somehow hold information about the running process ID or something similar. om om andre On 11/12/2018 9:23 AM, Malte Pfaff-Brill via use-livecode wrote: > Hi, > > Does anybody know what causes files to be created in C:\Users\*\AppData\Local\._LiveCode_\ for a standalone under Windows 7? Does this have something to do with the creation of UUIDs? Can the creation of those files be avoided? > > Cheers! > > Malte > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From revolution at derbrill.de Mon Nov 12 05:01:43 2018 From: revolution at derbrill.de (Malte Pfaff-Brill) Date: Mon, 12 Nov 2018 11:01:43 +0100 Subject: .PID file in C:\Users\*\AppData\Local\._LiveCode_\ In-Reply-To: References: Message-ID: Thanks Andre! I guess I will have to wait for someone from the mothership to join in then. :-/ I am currently trying to get the OSS project I am stewarding approved by a governmental agency and those files might be a showstopper, as I am not supposed to leave traces in the system, besides certain specified folders where I may get permission to write files. Cheers! Malte From andre at andregarzia.com Mon Nov 12 05:19:25 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Mon, 12 Nov 2018 10:19:25 +0000 Subject: .PID file in C:\Users\*\AppData\Local\._LiveCode_\ In-Reply-To: References: Message-ID: <57ed9526-d485-85f8-7f7e-42663e444cef@andregarzia.com> Malte, Found it in the source: https://github.com/livecode/livecode/blob/d780d79e800afd65897631f840296075ff6573e9/engine/src/w32relaunch.cpp#L310 As I suspected, it is related to the running process. We still need to hear from the mothership about it but files in AppData/Local should be approved by your clients right? That is a common folder where apps write support and temporary stuff. Cheers andre On 11/12/2018 10:01 AM, Malte Pfaff-Brill via use-livecode wrote: > Thanks Andre! > > I guess I will have to wait for someone from the mothership to join in then. :-/ > I am currently trying to get the OSS project I am stewarding approved by a governmental agency and those files might be a showstopper, as I am not supposed to leave traces in the system, besides certain specified folders where I may get permission to write files. > > Cheers! > > Malte > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From panos.merakos at livecode.com Mon Nov 12 09:14:18 2018 From: panos.merakos at livecode.com (panagiotis merakos) Date: Mon, 12 Nov 2018 16:14:18 +0200 Subject: [ANN] This Week in LiveCode 154 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 #154 here: https://goo.gl/6Cgsur 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 you 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 Bernd.Niggemann at uni-wh.de Mon Nov 12 12:56:45 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Mon, 12 Nov 2018 17:56:45 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: Message-ID: Thank you Brian for putting the test stack up. It makes it easier to test various non-ASCII texts. As your testing shows the UTF16 variant can be misleading. Unfortunately I also found a case of UTF32 not working. I copied from Icelandic Wikipedia from the entry about the capital Reykjavik some text as source (haystack) and put the Icelandic word for Reykjavik (Reykjav?k) into the delimiter(needle). Using UTF16 works but alas UTF32 does not find anything. So now it seems that my attempt to fool the offset function into greater speed by using either UTF16 or UTF32 textEncoded versions of "needle" and "haystack" is not reliable. Probably there is an explanation for this which eludes me. Sorry to have to retract my proposition for being unreliable. Would have loved to use the speed gain for "offset" which is horribly slow for non-ASCII text. Kind regards Bernd Am 12.11.2018 um 12:00 schrieb use-livecode-request at lists.runrev.com: From: Brian Milby To: How to use LiveCode > Subject: Re: How to find offsets in Unicode Text fast I just tried one additional test. Search for "??" within "aa??????aa". (On a Mac keyboard, the characters are made with A, Option-A, and Shift-Option-A.) The Offset UTF16 version does not return the correct result if case sensitive is false (returns the same value as if it were true: 3,7). Every other version correctly performs the case folding (3,4,5,6,7). From brian at milby7.com Mon Nov 12 13:13:06 2018 From: brian at milby7.com (Brian Milby) Date: Mon, 12 Nov 2018 12:13:06 -0600 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: Message-ID: I noticed something similar, but did not have a chance to dig into it. If I copied the complex character that Geoff inserted (is that Kanji?) into the string to search, I also got no results for UTF32. But, if I also copied it into the string to find field, then the results worked partially. Case folding was broken. (???)(aa?????????aa)(3,9 case sensitive or not for UTF32) On Mon, Nov 12, 2018 at 11:57 AM Niggemann, Bernd wrote: > Thank you Brian for putting the test stack up. It makes it easier to test > various non-ASCII texts. > > As your testing shows the UTF16 variant can be misleading. > > Unfortunately I also found a case of UTF32 not working. > > I copied from Icelandic Wikipedia from the entry about the capital > Reykjavik some text as source (haystack) and put the Icelandic word for > Reykjavik (Reykjav?k) into the delimiter(needle). > > Using UTF16 works but alas UTF32 does not find anything. > > So now it seems that my attempt to fool the offset function into greater > speed by using either UTF16 or UTF32 textEncoded versions of "needle" and > "haystack" is not reliable. > > Probably there is an explanation for this which eludes me. > > Sorry to have to retract my proposition for being unreliable. Would have > loved to use the speed gain for "offset" which is horribly slow for > non-ASCII text. > > Kind regards > Bernd > > > > Am 12.11.2018 um 12:00 schrieb use-livecode-request at lists.runrev.com: > > From: Brian Milby > To: How to use LiveCode > Subject: Re: How to find offsets in Unicode Text fast > > > I just tried one additional test. Search for "??" within "aa??????aa". > (On a Mac keyboard, the characters are made with A, Option-A, and > Shift-Option-A.) The Offset UTF16 version does not return the correct > result if case sensitive is false (returns the same value as if it were > true: 3,7). Every other version correctly performs the case folding > (3,4,5,6,7). > > > From benr_mc at cogapp.com Mon Nov 12 14:36:22 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 12 Nov 2018 19:36:22 -0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> Message-ID: <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> Coming late to this discussion. Very excited by this approach of converting everything to UTF-32 in order to do fast offsets. I'm really confused that case-insensitive should work at all for UTF-16 or UTF-32; at this point as far as I understand it, LC has no idea that how to correctly interpret the value of the variable as text. Or at least, I'd expect it work for some things - e.g. A/a which are the same as single bytes; and _also_ for ?/? because those are also equivalently 'single byte' - 0xC5 and 0xE5; but not for e.g. ?/? which are are 0x0102 and 0x0103, where I wouldn't expect 0x03 to be considered as a case-shifted version of 0x02. All this just proves that I don't understand what the new(ish) engine is doing with strings. I'm going to start a new thread to explore this. In the meantime I'd be suspicious about doing a case-insensitive search in this way; but my guess would be that, if your use-case will accept case-sensitivity, it would be safer (and faster?) to use byteOffset on the UTF-32 data rather than offset. Mr Very Picky would also suggest that to be really correct, the code in this case should also check that the offset found was on a four-byte boundary (tPos mod 4 = 1); it's probably a purely theoretical consideration, but I think that the four-byte sequence (representing the character you're searching for) could in theory be incorrectly matched across two other characters. On 12/11/2018 05:00, Brian Milby via use-livecode wrote: > I just tried one additional test. Search for "??" within "aa??????aa". > (On a Mac keyboard, the characters are made with A, Option-A, and > Shift-Option-A.) The Offset UTF16 version does not return the correct > result if case sensitive is false (returns the same value as if it were > true: 3,7). Every other version correctly performs the case folding > (3,4,5,6,7). > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From Bernd.Niggemann at uni-wh.de Mon Nov 12 15:08:42 2018 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Mon, 12 Nov 2018 20:08:42 +0000 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: Message-ID: <1C29EBDF-FBEF-43C1-809D-9F59C7D5BB07@uni-wh.de> Ben, Please see my remarks out failing UTF-32 with some Icelandic characters. Currently I would not recommend offset(UTF-32 text) unless one knows which character set is suited to be used and is in control of that character set. The same goes for UTF-16. I also thought that byteOffset would be faster for case-sensitive search in UTF-32 text. It turned out to be slower than offset(UTF-32 text). >Ben Rubinstein via use-livecode Mon, 12 Nov 2018 11:38:26 -0800 >Coming late to this discussion. Very excited by this approach of converting everything to UTF-32 in order to do fast offsets. >In the meantime I'd be suspicious about doing a case-insensitive search in this way; but my guess would be that, if your use-case will accept case->sensitivity, it would be safer (and faster?) to use byteOffset on the UTF-32 data rather than offset. Kind regards Bernd From monte at appisle.net Mon Nov 12 17:04:32 2018 From: monte at appisle.net (Monte Goulding) Date: Tue, 13 Nov 2018 09:04:32 +1100 Subject: .PID file in C:\Users\*\AppData\Local\._LiveCode_\ In-Reply-To: <57ed9526-d485-85f8-7f7e-42663e444cef@andregarzia.com> References: <57ed9526-d485-85f8-7f7e-42663e444cef@andregarzia.com> Message-ID: <4495E9C9-8B3E-40D2-8AEB-94478ED2C84D@appisle.net> This is not something I?ve looked at before but it appears the files should be being cleaned up at the end of the session. I guess if LiveCode writing this file is a particular issue for you then you could put in a feature request to toggle relaunch support in the standalone builder. > On 12 Nov 2018, at 9:19 pm, Andre Alves Garzia via use-livecode wrote: > > Malte, > > Found it in the source: > > https://github.com/livecode/livecode/blob/d780d79e800afd65897631f840296075ff6573e9/engine/src/w32relaunch.cpp#L310 > > As I suspected, it is related to the running process. We still need to hear from the mothership about it but files in AppData/Local should be approved by your clients right? That is a common folder where apps write support and temporary stuff. > > Cheers > > andre > > > On 11/12/2018 10:01 AM, Malte Pfaff-Brill via use-livecode wrote: >> Thanks Andre! >> >> I guess I will have to wait for someone from the mothership to join in then. :-/ >> I am currently trying to get the OSS project I am stewarding approved by a governmental agency and those files might be a showstopper, as I am not supposed to leave traces in the system, besides certain specified folders where I may get permission to write files. >> >> Cheers! >> >> Malte >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 benr_mc at cogapp.com Mon Nov 12 17:35:39 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Mon, 12 Nov 2018 22:35:39 -0000 Subject: What is LC's internal text format? Message-ID: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> This is something that I've been wondering about for a while. My unexamined assumption had been that in the 'new' fully unicode LC, text was held in UTF-8. However when I saved some text strings in binary I got something like UTF-8 - but not quite. And the recent experiments with offset suggested that LC at the least is able to distinguish between a string which is fully represented as single-byte (or perhaps ASCII?). And the reports of the ingenious investigators using UTF-32 to speed up offsets, and discovering that offset somehow managed to be case-insensitive in this case, made me wonder whether after using textEncode(xt, "UTF-32") LC marks the string in some way to give a clue about how to interpret it as text? So could someone who is familar with this bit of the engine enlighten us? In particular: - What is the internal format? - Is it different on different platforms? - Given that it appears to include a flag to indicate whether it is single-byte text or not, are there any other attributes? - Does saving a string in 'binary' file faithfully report the internal format? TIA, Ben From gcanyon at gmail.com Mon Nov 12 18:20:37 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 15:20:37 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> Message-ID: On Mon, Nov 12, 2018 at 11:36 AM Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> wrote: > > I'm really confused that case-insensitive should work at all for UTF-16 or > UTF-32; at this point as far as I understand it, LC has no idea that how > to > correctly interpret the value of the variable as text. > > Mr Very Picky would also suggest that to be really correct, the code in > this > case should also check that the offset found was on a four-byte boundary > (tPos > mod 4 = 1); it's probably a purely theoretical consideration, but I think > that > the four-byte sequence (representing the character you're searching for) > could > in theory be incorrectly matched across two other characters. > I also thought of the four-byte boundary consideration. The code below is available at: https://github.com/gcanyon/alloffsets For example, previous UTF-32 versions will fail on characters like ?, which converts to 00010001 and therefore finding ? in ??? would return 1,1,2,2,3. I don't know how many other possible issues there are, but given the current UTF-32 character set there are a few, but likely not many. The failure searching for "Reykjav?k" in "Reykjav?k er h?fu?borg" is weirder and worse, obviously. I was puzzled at first by the case-sensitive functionality in UTF-32-encoded strings, but I realized that standard case-insensitive searches are presumably just implemented as a set of exceptions at a low level. For example, the the engine isn't looking at "a" and "A" and saying, "those are the same." Instead, it's looking at raw ACII and mapping 97 to 65 if case-insensitive is requested. The same must be true of UTF-32: the engine isn't looking at "?" and "?", it's mapping 00000460 to 00000461. I agree that it seems a little odd that LC knows the string of binary data is "text", but maybe there's some trick to that? Anyway, here's the boundary-respecting, but still-flawed version of UTF-32-based allOffsets, with a documented bad example in a comment: function allOffsetsUTF32 pFind,pString,pCaseSensitive,pNoOverlaps -- returns a comma-delimited list of the offsets of pFind in pString -- note, this seems to fail on some searches, for example: -- searching for "Reykjav?k" in "Reykjav?k er h?fu?borg" -- It is uncertain why. -- See thread here: http://lists.runrev.com/pipermail/use-livecode/2018-November/251357.html local tNewPos, tPos, tResult, tSkip put textEncode(pFind,"UTF-32") into pFind put textEncode(pString,"UTF-32") into pString if pNoOverlaps then put length(pFind) - 1 into tSkip set the caseSensitive to pCaseSensitive is true put 0 into tPos repeat forever put offset(pFind, pString, tPos) into tNewPos if tNewPos = 0 then exit repeat add tNewPos to tPos if tPos mod 4 = 1 then put (tPos div 4 + 1),"" after tResult if pNoOverlaps then add tSkip to tPos end repeat if tResult is empty then return 0 else return char 1 to -2 of tResult end allOffsetsUTF32 From monte at appisle.net Mon Nov 12 18:50:00 2018 From: monte at appisle.net (Monte Goulding) Date: Tue, 13 Nov 2018 10:50:00 +1100 Subject: What is LC's internal text format? In-Reply-To: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> Message-ID: Text strings in LiveCode are native encoded (MacRoman or ISO 8859) where possible and where you don?t explicitly tell the engine it?s unicode (via textDecode) so that they can follow faster single byte code paths. If you use textDecode then the engine will first check if the text can be native encoded and use native if so otherwise it will use UTF 16 encoding. For what it?s worth using `offset` is the wrong thing to do if you have textEncoded your strings into binary data. You want to use `byteOffset` otherwise the engine will convert your data to a string and assume native encoding. This is probably why you are getting some case insensitivity. I haven?t been following along the offset discussion. I?ll have to take a look to see if there were some speed comparisons between offset and codepointOffset. Cheers Monte > On 13 Nov 2018, at 9:35 am, Ben Rubinstein via use-livecode wrote: > > This is something that I've been wondering about for a while. > > My unexamined assumption had been that in the 'new' fully unicode LC, text was held in UTF-8. However when I saved some text strings in binary I got something like UTF-8 - but not quite. And the recent experiments with offset suggested that LC at the least is able to distinguish between a string which is fully represented as single-byte (or perhaps ASCII?). And the reports of the ingenious investigators using UTF-32 to speed up offsets, and discovering that offset somehow managed to be case-insensitive in this case, made me wonder whether after using textEncode(xt, "UTF-32") LC marks the string in some way to give a clue about how to interpret it as text? > > So could someone who is familar with this bit of the engine enlighten us? In particular: > - What is the internal format? > - Is it different on different platforms? > - Given that it appears to include a flag to indicate whether it is single-byte text or not, are there any other attributes? > - Does saving a string in 'binary' file faithfully report the internal format? > > TIA, > > Ben > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From gcanyon at gmail.com Mon Nov 12 19:06:09 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 16:06:09 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> Message-ID: On Mon, Nov 12, 2018 at 11:36 AM Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> wrote: > I'm really confused that case-insensitive should work at all for UTF-16 or > UTF-32; This is so puzzling. I tried this code in a button: on mouseUp put "?" into x put "?" into y --put ("?" is "?") && (x is y) --exit mouseUp put textencode("?","UTF-32") into xBig put textencode("?","UTF-32") into xSmall repeat for each byte B in xBig put B after yBig end repeat repeat for each byte B in xSmall put B after ySmall end repeat put "?" into zBig put "?" into zSmall put zBig into wBig put zSamll into wSmall put textencode(zBig,"UTF-32") into zBig put textencode(zSmall,"UTF-32") into zSmall put x into j put y into k set caseSensitive to false put ("?" is "?") && (xBig is xSmall) && (yBig is ySmall) && (zBig is zSmall) && (wBig is wSmall) && (x is y) && (j is k) end mouseUp That puts: true false false false true true true Things to note: 1. "?" and "?" are upper and lower case omega in cyrillic, 00000460 and 00000461. Given the string literals, LC is happy to say they are the same (the first true). 2. Put them in a variable, LC is happy to say they are the same (the second-to-last true). 3. Convert them to UTF-32 and LC no longer recognizes them as the same (the fourth boolean, false) 4. Put the variables into other variables, and LC identifies them as the same (the last true) gc From monte at appisle.net Mon Nov 12 19:21:10 2018 From: monte at appisle.net (Monte Goulding) Date: Tue, 13 Nov 2018 11:21:10 +1100 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> Message-ID: <36ED57ED-25B1-4C4D-A30B-447E8B4DEBA0@appisle.net> Hi Folks I was a bit perplexed by this so I had a quick look about the engine and I see the issue. The problem is you are using `offset` which works on characters. Characters in LiveCode are neither unicode codepoints or bytes. They are graphemes. This means that when you have chars to skip the entire string needs to be parsed to find the grapheme boundaries so that the index can be translated into graphemes to skip. Note that if the strings you were dealing with weren?t unicode then the translation of chars to graphemes is 1 -> 1 so there?s no big cost which is why things are much faster when you textEncode and offset that. So! Change to using codepointOffset and hopefully it will be much speedier! Cheers Monte From gcanyon at gmail.com Tue Nov 13 00:17:18 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 21:17:18 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <36ED57ED-25B1-4C4D-A30B-447E8B4DEBA0@appisle.net> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> <36ED57ED-25B1-4C4D-A30B-447E8B4DEBA0@appisle.net> Message-ID: A few things: 1. It seems codepointOffset can only find a single character? So it won't work for any search for a multi-character string? 2: codepointOffset seems to work differently for multi-byte characters and regular characters: put codepointoffset("e","?ndatestest",6) -- puts 3 put codepointoffset("e","andatestest",6) -- puts 9 3: It seems that when multi-byte characters are involved, codepointOffset suffers from the same sort of slow-down as offset does. For example, in a 145K string with about 20K hits for a single character, a simple codepointOffset routine (below) takes over 10 seconds, while the item-based routine takes about 0.3 seconds for the same results. On Mon, Nov 12, 2018 at 4:21 PM Monte Goulding via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Folks > > I was a bit perplexed by this so I had a quick look about the engine and I > see the issue. The problem is you are using `offset` which works on > characters. Characters in LiveCode are neither unicode codepoints or bytes. > They are graphemes. This means that when you have chars to skip the entire > string needs to be parsed to find the grapheme boundaries so that the index > can be translated into graphemes to skip. Note that if the strings you were > dealing with weren?t unicode then the translation of chars to graphemes is > 1 -> 1 so there?s no big cost which is why things are much faster when you > textEncode and offset that. > > So! Change to using codepointOffset and hopefully it will be much speedier! > > Cheers > > Monte > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From gcanyon at gmail.com Tue Nov 13 00:35:54 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 21:35:54 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> <36ED57ED-25B1-4C4D-A30B-447E8B4DEBA0@appisle.net> Message-ID: I didn't realize until now that offset() simply fails with some unicode strings: put offset("a","??qeiuruioqeaaa??qeiuar",13) -- puts 0 On Mon, Nov 12, 2018 at 9:17 PM Geoff Canyon wrote: > A few things: > > 1. It seems codepointOffset can only find a single character? So it > won't work for any search for a multi-character string? > 2: codepointOffset seems to work differently for multi-byte characters and > regular characters: > > put codepointoffset("e","?ndatestest",6) -- puts 3 > put codepointoffset("e","andatestest",6) -- puts 9 > > 3: It seems that when multi-byte characters are involved, codepointOffset > suffers from the same sort of slow-down as offset does. For example, in a > 145K string with about 20K hits for a single character, a simple > codepointOffset routine (below) takes over 10 seconds, while the item-based > routine takes about 0.3 seconds for the same results. > > On Mon, Nov 12, 2018 at 4:21 PM Monte Goulding via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi Folks >> >> I was a bit perplexed by this so I had a quick look about the engine and >> I see the issue. The problem is you are using `offset` which works on >> characters. Characters in LiveCode are neither unicode codepoints or bytes. >> They are graphemes. This means that when you have chars to skip the entire >> string needs to be parsed to find the grapheme boundaries so that the index >> can be translated into graphemes to skip. Note that if the strings you were >> dealing with weren?t unicode then the translation of chars to graphemes is >> 1 -> 1 so there?s no big cost which is why things are much faster when you >> textEncode and offset that. >> >> So! Change to using codepointOffset and hopefully it will be much >> speedier! >> >> Cheers >> >> Monte >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > From gcanyon at gmail.com Tue Nov 13 01:15:06 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 22:15:06 -0800 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> Message-ID: On Mon, Nov 12, 2018 at 3:50 PM Monte Goulding via use-livecode < use-livecode at lists.runrev.com> wrote: > Text strings in LiveCode are native encoded (MacRoman or ISO 8859) where > possible and where you don?t explicitly tell the engine > For what it?s worth using `offset` is the wrong thing to do if you have > textEncoded your strings into binary data. You want to use `byteOffset` > otherwise the engine will convert your data to a string and assume native > encoding. This is probably why you are getting some case insensitivity. > Unless I'm misunderstanding, this hasn't been my observation. Using offset on a string that has been textEncodet()ed to UTF-32 returns values that are 4 * (the character offset - 1) + 1 -- if it were re-encoded, wouldn't it return the actual offsets (except when it fails)? Also, ? encodes to 00010001, and routines that convert to UTF-32 and then use offset will find five instances of that character in the UTF-32 encoding because of improper boundaries. To see this, run this code: on mouseUp put textencode("?","UTF-32") into X put textencode("???","UTF-32") into Y put offset(X,Y,1) end mouseUp That will return 2, meaning that it found the encoding for X starting at character 2 + 1 = 3 of Y. In other words, it found X using the last half of the first "?" and the first half of the second "?" From mark at livecode.com Tue Nov 13 01:21:35 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 07:21:35 +0100 Subject: What is LC's internal text =?UTF-8?Q?format=3F?= In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> Message-ID: <7ac3c12a47767af5e157d0fb17992869@livecode.com> On 2018-11-13 07:15, Geoff Canyon via use-livecode wrote: > On Mon, Nov 12, 2018 at 3:50 PM Monte Goulding via use-livecode < > use-livecode at lists.runrev.com> wrote: > Unless I'm misunderstanding, this hasn't been my observation. Using > offset > on a string that has been textEncodet()ed to UTF-32 returns values that > are > 4 * (the character offset - 1) + 1 -- if it were re-encoded, wouldn't > it > return the actual offsets (except when it fails)? Also, ? encodes to > 00010001, and routines that convert to UTF-32 and then use offset will > find > five instances of that character in the UTF-32 encoding because of > improper > boundaries. To see this, run this code: > > on mouseUp > put textencode("?","UTF-32") into X > put textencode("???","UTF-32") into Y > put offset(X,Y,1) > end mouseUp > > That will return 2, meaning that it found the encoding for X starting > at > character 2 + 1 = 3 of Y. In other words, it found X using the last > half of > the first "?" and the first half of the second "?" The textEncode function generates binary data which is composed of bytes. When you use binary data in a text function (which offset is), the engine uses a compatability conversion which treats the sequence of bytes as a sequence of native characters (this preserves what happened pre-7.0 when strings were only ever native, and as such binary and string were essentially the same thing). So if you textEncode a 1 (native) character string as UTF-32, you will get a four byte string, which will then turn back into a 4 (native) character string when passed to offset. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Tue Nov 13 02:07:53 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 08:07:53 +0100 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> <36ED57ED-25B1-4C4D-A30B-447E8B4DEBA0@appisle.net> Message-ID: On 2018-11-13 06:35, Geoff Canyon via use-livecode wrote: > I didn't realize until now that offset() simply fails with some unicode > strings: > > put offset("a","??qeiuruioqeaaa??qeiuar",13) -- puts 0 > > On Mon, Nov 12, 2018 at 9:17 PM Geoff Canyon wrote: > >> A few things: >> >> 1. It seems codepointOffset can only find a single character? So it >> won't work for any search for a multi-character string? >> 2: codepointOffset seems to work differently for multi-byte characters >> and >> regular characters: >> >> put codepointoffset("e","?ndatestest",6) -- puts 3 >> put codepointoffset("e","andatestest",6) -- puts 9 >> >> 3: It seems that when multi-byte characters are involved, >> codepointOffset >> suffers from the same sort of slow-down as offset does. For example, >> in a >> 145K string with about 20K hits for a single character, a simple >> codepointOffset routine (below) takes over 10 seconds, while the >> item-based >> routine takes about 0.3 seconds for the same results. There is something 'funky' going on with the *offset functions - even taking into account that codeunitOffset/codepointOffset/byteOffset return an absolute position rather than relative - I noticed something similar the other day, I'll endeavour to take a look. Regardless of any gremlins, the speed difference (although I've not seen the 'item-based' routine - so don't quite know what that is) is due to the fact that in order to compare text you need to do a lot of processing. Unicode is a multi-code representation of text *regardless* of whatever encoding: a single (what humans understand to be) character can be composed of multiple codes. For example, e-acute can be represented as [e-acute] or [e, combining-acute]. Indeed, Unicode allows an arbitrary sequence of combining marks to be attributed to a base character (whether your text rendering system can deal with such things is another matter). Some languages rely entirely on multi-code sequences - e.g. the Indic languages; and more recently, Emoji use various 'variation selectors' to allow variation in the base set of emoji - which are composed of multiple codes. Therefore, the only difference between UTF-8, UTF-16 and UTF-32 as a chosen representation is a balance between density, and storage requirement based on language - processing wise they all have to do the same 'yoga' to 'work' correctly when you are doing text processing: - UTF8: preserves the NUL byte (important for C systems), ASCII is 1-byte per code, European/Roman languages are generally at most 2-bytes per code, every other language 3-4 bytes per code (i.e. it heavily penalises Asian languages). - UTF16: does not preserve the NUL byte (as its a sequence of 16-bit unsigned integers), most languages in common use today (including Indic and CJK) are almost entirely encoded as 2-bytes per code, with some interspersion with 4-bytes per code (via the 'surrogate pair' mechanism). - UTF32: does not preserve the NUL byte (as its a sequence of 32-bit unsigned integers), all languages require 4 bytes per code, it wastes on average 15-bits per code (as almost all unicode codes currently defined require a maximum of 17-bits). Indeed, in a fully correct *general* implementation of Unicode processing, UTF32 will perform (on average) half as fast as a implementation based on UTF16, and UTF8 will only perform better than UTF16 *if* the majority of your texts are ASCII with occasional non-ASCII. (The latter is generally the case for European/Roman languages, but if you involve the Asian languages then it will, on average, be around 1/3rd slower). [ This observation is based on the fact that all Unicode text processes - if implemented in the most efficient way - will end up being memory bound on modern processors and as such average speed will be based on how many bytes the input string / output string take up ]. So, the reason 'offset' appears slow is that it is doing a lot more work than you think. There are two principal processes which need to be applied to Unicode text in order to do any sort of comparison: - normalization - case-folding Case-folding applies if you want to do caseless rather than case-sensitive comparison. It isn't *quite* upper-casing or lower-casing, but in fact a mapping from char->upper_char->lower_char so that differences in case are removed. Case-folding is a little more complex than just code->code mappings - for example ? in German maps to SS in full generality. Also there are some hairy edge cases with 'composed unicode characters' (particularly, but not exclusively when considering polytonic Greek). Normalization is the process of ensuring that two sequences of codes are mapped to canonically equivalent sequences of codes - it is *mostly* orthogonal to case-folding (at least if you normalize to the decomposed form). Basically the process of normalization discards the difference between sequences such as [e,combining-acute] and [e-acute]... However, again it isn't quite as simple as just mapping even direct sequences as combining marks have a priority which means their order after the base character doesn't matter. Similarly, you have things like the Hangul encoding of CJK (well, Korean really) ideographs - which compose and decompose in a specialized way (which is best done algorithmically as its generally faster than doing it with a lookup table which woul dbe huge). Anyway, upshot - offset has to do a lot of work when done in isolation as the engine doesn't know you are repeatedly using it. However, you can reduce its workload significantly by normalizing and case folding the inputs to it first, and then setting caseSenstive and formSensitive to true: put normalizeText(toUpper(pNeedle), "nfd") into pNeedle put normalizeText(toUpper(pHaystack), "nfd") into pHaystack set the caseSensitive to true set the formSensitive to true Here the caseSensitive property controls whether the engine case-folds strings before comparison, and formSensitive controls whether the engine normalizes strings before comparison. They can be set independently (although I must confess I'd have to double check the utility of caseSensitive false but formSensitive true - for reasons alluded to above!). Note here I've used "NFD" which is the fully decomposed normalization form (which means no composed characters such as e-acute will appear), and upper-casing as folding - which should cover both the issues with doing caseless comparison on composed sequences, as well as edge cases like ?. There's a couple of engine additions which would be useful here - one which gives direct access to the 'case-folding' unicode does, and one which returns a string pre-processed by the settings of case/formSensitive. With the above (modulo bugs in offset and friends - which appear to be rearing their heads based on Geoff's comments), then offset should run much quicker. Warmest Regards, Mark. P.S. I did notice an issue with toUpper/toLower recently - when the input string is Unicode then it applies the 'full' Unicode rules, including the German ? mapping; if however the input is native then it does not. For backwards compatibility sake (and the fact that most people don't expect uppercasing/lowercasing to change the number of characters in a string), it should probably only use simple rules - unless you explicitly ask it to. Monte did some work last week to start adding a second 'locale' parameter to control the precise (complex) mappings (casing behavior is actually defined by language/region - not by character - e.g. Turkish/Azeri both have a dotted and dotless I - and there is variation as to what happens when one or other is uppercased, based on what precise language is being represented). -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From gcanyon at gmail.com Tue Nov 13 02:35:58 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 12 Nov 2018 23:35:58 -0800 Subject: What is LC's internal text format? In-Reply-To: <7ac3c12a47767af5e157d0fb17992869@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <7ac3c12a47767af5e157d0fb17992869@livecode.com> Message-ID: So then why does put textEncode("a","UTF-32") into X;put chartonum(byte 1 of X) put 97? That implies that "byte" 1 is "a", not 1100001. Likewise, put textEncode("?","UTF-32") into X;put chartonum(byte 1 of X) puts 65. I've looked in the dictionary and I don't see anything that comes close to describing this. gc On Mon, Nov 12, 2018 at 10:21 PM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > On 2018-11-13 07:15, Geoff Canyon via use-livecode wrote: > > On Mon, Nov 12, 2018 at 3:50 PM Monte Goulding via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > Unless I'm misunderstanding, this hasn't been my observation. Using > > offset > > on a string that has been textEncodet()ed to UTF-32 returns values that > > are > > 4 * (the character offset - 1) + 1 -- if it were re-encoded, wouldn't > > it > > return the actual offsets (except when it fails)? Also, ? encodes to > > 00010001, and routines that convert to UTF-32 and then use offset will > > find > > five instances of that character in the UTF-32 encoding because of > > improper > > boundaries. To see this, run this code: > > > > on mouseUp > > put textencode("?","UTF-32") into X > > put textencode("???","UTF-32") into Y > > put offset(X,Y,1) > > end mouseUp > > > > That will return 2, meaning that it found the encoding for X starting > > at > > character 2 + 1 = 3 of Y. In other words, it found X using the last > > half of > > the first "?" and the first half of the second "?" > > The textEncode function generates binary data which is composed of > bytes. When you use binary data in a text function (which offset is), > the engine uses a compatability conversion which treats the sequence of > bytes as a sequence of native characters (this preserves what happened > pre-7.0 when strings were only ever native, and as such binary and > string were essentially the same thing). > > So if you textEncode a 1 (native) character string as UTF-32, you will > get a four byte string, which will then turn back into a 4 (native) > character string when passed to offset. > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Nov 13 03:03:07 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 09:03:07 +0100 Subject: What is LC's internal text =?UTF-8?Q?format=3F?= In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <7ac3c12a47767af5e157d0fb17992869@livecode.com> Message-ID: <195b170eec3434a7260eb10a93482f14@livecode.com> On 2018-11-13 08:35, Geoff Canyon via use-livecode wrote: > So then why does put textEncode("a","UTF-32") into X;put chartonum(byte > 1 > of X) put 97? Because: 1) textEncode("a", "UTF-32") produces the byte sequence <97,0,0,0> 2) byte 1 of <97,0,0,0> is <97> 3) charToNum(<97>) first converts the byte <97> into a native string which is "a" (as the 97 is the code for 'a' in the native encoding table), then converts that (native) char to a number -> 97 > That implies that "byte" 1 is "a", not 1100001. 1100001 is 97 but printed in base-2. FWIW, I think you are confusing 'binary string' with 'binary number' - these are not the same thing. A 'binary string' (internally the data type is 'Data') is a sequence of bytes (just as a 'string' is a sequence of characters/codepoints/codeunits). A 'binary number' is a number which has been rendered to a string with base-2. Bytes are like characters (and codepoints, and codeunits) in that they are 'abstract' things - they aren't numbers, and have no direct conversion to them - which is why we have byteToNum, numToByte, nativeCharToNum, numToNativeChar, codepointToNum and numToCodepoint. The charToNum and numToChar functions are actually deprecated / considered legacy - as their function (when useUnicode is set to true) depends on processing unicode text as binary data - which isn't how unicode works post-7 (indeed, there was no way to fold their behavior into the new model - hence the deprecation, and replacement with nativeCharToNum / numToNativeChar). You'll notice that there is no modern 'charToNum'/'numToChar' - just 'codepointToNum'/'numToCodepoint'. A codepoint is an index into the (large - 21-bit) Unicode code table; Unicode characters can be composed of multiple codepoints (e.g. [e,combining-acute] and thus don't have a 'number' per-se. Warmest Regards, Mark. > > I've looked in the dictionary and I don't see anything that comes close > to > describing this. > > gc > > On Mon, Nov 12, 2018 at 10:21 PM Mark Waddingham via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> On 2018-11-13 07:15, Geoff Canyon via use-livecode wrote: >> > On Mon, Nov 12, 2018 at 3:50 PM Monte Goulding via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > Unless I'm misunderstanding, this hasn't been my observation. Using >> > offset >> > on a string that has been textEncodet()ed to UTF-32 returns values that >> > are >> > 4 * (the character offset - 1) + 1 -- if it were re-encoded, wouldn't >> > it >> > return the actual offsets (except when it fails)? Also, ? encodes to >> > 00010001, and routines that convert to UTF-32 and then use offset will >> > find >> > five instances of that character in the UTF-32 encoding because of >> > improper >> > boundaries. To see this, run this code: >> > >> > on mouseUp >> > put textencode("?","UTF-32") into X >> > put textencode("???","UTF-32") into Y >> > put offset(X,Y,1) >> > end mouseUp >> > >> > That will return 2, meaning that it found the encoding for X starting >> > at >> > character 2 + 1 = 3 of Y. In other words, it found X using the last >> > half of >> > the first "?" and the first half of the second "?" >> >> The textEncode function generates binary data which is composed of >> bytes. When you use binary data in a text function (which offset is), >> the engine uses a compatability conversion which treats the sequence >> of >> bytes as a sequence of native characters (this preserves what happened >> pre-7.0 when strings were only ever native, and as such binary and >> string were essentially the same thing). >> >> So if you textEncode a 1 (native) character string as UTF-32, you will >> get a four byte string, which will then turn back into a 4 (native) >> character string when passed to offset. >> >> Warmest Regards, >> >> Mark. >> >> -- >> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ >> LiveCode: Everyone can create apps >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Tue Nov 13 03:26:55 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 09:26:55 +0100 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> Message-ID: <469889a3d6cbb361aeb401e8c3ff218f@livecode.com> On 2018-11-13 01:06, Geoff Canyon via use-livecode wrote: > On Mon, Nov 12, 2018 at 11:36 AM Ben Rubinstein via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I'm really confused that case-insensitive should work at all for >> UTF-16 or >> UTF-32; The caseSensitive (and formSensitive) properties only apply to strings *not* binary strings. The output of textEncode() is a binary string. The 'is' operator is overloaded - in strict order: left-empty 'is' right-ANY -- returns is-empty(right-ANY) left-ANY 'is' right-empty -- returns is-empty(left-ANY) left-array 'is' left-array -- compare as array left-number 'is' right-number -- compare as number left-numeric-[binary]-string 'is' right-numeric-[binary]-string -- compare as number left-binary-string 'is' right-binary-string -- compare as binary strings left-any 'is' right-any -- compare as strings Also concatenation, put after and put before are overloaded: binary-string & binary-string -> binary-string string & ANY -> string ANY & string -> string put src-data after|before dst-data -> dst-data is binary-string put src-ANY after|before dst-ANY -> dst-ANY is string > This is so puzzling. I tried this code in a button: > > on mouseUp > put "?" into x > put "?" into y > --put ("?" is "?") && (x is y) > --exit mouseUp > put textencode("?","UTF-32") into xBig > put textencode("?","UTF-32") into xSmall > repeat for each byte B in xBig > put B after yBig > end repeat > repeat for each byte B in xSmall > put B after ySmall > end repeat > put "?" into zBig > put "?" into zSmall > put zBig into wBig > put zSamll into wSmall > put textencode(zBig,"UTF-32") into zBig > put textencode(zSmall,"UTF-32") into zSmall > put x into j > put y into k > set caseSensitive to false > put ("?" is "?") && (xBig is xSmall) && (yBig is ySmall) && (zBig is > zSmall) && (wBig is wSmall) && (x is y) && (j is k) > end mouseUp > > > That puts: true false false false true true true > > Things to note: > > 1. "?" and "?" are upper and lower case omega in cyrillic, 00000460 and > 00000461. Given the string literals, LC is happy to say they are the > same > (the first true) > 2. Put them in a variable, LC is happy to say they are the same > (the second-to-last true). > 3. Convert them to UTF-32 and LC no longer recognizes them as the same > (the > fourth boolean, false) > 4. Put the variables into other variables, and LC identifies them as > the > same (the last true) ("?" is "?") is true because they are both strings (xBig is xSmall) is false because both sides are binary-strings (and so compare byte for byte) (yBig is ySmall) is false because both sides are binary-strings (zBig is zSmall) is false because you've textEncoded strings which produce binary-strings so both are binary strings (wBig is wSmall) is true because both sides are strings (x is y) is true because both sides are strings (j is k) is true because both sides are strings One could argue that 'is'/'is not' should never have been overloaded to do binary string comparison - and that should have perhaps been added as a separate operator (especially since binary strings are compared as numbers if numeric). With hindsight I'd probably agree as it is a slight discontinuity in terms of comparison with pre-7. Indeed, had we not added that overload then we would not be having this discussion - it would have been a similar discussion as used to come up a lot with comparing the output of compress() and other functions which have always produced binary data - and why comparisons seemed 'not as one would expect'. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From gcanyon at gmail.com Tue Nov 13 05:06:48 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 13 Nov 2018 02:06:48 -0800 Subject: What is LC's internal text format? In-Reply-To: <195b170eec3434a7260eb10a93482f14@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <7ac3c12a47767af5e157d0fb17992869@livecode.com> <195b170eec3434a7260eb10a93482f14@livecode.com> Message-ID: I don't *think* I'm confusing binary string/data with binary numbers -- I was just trying to illustrate that when a Latin Small Letter A (U+0061) gets encoded, somewhere there is stored (four bytes, one of which is) a byte 97, i.e. the bit sequence 1100001, unless computers don't work that way anymore. What I now see is tripping me up is the implicit cast to a character you're saying that charToNum supports, without the corresponding cast to a number supported in numToChar -- i.e. this fails: put textEncode("a","UTF-32") into X;put numtochar(byte 1 of X) while this works: put textEncode("a","UTF-32") into X;put numtochar(bytetonum(byte 1 of X)) Thanks for the insight, Geoff On Tue, Nov 13, 2018 at 12:03 AM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > On 2018-11-13 08:35, Geoff Canyon via use-livecode wrote: > > So then why does put textEncode("a","UTF-32") into X;put chartonum(byte > > 1 > > of X) put 97? > > Because: > > 1) textEncode("a", "UTF-32") produces the byte sequence <97,0,0,0> > 2) byte 1 of <97,0,0,0> is <97> > 3) charToNum(<97>) first converts the byte <97> into a native string > which is "a" (as the 97 is the code for 'a' in the native encoding > table), then converts that (native) char to a number -> 97 > > > That implies that "byte" 1 is "a", not 1100001. > > 1100001 is 97 but printed in base-2. > > FWIW, I think you are confusing 'binary string' with 'binary number' - > these are not the same thing. > > A 'binary string' (internally the data type is 'Data') is a sequence of > bytes (just as a 'string' is a sequence of > characters/codepoints/codeunits). > > A 'binary number' is a number which has been rendered to a string with > base-2. > > Bytes are like characters (and codepoints, and codeunits) in that they > are 'abstract' things - they aren't numbers, and have no direct > conversion to them - which is why we have byteToNum, numToByte, > nativeCharToNum, numToNativeChar, codepointToNum and numToCodepoint. > > The charToNum and numToChar functions are actually deprecated / > considered legacy - as their function (when useUnicode is set to true) > depends on processing unicode text as binary data - which isn't how > unicode works post-7 (indeed, there was no way to fold their behavior > into the new model - hence the deprecation, and replacement with > nativeCharToNum / numToNativeChar). > > You'll notice that there is no modern 'charToNum'/'numToChar' - just > 'codepointToNum'/'numToCodepoint'. A codepoint is an index into the > (large - 21-bit) Unicode code table; Unicode characters can be composed > of multiple codepoints (e.g. [e,combining-acute] and thus don't have a > 'number' per-se. > > Warmest Regards, > > Mark. > > > > > I've looked in the dictionary and I don't see anything that comes close > > to > > describing this. > > > > gc > > > > On Mon, Nov 12, 2018 at 10:21 PM Mark Waddingham via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> On 2018-11-13 07:15, Geoff Canyon via use-livecode wrote: > >> > On Mon, Nov 12, 2018 at 3:50 PM Monte Goulding via use-livecode < > >> > use-livecode at lists.runrev.com> wrote: > >> > Unless I'm misunderstanding, this hasn't been my observation. Using > >> > offset > >> > on a string that has been textEncodet()ed to UTF-32 returns values > that > >> > are > >> > 4 * (the character offset - 1) + 1 -- if it were re-encoded, wouldn't > >> > it > >> > return the actual offsets (except when it fails)? Also, ? encodes to > >> > 00010001, and routines that convert to UTF-32 and then use offset will > >> > find > >> > five instances of that character in the UTF-32 encoding because of > >> > improper > >> > boundaries. To see this, run this code: > >> > > >> > on mouseUp > >> > put textencode("?","UTF-32") into X > >> > put textencode("???","UTF-32") into Y > >> > put offset(X,Y,1) > >> > end mouseUp > >> > > >> > That will return 2, meaning that it found the encoding for X starting > >> > at > >> > character 2 + 1 = 3 of Y. In other words, it found X using the last > >> > half of > >> > the first "?" and the first half of the second "?" > >> > >> The textEncode function generates binary data which is composed of > >> bytes. When you use binary data in a text function (which offset is), > >> the engine uses a compatability conversion which treats the sequence > >> of > >> bytes as a sequence of native characters (this preserves what happened > >> pre-7.0 when strings were only ever native, and as such binary and > >> string were essentially the same thing). > >> > >> So if you textEncode a 1 (native) character string as UTF-32, you will > >> get a four byte string, which will then turn back into a 4 (native) > >> character string when passed to offset. > >> > >> Warmest Regards, > >> > >> Mark. > >> > >> -- > >> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > >> LiveCode: Everyone can create apps > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at lists.runrev.com > >> Please visit this url to subscribe, unsubscribe and manage your > >> subscription preferences: > >> http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From gcanyon at gmail.com Tue Nov 13 05:37:27 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 13 Nov 2018 02:37:27 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: <469889a3d6cbb361aeb401e8c3ff218f@livecode.com> References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> <469889a3d6cbb361aeb401e8c3ff218f@livecode.com> Message-ID: A lot of useful points here, thanks. The caseSensitive vs. binary has been covered in the other discussion -- Monte said that by using offset() "the engine will convert your data to a string and assume native encoding. This is probably why you are getting some case insensitivity." I understand (generally) the complexity of comparison, but that's not the speed issue causing this discussion. Most of the proposed solutions are using nearly the same operators/functions for comparison, or at least the same comparison is being done. Instead, the problem is a Foolish Line Painter problem: with single-byte characters, finding all occurrences of one string in another by repeatedly using offset() with charsToSkip scales well; but with multi-byte characters, the penalty for repeatedly calculating out longer and longer skips is exponential. The fastest proposed solutions so far, which both scale much more closely to linearly with the size of the stringToSearch, are: 1. Set the item delimiter to the charsToFind and then use repeat for each item on the stringToSearch. This comes with its own headaches, but supports (lack of) case sensitivity. 2. Converting to UTF-32 binary, and using offset and charsToSkip. This hasn't yet been corrected to use byteOffset and toUpper to property handle case insensitivity, but once that is done, this will probably be the preferred solution between the two -- the logic is simpler, and it's several times faster. Thanks, Geoff On Tue, Nov 13, 2018 at 12:27 AM Mark Waddingham via use-livecode < use-livecode at lists.runrev.com> wrote: > On 2018-11-13 01:06, Geoff Canyon via use-livecode wrote: > > On Mon, Nov 12, 2018 at 11:36 AM Ben Rubinstein via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> I'm really confused that case-insensitive should work at all for > >> UTF-16 or > >> UTF-32; > > The caseSensitive (and formSensitive) properties only apply to strings > *not* binary strings. > > The output of textEncode() is a binary string. > > The 'is' operator is overloaded - in strict order: > > left-empty 'is' right-ANY -- returns is-empty(right-ANY) > left-ANY 'is' right-empty -- returns is-empty(left-ANY) > left-array 'is' left-array -- compare as array > left-number 'is' right-number -- compare as number > left-numeric-[binary]-string 'is' right-numeric-[binary]-string -- > compare as number > left-binary-string 'is' right-binary-string -- compare as binary > strings > left-any 'is' right-any -- compare as strings > > Also concatenation, put after and put before are overloaded: > > binary-string & binary-string -> binary-string > string & ANY -> string > ANY & string -> string > > put src-data after|before dst-data -> dst-data is binary-string > put src-ANY after|before dst-ANY -> dst-ANY is string > > > This is so puzzling. I tried this code in a button: > > > > on mouseUp > > put "?" into x > > put "?" into y > > --put ("?" is "?") && (x is y) > > --exit mouseUp > > put textencode("?","UTF-32") into xBig > > put textencode("?","UTF-32") into xSmall > > repeat for each byte B in xBig > > put B after yBig > > end repeat > > repeat for each byte B in xSmall > > put B after ySmall > > end repeat > > put "?" into zBig > > put "?" into zSmall > > put zBig into wBig > > put zSamll into wSmall > > put textencode(zBig,"UTF-32") into zBig > > put textencode(zSmall,"UTF-32") into zSmall > > put x into j > > put y into k > > set caseSensitive to false > > put ("?" is "?") && (xBig is xSmall) && (yBig is ySmall) && (zBig is > > zSmall) && (wBig is wSmall) && (x is y) && (j is k) > > end mouseUp > > > > > > That puts: true false false false true true true > > > > Things to note: > > > > 1. "?" and "?" are upper and lower case omega in cyrillic, 00000460 and > > 00000461. Given the string literals, LC is happy to say they are the > > same > > (the first true) > > 2. Put them in a variable, LC is happy to say they are the same > > (the second-to-last true). > > 3. Convert them to UTF-32 and LC no longer recognizes them as the same > > (the > > fourth boolean, false) > > 4. Put the variables into other variables, and LC identifies them as > > the > > same (the last true) > > ("?" is "?") is true because they are both strings > (xBig is xSmall) is false because both sides are binary-strings (and so > compare byte for byte) > (yBig is ySmall) is false because both sides are binary-strings > (zBig is zSmall) is false because you've textEncoded strings which > produce binary-strings so both are binary strings > (wBig is wSmall) is true because both sides are strings > (x is y) is true because both sides are strings > (j is k) is true because both sides are strings > > One could argue that 'is'/'is not' should never have been overloaded to > do binary string comparison - and that should have perhaps been added as > a separate operator (especially since binary strings are compared as > numbers if numeric). With hindsight I'd probably agree as it is a slight > discontinuity in terms of comparison with pre-7. > > Indeed, had we not added that overload then we would not be having this > discussion - it would have been a similar discussion as used to come up > a lot with comparing the output of compress() and other functions which > have always produced binary data - and why comparisons seemed 'not as > one would expect'. > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at livecode.com Tue Nov 13 05:52:52 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 11:52:52 +0100 Subject: What is LC's internal text =?UTF-8?Q?format=3F?= In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <7ac3c12a47767af5e157d0fb17992869@livecode.com> <195b170eec3434a7260eb10a93482f14@livecode.com> Message-ID: <0e2eb98fe6f33bb89e4c691af6b5b86e@livecode.com> On 2018-11-13 11:06, Geoff Canyon via use-livecode wrote: > I don't *think* I'm confusing binary string/data with binary numbers -- > I > was just trying to illustrate that when a Latin Small Letter A (U+0061) > gets encoded, somewhere there is stored (four bytes, one of which is) a > byte 97, i.e. the bit sequence 1100001, unless computers don't work > that > way anymore. Yes - a byte is not a number, a char is not a number a bit sequence is not a number. Chars have never been numbers in LC - when LC sees a char - it sees a string and so when such a thing is used in number context it converts it to the number it *looks* like i.e. "1" -> 1, but "a" -> error in number context (bearing in mind the code for "1" is not 1). i.e. numToChar(charToNum("1")) + 0 -> 1 The same is try for 'byte' in LC7+ (indeed prior to that byte was a synonym for char). > What I now see is tripping me up is the implicit cast to a character > you're > saying that charToNum supports, without the corresponding cast to a > number > supported in numToChar -- i.e. this fails: > > put textEncode("a","UTF-32") into X;put numtochar(byte 1 of X) Right so that shouldn't work - byte 1 of X here is <97> (a byte), bytes get converted to native chars in string context, so numToChar(byte 1 of X) -> numToChar(<97> as char) -> numToChar("a") and "a" is not a number. You'd get exactly the same result if you did put numToChar(char 1 of "a"). As I said, bytes are not numbers, just as chars are not numbers - bytes do implicitly convert to (native) chars though - so when you use a binary string in number context, it gets treated as a numeric string. Put another way, just as the code for a char is not used in conversion in number context, the code of a byte is not used either. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From mark at livecode.com Tue Nov 13 06:02:08 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 12:02:08 +0100 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: <780B57ED-A293-47D9-9D4C-F3215942D05F@uni-wh.de> <3A2469C8-2B8A-4DDE-9D64-A643A63FFA8F@uni-wh.de> <6854EF10-4A2C-45C5-8F9D-2D7435DD4F3F@uni-wh.de> <0e765b9b-9ea2-44ef-88eb-e500005d7842@Spark> <16daa25c-7323-0eff-259a-773a640be68c@cogapp.com> <469889a3d6cbb361aeb401e8c3ff218f@livecode.com> Message-ID: <47e42e053ed9cbe24e7783cc012296d2@livecode.com> On 2018-11-13 11:37, Geoff Canyon via use-livecode wrote: > I understand (generally) the complexity of comparison, but that's not > the > speed issue causing this discussion. Most of the proposed solutions are > using nearly the same operators/functions for comparison, or at least > the > same comparison is being done. Instead, the problem is a Foolish Line > Painter problem: with single-byte characters, finding all occurrences > of > one string in another by repeatedly using offset() with charsToSkip > scales > well; but with multi-byte characters, the penalty for repeatedly > calculating out longer and longer skips is exponential. The actual reason its not linear when you have Unicode strings (the behavior isn't exponential, btw - cubic, I think) is that to work out the character index in a Unicode string is a O(n) operation - in native strings its O(1). So, I revise what I said before, you actually need to use codeunitOffset() with formSensitive and caseSensitive set to true, with your input strings appropriately processed. The only wrinkle with that is that you might get 'false-positive' matches - i.e. where a match is not on character boundaries: e.g. [e, combining-acute] will be found in [e, combining-acute, combining-grave] even though the latter is *not* the former as characters (but is as codeunits). Using textEncode("UTF-32") / binary offset will cause more false-positives than that (as you've mentioned before) as it could find matches which are not on a 4 byte boundary. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From benr_mc at cogapp.com Tue Nov 13 06:43:08 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 13 Nov 2018 11:43:08 -0000 Subject: What is LC's internal text format? In-Reply-To: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> Message-ID: <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> I'm grateful for all the information, but _outraged_ that the thread that I carefully created separate from the offset thread was so quickly hijacked for the continuing (useful!) detailed discussion on that topic. From recent contributions on both threads I'm getting some more insights, but I'd really like to understand clearly what's going on. I do think that I should have asked this question more broadly: how does the engine represent values internally? I believe from what I've read that the engine can distinguish the following kinds of value: - empty - array - number - string - binary string From Monte I get that the internal encoding for 'string' may be MacRoman, ISO 8859 (I thought it would be CP1252), or UTF16 - presumably with some attribute to tell the engine which one in each case. So then my question is whether a 'binary string' is a pure blob, with no clues as to interpretation; or whether in fact it does have some attributes to suggest that it might be interpreted as UTF8, UTF132 etc? If there are no such attributes, how does codepointOffset operate when passed a binary string? If there are such attributes, how do they get set? Evidently if textEncode is used, the engine knows that the resulting value is the requested encoding. But what happens if the program reads a file as 'binary' - presumable the result is a binary string, how does the engine treat it? Is there any way at LiveCode script level to detect what a value is, in the above terms? And one more question: if a string, or binary string, is saved in a 'binary' file, are the bytes stored on disk a faithful rendition of the bytes that composed the value in memory, or an interpretation of some kind? TIA, Ben From mark at livecode.com Tue Nov 13 08:31:35 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 14:31:35 +0100 Subject: What is LC's internal text =?UTF-8?Q?format=3F?= In-Reply-To: <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> Message-ID: <7ceea77446e359c72ac78b601a647f71@livecode.com> On 2018-11-13 12:43, Ben Rubinstein via use-livecode wrote: > I'm grateful for all the information, but _outraged_ that the thread > that I carefully created separate from the offset thread was so > quickly hijacked for the continuing (useful!) detailed discussion on > that topic. The phrase 'attempting to herd cats' springs to mind ;) > From recent contributions on both threads I'm getting some more > insights, but I'd really like to understand clearly what's going on. I > do think that I should have asked this question more broadly: how does > the engine represent values internally? The engine uses a number of distinct types 'behind the scenes'. The ones pertinent to LCS (there are many many more which LCS never sees) are: - nothing: a type with a single value nothing/null) - boolean: a type with two values true/false - number: a type which can either store a 32-bit integer *or* a double - string: a type which can either store a sequence of native (single byte) codes, or a sequence of unicode (two byte - UTF-16) codes - name: a type which stores a string, but uniques the string so that caseless and exact equality checking is constant time - data: a type which stores a sequence of bytes - array: a type which stores (using a hashtable) a mapping from 'names' to any other storage value type The LCS part of the engine then sits on top of these core types, providing various conversions depending on context. All LCS syntax is actually typed - meaning that when you pass a value to any piece of LCS syntax, each argument is converted to the type required. e.g. charToNativeNum() has signature 'integer charToNativeNum(string)' meaning that it expects a string as input and will return a number as output. Some syntax is overloaded - meaning that it can act in slightly different (but always consistent) ways depending on the type of the arguments. e.g. & has signatures 'string &(string, string)' and 'data &(data, data)'. In simple cases where there is no overload, type conversion occurs exactly as required: e.g. In the case of charToNativeNum() - it has no overload, so always expects a string which means that the input argument will always undergo a 'convert to string' operation. The convert to string operation operates as follows: - nothing -> "" - boolean -> "true" or "false" - number -> decimal representation of the number, using numberFormat - string -> stays the same - name -> uses the string the name contains - data -> converts to a string using the native encoding - array -> converts to empty (a very old semantic which probably does more harm than good!) In cases where syntax is overloaded, type conversion generally happens in syntax-specific sequence in order to preserve consistency: e.g. In the case of &, it can either take two data arguments, or two string arguments. In this case, if both arguments are data, then the result will be data. Otherwise both arguments will be converted to strings, and a string returned. > From Monte I get that the internal encoding for 'string' may be > MacRoman, ISO 8859 (I thought it would be CP1252), or UTF16 - > presumably with some attribute to tell the engine which one in each > case. Monte wasn't quite correct - on Mac it is MacRoman or UTF-16, on Windows it is CP1252 or UTF-16, on Linux it is IOS8859-1 or UTF-16. There is an internal flag in a string value which says whether its character sequence is single-byte (native) or double-byte (UTF_16). > So then my question is whether a 'binary string' is a pure blob, with > no clues as to interpretation; or whether in fact it does have some > attributes to suggest that it might be interpreted as UTF8, UTF132 > etc? Data (binary string) values are pure blobs - they are sequences of bytes - it has no knowledge of where it came from. Indeed, that would generally be a bad idea as you wouldn't get repeatable semantics (i.e. a value from one codepath which is data, might have a different effect in context from one which is fetched from somewhere else). That being said, the engine does store some flags on values - but purely for optimization. i.e. To save later work. For example, a string value can store its (double) numeric value in it - which saves multiple 'convert to number' operations performed on the same (pointer wise) string (due to the copy-on-write nature of values, and the fact that all literals are unique names, pointer-wise equality of values occurs a great deal). > If there are no such attributes, how does codepointOffset operate when > passed a binary string? CodepointOffset is has signature 'integer codepointOffset(string)', so when you pass a binary string (data) value to it, the data value gets converted to a string by interpreting it as a sequence of bytes in the native encoding. > If there are such attributes, how do they get set? Evidently if > textEncode is used, the engine knows that the resulting value is the > requested encoding. But what happens if the program reads a file as > 'binary' - presumable the result is a binary string, how does the > engine treat it? There are no attributes of that ilk. When you read a file as binary you get data (binary string) values - which means when you pass them to string taking functions/commands that data gets interpreted as a sequence of bytes in the native encoding. This is why you must always explicitly textEncode/textDecode data values when you know they are not representing native encoded text. > Is there any way at LiveCode script level to detect what a value is, > in the above terms? Yes - the 'is strictly' operators: is strictly nothing is strictly a boolean is strictly an integer - a number which has internal rep 32-bit int is strictly a real - a number which has internal rep double is strictly a string is strictly a binary string is strictly an array It should be noted that 'is strictly' reports only how that value is stored and not anything based on the value itself. This only really applies to 'an integer' and 'a real' - you can store an integer in a double and all LCS arithmetic operators act on doubles. e.g. (1+2) is strictly an integer -> false (1+2) is strictly a real -> true In contrast, though, *some* syntax will return numbers which are stored internally as integers: e.g. nativeCharToNum("a") is strictly an integer -> true I should point out that what 'is strictly' operators return for any given context is not stable in the sense that future engine versions might return different things. e.g. We might optimize arithmetic in the future (if we can figure out a way to do it without performance penalty!) so that things which are definitely integers, are stored as integers (e.g. 1 + 2 in the above). > And one more question: if a string, or binary string, is saved in a > 'binary' file, are the bytes stored on disk a faithful rendition of > the bytes that composed the value in memory, or an interpretation of > some kind? What happens when you read or write data or string values to a file depends on how you opened the file. If you opened the file for binary (whether reading or writing), when you read you will get data, when you write string values will be converted to data via the native encoding (default rule). If you opened the file for text, then the engine will try and determine (using a BOM) the existing text encoding of the file. If it can't determine it (if for example, you are opening a file for write which doesn't exist), it will assume it is encoded as native. Otherwise the file will have an explicit encoding associated with it specified by you - reading from it will interpret the bytes in that explicit encoding; while writing to it will expect string values which will be encoded appropriately. In the latter case if you write data values, they will first be converted to a string (assuming native encoding) and then written as strings in the file's encoding (i.e. default type conversion applies). Essentially you can view file's a typed-stream - if you opened for binary read/write give/take data; if you opened for text then read/write give/take strings and default type conversion rules apply. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From bobsneidar at iotecdigital.com Tue Nov 13 11:01:23 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 13 Nov 2018 16:01:23 +0000 Subject: What is LC's internal text format? In-Reply-To: <7ceea77446e359c72ac78b601a647f71@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> Message-ID: <616D75E9-B5F7-4B6D-B54B-689D4AB2FDC8@iotecdigital.com> There is a quest in World of Warcraft where the objective is actually to herd cats. It can be done, but only one cat at a time. :-) Bob S > On Nov 13, 2018, at 05:31 , Mark Waddingham via use-livecode wrote: > > On 2018-11-13 12:43, Ben Rubinstein via use-livecode wrote: >> I'm grateful for all the information, but _outraged_ that the thread >> that I carefully created separate from the offset thread was so >> quickly hijacked for the continuing (useful!) detailed discussion on >> that topic. > > The phrase 'attempting to herd cats' springs to mind ;) From bobsneidar at iotecdigital.com Tue Nov 13 11:05:41 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 13 Nov 2018 16:05:41 +0000 Subject: put the openStacks In-Reply-To: References: <2d60612e-868d-70ab-66b2-1260f2d1f9a5@gmail.com> <166ff706928.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> <166ffc664e0.2783.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: Oh that's a great idea for a Livecode party! After a few drinks, everyone dons nerf boots and begins kicking each other in the nether region. Bob S > On Nov 11, 2018, at 01:12 , Richmond via use-livecode wrote: > > Um, that kicking might prove mutual; or even, dare I say it, into a free-for-all melee among quite a few people. > > Richmond. From ludovic.thebault at laposte.net Tue Nov 13 12:19:57 2018 From: ludovic.thebault at laposte.net (Ludovic THEBAULT) Date: Tue, 13 Nov 2018 18:19:57 +0100 Subject: Widget Browser, useragent and iOS Message-ID: <7A9D8048-5E43-49F4-9156-1175EFFFE9F9@laposte.net> Hello, It seems we cannot set the user agent of the widget browser on iOS. Any workaround ? Thanks ! From gcanyon at gmail.com Tue Nov 13 12:21:31 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 13 Nov 2018 09:21:31 -0800 Subject: What is LC's internal text format? In-Reply-To: <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> Message-ID: On Tue, Nov 13, 2018 at 3:43 AM Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> wrote: > I'm grateful for all the information, but _outraged_ that the thread that > I > carefully created separate from the offset thread was so quickly hijacked > for > the continuing (useful!) detailed discussion on that topic. > Nothing I said in this thread has anything to do with optimizing the allOffsets routines; I only used examples from that discussion because they illustrate my puzzlement on the exact topic you (in general) raised: how data types are handled by the engine. I'd generalize the responses, to say that it seems how the engine stores data and how it presents that data are not identical in all cases. Separately, it's interesting to hear that the engine (can) store(s) numeric values for strings, as an optimization. The above notwithstanding: sorry I outraged you; I'll exit this thread. From mark at livecode.com Tue Nov 13 12:29:35 2018 From: mark at livecode.com (Mark Waddingham) Date: Tue, 13 Nov 2018 18:29:35 +0100 Subject: What is LC's internal text =?UTF-8?Q?format=3F?= In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> Message-ID: <4930be2db92f59477ac233f3ab44ecdb@livecode.com> On 2018-11-13 18:21, Geoff Canyon via use-livecode wrote: > Nothing I said in this thread has anything to do with optimizing the > allOffsets routines; I only used examples from that discussion because > they > illustrate my puzzlement on the exact topic you (in general) raised: > how > data types are handled by the engine. I'd generalize the responses, to > say > that it seems how the engine stores data and how it presents that data > are > not identical in all cases. The best way to think about it is that the engine stores data pretty much in the form it is presented with it; however, what script sees of data is in the form it requests. In particular, if data has been through some operation, or mutated, then there is a good change it won't be in the same form it was before. e.g. put tVar + 1 into tVar Here tVar could start off as a string, but would end up as a number by virtue of the fact you've performed an arithmetic operation on it. > The above notwithstanding: sorry I outraged you; I'll exit this thread. Obviously I'm not Ben, but I *think* it was 'faux outrage' (well I hope it was - hence my jocular comment about herding cats!) - so I don't think there's a reason to exit... Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps From benr at cogapp.com Tue Nov 13 14:33:56 2018 From: benr at cogapp.com (Ben Rubinstein) Date: Tue, 13 Nov 2018 19:33:56 -0000 Subject: What is LC's internal text format? In-Reply-To: <7ceea77446e359c72ac78b601a647f71@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> Message-ID: <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> That's really helpful - and in parts eye-opening - thanks Mark. I have a few follow-up questions. Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? > CodepointOffset has signature 'integer codepointOffset(string)', so when you > pass a binary string (data) value to it, the data value gets converted to a > string by interpreting it as a sequence of bytes in the native encoding. OK - so one message I take are that in fact one should never invoke codepointOffset on a binary string. Should it actually throw an error in this case? By the same token, probably one should only use 'byte', 'byteOffset', 'byteToNum' etc with binary strings - would it be better, to avoid confusion, if char, offset, charToNum should refuse to operate on a binary string? > e.g. In the case of &, it can either take two data arguments, or two > string arguments. In this case, if both arguments are data, then the result > will be data. Otherwise both arguments will be converted to strings, and a > string returned. The second message I take is that one needs to be very careful, if operating on UTF8 or other binary strings, to avoid 'contaminating' them e.g. by concatenating with a simple quoted string, as this may cause it to be silently converted to a non-binary string. (I presume that 'put "simple string" after/before pBinaryString' will cause a conversion in the same way as "&"? What about 'put "!" into char x of pBinaryString?) The engine can tell whether a string is 'native' or UTF16. When the engine is converting a binary string to 'string', does it always interpret the source as the native 8-bit encoding, or does it have some heuristic to decide whether it would be more plausible to interpret the source as UTF16? Thanks again for all the detail! Ben On 13/11/2018 13:31, Mark Waddingham via use-livecode wrote: > On 2018-11-13 12:43, Ben Rubinstein via use-livecode wrote: >> I'm grateful for all the information, but _outraged_ that the thread >> that I carefully created separate from the offset thread was so >> quickly hijacked for the continuing (useful!) detailed discussion on >> that topic. > > The phrase 'attempting to herd cats' springs to mind ;) > >> From recent contributions on both threads I'm getting some more >> insights, but I'd really like to understand clearly what's going on. I >> do think that I should have asked this question more broadly: how does >> the engine represent values internally? > > The engine uses a number of distinct types 'behind the scenes'. The ones > pertinent to LCS (there are many many more which LCS never sees) are: > > ? - nothing: a type with a single value nothing/null) > ? - boolean: a type with two values true/false > ? - number: a type which can either store a 32-bit integer *or* a double > ? - string: a type which can either store a sequence of native (single byte) > codes, or a sequence of unicode (two byte - UTF-16) codes > ? - name: a type which stores a string, but uniques the string so that > caseless and exact equality checking is constant time > ? - data: a type which stores a sequence of bytes > ? - array: a type which stores (using a hashtable) a mapping from 'names' to > any other storage value type > > The LCS part of the engine then sits on top of these core types, providing > various conversions depending on context. > > All LCS syntax is actually typed - meaning that when you pass a value to any > piece of LCS syntax, each argument is converted to the type required. > > e.g. charToNativeNum() has signature 'integer charToNativeNum(string)' meaning > that it > expects a string as input and will return a number as output. > > Some syntax is overloaded - meaning that it can act in slightly different (but > always consistent) ways depending on the type of the arguments. > > e.g. & has signatures 'string &(string, string)' and 'data &(data, data)'. > > In simple cases where there is no overload, type conversion occurs exactly as > required: > > e.g. In the case of charToNativeNum() - it has no overload, so always expects > a string > which means that the input argument will always undergo a 'convert to string' > operation. > > The convert to string operation operates as follows: > > ?? - nothing -> "" > ?? - boolean -> "true" or "false" > ?? - number -> decimal representation of the number, using numberFormat > ?? - string -> stays the same > ?? - name -> uses the string the name contains > ?? - data -> converts to a string using the native encoding > ?? - array -> converts to empty (a very old semantic which probably does more > harm than good!) > > In cases where syntax is overloaded, type conversion generally happens in > syntax-specific sequence in order to preserve consistency: > > e.g. In the case of &, it can either take two data arguments, or two string > arguments. In this case, > if both arguments are data, then the result will be data. Otherwise both > arguments will be converted > to strings, and a string returned. > >> From Monte I get that the internal encoding for 'string' may be >> MacRoman, ISO 8859 (I thought it would be CP1252), or UTF16 - >> presumably with some attribute to tell the engine which one in each >> case. > > Monte wasn't quite correct - on Mac it is MacRoman or UTF-16, on Windows it > is CP1252 or UTF-16, on Linux it is IOS8859-1 or UTF-16. There is an internal > flag in a string value which says whether its character sequence is > single-byte (native) > or double-byte (UTF_16). > >> So then my question is whether a 'binary string' is a pure blob, with >> no clues as to interpretation; or whether in fact it does have some >> attributes to suggest that it might be interpreted as UTF8, UTF132 >> etc? > > Data (binary string) values are pure blobs - they are sequences of bytes - it has > no knowledge of where it came from. Indeed, that would generally be a bad idea > as you > wouldn't get repeatable semantics (i.e. a value from one codepath which is > data, might > have a different effect in context from one which is fetched from somewhere > else). > > That being said, the engine does store some flags on values - but purely for > optimization. > i.e. To save later work. For example, a string value can store its (double) > numeric value in > it - which saves multiple 'convert to number' operations performed on the same > (pointer wise) string (due to the copy-on-write nature of values, and the fact > that all literals are unique names, pointer-wise equality of values occurs a > great deal). > >> If there are no such attributes, how does codepointOffset operate when >> passed a binary string? > > CodepointOffset is has signature 'integer codepointOffset(string)', so when you > pass a binary string (data) value to it, the data value gets converted to a > string > by interpreting it as a sequence of bytes in the native encoding. > >> If there are such attributes, how do they get set? Evidently if >> textEncode is used, the engine knows that the resulting value is the >> requested encoding. But what happens if the program reads a file as >> 'binary' - presumable the result is a binary string, how does the >> engine treat it? > > There are no attributes of that ilk. When you read a file as binary you get > data (binary > string) values - which means when you pass them to string taking > functions/commands that > data gets interpreted as a sequence of bytes in the native encoding. This is > why you must > always explicitly textEncode/textDecode data values when you know they are not > representing > native encoded text. > >> Is there any way at LiveCode script level to detect what a value is, >> in the above terms? > > Yes - the 'is strictly' operators: > > ? is strictly nothing > ? is strictly a boolean > ? is strictly an integer - a number which has internal rep 32-bit int > ? is strictly a real - a number which has internal rep double > ? is strictly a string > ? is strictly a binary string > ? is strictly an array > > It should be noted that 'is strictly' reports only how that value is stored > and not anything based on the value itself. This only really applies to 'an > integer' and 'a real' - you can store an integer in a double and all LCS > arithmetic operators act on doubles. > > e.g. (1+2) is strictly an integer -> false > ???? (1+2) is strictly a real -> true > > In contrast, though, *some* syntax will return numbers which are stored > internally as integers: > > e.g. nativeCharToNum("a") is strictly an integer -> true > > I should point out that what 'is strictly' operators return for any given > context is not stable in the sense that future engine versions might return > different things. e.g. We might optimize arithmetic in the future (if we can > figure out a way to do it without performance penalty!) so that things which > are definitely integers, are stored as integers (e.g. 1 + 2 in the above). > >> And one more question: if a string, or binary string, is saved in a >> 'binary' file, are the bytes stored on disk a faithful rendition of >> the bytes that composed the value in memory, or an interpretation of >> some kind? > > What happens when you read or write data or string values to a file depends on > how you opened the file. > > If you opened the file for binary (whether reading or writing), when you read > you will get data, when you write string values will be converted to data via > the native encoding (default rule). > > If you opened the file for text, then the engine will try and determine (using > a BOM) the existing text encoding of the file. If it can't determine it (if > for example, you are opening a file for write which doesn't exist), it will > assume it is encoded as native. > > Otherwise the file will have an explicit encoding associated with it specified > by you - reading from it will interpret the bytes in that explicit encoding; > while writing to it will expect string values which will be encoded > appropriately. In the latter case if you write data values, they will first be > converted to a string (assuming native encoding) and then written as strings > in the file's encoding (i.e. default type conversion applies). > > Essentially you can view file's a typed-stream - if you opened for binary > read/write give/take data; if you opened for text then read/write give/take > strings and default type conversion rules apply. > > Warmest Regards, > > Mark. > From bdrunrev at gmail.com Tue Nov 13 14:35:34 2018 From: bdrunrev at gmail.com (Bernard Devlin) Date: Tue, 13 Nov 2018 19:35:34 +0000 Subject: LiveCoders from London, lets meet! In-Reply-To: References: Message-ID: I live outside London, but easy enough to get in to meet up. On Sat, Nov 10, 2018 at 2:14 PM Keith Martin via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Andre, > > I'm based in London ? I live in Mitcham/Tooting and I work in Elephant > & Castle. I'm game! > > k > > > On 9 Nov 2018, at 17:04, Andre Alves Garzia via use-livecode wrote: > > > Hey Friends, > > > > Who here is from London or nearby and would be interested in regular > > meetups? We could meet once a month or so in a pub or quieter setting. > > I am thinking of informal meet & drink, chatting. > > > > Cheers > > > > andre > > > > From jerry at jhjensen.com Tue Nov 13 14:36:01 2018 From: jerry at jhjensen.com (Jerry Jensen) Date: Tue, 13 Nov 2018 11:36:01 -0800 Subject: What is LC's internal text format? In-Reply-To: <0e2eb98fe6f33bb89e4c691af6b5b86e@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <7ac3c12a47767af5e157d0fb17992869@livecode.com> <195b170eec3434a7260eb10a93482f14@livecode.com> <0e2eb98fe6f33bb89e4c691af6b5b86e@livecode.com> Message-ID: <5EE0CFD5-5FDB-4AA6-BFF5-F11538A51CB2@jhjensen.com> > On Nov 13, 2018, at 2:52 AM, Mark Waddingham via use-livecode wrote: > > Yes - a byte is not a number, a char is not a number a bit sequence is not a number. Reminds of a clever sig line from somebody on this list. I can?t remember who, so author please step up and take credit. Paraphrasing The Prisoner: ?I am not a number, I am a free NaN?. From mike at golddogcoffee.com Tue Nov 13 15:06:16 2018 From: mike at golddogcoffee.com (Mike for GDC) Date: Tue, 13 Nov 2018 13:06:16 -0700 Subject: finding location on mobile device Message-ID: <016e01d47b8c$5618f0e0$024ad2a0$@golddogcoffee.com> I am trying to find my current lat/long on my android device. I have played around with multiple options including "mobileCurrentLocation" and others. I have not been able to find an example of code that does it and works. What I want to do is push a button, have the lat/long displayed so as I can then "feed" it into a map widget for display. Does anyone have an example of code that does just that? Thanks. Mike From brahma at hindu.org Tue Nov 13 15:19:41 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Tue, 13 Nov 2018 20:19:41 +0000 Subject: [ANN] Release 9.0.2 RC-1 References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Message-ID: Bad news. (Does not change my little "guide") Build the app, used Jacqulines "Air Launch" get SivaSiva.ipa I already had new release, 1.3 on iTuneConnect. Booted Application Loader Run the SivaSiva.ipa It passed all analyses; I got a message from Application Loader "Success [snip other stuff] we will get a review shortly. That was saturday On Monday On 11/10/18 6:15 PM, Pi Digital via use-livecode wrote: > Perhaps we should get a simplified version of this into every release note from here on in. It will save a whole heap of hunting around for them. > > Sean Cole > Pi Digital > >> On 10 Nov 2018, at 14:59, Sannyasin Brahmanathaswami via use-livecode wrote: >> >> https://developer.apple.com/download/more/ >> >> filter the list to iOS (side panel) >> >> 1) get Xcode 10.0 >> 2) also Command_Line_Tools_macOS_10.14_for_Xcode_10.dmg >> >> It seems when you install manually like this, Xcode does not prompt to >> "install additional components" because, if you already downloaded from >> the store, and got the prompt and installed them, (my guess is that) the >> system thinks "Oh he got everything." >> >> But, upon building a standalone you will have troubles. Because you did >> not get tools to the current version of Xcode that you installed >> manually. So download these for Xcode 10 and install >> >> Next, be sure to run from the command line >> >> sudo xcode-select --switch /Applications/Xcode.app [or-your-path] From brahma at hindu.org Tue Nov 13 15:24:38 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Tue, 13 Nov 2018 20:24:38 +0000 Subject: [ANN] Release 9.0.2 RC-1 References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Message-ID: Hit send button too soon > Bad news. (Does not change my little "guide") > > Build the app, used Jacqulines "Air Launch" get SivaSiva.ipa > > I already had new release, 1.3 on iTuneConnect. > > Booted Application Loader > Run the SivaSiva.ipa > > It passed all analyses; I got a message from Application Loader "Success > [snip other stuff] we will get a review shortly. > > That was saturday On Monday I get a message from Apple that there was "invalid architecture" in app, Plus the using Push Notification Warning and Beta Test entitlement missing those are not blockers for approval. But "invalid architecture" is No further info I have ticket in with Livecode support. Brahmanathaswami From merakosp at gmail.com Tue Nov 13 15:36:00 2018 From: merakosp at gmail.com (panagiotis merakos) Date: Tue, 13 Nov 2018 22:36:00 +0200 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Message-ID: Hello Brahmanathaswami, Could it be the case that you have accidentally checked the "build 32bit slice only" checkbox in the iOS standalone settings? Regards, Panos On Tue, Nov 13, 2018, 22:24 Sannyasin Brahmanathaswami via use-livecode < use-livecode at lists.runrev.com wrote: > Hit send button too soon > > Bad news. (Does not change my little "guide") > > > > Build the app, used Jacqulines "Air Launch" get SivaSiva.ipa > > > > I already had new release, 1.3 on iTuneConnect. > > > > Booted Application Loader > > Run the SivaSiva.ipa > > > > It passed all analyses; I got a message from Application Loader "Success > > [snip other stuff] we will get a review shortly. > > > > That was saturday > On Monday I get a message from Apple that there was "invalid > architecture" in app, > > Plus the using Push Notification Warning and Beta Test entitlement > missing those are not blockers for approval. But "invalid architecture" is > > No further info > > I have ticket in with Livecode support. > > > 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 benr_mc at cogapp.com Tue Nov 13 15:54:26 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 13 Nov 2018 20:54:26 +0000 Subject: What is LC's internal text format? In-Reply-To: <4930be2db92f59477ac233f3ab44ecdb@livecode.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <4930be2db92f59477ac233f3ab44ecdb@livecode.com> Message-ID: <7aa4ffcc-b51b-9352-b0d8-79ce3c80d404@cogapp.com> For the avoidance of doubt, all my outrage is faux outrage. Public life on both sides of the Atlantic (and around the world) has completely exhausted capacity for real outrage. Come back Geoff! Ben On 13/11/2018 17:29, Mark Waddingham via use-livecode wrote: > On 2018-11-13 18:21, Geoff Canyon via use-livecode wrote: >> Nothing I said in this thread has anything to do with optimizing the >> allOffsets routines; I only used examples from that discussion because they >> illustrate my puzzlement on the exact topic you (in general) raised: how >> data types are handled by the engine. I'd generalize the responses, to say >> that it seems how the engine stores data and how it presents that data are >> not identical in all cases. > > The best way to think about it is that the engine stores data pretty much in > the form it is presented with it; however, what script sees of data is in the > form it requests. In particular, if data has been through some operation, or > mutated, then there is a good change it won't be in the same form it was before. > > e.g. put tVar + 1 into tVar > > Here tVar could start off as a string, but would end up as a number by virtue > of the fact you've performed an arithmetic operation on it. > >> The above notwithstanding: sorry I outraged you; I'll exit this thread. > > Obviously I'm not Ben, but I *think* it was 'faux outrage' (well I hope it was > - hence my jocular comment about herding cats!) - so I don't think there's a > reason to exit... > > Warmest Regards, > > Mark. > From devin_asay at byu.edu Tue Nov 13 16:22:36 2018 From: devin_asay at byu.edu (Devin Asay) Date: Tue, 13 Nov 2018 21:22:36 +0000 Subject: finding location on mobile device In-Reply-To: <016e01d47b8c$5618f0e0$024ad2a0$@golddogcoffee.com> References: <016e01d47b8c$5618f0e0$024ad2a0$@golddogcoffee.com> Message-ID: This has worked for me in the past, but I haven?t tried it in quite some time: mobileStartTrackingSensor "location", false put mobileCurrentLocation() into tLocArray mobileStopTrackingSensor "location" put "lat: " & tLocArray["latitude"] & cr & "long: " & tLocArray["longitude?] into fld "report" Devin > On Nov 13, 2018, at 1:06 PM, Mike for GDC via use-livecode wrote: > > I am trying to find my current lat/long on my android device. I have played > around with multiple options including "mobileCurrentLocation" and others. > I have not been able to find an example of code that does it and works. > What I want to do is push a button, have the lat/long displayed so as I can > then "feed" it into a map widget for display. Does anyone have an example > of code that does just that? Thanks. Mike > > _______________________________________________ > use-livecode mailing list > use-livecode 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 gcanyon at gmail.com Tue Nov 13 16:39:44 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 13 Nov 2018 13:39:44 -0800 Subject: How to find offsets in Unicode Text fast In-Reply-To: References: Message-ID: I didn't realize this conversation was just between Bernd and me, so here it is for the list. Bernd found a solution for the Reykjav?k issue (seemingly -- it works, but it's weird) and based on a conversation in another thread I have a solution for non-case-sensitive matching. So the UTF-32 version has been updated to account for those issues. It's available here: https://github.com/gcanyon/alloffsets On Tue, Nov 13, 2018 at 12:23 PM Geoff Canyon wrote: > It's amazing to me that appending the character "?" for the textEncoding > fixes the issues with the other characters. I have no idea why that would > affect anything else at all. Maybe the engine crew can weigh in. > > In any case, you seem to have hit on the right bizarre solution, so I > added that in. I also added a modification to correctly handle case by > using toUpper instead of (wrongly) depending on caseSensitive, and changed > from offset to byteOffset, which might speed things up a little. The UTF32 > version is about 3x faster than the item-based solution, but both scale > well, so I added comments leaving it up to the developer which to use. > > The updated version is here: https://github.com/gcanyon/alloffsets > > On Tue, Nov 13, 2018 at 9:34 AM Niggemann, Bernd < > Bernd.Niggemann at uni-wh.de> wrote: > >> Geoff, >> >> The thread is very instructive but also a bit disillusioning as far as >> speed goes. I tried a couple of things Mark Waddingham recommended and they >> kind of work (I don't know if I did it correctly) but are still slow. Not >> as slow as simple offset for complex texts but still. >> >> Here I pick up on your latest attempt to use UTF-32 which fails on >> Icelandic Reykjav?k (the ? is the culprit). There are more Icelandic >> characters that fail UTF32. >> >> On the other hand UTF-32 works surprisingly fast and in many cases >> accurately. >> >> Now I figured that forcing the text to be UTF-32 compliant I would cheat >> in appending a Japanese character to pFind and pSearch before converting to >> UTF-32 and removing those afterwards. >> >> It turns out that it cures the Icelandic disease... >> It should also cure similar cases in similar languages. >> It turns out to be accurate in many things I tested in Brian's test stack. >> >> I would love to know the limits of this approach >> >> Kind regards >> >> Bernd >> >> here is the code, additions marked as "new" >> >> >> ------------------------------------------------- >> *function* allOffsets pFind,pString,pCaseSensitive,pNoOverlaps >> *-- returns a comma-delimited list of the offsets of pFind in pString* >> *-- note, this seems to fail on some searches, for example:* >> *-- searching for "Reykjav?k" in "Reykjav?k er h?fu?borg"* >> *-- It is uncertain why.* >> *-- See thread here: >> http://lists.runrev.com/pipermail/use-livecode/2018-November/251357.html >> * >> *local* tNewPos, tPos, tResult, tSkip >> >> >> *put* "?" after pFind *#<- new force UTF-32* >> *put* "?" after pString *#<- new force UTF-32* >> >> >> >> >> *put* textEncode(pFind,"UTF-32") into pFind >> *put* textEncode(pString,"UTF-32") into pString >> >> >> *delete* byte -4 to -1 of pFind *#<- new force UTF-32* >> *delete* byte -4 to -1 of pString *#<- new force UTF-32* >> >> >> *if* pNoOverlaps *then* *put* length(pFind) - 1 into tSkip >> >> >> *set* the caseSensitive to pCaseSensitive is true >> *put* 0 into tPos >> *repeat* forever >> *put* offset(pFind, pString, tPos) into tNewPos >> *if* tNewPos = 0 *then* *exit* *repeat* >> *add* tNewPos to tPos >> *if* tPos mod 4 = 1 *then* *put* (tPos div 4 + 1),"" after tResult >> *if* pNoOverlaps *then* *add* tSkip to tPos >> *end* * repeat* >> *if* tResult is empty *then* *return* 0 >> *else* *return* char 1 to -2 of tResult >> *end* allOffsets >> ------------------------------------------------- >> > From rdimola at evergreeninfo.net Tue Nov 13 16:54:01 2018 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Tue, 13 Nov 2018 16:54:01 -0500 Subject: finding location on mobile device In-Reply-To: <016e01d47b8c$5618f0e0$024ad2a0$@golddogcoffee.com> References: <016e01d47b8c$5618f0e0$024ad2a0$@golddogcoffee.com> Message-ID: <011e01d47b9b$66587ed0$33097c70$@net> Mike preOpenStack: if the environment = "mobile" then if mobileSensorAvailable("location") then mobileStartTrackingSensor "Location", false end if end if ----------- this is a hacked up version of what I use. It should be close. It compiles but not tested. I have to see if this needs some tweaks using the new Android permission model. function GetGpsCords -- returns -- Got fix: An array with ["latitude"] and ["longitude"] -- Bad lock: empty -- Permission issues: empty -- Not yet "retry" local tGPS if not (the environment = "mobile") then put 45.338960434184 into tGPS["latitude"] put -74.6840746841539 into tGPS["longitude"] return tGPS else put mobileSensorReading("location", true) into tGPS if tGPS["latitude"] is not empty and tGPS["longitude"] <> 0 then wait .25 seconds -- needed this in the past sometimes on first location fix put mobileSensorReading("location", true) into tGPS end if if tGPS["latitude"] is not empty and tGPS["longitude"] <> 0 then return tGPS else local tGPStext switch the platform case "iphone" -- see what the iOS permisstion status is put "Location Services" into tGPStext switch mobileLocationAuthorizationStatus() case "authorizedWhenInUse" case "authorizedAlways" answer tGPStext && "can't determine your location." & cr & \ "If your" && tGPStext && "was just enabled, please try again in a few minutes." \ with "OK" titled "Proximity Search" return empty break case "denied" case "restricted" answer "App is not authorized to access"&&tGPStext &"." & cr & \ "In Settings, please select" && quote & "While Using the App" "e && "in" && quote&"Location Services" & quote && "in this app's settings" \ with "OK" titled "Proximity Search" return empty break case "notDetermined" if mobileSensorAvailable("location") then mobileStartTrackingSensor "Location", false return "Retry" end if return empty break default answer tGPStext && "can't determine your location." & cr & \ "If your" && tGPStext && "was just enabled, please try again in a few minutes." \ with "OK" titled "Proximity Search" return empty end switch break default put "GPS" into tGPStext answer tGPStext && "can't determine your location." & cr & \ "If your" && tGPStext && "was just enabled, please try again in a few minutes." \ with "OK" titled "Proximity Search" return empty end switch end if end if end GetGpsCords 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 Mike for GDC via use-livecode Sent: Tuesday, November 13, 2018 3:06 PM To: use-livecode at lists.runrev.com Cc: Mike for GDC Subject: finding location on mobile device I am trying to find my current lat/long on my android device. I have played around with multiple options including "mobileCurrentLocation" and others. I have not been able to find an example of code that does it and works. What I want to do is push a button, have the lat/long displayed so as I can then "feed" it into a map widget for display. Does anyone have an example of code that does just that? Thanks. Mike _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From kaveh at rivervalleytechnologies.com Tue Nov 13 17:28:08 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Tue, 13 Nov 2018 22:28:08 +0000 Subject: Reading data from Google Sheets Message-ID: Can someone point me to how I can read data from Google Sheets into LiveCode? For now I just need to read, not write. Thanks. -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From gcanyon at gmail.com Tue Nov 13 17:29:23 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 13 Nov 2018 14:29:23 -0800 Subject: What is LC's internal text format? In-Reply-To: <7aa4ffcc-b51b-9352-b0d8-79ce3c80d404@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <4930be2db92f59477ac233f3ab44ecdb@livecode.com> <7aa4ffcc-b51b-9352-b0d8-79ce3c80d404@cogapp.com> Message-ID: I never left, I just went silent. But since I'm "back", I'm curious to know what the engine-types think of Bernd's solution for fixing the UTF-32 offsets code. It seems that when converting both the stringToFind and stringToSearch to UTF-32 and then searching the binary with byteOffset, you won't find "Reykjav?k" in "Reykjav?k er h?fu?borg" But if you first append "?" to each string, then do the textEncode, then strip the last 4 bytes, the match will work. That seems like strange voodoo to me. On Tue, Nov 13, 2018 at 12:54 PM Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> wrote: > For the avoidance of doubt, all my outrage is faux outrage. > Public life on both sides of the Atlantic (and around the world) has > completely exhausted capacity for real outrage. > > Come back Geoff! > > Ben > > On 13/11/2018 17:29, Mark Waddingham via use-livecode wrote: > > On 2018-11-13 18:21, Geoff Canyon via use-livecode wrote: > >> Nothing I said in this thread has anything to do with optimizing the > >> allOffsets routines; I only used examples from that discussion because > they > >> illustrate my puzzlement on the exact topic you (in general) raised: how > >> data types are handled by the engine. I'd generalize the responses, to > say > >> that it seems how the engine stores data and how it presents that data > are > >> not identical in all cases. > > > > The best way to think about it is that the engine stores data pretty > much in > > the form it is presented with it; however, what script sees of data is > in the > > form it requests. In particular, if data has been through some > operation, or > > mutated, then there is a good change it won't be in the same form it was > before. > > > > e.g. put tVar + 1 into tVar > > > > Here tVar could start off as a string, but would end up as a number by > virtue > > of the fact you've performed an arithmetic operation on it. > > > >> The above notwithstanding: sorry I outraged you; I'll exit this thread. > > > > Obviously I'm not Ben, but I *think* it was 'faux outrage' (well I hope > it was > > - hence my jocular comment about herding cats!) - so I don't think > there's a > > reason to exit... > > > > Warmest Regards, > > > > Mark. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From monte at appisle.net Tue Nov 13 18:44:38 2018 From: monte at appisle.net (Monte Goulding) Date: Wed, 14 Nov 2018 10:44:38 +1100 Subject: What is LC's internal text format? In-Reply-To: <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> Message-ID: <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> > On 14 Nov 2018, at 6:33 am, Ben Rubinstein via use-livecode wrote: > > That's really helpful - and in parts eye-opening - thanks Mark. > > I have a few follow-up questions. > > Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? Internally we have different types of values. So we have MCStringRef which is the thing which either contains a buffer of native chars or a buffer of UTF-16 chars. There are others. For example, MCNumberRef will either hold a 32 bit signed int or a double. These are returned by numeric operations where there?s no string representation of a number. So: put 1.0 into tNumber # tNumber holds an MCStringRef put 1.0 + 0 int0 tNumber # tNumber holds an MCNumberRef The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size & byte count. So: put textEncode(?foo?, ?UTF-8?) into tFoo # tFoo holds MCDataRef Then if we do something like: set the text of field ?foo? to tFoo tFoo is first converted to MCStringRef. As it?s an MCDataRef we just move the buffer over and say it?s a native encoded string. There?s no checking to see if it?s a UTF-8 string and decoding with that etc. Then the string is put into the field. If you remember that mergJSON issue you reported where mergJSON returns UTF-8 data and you were putting it into a field and it looked funny this is why. > > > CodepointOffset has signature 'integer codepointOffset(string)', so when you > > pass a binary string (data) value to it, the data value gets converted to a > > string by interpreting it as a sequence of bytes in the native encoding. > > OK - so one message I take are that in fact one should never invoke codepointOffset on a binary string. Should it actually throw an error in this case? No, as mentioned above values can move to and from different types according to the operations performed on them and this is largely opaque to the scripter. If you do a text operation on a binary string then there?s an implicit conversion to a native encoded string. You generally want to use codepoint in 7+ generally where previously you used char unless you know you are dealing with a binary string and then you use byte. > > By the same token, probably one should only use 'byte', 'byteOffset', 'byteToNum' etc with binary strings - would it be better, to avoid confusion, if char, offset, charToNum should refuse to operate on a binary string? That would not be backwards compatible. > >> e.g. In the case of &, it can either take two data arguments, or two >> string arguments. In this case, if both arguments are data, then the result >> will be data. Otherwise both arguments will be converted to strings, and a >> string returned. > The second message I take is that one needs to be very careful, if operating on UTF8 or other binary strings, to avoid 'contaminating' them e.g. by concatenating with a simple quoted string, as this may cause it to be silently converted to a non-binary string. (I presume that 'put "simple string" after/before pBinaryString' will cause a conversion in the same way as "&"? What about 'put "!" into char x of pBinaryString?) When concatenating if both left and right are binary strings (MCDataRef) then there?s no conversion of either to string however we do not currently have a way to declare a literal as a binary string (might be nice if we did!) so you would need to: put textEncode("simple string?, ?UTF-8?) after pBinaryString > > The engine can tell whether a string is 'native' or UTF16. When the engine is converting a binary string to 'string', does it always interpret the source as the native 8-bit encoding, or does it have some heuristic to decide whether it would be more plausible to interpret the source as UTF16? No it does not try to interpret. ICU has a charset detector that will give you a list of possible charsets along with a confidence. It could be implemented as a separate api: get detectedTextEncodings(, []) -> array of charset/confidence pairs get bestDetectedTextEncoding(, []) -> charset Feel free to feature request that! Cheers Monte From alanstenhouse at hotmail.com Tue Nov 13 18:53:04 2018 From: alanstenhouse at hotmail.com (Alan) Date: Tue, 13 Nov 2018 23:53:04 +0000 Subject: finding location on mobile device In-Reply-To: References: Message-ID: Note that you may not get a value immediately from your location services subsystem so if you find there's nothing there, then try starting up the sensor in openCard or openStack, wait some time and then use the button to get the current location. Hope that makes sense (and works for you). Or are you having problems feeding it in to the map widget? cheers Alan > On 14 Nov 2018, at 7:52 am, Devin Asay via wrote: > > > This has worked for me in the past, but I haven?t tried it in quite some time: > > mobileStartTrackingSensor "location", false > put mobileCurrentLocation() into tLocArray > mobileStopTrackingSensor "location" > put "lat: " & tLocArray["latitude"] & cr & "long: " & tLocArray["longitude"] into fld "report" > > Devin > >> On Nov 13, 2018, at 1:06 PM, Mike for GDC via use-livecode wrote: >> >> I am trying to find my current lat/long on my android device. I have played >> around with multiple options including "mobileCurrentLocation" and others. >> I have not been able to find an example of code that does it and works. >> What I want to do is push a button, have the lat/long displayed so as I can >> then "feed" it into a map widget for display. Does anyone have an example >> of code that does just that? Thanks. Mike From monte at appisle.net Tue Nov 13 19:39:36 2018 From: monte at appisle.net (Monte Goulding) Date: Wed, 14 Nov 2018 11:39:36 +1100 Subject: What is LC's internal text format? In-Reply-To: <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> Message-ID: > On 14 Nov 2018, at 10:44 am, Monte Goulding via use-livecode wrote: > > You generally want to use codepoint in 7+ generally where previously you used char unless you know you are dealing with a binary string and then you use byte. Sorry! I have written codepoints here when I was thinking codeunits! Use codeunits rather than codepoints as they are a fixed number of bytes (2). Codepoints may be 2 or 4 bytes so there is a cost in figuring out the number of codepoints or the exact byte codepoint x refers to. So for chunk expressions on unicode strings use `codeunit x to y`. Cheers Monte From dunbarx at aol.com Tue Nov 13 19:46:52 2018 From: dunbarx at aol.com (dunbarxx) Date: Tue, 13 Nov 2018 18:46:52 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: References: Message-ID: <1542156412527-0.post@n4.nabble.com> Hi. well the (very) short answer is that you can: put url "yourWebpageAddressHere" into temp What you get is the entirety of the html contents of a page. Others will tell both of us how to get the "visible" text, that is, the tab and return delimited data, buried in all those tags. Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From monte at appisle.net Tue Nov 13 19:49:27 2018 From: monte at appisle.net (Monte Goulding) Date: Wed, 14 Nov 2018 11:49:27 +1100 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> Message-ID: > On 14 Nov 2018, at 11:39 am, Monte Goulding via use-livecode wrote: > >> You generally want to use codepoint in 7+ generally where previously you used char unless you know you are dealing with a binary string and then you use byte. > > Sorry! I have written codepoints here when I was thinking codeunits! Use codeunits rather than codepoints as they are a fixed number of bytes (2). Codepoints may be 2 or 4 bytes so there is a cost in figuring out the number of codepoints or the exact byte codepoint x refers to. So for chunk expressions on unicode strings use `codeunit x to y`. Argh? sorry again? codeunits are a fixed number of bytes but that fixed number depends on whether the string is native encoded (1 byte) or UTF-16 (2 bytes)! And for completeness codeunit/codepoint is not equivalent to char. If you really need to count graphemes then you will need to use char. Cheers Monte From andre at andregarzia.com Tue Nov 13 21:12:04 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Wed, 14 Nov 2018 02:12:04 +0000 Subject: Reading data from Google Sheets In-Reply-To: <1542156412527-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> Message-ID: Kaveh, There is a much easier way. I've just posted about it since it can be of interest for others (there is a demo stack included): http://andregarzia.com/2018/11/reading-google-sheets-data-from-livecode.html Basically, there are special URLs for retrieving a Google Sheet as a CSV or a JSON. Much easier than parsing HTML or visible text. Cheers andre On 11/14/2018 12:46 AM, dunbarxx via use-livecode wrote: > Hi. > > well the (very) short answer is that you can: > > put url "yourWebpageAddressHere" into temp > > What you get is the entirety of the html contents of a page. Others will > tell both of us how to get the "visible" text, that is, the tab and return > delimited data, buried in all those tags. > > Craig Newman > > > > -- > Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From kaveh at rivervalleytechnologies.com Wed Nov 14 00:37:11 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Wed, 14 Nov 2018 05:37:11 +0000 Subject: Reading data from Google Sheets In-Reply-To: References: <1542156412527-0.post@n4.nabble.com> Message-ID: Thank you so much to both. And Andre, if you could write a blog post for every question I have it would help me a lot. ;-) Actually I think I had looked at the very helpful StackExchange page before for reading Google Sheets directly in R. I will try it and report back with any follow ups. Regards Kaveh On Wed, 14 Nov 2018 at 02:12, Andre Alves Garzia wrote: > Kaveh, > > There is a much easier way. I've just posted about it since it can be of > interest for others (there is a demo stack included): > > > http://andregarzia.com/2018/11/reading-google-sheets-data-from-livecode.html > > Basically, there are special URLs for retrieving a Google Sheet as a CSV > or a JSON. Much easier than parsing HTML or visible text. > > Cheers > > andre > > On 11/14/2018 12:46 AM, dunbarxx via use-livecode wrote: > > Hi. > > > > well the (very) short answer is that you can: > > > > put url "yourWebpageAddressHere" into temp > > > > What you get is the entirety of the html contents of a page. Others will > > tell both of us how to get the "visible" text, that is, the tab and > return > > delimited data, buried in all those tags. > > > > Craig Newman > > > > > > > > -- > > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From merakosp at gmail.com Wed Nov 14 02:17:09 2018 From: merakosp at gmail.com (panagiotis merakos) Date: Wed, 14 Nov 2018 09:17:09 +0200 Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <2e1b4a3d-a628-001c-e26d-1d52a93a17e9@sonic.net> <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Message-ID: OK, since the "build 32bit slice only" checkbox was not checked (Brahmanathaswami replied to me privately) then the next thing to check is that the version of Application Loader you used to upload the .ipa is the one included in the Xcode version you used to build the app. See this thread: http://forums.livecode.com/viewtopic.php?f=49&t=31656&p=172373&hilit=invalid+architecture#p172373 Best regards, Panos -- On Tue, Nov 13, 2018 at 10:36 PM panagiotis merakos wrote: > Hello Brahmanathaswami, > > Could it be the case that you have accidentally checked the "build 32bit > slice only" checkbox in the iOS standalone settings? > > Regards, > Panos > > On Tue, Nov 13, 2018, 22:24 Sannyasin Brahmanathaswami via use-livecode < > use-livecode at lists.runrev.com wrote: > >> Hit send button too soon >> > Bad news. (Does not change my little "guide") >> > >> > Build the app, used Jacqulines "Air Launch" get SivaSiva.ipa >> > >> > I already had new release, 1.3 on iTuneConnect. >> > >> > Booted Application Loader >> > Run the SivaSiva.ipa >> > >> > It passed all analyses; I got a message from Application Loader "Success >> > [snip other stuff] we will get a review shortly. >> > >> > That was saturday >> On Monday I get a message from Apple that there was "invalid >> architecture" in app, >> >> Plus the using Push Notification Warning and Beta Test entitlement >> missing those are not blockers for approval. But "invalid architecture" is >> >> No further info >> >> I have ticket in with Livecode support. >> >> >> 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 keith.clarke at me.com Wed Nov 14 07:40:40 2018 From: keith.clarke at me.com (Keith Clarke) Date: Wed, 14 Nov 2018 12:40:40 +0000 Subject: How to diagnose browser widget JS handlers failing silently? Message-ID: Folks, Is there any way to see the raw message that arrive in LC from javascripts in a browser widget? I?m getting silent failures on some JSHandlers and would like to determine whether it?s JS failing to send (unlikely as they?re variations on working themes) or LC rejecting the inbound message due to syntax, unescaped quotes, etc. Thanks Keith From MikeKerner at roadrunner.com Wed Nov 14 09:06:08 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 14 Nov 2018 09:06:08 -0500 Subject: Reading data from Google Sheets In-Reply-To: References: <1542156412527-0.post@n4.nabble.com> Message-ID: There's also the mergGoogle external. On Wed, Nov 14, 2018 at 12:37 AM Kaveh Bazargan via use-livecode < use-livecode at lists.runrev.com> wrote: > Thank you so much to both. And Andre, if you could write a blog post for > every question I have it would help me a lot. ;-) > > Actually I think I had looked at the very helpful StackExchange page before > for reading Google Sheets directly in R. I will try it and report back with > any follow ups. > > Regards > Kaveh > > On Wed, 14 Nov 2018 at 02:12, Andre Alves Garzia > wrote: > > > Kaveh, > > > > There is a much easier way. I've just posted about it since it can be of > > interest for others (there is a demo stack included): > > > > > > > http://andregarzia.com/2018/11/reading-google-sheets-data-from-livecode.html > > > > Basically, there are special URLs for retrieving a Google Sheet as a CSV > > or a JSON. Much easier than parsing HTML or visible text. > > > > Cheers > > > > andre > > > > On 11/14/2018 12:46 AM, dunbarxx via use-livecode wrote: > > > Hi. > > > > > > well the (very) short answer is that you can: > > > > > > put url "yourWebpageAddressHere" into temp > > > > > > What you get is the entirety of the html contents of a page. Others > will > > > tell both of us how to get the "visible" text, that is, the tab and > > return > > > delimited data, buried in all those tags. > > > > > > Craig Newman > > > > > > > > > > > > -- > > > Sent from: > > > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > > > > > _______________________________________________ > > > use-livecode mailing list > > > use-livecode at lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From MikeKerner at roadrunner.com Wed Nov 14 09:56:32 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 14 Nov 2018 09:56:32 -0500 Subject: NSURLErrorDomain error -999 Message-ID: Any idea what the error means, before I fire up the sniffer? -- 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 colinholgate at gmail.com Wed Nov 14 10:02:28 2018 From: colinholgate at gmail.com (Colin Holgate) Date: Wed, 14 Nov 2018 08:02:28 -0700 Subject: NSURLErrorDomain error -999 In-Reply-To: References: Message-ID: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> Mr Google suggested this page: https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os "This error may occur if an another request is made before the previous request of WebView is completed." From merakosp at gmail.com Wed Nov 14 10:22:53 2018 From: merakosp at gmail.com (panagiotis merakos) Date: Wed, 14 Nov 2018 17:22:53 +0200 Subject: NSURLErrorDomain error -999 In-Reply-To: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> References: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> Message-ID: Do you see this on the (mobileControlCreate) iOS browser? I think you can just ignore it. https://quality.livecode.com/show_bug.cgi?id=12575 Best, Panos -- On Wed, Nov 14, 2018 at 5:02 PM Colin Holgate via use-livecode < use-livecode at lists.runrev.com> wrote: > Mr Google suggested this page: > > > https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os > < > https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os > > > > "This error may occur if an another request is made before the previous > request of WebView is completed." > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Nov 14 11:20:26 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 14 Nov 2018 11:20:26 -0500 Subject: NSURLErrorDomain error -999 In-Reply-To: References: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> Message-ID: mac not ios On Wed, Nov 14, 2018 at 10:23 AM panagiotis merakos via use-livecode < use-livecode at lists.runrev.com> wrote: > Do you see this on the (mobileControlCreate) iOS browser? > > I think you can just ignore it. > > https://quality.livecode.com/show_bug.cgi?id=12575 > > Best, > Panos > -- > > On Wed, Nov 14, 2018 at 5:02 PM Colin Holgate via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Mr Google suggested this page: > > > > > > > https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os > > < > > > https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os > > > > > > > "This error may occur if an another request is made before the previous > > request of WebView is completed." > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From MikeKerner at roadrunner.com Wed Nov 14 11:22:19 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 14 Nov 2018 11:22:19 -0500 Subject: NSURLErrorDomain error -999 In-Reply-To: References: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> Message-ID: however since it's macos i'm sure it's similar to ios. I'll stick a try/catch in. It's weird because the file that it's complaining about isn't even one that's being loaded. On Wed, Nov 14, 2018 at 11:20 AM Mike Kerner wrote: > mac not ios > > On Wed, Nov 14, 2018 at 10:23 AM panagiotis merakos via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Do you see this on the (mobileControlCreate) iOS browser? >> >> I think you can just ignore it. >> >> https://quality.livecode.com/show_bug.cgi?id=12575 >> >> Best, >> Panos >> -- >> >> On Wed, Nov 14, 2018 at 5:02 PM Colin Holgate via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >> > Mr Google suggested this page: >> > >> > >> > >> https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os >> > < >> > >> https://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error-999-in-iphone-3-0-os >> > > >> > >> > "This error may occur if an another request is made before the previous >> > request of WebView is completed." >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode at lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> > subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> > >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > -- 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 hh at hyperhh.de Wed Nov 14 11:34:06 2018 From: hh at hyperhh.de (hh) Date: Wed, 14 Nov 2018 17:34:06 +0100 Subject: How to diagnose browser widget JS handlers failing silently? Message-ID: You can use the params to see what arrives. Most probably you didn't convert the parameters of the handler in the JavaScript to arrays or strings. LiveCode expects strings or arrays as params of javaScriptHandlers. So "combine" on the LC side and/or ".toString()" on the JS side are your friends. Example test: -- script of the widget (or above it in the message path) on JS u,v,w -- a javaScriptHandler of widget "browser" if u is an array then combine u with ":" put u & cr & v & cr & w end JS on mouseUp do "var x=[1,2,3], y='hello'; " & \ "liveCode.JS(x, y, x.toString())" in widget "browser" end mouseUp From colinholgate at gmail.com Wed Nov 14 11:48:00 2018 From: colinholgate at gmail.com (Colin Holgate) Date: Wed, 14 Nov 2018 09:48:00 -0700 Subject: NSURLErrorDomain error -999 In-Reply-To: References: <657302C8-E909-4ADF-8CA1-4DCC9E2C3A4A@gmail.com> Message-ID: I took the iOS part of the problem as being incidental, even if it was where the problem showed up. Are you doing something that affects a web view, and then doing something else before that first change has happened? From mike at golddogcoffee.com Wed Nov 14 12:12:39 2018 From: mike at golddogcoffee.com (Mike for GDC) Date: Wed, 14 Nov 2018 10:12:39 -0700 Subject: map widget Message-ID: <003501d47c3d$3ff3d260$bfdb7720$@golddogcoffee.com> Does anyone have an example of using the "map widget"? I got my current location of lat/long and now want to display it on a map. I have set up my api key but have not seen any example of how to implement the map.. what I really want to do is to show my location and also any nearby restaurants, gas stations nearby. I have seen some livecode examples of this but not the code of how to accomplish it. Any help would be much appreciated. Thanks. From hh at hyperhh.de Wed Nov 14 12:58:33 2018 From: hh at hyperhh.de (hh) Date: Wed, 14 Nov 2018 18:58:33 +0100 Subject: map widget Message-ID: <66D7697E-9F0F-4337-BD14-2637F79ECA2D@hyperhh.de> [Dictionary/map] set the region of widget "Map" to "55.9533,-3.1883, 10, 10" The region of a map widget is a tuple describing the map region currently displayed; the first two items are the centerCoordinates and the second two the span. set the centerCoordinates of widget "Map" to "55.9533,-3.1883" first item is latitude, second item is longitude From curt at sonasoftware.com Wed Nov 14 14:27:43 2018 From: curt at sonasoftware.com (Curt Ford) Date: Wed, 14 Nov 2018 11:27:43 -0800 Subject: updating to 64bit for Macs: standalones vs stacks opened by a standalone Message-ID: <5BEC772F.7000909@sonasoftware.com> A few years ago I did a project for a client that involved a standalone that was basically just a menu of modules. When you clicked on an item, it downloaded the module, which was a Livecode stack (not standalone); after downloading, clicking on an item in the menu app would open the downloaded module. I'm now updating Mac versions of other projects for 64bit compatibility, and I'm wondering how to approach this one. I'm assuming the standalone menu app will need to be repackaged with LC 9; is the same true of the downloaded stacks (which were done in LC 7)? Or is the engine in the standalone the only thing that needs to be 64bit? Curt -- Sent from Postbox From lists at mangomultimedia.com Wed Nov 14 16:30:59 2018 From: lists at mangomultimedia.com (Trevor DeVore) Date: Wed, 14 Nov 2018 13:30:59 -0800 Subject: NSURLErrorDomain error -999 In-Reply-To: References: Message-ID: On Wed, Nov 14, 2018 at 8:57 AM Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > Any idea what the error means, before I fire up the sniffer? > I ran into that same error when implementing Single Sign-on in my app (which has a lot of redirects). I found the same article that Colin pointed to. I tried to troubleshoot it for a while but eventually I just implemented the following workaround. In browserNavigateFailed I have this code: ``` if pError contains "NSURLErrorDomain error -999" then browserNavigateComplete pURL else ... end if ``` -- Trevor DeVore ScreenSteps www.screensteps.com From hlowe at me.com Wed Nov 14 17:03:48 2018 From: hlowe at me.com (hlowe) Date: Wed, 14 Nov 2018 16:03:48 -0600 (CST) Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> Message-ID: <1542233028451-0.post@n4.nabble.com> @BR, Sorry to hear about your problems with the iOS App Store. We had an iOS app update approved this morning by the App Store using: LC 9.0.2 - RC1 (Indy) Mac OS 10.14.1 Xcode 10.0 I did find this link, which may be helpful: https://stackoverflow.com/questions/52427687/invalid-architectures-xcode-10 Apparently Xcode 10.x doesn't support deployment targets lower than 8.0. We selected 10.3 or later for the update. Hope this helps. Henry -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From dunbarx at aol.com Wed Nov 14 17:08:05 2018 From: dunbarx at aol.com (dunbarxx) Date: Wed, 14 Nov 2018 16:08:05 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: References: <1542156412527-0.post@n4.nabble.com> Message-ID: <1542233285348-0.post@n4.nabble.com> All. I tried the sample stack on a simple google sheet, and it returns a universe of tags, not the actual contents of the sheet. What am I doing wrong? I only changed the target url to point to the sheet I created. Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From andre at andregarzia.com Wed Nov 14 17:15:12 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Wed, 14 Nov 2018 22:15:12 +0000 Subject: Reading data from Google Sheets In-Reply-To: <1542233285348-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> Message-ID: <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> Craig, Check the sharing options on the spreadsheet. Remember LiveCode is not logged as your user, so it can only access spreadsheets that are viewable by anyone with the link. In doubt, pick the link you used, open a private window on your favorite browser and check to see if you can view it as an unlogged user. best On 11/14/2018 10:08 PM, dunbarxx via use-livecode wrote: > All. > > I tried the sample stack on a simple google sheet, and it returns a universe > of tags, not the actual contents of the sheet. > > What am I doing wrong? I only changed the target url to point to the sheet I > created. > > Craig Newman > > > > -- > Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Wed Nov 14 18:29:17 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Wed, 14 Nov 2018 23:29:17 +0000 Subject: Reading data from Google Sheets In-Reply-To: <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> Message-ID: I?m a big fan of Monte?s mergGoogle for reading sheets. With the exception of an exceptional failure in service midway through this year due to an oAuth issue (now fixed) it made reading and writing sheet data remarkably easy. I?d thoroughly recommend adopting this if you are able. Sean Cole Pi Digital > On 14 Nov 2018, at 22:15, Andre Alves Garzia via use-livecode wrote: > > Craig, > > Check the sharing options on the spreadsheet. Remember LiveCode is not logged as your user, so it can only access spreadsheets that are viewable by anyone with the link. In doubt, pick the link you used, open a private window on your favorite browser and check to see if you can view it as an unlogged user. > > best > >> On 11/14/2018 10:08 PM, dunbarxx via use-livecode wrote: >> All. >> >> I tried the sample stack on a simple google sheet, and it returns a universe >> of tags, not the actual contents of the sheet. >> >> What am I doing wrong? I only changed the target url to point to the sheet I >> created. >> >> Craig Newman >> >> >> >> -- >> Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 dunbarx at aol.com Wed Nov 14 19:29:20 2018 From: dunbarx at aol.com (dunbarxx) Date: Wed, 14 Nov 2018 18:29:20 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> Message-ID: <1542241760102-0.post@n4.nabble.com> Hi. Thanks for taking the time with me. I did indeed paste the url into a separate private window in Safari, and it asked me to sign in. I did, and the sheet popped up. A standard window goes directly, without issue. This is not a forum for teaching me how to use google sheets. But do you know how I change the sharing properties? Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From colinholgate at gmail.com Wed Nov 14 20:14:58 2018 From: colinholgate at gmail.com (Colin Holgate) Date: Wed, 14 Nov 2018 18:14:58 -0700 Subject: Reading data from Google Sheets In-Reply-To: <1542241760102-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> Message-ID: On a Google Sheets page there is a Share button in the upper right. If it has a padlock it hasn?t been set up for sharing. Once you click on it you can set various options, including one where anyone with the link can view without having to sign in. From rdimola at evergreeninfo.net Wed Nov 14 21:22:48 2018 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Wed, 14 Nov 2018 21:22:48 -0500 Subject: NSURLErrorDomain error -999 In-Reply-To: References: Message-ID: <006c01d47c8a$1d011bd0$57035370$@net> Yes, This can be safely ignored. I reported this in 2014 QCC 12575. I did some research at the time and found a code snippet in objective C that shows it to be the only error that can be safely ignored. The code is documented in the QCC report. 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 Trevor DeVore via use-livecode Sent: Wednesday, November 14, 2018 4:31 PM To: How to use LiveCode Cc: Trevor DeVore Subject: Re: NSURLErrorDomain error -999 On Wed, Nov 14, 2018 at 8:57 AM Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > Any idea what the error means, before I fire up the sniffer? > I ran into that same error when implementing Single Sign-on in my app (which has a lot of redirects). I found the same article that Colin pointed to. I tried to troubleshoot it for a while but eventually I just implemented the following workaround. In browserNavigateFailed I have this code: ``` if pError contains "NSURLErrorDomain error -999" then browserNavigateComplete pURL else ... end if ``` -- Trevor DeVore ScreenSteps www.screensteps.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 Wed Nov 14 21:41:18 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Thu, 15 Nov 2018 02:41:18 +0000 Subject: [ANN] Release 9.0.2 RC-1 References: <08680D6A-1B63-455C-B45D-F64F7C326CDD@livecode.org> <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> <1542233028451-0.post@n4.nabble.com> Message-ID: Ha! SA Builder had a 6.1.target, if you click the popup menu it starts at 8.0 + as the only option. Perhaps we need SA Builder not have a "sticky" old build target that is below range. I uploaded again with Application Loader; all went well. Do you see the latest build in iTune submissions form right away? Or does it take time, or is it only after review? Well, we will know tomorrow. It past hour on the mainland Thanks for this tip, checking the target was "one easy fix." BR On 11/14/18 12:04 PM, hlowe via use-livecode wrote: > Apparently Xcode 10.x doesn't support deployment targets lower than 8.0. We > selected 10.3 or later for the update. > > Hope this helps. > > Henry From hlowe at me.com Wed Nov 14 22:01:39 2018 From: hlowe at me.com (hlowe) Date: Wed, 14 Nov 2018 21:01:39 -0600 (CST) Subject: [ANN] Release 9.0.2 RC-1 In-Reply-To: References: <1541793883966-0.post@n4.nabble.com> <3D3A505B-DB99-4748-8B61-0E36DD7C65F7@pidigital.co.uk> <1542233028451-0.post@n4.nabble.com> Message-ID: <1542250899385-0.post@n4.nabble.com> BR, After you upload the app for review using the Xcode Application Loader tool it may take a while for the app to to available in the submission form. If I recall correctly, a small plus sign ('add' icon) appears at the top left of the Build section. Clicking that icon allows you to add the uploaded app to the form. Hope your app gets through this time. Henry -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From dunbarx at aol.com Thu Nov 15 09:08:41 2018 From: dunbarx at aol.com (dunbarxx) Date: Thu, 15 Nov 2018 08:08:41 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> Message-ID: <1542290921252-0.post@n4.nabble.com> Thanks, Colin. I found my way through that setting. Now I do indeed get the data in the sheet, but followed by a massive array of tags. This would not be an issue, except that the very start of that tag dataSet is appended the the text in the last cell of the actual sheet data. In other words, if the bottomMostCell in my data is a "W", then the tab delimited text that comes over in that cell reads as: W"><" is both reliable and unique in what is appended to actual the sheet information, and I could set the itemDel to that. But I suspect there is a better way. Thanks again... Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From theaford at btinternet.com Thu Nov 15 10:03:07 2018 From: theaford at btinternet.com (Terence Heaford) Date: Thu, 15 Nov 2018 15:03:07 +0000 Subject: Stack Height/Menubar Message-ID: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> This post is regard the use of Livecode on MacOS(LC 9.0.1) When you set the height of this stack to 800 (for example) The height of this card in the property inspector is 822 and is also returned as 822 in script. This seems to be as a result of the menubar position on none mac systems. I have "set as stack menubar" checked in Menu Builder When displayed on screen the card displays with a height of 822 not 800 even though the menubar is not showing in the window. If you then position say a button for example within the lower 22 of the card remnants of the button can be seen on other cards when you go to another card. How is this supposed to be dealt with in Livecode. It all seems rather confusing to me. It is usual on a Mac to have a 20 border to the edge of windows etc. As stated above if you do this then parts of the buttons for some reason show on other cards (22 - 20). Livecode should simply identify you are on a Mac and the 22 for the menubar should be dealt with in Livecode code rather than leaving it to the scripter to sort out. On a Mac if you set the stack height to 800 then the card should default to 800. Why can?t the menubar be stored by some other means? End of part rant. Thanks Terry From theaford at btinternet.com Thu Nov 15 10:20:19 2018 From: theaford at btinternet.com (Terence Heaford) Date: Thu, 15 Nov 2018 15:20:19 +0000 Subject: Stack Height/Menubar In-Reply-To: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> Message-ID: This all basically means you can?t place anything in the bottom 22 of the card. Terry > On 15 Nov 2018, at 15:03, Terence Heaford via use-livecode wrote: > > This post is regard the use of Livecode on MacOS(LC 9.0.1) > > When you set the height of this stack to 800 (for example) > > The height of this card in the property inspector is 822 and is also returned as 822 in script. > > This seems to be as a result of the menubar position on none mac systems. > > I have "set as stack menubar" checked in Menu Builder > > When displayed on screen the card displays with a height of 822 not 800 even though the menubar is not showing in the window. > > If you then position say a button for example within the lower 22 of the card remnants of the button can be seen on other cards when you go to another card. > > How is this supposed to be dealt with in Livecode. > > It all seems rather confusing to me. > > It is usual on a Mac to have a 20 border to the edge of windows etc. As stated above if you do this then parts of the buttons > for some reason show on other cards (22 - 20). > > Livecode should simply identify you are on a Mac and the 22 for the menubar should be dealt with in Livecode code rather than leaving it > to the scripter to sort out. > > On a Mac if you set the stack height to 800 then the card should default to 800. > > Why can?t the menubar be stored by some other means? > > End of part rant. > > > > > Thanks > > Terry > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Nov 15 10:37:27 2018 From: paul at researchware.com (Paul Dupuis) Date: Thu, 15 Nov 2018 10:37:27 -0500 Subject: Stack Height/Menubar In-Reply-To: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> Message-ID: <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> Look at the 'effective' keyword in the dictionary The effective rect of a stack includes the borders and titlebar. The rect of a stack is just the interior size available for card and controls.. The difference gives you the border sizes and titlebar sizes. You can also use 'effective' with ofther stack position/coordinate properties (I think) like top,left, right, bottom, height, width. On 11/15/2018 10:03 AM, Terence Heaford via use-livecode wrote: > This post is regard the use of Livecode on MacOS(LC 9.0.1) > > When you set the height of this stack to 800 (for example) > > The height of this card in the property inspector is 822 and is also returned as 822 in script. > > This seems to be as a result of the menubar position on none mac systems. > > I have "set as stack menubar" checked in Menu Builder > > When displayed on screen the card displays with a height of 822 not 800 even though the menubar is not showing in the window. > > If you then position say a button for example within the lower 22 of the card remnants of the button can be seen on other cards when you go to another card. > > How is this supposed to be dealt with in Livecode. > > It all seems rather confusing to me. > > It is usual on a Mac to have a 20 border to the edge of windows etc. As stated above if you do this then parts of the buttons > for some reason show on other cards (22 - 20). > > Livecode should simply identify you are on a Mac and the 22 for the menubar should be dealt with in Livecode code rather than leaving it > to the scripter to sort out. > > On a Mac if you set the stack height to 800 then the card should default to 800. > > Why can?t the menubar be stored by some other means? > > End of part rant. > > > > > Thanks > > Terry > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From theaford at btinternet.com Thu Nov 15 11:26:19 2018 From: theaford at btinternet.com (Terence Heaford) Date: Thu, 15 Nov 2018 16:26:19 +0000 Subject: Stack Height/Menubar In-Reply-To: <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> Message-ID: <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> This is fair enough but you still cannot put anything in the bottom 22 of a visible card on screen. Try dragging an object to the card and it will not allow you to place it in the bottom 22 of the card (LC 9.0.1) Thanks Terry > On 15 Nov 2018, at 15:37, Paul Dupuis via use-livecode wrote: > > Look at the 'effective' keyword in the dictionary > > The effective rect of a stack includes the borders and titlebar. The > rect of a stack is just the interior size available for card and > controls.. The difference gives you the border sizes and titlebar sizes. > You can also use 'effective' with ofther stack position/coordinate > properties (I think) like top,left, right, bottom, height, width. > > > > On 11/15/2018 10:03 AM, Terence Heaford via use-livecode wrote: >> This post is regard the use of Livecode on MacOS(LC 9.0.1) >> >> When you set the height of this stack to 800 (for example) >> >> The height of this card in the property inspector is 822 and is also returned as 822 in script. >> >> This seems to be as a result of the menubar position on none mac systems. >> >> I have "set as stack menubar" checked in Menu Builder >> >> When displayed on screen the card displays with a height of 822 not 800 even though the menubar is not showing in the window. >> >> If you then position say a button for example within the lower 22 of the card remnants of the button can be seen on other cards when you go to another card. >> >> How is this supposed to be dealt with in Livecode. >> >> It all seems rather confusing to me. >> >> It is usual on a Mac to have a 20 border to the edge of windows etc. As stated above if you do this then parts of the buttons >> for some reason show on other cards (22 - 20). >> >> Livecode should simply identify you are on a Mac and the 22 for the menubar should be dealt with in Livecode code rather than leaving it >> to the scripter to sort out. >> >> On a Mac if you set the stack height to 800 then the card should default to 800. >> >> Why can?t the menubar be stored by some other means? >> >> End of part rant. >> >> >> >> >> Thanks >> >> Terry >> >> >> >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From klaus at major-k.de Thu Nov 15 11:32:12 2018 From: klaus at major-k.de (Klaus major-k) Date: Thu, 15 Nov 2018 17:32:12 +0100 Subject: Stack Height/Menubar In-Reply-To: <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> Message-ID: <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> Hi Terry, > Am 15.11.2018 um 17:26 schrieb Terence Heaford via use-livecode : > > This is fair enough but you still cannot put anything in the bottom 22 of a visible card on screen. > Try dragging an object to the card and it will not allow you to place it in the bottom 22 of the card (LC 9.0.1) I ususally store my "menubar group" in a substack that will never be opened. Then I set "the defaultmenubar" of my stack to the name of that group and am a happy camper, no more missing 22 pixels etc. on the Mac. > Thanks > > Terry > >> On 15 Nov 2018, at 15:37, Paul Dupuis via use-livecode wrote: >> Look at the 'effective' keyword in the dictionary >> The effective rect of a stack includes the borders and titlebar. The >>> ... >>> On a Mac if you set the stack height to 800 then the card should default to 800. >>> Why can?t the menubar be stored by some other means? It can, see above... Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From brian at milby7.com Thu Nov 15 11:33:36 2018 From: brian at milby7.com (Brian Milby) Date: Thu, 15 Nov 2018 10:33:36 -0600 Subject: Stack Height/Menubar In-Reply-To: <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> Message-ID: Did you try turning "Set as stack menu bar" off and back on? When I do that, the stack size changes. Or you could do what Klaus mentioned. On Thu, Nov 15, 2018 at 10:26 AM Terence Heaford via use-livecode < use-livecode at lists.runrev.com> wrote: > This is fair enough but you still cannot put anything in the bottom 22 of > a visible card on screen. > > Try dragging an object to the card and it will not allow you to place it > in the bottom 22 of the card (LC 9.0.1) > > Thanks > > Terry > > > > On 15 Nov 2018, at 15:37, Paul Dupuis via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Look at the 'effective' keyword in the dictionary > > > > The effective rect of a stack includes the borders and titlebar. The > > rect of a stack is just the interior size available for card and > > controls.. The difference gives you the border sizes and titlebar sizes. > > You can also use 'effective' with ofther stack position/coordinate > > properties (I think) like top,left, right, bottom, height, width. > > > > > > > > On 11/15/2018 10:03 AM, Terence Heaford via use-livecode wrote: > >> This post is regard the use of Livecode on MacOS(LC 9.0.1) > >> > >> When you set the height of this stack to 800 (for example) > >> > >> The height of this card in the property inspector is 822 and is also > returned as 822 in script. > >> > >> This seems to be as a result of the menubar position on none mac > systems. > >> > >> I have "set as stack menubar" checked in Menu Builder > >> > >> When displayed on screen the card displays with a height of 822 not 800 > even though the menubar is not showing in the window. > >> > >> If you then position say a button for example within the lower 22 of > the card remnants of the button can be seen on other cards when you go to > another card. > >> > >> How is this supposed to be dealt with in Livecode. > >> > >> It all seems rather confusing to me. > >> > >> It is usual on a Mac to have a 20 border to the edge of windows etc. As > stated above if you do this then parts of the buttons > >> for some reason show on other cards (22 - 20). > >> > >> Livecode should simply identify you are on a Mac and the 22 for the > menubar should be dealt with in Livecode code rather than leaving it > >> to the scripter to sort out. > >> > >> On a Mac if you set the stack height to 800 then the card should > default to 800. > >> > >> Why can?t the menubar be stored by some other means? > >> > >> End of part rant. > >> > >> > >> > >> > >> Thanks > >> > >> Terry > >> > >> > >> > >> > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode 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 Nov 15 11:35:19 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Thu, 15 Nov 2018 10:35:19 -0600 Subject: Stack Height/Menubar In-Reply-To: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> Message-ID: <167183a1558.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> I haven't needed to create menubars for some time, but this is how it has always worked in the past: LiveCode menus are objects that take up room at the top of a card. On Windows, this is standard; menus appear at the top of each window. When the same stack is run on a Mac, LiveCode pushes the top portion of the card above the top border of the window, out of view. The body of the window shortens to accomodate only that portion of the card that contains the actual stack content. The card is still technically the same height, but the part of the height that contains the menu group is hidden from view. LiveCode handles this window resizing transparently between platforms. When the menu scrolls out of view, the actual content area will be, in this case, 800 pixels high. The other 22 pixels are above the top of the viewable area. You do not need to set the menu group invisible because it won't be in view. While you are working it's convenient to not set the group as the system menu. That way you can see where placement of the controls should go relative to the area that will disappear later. When layout is done, set it back to be used as the stack menubar so it will behave as you want. If the menu group is not placed on every card, those cards will not scroll and the full height of the card is displayed. If you place the menu group on every card so the size remains consistent everywhere, the redraw problem at the bottom of the card shouldn't happen. If you have already placed controls under the menubar area, you'll need to move them down. Menubar behavior on Mac is a little quirky but it does allow you to write once and run on any OS, which is what LC is all about. As long as you don't make the menu group invisible, the stack will look as expected everywhere. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 15, 2018 9:05:09 AM Terence Heaford via use-livecode wrote: > This post is regard the use of Livecode on MacOS(LC 9.0.1) > > > When you set the height of this stack to 800 (for example) > > > The height of this card in the property inspector is 822 and is also > returned as 822 in script. > > > This seems to be as a result of the menubar position on none mac systems. > > > I have "set as stack menubar" checked in Menu Builder > > > When displayed on screen the card displays with a height of 822 not 800 > even though the menubar is not showing in the window. > > > If you then position say a button for example within the lower 22 of the > card remnants of the button can be seen on other cards when you go to > another card. > > > How is this supposed to be dealt with in Livecode. > > > It all seems rather confusing to me. > > > It is usual on a Mac to have a 20 border to the edge of windows etc. As > stated above if you do this then parts of the buttons > for some reason show on other cards (22 - 20). > > > Livecode should simply identify you are on a Mac and the 22 for the menubar > should be dealt with in Livecode code rather than leaving it > to the scripter to sort out. > > > On a Mac if you set the stack height to 800 then the card should default to > 800. > > > Why can?t the menubar be stored by some other means? > > > End of part rant. > > > > > > > > > Thanks > > > Terry > > > > > > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Nov 15 11:36:45 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 15 Nov 2018 16:36:45 +0000 Subject: Stack Height/Menubar In-Reply-To: <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> Message-ID: <5859293B-3D19-4F0E-97BB-BC46973CCD37@iotecdigital.com> I do not have that problem. I have objects well into that space. I have a status bar for displaying progress messages 9 pixels from the bottom of each card. That being said, I do set the size of my windows by script when they open, because I had an issue with it between Windows and Mac. Windows natively has a large border which shifts everything down and partially obscures my status bar. Bob S > On Nov 15, 2018, at 08:26 , Terence Heaford via use-livecode wrote: > > This is fair enough but you still cannot put anything in the bottom 22 of a visible card on screen. > > Try dragging an object to the card and it will not allow you to place it in the bottom 22 of the card (LC 9.0.1) > > Thanks > > Terry From bobsneidar at iotecdigital.com Thu Nov 15 11:38:42 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 15 Nov 2018 16:38:42 +0000 Subject: Stack Height/Menubar In-Reply-To: <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> Message-ID: <6A298E06-674C-4B97-ACB3-8C43730F9BB0@iotecdigital.com> I'm going to have to give that a try. I have standard menus, with additional menus depending on the module. I already have a script where I can add and remove menus on the fly and reposition all the buttons, so it wouldn't be difficult to set the menubar the way you are doing it, then add the custom menus on the fly! Bob S > On Nov 15, 2018, at 08:32 , Klaus major-k via use-livecode wrote: > > Hi Terry, > >> Am 15.11.2018 um 17:26 schrieb Terence Heaford via use-livecode : >> >> This is fair enough but you still cannot put anything in the bottom 22 of a visible card on screen. >> Try dragging an object to the card and it will not allow you to place it in the bottom 22 of the card (LC 9.0.1) > > I ususally store my "menubar group" in a substack that will never be opened. > Then I set "the defaultmenubar" of my stack to the name of that group and am a happy camper, > no more missing 22 pixels etc. on the Mac. From kaveh at rivervalleytechnologies.com Thu Nov 15 12:41:14 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Thu, 15 Nov 2018 17:41:14 +0000 Subject: regex problem Message-ID: The following line returns true as expected: *put* matchtext("abc", "^[ ]*") (zero or more spaces at start of string) But the following: *put* replacetext("abc", "^[ ]*", "~") returns "abc", not "~abc" as expected. Any ideas? -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From dunbarx at aol.com Thu Nov 15 12:51:08 2018 From: dunbarx at aol.com (dunbarxx) Date: Thu, 15 Nov 2018 11:51:08 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: <1542290921252-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> <1542290921252-0.post@n4.nabble.com> Message-ID: <1542304268433-0.post@n4.nabble.com> Well, heck. Even I know that the string "><" is ubiquitous in html tag sets. Wasn't thinking. So for now, I have to include an arcane char at the end of my sheet file, and lose it in LC. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From dunbarx at aol.com Thu Nov 15 13:04:42 2018 From: dunbarx at aol.com (dunbarxx) Date: Thu, 15 Nov 2018 12:04:42 -0600 (CST) Subject: Reading data from Google Sheets In-Reply-To: <1542304268433-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> <1542290921252-0.post@n4.nabble.com> <1542304268433-0.post@n4.nabble.com> Message-ID: <1542305082729-0.post@n4.nabble.com> No good. Somewhere the last char of the text of a google sheet is inserted three times in the body of the html tag suite. So adding a delimiting char of any kind is futile. I still think I am overthinking this. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From harrison at all-auctions.com Thu Nov 15 13:27:19 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Thu, 15 Nov 2018 13:27:19 -0500 Subject: Stack Height/Menubar In-Reply-To: <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> Message-ID: Hi Klaus, This sounds like it could be a good solution. Unfortunately after trying to do it several ways I can?t seem to get it to work. Could you be a little more specific about what exactly you are doing? Are you setting the defaultMenuBar with a script, or are you just checking the button in the "Set as stack Menubar? in the Menu Builder? I also noticed some weirdness with the Menu Builder when I put in a ?Preferences? item in the first menu column. It will show up fine in the stack but when I check the ?Preview? button it disappears from the Menu as though it was never there! Suggestions? Thanks, Rick > On Nov 15, 2018, at 11:32 AM, Klaus major-k via use-livecode wrote: > > I usually store my "menubar group" in a substack that will never be opened. > Then I set "the defaultmenubar" of my stack to the name of that group and am a happy camper, > no more missing 22 pixels etc. on the Mac. > ... > Best > > Klaus > > -- > Klaus Major From klaus at major-k.de Thu Nov 15 13:43:18 2018 From: klaus at major-k.de (Klaus major-k) Date: Thu, 15 Nov 2018 19:43:18 +0100 Subject: Stack Height/Menubar In-Reply-To: References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> Message-ID: <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> Hi Rick, > Am 15.11.2018 um 19:27 schrieb Rick Harrison via use-livecode : > > Hi Klaus, > > This sounds like it could be a good solution. > Unfortunately after trying to do it several ways > I can?t seem to get it to work. > > Could you be a little more specific about what > exactly you are doing? Are you setting the > defaultMenuBar with a script, or are you just checking > the button in the "Set as stack Menubar? in the Menu Builder? I set "the defaultmenubar" by script "on openstack". > I also noticed some weirdness with the Menu Builder I never used it. > when I put in a ?Preferences? item in the first menu column. > It will show up fine in the stack but when I check the > ?Preview? button it disappears from the Menu as though > it was never there! Menubars on macOS have some caveats: 1. Last menuitem in your HELP menu should read: About XXX(Your app)... and will go as first menuitem into the application menu 2. Last menuitem of your "EDIT" menu (-> Preferences) will also go into the application menu -> Settings... 3. Last menu of your "FILE" menu (-> Quit) will also go into the application menu. > Suggestions? > > Thanks, > > Rick Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From MikeKerner at roadrunner.com Thu Nov 15 14:34:32 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 15 Nov 2018 14:34:32 -0500 Subject: directory tree view Message-ID: I fought through the various tree view issues and got it to build a directory list that's kind-of functional. Please break and report issues on the repo. https://github.com/macMikey/directoryTreeView -- 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 andre at andregarzia.com Thu Nov 15 14:44:47 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Thu, 15 Nov 2018 19:44:47 +0000 Subject: [ANN] LiveCode Advanced Application Architecture book available Message-ID: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> Hi Friends, I've just released a new LiveCode book in the wild. It is called "LiveCode Advanced Application Architecture" and it deals with Best Practices from our community and the MVC pattern. With the techniques contained in it you will build applications that are easier to maintain and adapt leading to a more fun and profitable future. The book is offered here for GBP 15 and is comes in a zip file containing the book in PDF, Mobi and ePub formats without DRM and the source code, you can buy it by clicking here: https://sowl.co/cqnKW BUT WAIIIIITTTT!!!! I've made a delicious bundle for you! I am offering a bundle of: ? * DB Lib: The most user friendly database library for LiveCode. ? * The book: The newest LiveCode book. ? * Network Tracer: A handy utility to help you debug your standalones. ? * AAG | Tools: A collection of little plugins for the IDE For GBP 100, which is a heavy discount, basically the book is free and all the rest is 30% discounted. But there is moooooore! The first 50 people to get this bundle will be able to schedule a one-on-one call with me to help them out with LiveCode related issues, which is something I don't usually offer. You can get this bundle at: https://sowl.co/BAAZl Don't forget to check all things LiveCode at my home page: https://andregarzia.com/livecode I hope you folks like this bundle and book. My plans is to schedule the one-on-one calls between November 2018 and March 2019, first come, first served. Cheers andre From tom at makeshyft.com Thu Nov 15 14:58:15 2018 From: tom at makeshyft.com (Tom Glod) Date: Thu, 15 Nov 2018 14:58:15 -0500 Subject: [ANN] LiveCode Advanced Application Architecture book available In-Reply-To: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> References: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> Message-ID: Andre, well done!......I want to buy the book with paypal....... pm me your address: tom at makeshyft.com. Thanks On Thu, Nov 15, 2018 at 2:45 PM Andre Alves Garzia via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Friends, > > I've just released a new LiveCode book in the wild. It is called > "LiveCode Advanced Application Architecture" and it deals with Best > Practices from our community and the MVC pattern. > > With the techniques contained in it you will build applications that are > easier to maintain and adapt leading to a more fun and profitable future. > > The book is offered here for GBP 15 and is comes in a zip file > containing the book in PDF, Mobi and ePub formats without DRM and the > source code, you can buy it by clicking here: https://sowl.co/cqnKW > > BUT WAIIIIITTTT!!!! > > I've made a delicious bundle for you! I am offering a bundle of: > > * DB Lib: The most user friendly database library for LiveCode. > > * The book: The newest LiveCode book. > > * Network Tracer: A handy utility to help you debug your standalones. > > * AAG | Tools: A collection of little plugins for the IDE > > For GBP 100, which is a heavy discount, basically the book is free and > all the rest is 30% discounted. But there is moooooore! > > The first 50 people to get this bundle will be able to schedule a > one-on-one call with me to help them out with LiveCode related issues, > which is something I don't usually offer. You can get this bundle at: > https://sowl.co/BAAZl > > Don't forget to check all things LiveCode at my home page: > https://andregarzia.com/livecode > > I hope you folks like this bundle and book. My plans is to schedule the > one-on-one calls between November 2018 and March 2019, first come, first > served. > > Cheers > > andre > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jjs at krutt.org Thu Nov 15 14:06:38 2018 From: jjs at krutt.org (JJS) Date: Thu, 15 Nov 2018 20:06:38 +0100 Subject: Reading data from Google Sheets In-Reply-To: <1542305082729-0.post@n4.nabble.com> References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> <1542290921252-0.post@n4.nabble.com> <1542304268433-0.post@n4.nabble.com> <1542305082729-0.post@n4.nabble.com> Message-ID: i used this 3 years ago, found some examples and altered it a bit, still works ok. we used this to find info back on what others had added to the list. you have to select the columns you want to read in the SELECT statement in the script, you have to play with this the script shows you that i used some buttons and fields cardscript: (add your key!) *local*sBrowserId *function*browserId *return*sBrowserId *end*browserId *on*browserBeforeNavigate pId, pUrl *global*browserCancel *if* "spreadsheets.google.com"isnotinpURL *then* *answer*warning"Won't allow you to go to a domain outside this page!" *put*trueintobrowserCancel *end* *if* *end*browserBeforeNavigate *on*closeCard *#if the hilite of btn "Browser ON" then* *#unhilite btn "Browser ON"* *#end if* *#set the vScroll of fld "theText" to 0* *pass*closeCard *end*closeCard *on*openCard altBrowserOn *pass*openCard *end*openCard *on*altBrowserOn *local*tWinID *put*thewindowidofthisstackintotWinID *local*tBrowserId *put*revBrowserOpen(tWinId, "https://spreadsheets.google.com/tq?tqx=out:html&tq=SELECT%20A%2C%20B%2C%20C%2C%20I%2C%20J%2C%20K%2C%20L&key=YOURKEYGOESHERE&gid=0") intotBrowserId *if* tBrowserId isnotainteger*then* *answer*"Failed to open browser: "& tBrowserId *exit* altBrowserOn *end* *if* *put*tBrowserId intosBrowserId revBrowserSet sBrowserId, "showborder", true revBrowserSet sBrowserId, "rect", therectoffield"veld" *end*altBrowserOn *on*altBrowserOff *if* sBrowserId isaninteger*then* revBrowserClose sBrowserId *end* *if* *put*emptyintosBrowserId *end*altBrowserOff button refresh: *on*mouseUp *local*tBrowserId *put*browserId() intotBrowserId *if* tBrowserId isnotaninteger*then* *exit* mouseUp *end* *if* revBrowserRefresh browserId() *end*mouseUp button to find something in the list: *local*tVind *on*mouseUp *local*tBrowserId *put*browserId() intotBrowserId *if* tBrowserId isnotaninteger*then* *exit* mouseUp *end* *if* *put*field"findthis"intotVind revBrowserSet tBrowserId, "selected", tVind *Put*emptyintofield"findthis" *end*mouseUp Op 15-11-2018 om 19:04 schreef dunbarxx via use-livecode: > No good. Somewhere the last char of the text of a google sheet is inserted > three times in the body of the html tag suite. So adding a delimiting char > of any kind is futile. > > I still think I am overthinking this. > > Craig > > > > -- > Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tyarmstead at comcast.net Thu Nov 15 15:06:32 2018 From: tyarmstead at comcast.net (Tyrone Armstead) Date: Thu, 15 Nov 2018 15:06:32 -0500 (EST) Subject: [ANN] LiveCode Advanced Application Architecture book available In-Reply-To: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> References: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> Message-ID: <244269859.394192.1542312393549@connect.xfinity.com> I'm interested, I'm in the US, is it $127 in US dollars? Tyrone Armstead Armstead Enterprises, LLC 732 South 11th St. Suite 100-195 Niles,MI 49120 P: 269-3484-9183 C: 269-313-2270 F: 888-811-6591 Email: T[yArmstead at Comcast.net]() [WWW.ArmsteadLLC.com]() "Luck Is What Happens When Preparation Meets Opportunity" Seneca > On November 15, 2018 at 2:44 PM Andre Alves Garzia via use-livecode wrote: > > > Hi Friends, > > I've just released a new LiveCode book in the wild. It is called > "LiveCode Advanced Application Architecture" and it deals with Best > Practices from our community and the MVC pattern. > > With the techniques contained in it you will build applications that are > easier to maintain and adapt leading to a more fun and profitable future. > > The book is offered here for GBP 15 and is comes in a zip file > containing the book in PDF, Mobi and ePub formats without DRM and the > source code, you can buy it by clicking here: https://sowl.co/cqnKW > > BUT WAIIIIITTTT!!!! > > I've made a delicious bundle for you! I am offering a bundle of: > > ? * DB Lib: The most user friendly database library for LiveCode. > > ? * The book: The newest LiveCode book. > > ? * Network Tracer: A handy utility to help you debug your standalones. > > ? * AAG | Tools: A collection of little plugins for the IDE > > For GBP 100, which is a heavy discount, basically the book is free and > all the rest is 30% discounted. But there is moooooore! > > The first 50 people to get this bundle will be able to schedule a > one-on-one call with me to help them out with LiveCode related issues, > which is something I don't usually offer. You can get this bundle at: > https://sowl.co/BAAZl > > Don't forget to check all things LiveCode at my home page: > https://andregarzia.com/livecode > > I hope you folks like this bundle and book. My plans is to schedule the > one-on-one calls between November 2018 and March 2019, first come, first > served. > > Cheers > > andre > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From waprothero at gmail.com Thu Nov 15 18:09:44 2018 From: waprothero at gmail.com (William Prothero) Date: Thu, 15 Nov 2018 15:09:44 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: References: Message-ID: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. Or, perhaps there is an easier way to display and edit a pretty simple array. Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. Best, Bill William A. Prothero http://earthlearningsolutions.org From antuanmjohnson at gmail.com Thu Nov 15 18:56:48 2018 From: antuanmjohnson at gmail.com (Antuan Johnson) Date: Thu, 15 Nov 2018 18:56:48 -0500 Subject: Steamworks API and LiveCode Message-ID: Does anyone have any experience implementing Steam's API with LiveCode? I'm working on a game that requires the API, so any help would be greatly appreciated. Steam's API: https://partner.steamgames.com/doc/sdk/api From MikeKerner at roadrunner.com Thu Nov 15 18:57:59 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 15 Nov 2018 18:57:59 -0500 Subject: Reading data from Google Sheets In-Reply-To: References: <1542156412527-0.post@n4.nabble.com> <1542233285348-0.post@n4.nabble.com> <91d4ee4d-6730-885f-55f3-c51476bc9091@andregarzia.com> <1542241760102-0.post@n4.nabble.com> <1542290921252-0.post@n4.nabble.com> <1542304268433-0.post@n4.nabble.com> <1542305082729-0.post@n4.nabble.com> Message-ID: why aren't you using merggoogle again? It has issues but it would be easier to get going. On Thu, Nov 15, 2018 at 3:06 PM JJS via use-livecode < use-livecode at lists.runrev.com> wrote: > i used this 3 years ago, found some examples and altered it a bit, still > works ok. > > we used this to find info back on what others had added to the list. > > you have to select the columns you want to read in the SELECT statement > in the script, you have to play with this > > the script shows you that i used some buttons and fields > > > cardscript: (add your key!) > > *local*sBrowserId > > *function*browserId > > *return*sBrowserId > > *end*browserId > > *on*browserBeforeNavigate pId, pUrl > > *global*browserCancel > > *if* "spreadsheets.google.com"isnotinpURL *then* > > *answer*warning"Won't allow you to go to a domain outside this page!" > > *put*trueintobrowserCancel > > *end* *if* > > *end*browserBeforeNavigate > > *on*closeCard > > *#if the hilite of btn "Browser ON" then* > > *#unhilite btn "Browser ON"* > > *#end if* > > *#set the vScroll of fld "theText" to 0* > > *pass*closeCard > > *end*closeCard > > *on*openCard > > altBrowserOn > > *pass*openCard > > *end*openCard > > *on*altBrowserOn > > *local*tWinID > > *put*thewindowidofthisstackintotWinID > > *local*tBrowserId > > *put*revBrowserOpen(tWinId, > " > https://spreadsheets.google.com/tq?tqx=out:html&tq=SELECT%20A%2C%20B%2C%20C%2C%20I%2C%20J%2C%20K%2C%20L&key=YOURKEYGOESHERE&gid=0") > > intotBrowserId > > *if* tBrowserId isnotainteger*then* > > *answer*"Failed to open browser: "& tBrowserId > > *exit* altBrowserOn > > *end* *if* > > *put*tBrowserId intosBrowserId > > revBrowserSet sBrowserId, "showborder", true > > revBrowserSet sBrowserId, "rect", therectoffield"veld" > > *end*altBrowserOn > > *on*altBrowserOff > > *if* sBrowserId isaninteger*then* > > revBrowserClose sBrowserId > > *end* *if* > > *put*emptyintosBrowserId > > *end*altBrowserOff > > > button refresh: > > *on*mouseUp > > *local*tBrowserId > > *put*browserId() intotBrowserId > > *if* tBrowserId isnotaninteger*then* > > *exit* mouseUp > > *end* *if* > > revBrowserRefresh browserId() > > *end*mouseUp > > > button to find something in the list: > > *local*tVind > > *on*mouseUp > > *local*tBrowserId > > *put*browserId() intotBrowserId > > *if* tBrowserId isnotaninteger*then* > > *exit* mouseUp > > *end* *if* > > *put*field"findthis"intotVind > > revBrowserSet tBrowserId, "selected", tVind > > *Put*emptyintofield"findthis" > > *end*mouseUp > > > Op 15-11-2018 om 19:04 schreef dunbarxx via use-livecode: > > No good. Somewhere the last char of the text of a google sheet is > inserted > > three times in the body of the html tag suite. So adding a delimiting > char > > of any kind is futile. > > > > I still think I am overthinking this. > > > > Craig > > > > > > > > -- > > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From bobsneidar at iotecdigital.com Thu Nov 15 18:59:45 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 15 Nov 2018 23:59:45 +0000 Subject: directory tree view In-Reply-To: References: Message-ID: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> Do I have to create/compile the widget before being able to use the stack? Never done widgets before... Bob S > On Nov 15, 2018, at 11:34 , Mike Kerner via use-livecode wrote: > > I fought through the various tree view issues and got it to build a > directory list that's kind-of functional. > Please break and report issues on the repo. > https://github.com/macMikey/directoryTreeView From bobsneidar at iotecdigital.com Thu Nov 15 19:04:59 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 16 Nov 2018 00:04:59 +0000 Subject: Stack Height/Menubar In-Reply-To: <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> Message-ID: I did not know that! Bob S > On Nov 15, 2018, at 10:43 , Klaus major-k via use-livecode wrote: > > Menubars on macOS have some caveats: > 1. Last menuitem in your HELP menu should read: About XXX(Your app)... > and will go as first menuitem into the application menu > > 2. Last menuitem of your "EDIT" menu (-> Preferences) will also go into the application menu -> Settings... > > 3. Last menu of your "FILE" menu (-> Quit) will also go into the application menu. From terry.judd at unimelb.edu.au Thu Nov 15 20:19:20 2018 From: terry.judd at unimelb.edu.au (Terry Judd) Date: Fri, 16 Nov 2018 01:19:20 +0000 Subject: Array editing or Validate JSON string? In-Reply-To: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> Message-ID: <554970E6-C248-46BF-960B-157E24198822@unimelb.edu.au> Hi Bill - I convert the JSON (jsonImport) to an array then use a treeview widget to display it. I then use an actionDoubleClick handler in the widget script to grab the appropriate array element and display it in an ask dialog. The value goes back into the array and I export the array back to JSON (jsonExport). Works well as long as the JSON elements don't contain large amounts of text - in which case you might need a custom dialog for displaying and editing the contents. Terry... ?On 16/11/2018 10:10 am, "use-livecode on behalf of William Prothero via use-livecode" wrote: Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. Or, perhaps there is an easier way to display and edit a pretty simple array. Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. Best, Bill William A. Prothero http://earthlearningsolutions.org _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From waprothero at gmail.com Thu Nov 15 20:55:20 2018 From: waprothero at gmail.com (William Prothero) Date: Thu, 15 Nov 2018 17:55:20 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: <554970E6-C248-46BF-960B-157E24198822@unimelb.edu.au> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <554970E6-C248-46BF-960B-157E24198822@unimelb.edu.au> Message-ID: <0C04566A-E0ED-46B6-9035-9F827981B08C@gmail.com> Thanks, Terry: I?ll give it a whack. Bill > On Nov 15, 2018, at 5:19 PM, Terry Judd via use-livecode wrote: > > Hi Bill - I convert the JSON (jsonImport) to an array then use a treeview widget to display it. I then use an actionDoubleClick handler in the widget script to grab the appropriate array element and display it in an ask dialog. The value goes back into the array and I export the array back to JSON (jsonExport). Works well as long as the JSON elements don't contain large amounts of text - in which case you might need a custom dialog for displaying and editing the contents. > > Terry... > > ?On 16/11/2018 10:10 am, "use-livecode on behalf of William Prothero via use-livecode" wrote: > > Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. > > Or, perhaps there is an easier way to display and edit a pretty simple array. > > Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. > > Best, > Bill > > William A. Prothero > http://earthlearningsolutions.org > > _______________________________________________ > use-livecode mailing list > use-livecode 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 brian at milby7.com Thu Nov 15 21:52:37 2018 From: brian at milby7.com (Brian Milby) Date: Thu, 15 Nov 2018 20:52:37 -0600 Subject: directory tree view In-Reply-To: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> Message-ID: This just leverages the included widget. ?The latest RC no longer needs the hack to clear the hilited item (empty no longer throws an error). Thanks, Brian On Nov 15, 2018, 6:00 PM -0600, Bob Sneidar via use-livecode , wrote: > Do I have to create/compile the widget before being able to use the stack? Never done widgets before... > > Bob S > > > > On Nov 15, 2018, at 11:34 , Mike Kerner via use-livecode wrote: > > > > I fought through the various tree view issues and got it to build a > > directory list that's kind-of functional. > > Please break and report issues on the repo. > > https://github.com/macMikey/directoryTreeView > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Thu Nov 15 22:06:09 2018 From: brian at milby7.com (Brian Milby) Date: Thu, 15 Nov 2018 21:06:09 -0600 Subject: Steamworks API and LiveCode In-Reply-To: References: Message-ID: Can you use the web API? ?If not, then LCB will need to be used to build the needed module. Thanks, Brian On Nov 15, 2018, 5:58 PM -0600, Antuan Johnson via use-livecode , wrote: > Does anyone have any experience implementing Steam's API with LiveCode? > I'm working on a game that requires the API, so any help would be greatly > appreciated. > > Steam's API: https://partner.steamgames.com/doc/sdk/api > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From monte at appisle.net Thu Nov 15 22:44:49 2018 From: monte at appisle.net (Monte Goulding) Date: Fri, 16 Nov 2018 14:44:49 +1100 Subject: Steamworks API and LiveCode In-Reply-To: References: Message-ID: <78E47ACE-E9A1-490C-A0A7-7AEE8EEA5C70@appisle.net> The fact their API is C++ will make it complicated to wrap with LCB. A quick google came up with a few C wrappers for steam. If you don?t want to use those it would be easier to write an external. > On 16 Nov 2018, at 2:06 pm, Brian Milby via use-livecode wrote: > > Can you use the web API? If not, then LCB will need to be used to build the needed module. > > Thanks, > Brian > On Nov 15, 2018, 5:58 PM -0600, Antuan Johnson via use-livecode , wrote: >> Does anyone have any experience implementing Steam's API with LiveCode? >> I'm working on a game that requires the API, so any help would be greatly >> appreciated. >> >> Steam's API: https://partner.steamgames.com/doc/sdk/api >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From harrison at all-auctions.com Fri Nov 16 00:41:03 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Fri, 16 Nov 2018 00:41:03 -0500 Subject: Stack Height/Menubar In-Reply-To: <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> Message-ID: <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> Hi Klaus, I found that: set the defaultMenubar to group ?MyMenuBar? of stack ?MenuBarSubStack? (Does not work.) but set the defaultMenubar to the long ID of group ?MyMenuBar? of stack ?MenuBarSubStack? (works!) Although when I create the standalone it stops working. I think it is not finding the sub stack. Your thoughts? Thanks, Rick > On Nov 15, 2018, at 1:43 PM, Klaus major-k via use-livecode wrote: > > Hi Rick, > > I set "the defaultmenubar" by script "on openstack". > > I never used it. > > Menubars on macOS have some caveats: > 1. Last menuitem in your HELP menu should read: About XXX(Your app)... > and will go as first menuitem into the application menu > > 2. Last menuitem of your "EDIT" menu (-> Preferences) will also go into the application menu -> Settings... > > 3. Last menu of your "FILE" menu (-> Quit) will also go into the application menu. > > Best > > Klaus > From theaford at btinternet.com Fri Nov 16 03:23:06 2018 From: theaford at btinternet.com (Terence Heaford) Date: Fri, 16 Nov 2018 08:23:06 +0000 Subject: Stack Height/Menubar In-Reply-To: <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> Message-ID: <2EC51991-4078-40DB-9D14-BD4E778DB39C@btinternet.com> Hi Klaus, What an excellent suggestion. Copied my menubar to a card that I never use and pointed everything to that and its associated scripts and this has now sorted the problem. Named my Card ?MenusAndImages?. Keep my button icons here as well. Sorted. Thanks for your help Terry > On 15 Nov 2018, at 16:32, Klaus major-k via use-livecode wrote: > > I ususally store my "menubar group" in a substack that will never be opened. > Then I set "the defaultmenubar" of my stack to the name of that group and am a happy camper, > no more missing 22 pixels etc. on the Mac. From kaveh at rivervalleytechnologies.com Fri Nov 16 05:14:44 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Fri, 16 Nov 2018 10:14:44 +0000 Subject: Stack and Standalone hogging memory on Mac Message-ID: I have been working on a stack that has been behaving well. It is now hogging all CPU memory when I open it and is unresponsive. There is no idle handler. When I click Command?dot repeatedly the script pops up and activity stops temporarily. I think this means something is running in the background. I have opened message watcher, but no activity when I don't interact. I have saved as Standalone for Mac, and same problem exists in Standalone, but of course I can't stop any execution there. Any suggestions as to how I can pin down what is going on in the background? -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From andre at andregarzia.com Fri Nov 16 05:34:17 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Fri, 16 Nov 2018 10:34:17 +0000 Subject: Stack and Standalone hogging memory on Mac In-Reply-To: References: Message-ID: Kaveh, Build using different versions of LC and check to see if earlier versions are behaving better. It might be a regression. Cheers andre On 11/16/2018 10:14 AM, Kaveh Bazargan via use-livecode wrote: > I have been working on a stack that has been behaving well. It is now > hogging all CPU memory when I open it and is unresponsive. There is no idle > handler. When I click Command?dot repeatedly the script pops up and > activity stops temporarily. I think this means something is running in > the background. > > I have opened message watcher, but no activity when I don't interact. > > I have saved as Standalone for Mac, and same problem exists in Standalone, > but of course I can't stop any execution there. > > Any suggestions as to how I can pin down what is going on in the background? > From klaus at major-k.de Fri Nov 16 06:26:38 2018 From: klaus at major-k.de (Klaus major-k) Date: Fri, 16 Nov 2018 12:26:38 +0100 Subject: Stack Height/Menubar In-Reply-To: <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> Message-ID: <2CBE9C40-8481-492F-9203-D1AE2E3B3126@major-k.de> Hi Rick, > Am 16.11.2018 um 06:41 schrieb Rick Harrison via use-livecode : > > Hi Klaus, > > I found that: > set the defaultMenubar to group ?MyMenuBar? of stack ?MenuBarSubStack? (Does not work.) > but > set the defaultMenubar to the long ID of group ?MyMenuBar? of stack ?MenuBarSubStack? (works!) > > Although when I create the standalone it stops working. > I think it is not finding the sub stack. > > Your thoughts? sorry, I really cannot remember anymore. > Thanks, > > Rick > >> On Nov 15, 2018, at 1:43 PM, Klaus major-k via use-livecode wrote: >> Hi Rick, >> >> I set "the defaultmenubar" by script "on openstack". >> I never used it. >> Menubars on macOS have some caveats: >> 1. Last menuitem in your HELP menu should read: About XXX(Your app)... >> and will go as first menuitem into the application menu >> 2. Last menuitem of your "EDIT" menu (-> Preferences) will also go into the application menu -> Settings... >> 3. Last menu of your "FILE" menu (-> Quit) will also go into the application menu. Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From MikeKerner at roadrunner.com Fri Nov 16 10:04:38 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 16 Nov 2018 10:04:38 -0500 Subject: directory tree view In-Reply-To: References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> Message-ID: Brian, The widgets are backward-compatible, right? I can include the new version of the widget and it will work in any version of 8 or 9? From jacque at hyperactivesw.com Fri Nov 16 11:05:28 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Fri, 16 Nov 2018 10:05:28 -0600 Subject: Stack and Standalone hogging memory on Mac In-Reply-To: References: Message-ID: <1671d451d40.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Are there any pending messages? Sometimes these can get out of hand and take over everything. You can see them in the message box "messages" pane and if you click the auto-update button there they will scroll by. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 16, 2018 4:16:59 AM Kaveh Bazargan via use-livecode wrote: > I have been working on a stack that has been behaving well. It is now > hogging all CPU memory when I open it and is unresponsive. There is no idle > handler. When I click Command?dot repeatedly the script pops up and > activity stops temporarily. I think this means something is running in > the background. > > I have opened message watcher, but no activity when I don't interact. > > I have saved as Standalone for Mac, and same problem exists in Standalone, > but of course I can't stop any execution there. > > Any suggestions as to how I can pin down what is going on in the background? > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From brian at milby7.com Fri Nov 16 11:23:15 2018 From: brian at milby7.com (Brian Milby) Date: Fri, 16 Nov 2018 10:23:15 -0600 Subject: directory tree view In-Reply-To: References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> Message-ID: <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> It would not work with 8 unless compiled with 8. ?It should work with any release of 9. Thanks, Brian On Nov 16, 2018, 9:06 AM -0600, Mike Kerner via use-livecode , wrote: > Brian, > The widgets are backward-compatible, right? I can include the new version > of the widget and it will work in any version of 8 or 9? > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tom at makeshyft.com Fri Nov 16 11:23:56 2018 From: tom at makeshyft.com (Tom Glod) Date: Fri, 16 Nov 2018 11:23:56 -0500 Subject: Hide iconified stack from taskbar? Message-ID: Hi folks, is there any way to hide a stack that is iconified from the taskbar so that it only appears in the system tray? I've found the "modeless" method..... but it really slows down the restoration of the window .... and actually creates a white header bar with the stack name on the bottom left of my desktop. But the slowness of the stack mode changes are not something i can accept. Are there any other methods to hide it from the taskbar? Windows 10. Thanks Tom From bobsneidar at iotecdigital.com Fri Nov 16 12:14:09 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 16 Nov 2018 17:14:09 +0000 Subject: Stack Height/Menubar In-Reply-To: <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> Message-ID: <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> Try referencing the card as well. set the defaultMenubar to the long ID of group ?MyMenuBar? of of card of stack ?MenuBarSubStack? Bob S > On Nov 15, 2018, at 21:41 , Rick Harrison via use-livecode wrote: > > Hi Klaus, > > I found that: > > set the defaultMenubar to group ?MyMenuBar? of stack ?MenuBarSubStack? (Does not work.) > > but > > set the defaultMenubar to the long ID of group ?MyMenuBar? of stack ?MenuBarSubStack? (works!) > > Although when I create the standalone it stops working. > I think it is not finding the sub stack. > > Your thoughts? > > Thanks, > > Rick From jjs at krutt.org Fri Nov 16 11:22:37 2018 From: jjs at krutt.org (JJS) Date: Fri, 16 Nov 2018 17:22:37 +0100 Subject: Array editing or Validate JSON string? In-Reply-To: <0C04566A-E0ED-46B6-9035-9F827981B08C@gmail.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <554970E6-C248-46BF-960B-157E24198822@unimelb.edu.au> <0C04566A-E0ED-46B6-9035-9F827981B08C@gmail.com> Message-ID: <3dcb0073-eb23-28c3-0fc5-14305ef386a8@krutt.org> https://jsonlint.com/ not there are a few forms to write JSON Op 16-11-2018 om 02:55 schreef William Prothero via use-livecode: > Thanks, Terry: > I?ll give it a whack. > Bill > >> On Nov 15, 2018, at 5:19 PM, Terry Judd via use-livecode wrote: >> >> Hi Bill - I convert the JSON (jsonImport) to an array then use a treeview widget to display it. I then use an actionDoubleClick handler in the widget script to grab the appropriate array element and display it in an ask dialog. The value goes back into the array and I export the array back to JSON (jsonExport). Works well as long as the JSON elements don't contain large amounts of text - in which case you might need a custom dialog for displaying and editing the contents. >> >> Terry... >> >> ?On 16/11/2018 10:10 am, "use-livecode on behalf of William Prothero via use-livecode" wrote: >> >> Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. >> >> Or, perhaps there is an easier way to display and edit a pretty simple array. >> >> Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. >> >> Best, >> Bill >> >> William A. Prothero >> http://earthlearningsolutions.org >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 harrison at all-auctions.com Fri Nov 16 13:09:24 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Fri, 16 Nov 2018 13:09:24 -0500 Subject: Stack Height/Menubar In-Reply-To: <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> Message-ID: Hi Bob, I tried your suggestion. No luck on that. I also tried not using a sub-stack and put the menu in the normal stack on a different card that I wasn?t using. It works fine in the IDE but not in a standalone version. In the standalone it keeps giving me the default Menu instead of the one I set. Other ideas? Thanks, Rick > On Nov 16, 2018, at 12:14 PM, Bob Sneidar via use-livecode wrote: > > Try referencing the card as well. > > set the defaultMenubar to the long ID of group ?MyMenuBar? of of card of stack ?MenuBarSubStack? > > Bob S > From MikeKerner at roadrunner.com Fri Nov 16 16:11:29 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 16 Nov 2018 16:11:29 -0500 Subject: directory tree view In-Reply-To: <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> Message-ID: Brian, So walk me through this: Is the LCB code for the widget a component of the widget itself or of LC - i.e. is the widget in a stack just a reference to the widget in LC (which would mean that the code changes with each version of LC, until you do a build), or is it dependent on the version of LC that was used to build the stack that contains the widget, i.e. the way to update the widget in my project is to open the stack with the RC, delete the widget, reinstall it with the new version, and then the changes to the widget code base apply to all 9.x versions (if that's the case, we need to have a discussion with LC about being able to see which version of a widget is installed in a stack...) On Fri, Nov 16, 2018 at 11:23 AM Brian Milby via use-livecode < use-livecode at lists.runrev.com> wrote: > It would not work with 8 unless compiled with 8. It should work with any > release of 9. > > Thanks, > Brian > On Nov 16, 2018, 9:06 AM -0600, Mike Kerner via use-livecode < > use-livecode at lists.runrev.com>, wrote: > > Brian, > > The widgets are backward-compatible, right? I can include the new version > > of the widget and it will work in any version of 8 or 9? > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From MikeKerner at roadrunner.com Fri Nov 16 16:13:30 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 16 Nov 2018 16:13:30 -0500 Subject: directory tree view In-Reply-To: References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> Message-ID: Hmm. I just seem to have answered my own question. It seems that it is the latter. I think we need to have a discussion with LC about widget versions. On Fri, Nov 16, 2018 at 4:11 PM Mike Kerner wrote: > Brian, > So walk me through this: Is the LCB code for the widget a component of > the widget itself or of LC - i.e. is the widget in a stack just a reference > to the widget in LC (which would mean that the code changes with each > version of LC, until you do a build), or is it dependent on the version of > LC that was used to build the stack that contains the widget, i.e. the way > to update the widget in my project is to open the stack with the RC, delete > the widget, reinstall it with the new version, and then the changes to the > widget code base apply to all 9.x versions (if that's the case, we need to > have a discussion with LC about being able to see which version of a widget > is installed in a stack...) > > On Fri, Nov 16, 2018 at 11:23 AM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> It would not work with 8 unless compiled with 8. It should work with any >> release of 9. >> >> Thanks, >> Brian >> On Nov 16, 2018, 9:06 AM -0600, Mike Kerner via use-livecode < >> use-livecode at lists.runrev.com>, wrote: >> > Brian, >> > The widgets are backward-compatible, right? I can include the new >> version >> > of the widget and it will work in any version of 8 or 9? >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode at lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > -- 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 brian at milby7.com Fri Nov 16 16:56:40 2018 From: brian at milby7.com (Brian Milby) Date: Fri, 16 Nov 2018 15:56:40 -0600 Subject: directory tree view In-Reply-To: References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> Message-ID: <82fc4943-3043-4080-b345-230d92bfcf1e@Spark> A widget in a stack is just a reference until an application is built where the compiled LCB and resources are packaged with the app*. ?Opening a stack with a different version of the IDE will use the included widgets from that version of the IDE. ?User installed widgets will remain constant as long as a compiled version is present for that particular version of the IDE (you can create a package that contains versions compiled for both 8 and 9). Widget versions are distinct from the overall IDE version. ?I have looked briefly and am not entirely sure why the versions don?t appear in the dictionary. ?The metadata is available. * It is possible to embed a widget inside a stack and have it install but I have not looked into how that is done. Thanks, Brian On Nov 16, 2018, 3:14 PM -0600, Mike Kerner via use-livecode , wrote: > Hmm. I just seem to have answered my own question. It seems that it is > the latter. I think we need to have a discussion with LC about widget > versions. > > On Fri, Nov 16, 2018 at 4:11 PM Mike Kerner > wrote: > > > Brian, > > So walk me through this: Is the LCB code for the widget a component of > > the widget itself or of LC - i.e. is the widget in a stack just a reference > > to the widget in LC (which would mean that the code changes with each > > version of LC, until you do a build), or is it dependent on the version of > > LC that was used to build the stack that contains the widget, i.e. the way > > to update the widget in my project is to open the stack with the RC, delete > > the widget, reinstall it with the new version, and then the changes to the > > widget code base apply to all 9.x versions (if that's the case, we need to > > have a discussion with LC about being able to see which version of a widget > > is installed in a stack...) > > > > On Fri, Nov 16, 2018 at 11:23 AM Brian Milby via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > It would not work with 8 unless compiled with 8. It should work with any > > > release of 9. > > > > > > Thanks, > > > Brian > > > On Nov 16, 2018, 9:06 AM -0600, Mike Kerner via use-livecode < > > > use-livecode at lists.runrev.com>, wrote: > > > > Brian, > > > > The widgets are backward-compatible, right? I can include the new > > > version > > > > of the widget and it will work in any version of 8 or 9? > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode at lists.runrev.com > > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > > > use-livecode mailing list > > > use-livecode at lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > -- > > On the first day, God created the heavens and the Earth > > On the second day, God created the oceans. > > On the third day, God put the animals on hold for a few hours, > > and did a little diving. > > And God said, "This is good." > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mark at canelasoftware.com Fri Nov 16 16:57:45 2018 From: mark at canelasoftware.com (Mark Talluto) Date: Fri, 16 Nov 2018 13:57:45 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> Message-ID: <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> Hi Bill, My favorite JSON validator is: https://jsonformatter.curiousconcept.com Best regards, Mark Talluto livecloud.io nursenotes.net canelasoftware.com > On Nov 15, 2018, at 3:09 PM, William Prothero via use-livecode wrote: > > Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. > > Or, perhaps there is an easier way to display and edit a pretty simple array. > > Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. > > Best, > Bill > > William A. Prothero > http://earthlearningsolutions.org > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From tore.nilsen at me.com Fri Nov 16 18:22:59 2018 From: tore.nilsen at me.com (Tore Nilsen) Date: Sat, 17 Nov 2018 00:22:59 +0100 Subject: Bug in how LC handles sentences Message-ID: I have come across what I think must be a bug in how LC handles sentences. When a sentence begins with a number, it is not counted as a sentence if the previous sentence ends with a full stop. If the previous sentence end with a question mark or an exclamation mark, then the sentence starting with a number is counted as a sentence. I am on Indy, 9.0.1, MacOS 10.14.2. Anyone who can confirm this? Best regards Tore Nilsen From tore.nilsen at me.com Fri Nov 16 18:36:56 2018 From: tore.nilsen at me.com (Tore Nilsen) Date: Sat, 17 Nov 2018 00:36:56 +0100 Subject: Bug in how LC handles sentences In-Reply-To: References: Message-ID: <06F2DA07-48CD-45CE-AB6D-EA6C1C64303A@me.com> Answering my own question: This bug report: 15690 states that it is not a bug, next sentence just needs to start with a capital letter. I would still say it is a bug, as it is recognized as a sentence if previous sentence ends with anything but full stop. A sentence may well start with a number! Best regards Tore Nilsen > 17. nov. 2018 kl. 00:22 skrev Tore Nilsen via use-livecode : > > > I have come across what I think must be a bug in how LC handles sentences. When a sentence begins with a number, it is not counted as a sentence if the previous sentence ends with a full stop. If the previous sentence end with a question mark or an exclamation mark, then the sentence starting with a number is counted as a sentence. I am on Indy, 9.0.1, MacOS 10.14.2. > > Anyone who can confirm this? > > 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 tore.nilsen at me.com Fri Nov 16 18:47:30 2018 From: tore.nilsen at me.com (Tore Nilsen) Date: Sat, 17 Nov 2018 00:47:30 +0100 Subject: Bug in how LC handles sentences In-Reply-To: <06F2DA07-48CD-45CE-AB6D-EA6C1C64303A@me.com> References: <06F2DA07-48CD-45CE-AB6D-EA6C1C64303A@me.com> Message-ID: <208E77FE-B010-4DEE-A324-1197D51F51E6@me.com> After some thinking I actually do agree it is not a bug. The problem being that full stop (period) can also be used in abbreviations, and numbers can follow immediately after such abbreviations. Tore > 17. nov. 2018 kl. 00:36 skrev Tore Nilsen via use-livecode : > > I would still say it is a bug, as it is recognized as a sentence if previous sentence ends with anything but full stop. A sentence may well start with a number! From MikeKerner at roadrunner.com Fri Nov 16 19:19:37 2018 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 16 Nov 2018 19:19:37 -0500 Subject: directory tree view In-Reply-To: <82fc4943-3043-4080-b345-230d92bfcf1e@Spark> References: <7AB1EF50-880F-4E90-BF55-C6E8184432B6@iotecdigital.com> <06fdb73b-b249-4f51-ac3c-b5f889f261d2@Spark> <82fc4943-3043-4080-b345-230d92bfcf1e@Spark> Message-ID: Yep, some more testing shows that it was a bug in my test code that was leading me to believe that the widget object code was embedded in the stack. From tom at makeshyft.com Fri Nov 16 19:37:58 2018 From: tom at makeshyft.com (Tom Glod) Date: Fri, 16 Nov 2018 19:37:58 -0500 Subject: Bug in how LC handles sentences In-Reply-To: <208E77FE-B010-4DEE-A324-1197D51F51E6@me.com> References: <06F2DA07-48CD-45CE-AB6D-EA6C1C64303A@me.com> <208E77FE-B010-4DEE-A324-1197D51F51E6@me.com> Message-ID: I just did a test .... "Sentence 1. Sentence 2. Sentence 3. 4 sentences are here." Recognizes only 3 sentences. ". " (period space) then should be recognized as a sentence delimiter. and 1 letter sentences could maybe be ignored as acronyms., and also we can read whether the period is preceded or followed by a number. I guess there is no way to make it error proof.... but this example seems way too common to fail. On Fri, Nov 16, 2018 at 6:47 PM Tore Nilsen via use-livecode < use-livecode at lists.runrev.com> wrote: > After some thinking I actually do agree it is not a bug. The problem being > that full stop (period) can also be used in abbreviations, and numbers can > follow immediately after such abbreviations. > > Tore > > > > > > > > > 17. nov. 2018 kl. 00:36 skrev Tore Nilsen via use-livecode < > use-livecode at lists.runrev.com>: > > > > I would still say it is a bug, as it is recognized as a sentence if > previous sentence ends with anything but full stop. A sentence may well > start with a number! > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sat Nov 17 00:28:09 2018 From: bogdanoff at me.com (Peter Bogdanoff) Date: Sat, 17 Nov 2018 00:28:09 -0500 Subject: Radio Buttons on multiple cards Message-ID: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> Hi, A question about LC mechanics: I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set. When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card. I don?t see this universal choice as a button property. Is this to be done by scripting? Peter Bogdanoff ArtsInteractive From revdev at pdslabs.net Sat Nov 17 03:04:38 2018 From: revdev at pdslabs.net (Phil Davis) Date: Sat, 17 Nov 2018 00:04:38 -0800 Subject: Radio Buttons on multiple cards In-Reply-To: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> References: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> Message-ID: <04b7d3ef-0e74-ec7b-157a-306c0a56094e@pdslabs.net> Hi Peter, Set the sharedHilite of each button to true. That'll give you what you want. Phil Davis On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote: > Hi, > > A question about LC mechanics: > > I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set. > > When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card. > > I don?t see this universal choice as a button property. Is this to be done by scripting? > > Peter Bogdanoff > ArtsInteractive > _______________________________________________ > use-livecode mailing list > use-livecode 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 From brahma at hindu.org Sat Nov 17 08:07:41 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sat, 17 Nov 2018 13:07:41 +0000 Subject: updating to 64bit for Macs: standalones vs stacks opened by a standalone References: <5BEC772F.7000909@sonasoftware.com> Message-ID: The engine it the only thing that needs to be 64Bit. The stacks you are downloading as just "documents" that are interpreted by LC-your menu/engine stack. BR On 11/14/18 10:02 AM, Curt Ford via use-livecode wrote: > I'm assuming the standalone > menu app will need to be repackaged with LC 9; is the same true of the > downloaded stacks (which were done in LC 7)? Or is the engine in the > standalone the only thing that needs to be 64bit? > > Curt From brahma at hindu.org Sat Nov 17 08:21:41 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Sat, 17 Nov 2018 13:21:41 +0000 Subject: Bug in how LC handles sentences References: <06F2DA07-48CD-45CE-AB6D-EA6C1C64303A@me.com> <208E77FE-B010-4DEE-A324-1197D51F51E6@me.com> Message-ID: On 11/16/18 2:38 PM, Tom Glod via use-livecode wrote: > I just did a test .... > > "Sentence 1. Sentence 2. Sentence 3. 4 sentences are here." > > Recognizes only 3 sentences. Ha! I would *never* get my editors to let a sentence starting with a number, to go through. It will always come back to me with markup. "Number at beginning: spell out." Search for "Can I begin a sentence with a number?" Of course, it is just a "writer's convention", but it is a strongly enforced one. Brahmanathaswami From bogdanoff at me.com Sat Nov 17 11:08:15 2018 From: bogdanoff at me.com (Peter Bogdanoff) Date: Sat, 17 Nov 2018 11:08:15 -0500 Subject: Radio Buttons on multiple cards In-Reply-To: <04b7d3ef-0e74-ec7b-157a-306c0a56094e@pdslabs.net> References: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> <04b7d3ef-0e74-ec7b-157a-306c0a56094e@pdslabs.net> Message-ID: <2B1B43D0-7786-4832-B201-FE72F8616848@me.com> Thanks Phil, that did it. I was trying to set the group sharedHilite, which can?t be done. Peter > On Nov 17, 2018, at 3:04 AM, Phil Davis via use-livecode wrote: > > Hi Peter, > > Set the sharedHilite of each button to true. That'll give you what you want. > > Phil Davis > > > On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote: >> Hi, >> >> A question about LC mechanics: >> >> I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set. >> >> When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card. >> >> I don?t see this universal choice as a button property. Is this to be done by scripting? >> >> Peter Bogdanoff >> ArtsInteractive >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From revdev at pdslabs.net Sat Nov 17 13:28:14 2018 From: revdev at pdslabs.net (Phil Davis) Date: Sat, 17 Nov 2018 10:28:14 -0800 Subject: Radio Buttons on multiple cards In-Reply-To: <2B1B43D0-7786-4832-B201-FE72F8616848@me.com> References: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> <04b7d3ef-0e74-ec7b-157a-306c0a56094e@pdslabs.net> <2B1B43D0-7786-4832-B201-FE72F8616848@me.com> Message-ID: <51c92c81-bce6-8651-d32a-86304e20f73c@pdslabs.net> Hmmm. Here is what I tried, and the hilites 'stick' across all cards in the stack: - create stack - add 2 radio buttons - group them - set the sharedHilite of each radio to true - add another generic button to the card - group the newest button with the group of radios - make new card - place that last group on card 2 Result: Radio hilites stick across both cards I'm not sure why your experience would be different than this. Do you have any scripts that fiddle with the radio hilites? Phil On 11/17/18 8:08 AM, Peter Bogdanoff via use-livecode wrote: > Thanks Phil, that did it. I was trying to set the group sharedHilite, which can?t be done. > > Peter > >> On Nov 17, 2018, at 3:04 AM, Phil Davis via use-livecode wrote: >> >> Hi Peter, >> >> Set the sharedHilite of each button to true. That'll give you what you want. >> >> Phil Davis >> >> >> On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote: >>> Hi, >>> >>> A question about LC mechanics: >>> >>> I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set. >>> >>> When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card. >>> >>> I don?t see this universal choice as a button property. Is this to be done by scripting? >>> >>> Peter Bogdanoff >>> ArtsInteractive >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 From harrison at all-auctions.com Sat Nov 17 13:49:22 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Sat, 17 Nov 2018 13:49:22 -0500 Subject: Stack Height/Menubar In-Reply-To: <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> Message-ID: <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> After hours of playing around with this problem, it looks to me like a Menubar has to be shifted into that upward position in order for it to work in a standalone. (If you can prove me wrong on this please proceed! I would love to see a work around that really works!) (This seems a bit crazy as it impacts the entire stack?s layout unless one planned for it at the very beginning of one?s design. Most people wouldn?t do as this seems to be only an LC thing not really found in other environments.) Does anyone have a nice routine which will compensate for the change in layout by moving all other objects farther down? I thought I saw a mention this before. Thanks in advance, Rick From bogdanoff at me.com Sat Nov 17 14:27:17 2018 From: bogdanoff at me.com (Peter Bogdanoff) Date: Sat, 17 Nov 2018 14:27:17 -0500 Subject: Radio Buttons on multiple cards In-Reply-To: <51c92c81-bce6-8651-d32a-86304e20f73c@pdslabs.net> References: <1A38A240-22FE-4CC9-872C-35ECF6B16974@me.com> <04b7d3ef-0e74-ec7b-157a-306c0a56094e@pdslabs.net> <2B1B43D0-7786-4832-B201-FE72F8616848@me.com> <51c92c81-bce6-8651-d32a-86304e20f73c@pdslabs.net> Message-ID: I did get it to work, as you said, by setting each button individually, rather than trying to set the whole group. So I?m good. Thanks! Peter > On Nov 17, 2018, at 1:28 PM, Phil Davis via use-livecode wrote: > > Hmmm. Here is what I tried, and the hilites 'stick' across all cards in the stack: > - create stack > - add 2 radio buttons > - group them > - set the sharedHilite of each radio to true > - add another generic button to the card > - group the newest button with the group of radios > - make new card > - place that last group on card 2 > > Result: > Radio hilites stick across both cards > > I'm not sure why your experience would be different than this. Do you have any scripts that fiddle with the radio hilites? > > Phil > > > On 11/17/18 8:08 AM, Peter Bogdanoff via use-livecode wrote: >> Thanks Phil, that did it. I was trying to set the group sharedHilite, which can?t be done. >> >> Peter >> >>> On Nov 17, 2018, at 3:04 AM, Phil Davis via use-livecode wrote: >>> >>> Hi Peter, >>> >>> Set the sharedHilite of each button to true. That'll give you what you want. >>> >>> Phil Davis >>> >>> >>> On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote: >>>> Hi, >>>> >>>> A question about LC mechanics: >>>> >>>> I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set. >>>> >>>> When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card. >>>> >>>> I don?t see this universal choice as a button property. Is this to be done by scripting? >>>> >>>> Peter Bogdanoff >>>> ArtsInteractive >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode 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 >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From waprothero at gmail.com Sat Nov 17 18:39:47 2018 From: waprothero at gmail.com (William Prothero) Date: Sat, 17 Nov 2018 15:39:47 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> Message-ID: <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> Folks: I guess I could have been more clear. I am editing the JSON directly in a text field. If I make a mistake, then use JSONToArray, the program just fails silently. What I would like to do is get a dialog that the JSON wasn?t formed correctly. Of course, since I?m using it for my personal development of my app, I can know that it failed if I don?t get the answer dialog I put in after it. but, it seems a kludge. Shouldn?t there be some kind of an error result if the JSON is ill-formed? Best, Bill > On Nov 16, 2018, at 1:57 PM, Mark Talluto via use-livecode wrote: > > Hi Bill, > > My favorite JSON validator is: https://jsonformatter.curiousconcept.com > > > Best regards, > > Mark Talluto > livecloud.io > nursenotes.net > canelasoftware.com > > > > >> On Nov 15, 2018, at 3:09 PM, William Prothero via use-livecode wrote: >> >> Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. >> >> Or, perhaps there is an easier way to display and edit a pretty simple array. >> >> Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. >> >> Best, >> Bill >> >> William A. Prothero >> http://earthlearningsolutions.org >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 tfabacher at gmail.com Sat Nov 17 21:21:31 2018 From: tfabacher at gmail.com (Todd Fabacher) Date: Sat, 17 Nov 2018 21:21:31 -0500 Subject: use password protected scripts on LC web server Message-ID: Quick question...we have some specific info in LC we need to put in a LiveCode web script to be run online. But we need to protect the content. Can we put that in a password protected script, drop it online and add it in as an "Include"?? Thanks, this would be SUPER helpful, Todd From tfabacher at gmail.com Sat Nov 17 21:26:58 2018 From: tfabacher at gmail.com (Todd Fabacher) Date: Sat, 17 Nov 2018 21:26:58 -0500 Subject: use password protected scripts on LC web server In-Reply-To: References: Message-ID: SUPER..I FOUND IT AND THE ANSWER IS YES!!! This changes my entire concept of using LiveCode online. I can do full debugging in my app and just take the functionality I want and move it online. FANTASTIC!! On Sat, Nov 17, 2018 at 9:21 PM Todd Fabacher wrote: > Quick question...we have some specific info in LC we need to put in a > LiveCode web script to be run online. But we need to protect the content. > Can we put that in a password protected script, drop it online and add it > in as an "Include"?? > > Thanks, this would be SUPER helpful, > > Todd > > > From kee.nethery at elloco.com Sat Nov 17 22:11:38 2018 From: kee.nethery at elloco.com (kee nethery) Date: Sat, 17 Nov 2018 19:11:38 -0800 Subject: where can I learn about macOS app Help menu Search menu item? Message-ID: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> Building a macOS app and in the Help menu, the top menu item is ?Search? with a search field. How do I populate the data that gets searched so that answers to questions about the app can live there? Trying to search for ?search? and ?Menu? is not useful. Thanks, Kee Nethery From tfabacher at gmail.com Sat Nov 17 22:30:06 2018 From: tfabacher at gmail.com (Todd Fabacher) Date: Sat, 17 Nov 2018 22:30:06 -0500 Subject: use password protected scripts on LC web server In-Reply-To: References: Message-ID: I got the LC Indy web server installed and it can connect to the DB and return JSON. But as soon as I reference a password protected script file, it gave me an error. This is the error I am getting: REVO7000 file "/var/www/html/model.lc" file "/var/www/html/xps_sync_delete.lc" file "/var/www/html/xps_sync.livecode" row 7, col 6: Function: error in function handler (DoesItWork) row 7, col 6: put: error in expression Here is the simple password protected function: function DoesItWork return "It Works" end DoesItWork On Sat, Nov 17, 2018 at 9:26 PM Todd Fabacher wrote: > SUPER..I FOUND IT AND THE ANSWER IS YES!!! > > This changes my entire concept of using LiveCode online. I can do full > debugging in my app and just take the functionality I want and move it > online. > > FANTASTIC!! > > On Sat, Nov 17, 2018 at 9:21 PM Todd Fabacher wrote: > >> Quick question...we have some specific info in LC we need to put in a >> LiveCode web script to be run online. But we need to protect the content. >> Can we put that in a password protected script, drop it online and add it >> in as an "Include"?? >> >> Thanks, this would be SUPER helpful, >> >> Todd >> >> >> From tfabacher at gmail.com Sat Nov 17 23:43:50 2018 From: tfabacher at gmail.com (Todd Fabacher) Date: Sat, 17 Nov 2018 23:43:50 -0500 Subject: use password protected scripts on LC web server In-Reply-To: References: Message-ID: I finally got it to work, just don't do "include" the script, but only do "start using" On Sat, Nov 17, 2018 at 10:30 PM Todd Fabacher wrote: > I got the LC Indy web server installed and it can connect to the DB and > return JSON. > > But as soon as I reference a password protected script file, it gave me an > error. > > // Database > include "model.lc" > include "xps_sync.livecode" > > --I even tried "start using", but did not help > --was getting: row 6, col 1: Chunk: can't find stack > --start using stack "xps_sync" > > put DoesItWork() -- Simple function that returns "It Works" > ?> > > This is the error I am getting: > > REVO7000 > > file "/var/www/html/model.lc" > file "/var/www/html/xps_sync_delete.lc" > file "/var/www/html/xps_sync.livecode" > row 7, col 6: Function: error in function handler (DoesItWork) > row 7, col 6: put: error in expression > > > Here is the simple password protected function: > > function DoesItWork > > return "It Works" > > end DoesItWork > > On Sat, Nov 17, 2018 at 9:26 PM Todd Fabacher wrote: > >> SUPER..I FOUND IT AND THE ANSWER IS YES!!! >> >> This changes my entire concept of using LiveCode online. I can do full >> debugging in my app and just take the functionality I want and move it >> online. >> >> FANTASTIC!! >> >> On Sat, Nov 17, 2018 at 9:21 PM Todd Fabacher >> wrote: >> >>> Quick question...we have some specific info in LC we need to put in a >>> LiveCode web script to be run online. But we need to protect the content. >>> Can we put that in a password protected script, drop it online and add it >>> in as an "Include"?? >>> >>> Thanks, this would be SUPER helpful, >>> >>> Todd >>> >>> >>> From paul at livecode.org Sun Nov 18 00:23:45 2018 From: paul at livecode.org (Paul Hibbert) Date: Sat, 17 Nov 2018 21:23:45 -0800 Subject: where can I learn about macOS app Help menu Search menu item? In-Reply-To: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> References: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> Message-ID: AFAIK the ?Search? feature in the Help menu is mainly for searching Menu items, try it while you are in Mail and search for ?Accounts?, then each menu item that contains ?Accounts? will appear at the top of the list with more generic Apple ?Accounts? related subjects below. As you mouse over each item in the top part of the list, the Menu is opened and the item is highlighted. From what I?ve seen, it works the same with any LC app, so I don?t think you need to do anything special other than create a Menu for your app. I don?t know of any way to populate it with any different information, but there maybe. Paul > On 17 Nov 2018, at 19:11, kee nethery via use-livecode wrote: > > Building a macOS app and in the Help menu, the top menu item is ?Search? with a search field. How do I populate the data that gets searched so that answers to questions about the app can live there? Trying to search for ?search? and ?Menu? is not useful. > > Thanks, > > Kee Nethery > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 18 00:39:31 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Sun, 18 Nov 2018 00:39:31 -0500 Subject: where can I learn about macOS app Help menu Search menu item? In-Reply-To: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> References: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> Message-ID: <2E88EF9F-6C32-4203-B110-69A2F01D0721@all-auctions.com> Hi Kee, I found that any search term input seems to just look at the Mac?s HelpViewer app that is located under the system library core services. I haven?t found where it stores it?s files yet or if I can put my own stuff in there somewhere. What I do instead of that is provide links to my user manual, website and feedback support email. I provide a search routine on my website that accesses my app?s user manual etc. If you come up with a better solution, I?m all eyes and ears on it! Rick > On Nov 17, 2018, at 10:11 PM, kee nethery via use-livecode wrote: > > Building a macOS app and in the Help menu, the top menu item is ?Search? with a search field. How do I populate the data that gets searched so that answers to questions about the app can live there? Trying to search for ?search? and ?Menu? is not useful. > > Thanks, > > Kee Nethery From jacque at hyperactivesw.com Sun Nov 18 00:58:39 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sat, 17 Nov 2018 23:58:39 -0600 Subject: Stack Height/Menubar In-Reply-To: <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> Message-ID: <2d81bbb8-d4c4-14fd-93d9-150ad7528853@hyperactivesw.com> On 11/17/18 12:49 PM, Rick Harrison via use-livecode wrote: > Does anyone have a nice routine which > will compensate for the change in layout > by moving all other objects farther down? > I thought I saw a mention this before. on pushDown repeat with x = 1 to the number of bgs set the top of bg x to the top of bg x + 22 end repeat repeat with x = 1 to the number of cds go cd x repeat with n = 1 to the number of cd parts set the top of cd part n to the top of cd part n + 22 end repeat end repeat end pushDown This is from a HyperCard-to-LC conversion tutorial. "Parts" is a HC synonym for "controls", which you can substitute if you want. The default menubar height used to be 22, but change that number if you need to. Tutorial covering menus is here: And the above handler is here: -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com From smudge.andy at googlemail.com Sun Nov 18 07:38:34 2018 From: smudge.andy at googlemail.com (AndyP) Date: Sun, 18 Nov 2018 06:38:34 -0600 (CST) Subject: use password protected scripts on LC web server In-Reply-To: References: Message-ID: <1542544714064-0.post@n4.nabble.com> You can also put your LC scripts outside the public web root, then include them in a calling LC script for extra security. ----- Andy Piddock My software never has bugs. It just develops random features. TinyIDE a Free alternative minimalist IDE Plugin for LiveCode Script editor Themer for LC http://2108.co.uk PointandSee is a FREE simple but full featured under cursor colour picker / finder. http://www.pointandsee.co.uk - made with LiveCode -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From bob at bobhall.net Sun Nov 18 09:18:04 2018 From: bob at bobhall.net (bob at bobhall.net) Date: Sun, 18 Nov 2018 09:18:04 -0500 Subject: Array editing or Validate JSON string? In-Reply-To: <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> Message-ID: Livecode provides a text editor to, well, edit text. It does not understand the syntax/grammar of languages (Livecode, HTML, Javascript, JSON, YML, etc). What you need is an editor that ?knows" JSON. Your best bet is to copy the text into Sublime, Visual Studio Code or Atom which do understand JSON?s syntax/grammar. There may be some configuration to the tool you will need to do but you will get indications from these editors when you have malformed JSON. - Bob Hall > On Nov 17, 2018, at 6:39 PM, William Prothero via use-livecode wrote: > > What I would like to do is get a dialog that the JSON wasn?t formed correctly. Of course, since I?m using it for my personal development of my app, I can know that it failed if I don?t get the answer dialog I put in after it. but, it seems a kludge. Shouldn?t there be some kind of an error result if the JSON is ill-formed? From matthias_livecode_150811 at m-r-d.de Sun Nov 18 10:46:05 2018 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Sun, 18 Nov 2018 16:46:05 +0100 Subject: use password protected scripts on LC web server In-Reply-To: <1542544714064-0.post@n4.nabble.com> References: <1542544714064-0.post@n4.nabble.com> Message-ID: <0A4B0829-74AB-4672-8218-DD54E2BEF0BB@m-r-d.de> That?s the way i am doing it with the complete script, not only with confidential data. Most of my scripts in public web root just contain an include command e.g. The included file, which is stored outside the public web area then contains the complete script. So in any case the Livecode Server engine is not running, the web visitor just sees the include command and nothing else. Matthias Matthias Rebbe free tools for Livecoders: https://instamaker.dermattes.de https://winsignhelper.dermattes.de > Am 18.11.2018 um 13:38 schrieb AndyP via use-livecode : > > You can also put your LC scripts outside the public web root, then include > them in a calling LC script for extra security. > > > > ----- > Andy Piddock > > > My software never has bugs. It just develops random features. > > TinyIDE a Free alternative minimalist IDE Plugin for LiveCode > > > Script editor Themer for LC http://2108.co.uk > > PointandSee is a FREE simple but full featured under cursor colour picker / finder. > http://www.pointandsee.co.uk - made with LiveCode > -- > Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 18 12:29:32 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Sun, 18 Nov 2018 12:29:32 -0500 Subject: Stack Height/Menubar In-Reply-To: <2d81bbb8-d4c4-14fd-93d9-150ad7528853@hyperactivesw.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> <2d81bbb8-d4c4-14fd-93d9-150ad7528853@hyperactivesw.com> Message-ID: <54F712F8-BBAF-4720-BDEE-0EE92C62AA62@all-auctions.com> Hi Jacqueline, Thanks for pointing out this routine. I have some modifications I need to make to it though. I have to check to see if any items are locked, and unlock them before changing the location and then re-lock them after the change. The number of controls also includes groups which are made up of buttons so I will have to modify my calculation there. I also read your informative links to the other menu tutorials. Thanks, Rick > On Nov 18, 2018, at 12:58 AM, J. Landman Gay via use-livecode wrote: > > On 11/17/18 12:49 PM, Rick Harrison via use-livecode wrote: >> Does anyone have a nice routine which >> will compensate for the change in layout >> by moving all other objects farther down? >> I thought I saw a mention this before. > > on pushDown > repeat with x = 1 to the number of bgs > set the top of bg x to the top of bg x + 22 > end repeat > repeat with x = 1 to the number of cds > go cd x > repeat with n = 1 to the number of cd parts > set the top of cd part n to the top of cd part n + 22 > end repeat > end repeat > end pushDown > > This is from a HyperCard-to-LC conversion tutorial. "Parts" is a HC synonym for "controls", which you can substitute if you want. The default menubar height used to be 22, but change that number if you need to. > > Tutorial covering menus is here: > > And the above handler is here: > > > -- > 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 Sun Nov 18 12:58:58 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 18 Nov 2018 11:58:58 -0600 Subject: Stack Height/Menubar In-Reply-To: <54F712F8-BBAF-4720-BDEE-0EE92C62AA62@all-auctions.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> <2d81bbb8-d4c4-14fd-93d9-150ad7528853@hyperactivesw.com> <54F712F8-BBAF-4720-BDEE-0EE92C62AA62@all-auctions.com> Message-ID: <16727f9bed0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Scripts can move locked controls, so you won't have to worry about that. If the groups are shared (background groups) their content will move with them and the script won't touch those buttons. It will also move card groups, so you may need to check for the content controls in that case. You were right that if you know there will be a menubar it should be placed first, or at least space should be reserved for it. I made the same mistake the first time. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 18, 2018 11:31:32 AM Rick Harrison via use-livecode wrote: > Hi Jacqueline, > > Thanks for pointing out this routine. > > I have some modifications I need to > make to it though. > > I have to check to see if any items > are locked, and unlock them before > changing the location and then > re-lock them after the change. > > The number of controls also includes > groups which are made up of buttons > so I will have to modify my calculation > there. > > I also read your informative links to > the other menu tutorials. > > Thanks, > > Rick > > >> On Nov 18, 2018, at 12:58 AM, J. Landman Gay via use-livecode >> wrote: >> >> On 11/17/18 12:49 PM, Rick Harrison via use-livecode wrote: >>> Does anyone have a nice routine which >>> will compensate for the change in layout >>> by moving all other objects farther down? >>> I thought I saw a mention this before. >> >> on pushDown >> repeat with x = 1 to the number of bgs >> set the top of bg x to the top of bg x + 22 >> end repeat >> repeat with x = 1 to the number of cds >> go cd x >> repeat with n = 1 to the number of cd parts >> set the top of cd part n to the top of cd part n + 22 >> end repeat >> end repeat >> end pushDown >> >> This is from a HyperCard-to-LC conversion tutorial. "Parts" is a HC synonym >> for "controls", which you can substitute if you want. The default menubar >> height used to be 22, but change that number if you need to. >> >> Tutorial covering menus is here: >> >> And the above handler is here: >> >> >> -- >> 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 harrison at all-auctions.com Sun Nov 18 13:10:32 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Sun, 18 Nov 2018 13:10:32 -0500 Subject: Stack Height/Menubar In-Reply-To: <16727f9bed0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <286881A8-161F-435F-9345-842A5E40BDF0@btinternet.com> <236d0a8d-ff13-6907-c54c-5dd7e47cc273@researchware.com> <29686EAB-4E5A-4306-885C-123CA97E4BF2@btinternet.com> <5D3583ED-75B1-4B8F-8884-491663C576AA@major-k.de> <93A34CF1-7BF3-4757-BB79-50ADB7D081DD@major-k.de> <46BD01F8-DD1C-481E-8F43-73F02968E9C1@all-auctions.com> <71DC34D7-53E7-4707-9693-0134D7557A7D@iotecdigital.com> <75951C0D-A836-43DE-B1BB-9E9AFE1A38BE@all-auctions.com> <2d81bbb8-d4c4-14fd-93d9-150ad7528853@hyperactivesw.com> <54F712F8-BBAF-4720-BDEE-0EE92C62AA62@all-auctions.com> <16727f9bed0.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <2B550CAA-C6ED-4992-8153-0C6447BAB7FC@all-auctions.com> Nice, I didn?t know it would work on locked controls. This app was originally for iOS so that was what caught me. Thanks again, Rick > On Nov 18, 2018, at 12:58 PM, J. Landman Gay via use-livecode wrote: > > Scripts can move locked controls, so you won't have to worry about that. If the groups are shared (background groups) their content will move with them and the script won't touch those buttons. It will also move card groups, so you may need to check for the content controls in that case. > > You were right that if you know there will be a menubar it should be placed first, or at least space should be reserved for it. I made the same mistake the first time. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > From gcanyon at gmail.com Sun Nov 18 13:28:30 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Sun, 18 Nov 2018 10:28:30 -0800 Subject: bignum math library Message-ID: I've created bignum libraries in the past, but never organized it or did all four operators. So I started with earlier versions of some of the functions, optimized, corrected, and extended, and here it is: https://github.com/gcanyon/bignum It includes functions for addition, subtraction, multiplication, division, and comparison/equals. All functions handle any length of argument. Most have options that handle signed arguments. The functions are optimized for things like different-length arguments. Some performance benchmarks on my five-year-old laptop: Add two 10,000 digit numbers: 0.005 seconds. Add two 10,000 digit numbers: 0.004 seconds. Multiply two 10,000 digit numbers: 3.1 seconds. Divide a 10,000 digit number by a 5,000 digit number: 9.4 seconds -- needs some optimization. For division in particular, I wrote a faster algorithm that is included, but there is a bug in the final steps that I haven't figured out yet. bigDivFlawed is about 40% faster than bigDiv, but can bork the last few digits of the quotient. Included in case anyone sees the logic error. If anyone has any suggestions, let me know here, or file bug reports on github, or code and submit a pull request. A list of the functions included: function bigAdd -- returns the sum function bigAddSigned -- handles positive and negative arguments function bigSubtract -- returns the difference function bigSubtractSigned -- handles positive and negative arguments function bigTimes -- returns the product function bigTimesSigned -- handles positive and negative arguments function bigDiv -- returns (the integer quotient),(the remainder) function bigDivSigned -- handles positive and negative arguments function bigishDiv -- Handles any length dividend; divisor must be a valid LC number (< 16 digits) function bigDivFlawed -- About 40% faster than bigDiv, but can bork the last few digits of the quotient. Included in case anyone sees the logic error. function bigCompare -- Applies >,<,=,<=,>= to any length arguments function stripLeadingZeros -- returns any string without whatever leading zeros it contains From prothero at earthlearningsolutions.org Sun Nov 18 13:30:30 2018 From: prothero at earthlearningsolutions.org (prothero at earthlearningsolutions.org) Date: Sun, 18 Nov 2018 10:30:30 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> Message-ID: <2655E6EB-D091-4755-B68A-284C6C92FAD8@earthlearningsolutions.org> Bob, Tnx for the info. However, isn?t it reasonable that the LC conversion should respond with some indication that it can?t do the JSON to array conversion, rather than throw a script error? Bill William Prothero http://es.earthednet.org > On Nov 18, 2018, at 6:18 AM, bob--- via use-livecode wrote: > > Livecode provides a text editor to, well, edit text. It does not understand the syntax/grammar of languages (Livecode, HTML, Javascript, JSON, YML, etc). What you need is an editor that ?knows" JSON. > > Your best bet is to copy the text into Sublime, Visual Studio Code or Atom which do understand JSON?s syntax/grammar. There may be some configuration to the tool you will need to do but you will get indications from these editors when you have malformed JSON. > > - Bob Hall > >> On Nov 17, 2018, at 6:39 PM, William Prothero via use-livecode wrote: >> >> What I would like to do is get a dialog that the JSON wasn?t formed correctly. Of course, since I?m using it for my personal development of my app, I can know that it failed if I don?t get the answer dialog I put in after it. but, it seems a kludge. Shouldn?t there be some kind of an error result if the JSON is ill-formed? > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Sun Nov 18 14:40:14 2018 From: jacque at hyperactivesw.com (J. Landman Gay) Date: Sun, 18 Nov 2018 13:40:14 -0600 Subject: Array editing or Validate JSON string? In-Reply-To: <2655E6EB-D091-4755-B68A-284C6C92FAD8@earthlearningsolutions.org> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> <2655E6EB-D091-4755-B68A-284C6C92FAD8@earthlearningsolutions.org> Message-ID: <16728567530.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> When I needed to check JSON validation, I put the JSONToArray function inside a "try" structure. The catch clause will trigger and tell you there's an error. It isn't too much different than what the editor does but It can give you a clue. -- Jacqueline Landman Gay | jacque at hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 18, 2018 12:32:27 PM prothero--- via use-livecode wrote: > Bob, > Tnx for the info. However, isn?t it reasonable that the LC conversion > should respond with some indication that it can?t do the JSON to array > conversion, rather than throw a script error? > > Bill > > William Prothero > http://es.earthednet.org > >> On Nov 18, 2018, at 6:18 AM, bob--- via use-livecode >> wrote: >> >> Livecode provides a text editor to, well, edit text. It does not understand >> the syntax/grammar of languages (Livecode, HTML, Javascript, JSON, YML, >> etc). What you need is an editor that ?knows" JSON. >> >> Your best bet is to copy the text into Sublime, Visual Studio Code or Atom >> which do understand JSON?s syntax/grammar. There may be some configuration >> to the tool you will need to do but you will get indications from these >> editors when you have malformed JSON. >> >> - Bob Hall >> >>> On Nov 17, 2018, at 6:39 PM, William Prothero via use-livecode >>> wrote: >>> >>> What I would like to do is get a dialog that the JSON wasn?t formed >>> correctly. Of course, since I?m using it for my personal development of my >>> app, I can know that it failed if I don?t get the answer dialog I put in >>> after it. but, it seems a kludge. Shouldn?t there be some kind of an error >>> result if the JSON is ill-formed? >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 prothero at earthlearningsolutions.org Sun Nov 18 15:14:07 2018 From: prothero at earthlearningsolutions.org (prothero at earthlearningsolutions.org) Date: Sun, 18 Nov 2018 12:14:07 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: <16728567530.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> <2655E6EB-D091-4755-B68A-284C6C92FAD8@earthlearningsolutions.org> <16728567530.27a5.5e131b4e58299f54a9f0b9c05d4f07f9@hyperactivesw.com> Message-ID: <07C484D5-C1E8-475E-9ACE-A3A0EBA407DD@earthlearningsolutions.org> Jacqueline, Thanks. Makes sense. I?ll do that. Bill William Prothero http://es.earthednet.org > On Nov 18, 2018, at 11:40 AM, J. Landman Gay via use-livecode wrote: > > When I needed to check JSON validation, I put the JSONToArray function inside a "try" structure. The catch clause will trigger and tell you there's an error. It isn't too much different than what the editor does but It can give you a clue. > > -- > Jacqueline Landman Gay | jacque at hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On November 18, 2018 12:32:27 PM prothero--- via use-livecode wrote: >> >> Bob, >> Tnx for the info. However, isn?t it reasonable that the LC conversion should respond with some indication that it can?t do the JSON to array conversion, rather than throw a script error? >> >> Bill >> >> William Prothero >> http://es.earthednet.org >> >>> On Nov 18, 2018, at 6:18 AM, bob--- via use-livecode wrote: >>> >>> Livecode provides a text editor to, well, edit text. It does not understand the syntax/grammar of languages (Livecode, HTML, Javascript, JSON, YML, etc). What you need is an editor that ?knows" JSON. >>> >>> Your best bet is to copy the text into Sublime, Visual Studio Code or Atom which do understand JSON?s syntax/grammar. There may be some configuration to the tool you will need to do but you will get indications from these editors when you have malformed JSON. >>> >>> - Bob Hall >>> >>>> On Nov 17, 2018, at 6:39 PM, William Prothero via use-livecode wrote: >>>> >>>> What I would like to do is get a dialog that the JSON wasn?t formed correctly. Of course, since I?m using it for my personal development of my app, I can know that it failed if I don?t get the answer dialog I put in after it. but, it seems a kludge. Shouldn?t there be some kind of an error result if the JSON is ill-formed? >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 tom at makeshyft.com Sun Nov 18 17:20:52 2018 From: tom at makeshyft.com (Tom Glod) Date: Sun, 18 Nov 2018 17:20:52 -0500 Subject: bignum math library In-Reply-To: References: Message-ID: very impressed ..thank you. On Sun, Nov 18, 2018 at 1:29 PM Geoff Canyon via use-livecode < use-livecode at lists.runrev.com> wrote: > I've created bignum libraries in the past, but never organized it or did > all four operators. So I started with earlier versions of some of the > functions, optimized, corrected, and extended, and here it is: > https://github.com/gcanyon/bignum > > It includes functions for addition, subtraction, multiplication, division, > and comparison/equals. All functions handle any length of argument. Most > have options that handle signed arguments. The functions are optimized for > things like different-length arguments. > > Some performance benchmarks on my five-year-old laptop: > > Add two 10,000 digit numbers: 0.005 seconds. > Add two 10,000 digit numbers: 0.004 seconds. > Multiply two 10,000 digit numbers: 3.1 seconds. > Divide a 10,000 digit number by a 5,000 digit number: 9.4 seconds -- needs > some optimization. > > For division in particular, I wrote a faster algorithm that is included, > but there is a bug in the final steps that I haven't figured out yet. > bigDivFlawed is about 40% faster than bigDiv, but can bork the last few > digits of the quotient. Included in case anyone sees the logic error. > > If anyone has any suggestions, let me know here, or file bug reports on > github, or code and submit a pull request. > > A list of the functions included: > > > function bigAdd -- returns the sum > function bigAddSigned -- handles positive and negative arguments > function bigSubtract -- returns the difference > function bigSubtractSigned -- handles positive and negative arguments > function bigTimes -- returns the product > function bigTimesSigned -- handles positive and negative arguments > function bigDiv -- returns (the integer quotient),(the remainder) > function bigDivSigned -- handles positive and negative arguments > function bigishDiv -- Handles any length dividend; divisor must be a valid > LC number (< 16 digits) > function bigDivFlawed -- About 40% faster than bigDiv, but can bork the > last few digits of the quotient. Included in case anyone sees the logic > error. > function bigCompare -- Applies >,<,=,<=,>= to any length arguments > function stripLeadingZeros -- returns any string without whatever leading > zeros it contains > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Nov 18 21:12:21 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Mon, 19 Nov 2018 02:12:21 +0000 Subject: OT: iOS Policies Message-ID: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> Well, by setting the target to iOS 8. The apps went through. ?but then FWIW It was rejected: I got a message saying that "you have unfilter access to YouTube, you must set the app for (age) 12+) I had it sent for age 4+ Send for review; wait a day.. Rejected Again! Guideline 2.3.10 - Performance - Accurate Metadata We noticed that your app or its metadata includes irrelevant third-party platform information. Specifically, your app includes Android references in the ?app news? section. Referencing third-party platforms in your app or its metadata is not permitted on the App Store unless there is specific interactive functionality. Next Steps To resolve this issue, please remove all instances of this information from your app and its metadata, including the app description, promotional text, What's New info, previews, and screenshots. In the "App News" (which called from the server) I made the mistake of saying ======= Version 1.3 With version 1.3, we hope to have resolved some issues for Android users. The operating system is more robust. The app is less likely to quite.] So, if the see any reference to android, Rejected! Somehow that feels "just wrong" to me? I use Macs but?. "greed incarnate" keeps coming up in my word cloud From rdimola at evergreeninfo.net Sun Nov 18 21:44:24 2018 From: rdimola at evergreeninfo.net (Ralph DiMola) Date: Sun, 18 Nov 2018 21:44:24 -0500 Subject: iOS Policies In-Reply-To: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> References: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> Message-ID: <004101d47fb1$cb2203d0$61660b70$@net> BR, I once got rejected for the same thing. When you play with a trillion dollar company they call all the shots. 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: Sunday, November 18, 2018 9:12 PM To: How LiveCode Cc: Sannyasin Brahmanathaswami Subject: OT: iOS Policies Well, by setting the target to iOS 8. The apps went through. ?but then FWIW It was rejected: I got a message saying that "you have unfilter access to YouTube, you must set the app for (age) 12+) I had it sent for age 4+ Send for review; wait a day.. Rejected Again! Guideline 2.3.10 - Performance - Accurate Metadata We noticed that your app or its metadata includes irrelevant third-party platform information. Specifically, your app includes Android references in the ?app news? section. Referencing third-party platforms in your app or its metadata is not permitted on the App Store unless there is specific interactive functionality. Next Steps To resolve this issue, please remove all instances of this information from your app and its metadata, including the app description, promotional text, What's New info, previews, and screenshots. In the "App News" (which called from the server) I made the mistake of saying ======= Version 1.3 With version 1.3, we hope to have resolved some issues for Android users. The operating system is more robust. The app is less likely to quite.] So, if the see any reference to android, Rejected! Somehow that feels "just wrong" to me? I use Macs but?. "greed incarnate" keeps coming up in my word cloud _______________________________________________ use-livecode mailing list use-livecode at lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode From colinholgate at gmail.com Sun Nov 18 22:03:59 2018 From: colinholgate at gmail.com (Colin Holgate) Date: Sun, 18 Nov 2018 20:03:59 -0700 Subject: iOS Policies In-Reply-To: <004101d47fb1$cb2203d0$61660b70$@net> References: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> <004101d47fb1$cb2203d0$61660b70$@net> Message-ID: <6BA159F0-EF71-4143-BD03-D555F6044809@gmail.com> I?ve seen similar issues if you add in awards, such as ?Best App in Google Play?. Pretty sure Amazon are similar about promoting other apps stores, and even Google apps go through a review process. You wouldn?t dream of putting ?Support for iOS 12 and iPhone X? in your Android submissions, though you might get away with it. Just get used to only having meta data that is needed for that particular store. From hh at hyperhh.de Mon Nov 19 02:14:54 2018 From: hh at hyperhh.de (hh) Date: Mon, 19 Nov 2018 08:14:54 +0100 Subject: bignum math library Message-ID: <229944E3-2702-4560-906C-A6621C9AB639@hyperhh.de> On LC Global (Nov 2018, Monthly report) Kevin and Ali announced among others "Decimal Number Implementation", see my screenshot http://forums.livecode.com/viewtopic.php?f=76&t=31797 This is probably close to an arbitrary-precision Decimal type, I know the javascript version: https://github.com/MikeMcl/decimal.js/ Perhaps it is possible to have "synergetic effects" by joining your work? From sean at pidigital.co.uk Mon Nov 19 02:55:11 2018 From: sean at pidigital.co.uk (Pi Digital) Date: Mon, 19 Nov 2018 07:55:11 +0000 Subject: where can I learn about macOS app Help menu Search menu item? In-Reply-To: <2E88EF9F-6C32-4203-B110-69A2F01D0721@all-auctions.com> References: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> <2E88EF9F-6C32-4203-B110-69A2F01D0721@all-auctions.com> Message-ID: <86342CDD-2776-4AE3-84B6-BEAAABDBFD43@pidigital.co.uk> Here?s the link to the Apple Dev page for help view files https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/authoring_help/authoring_help_book.html Once you apply this with your app it is searchable along with menu items. Sean Cole Pi Digital Prod Ltd > On 18 Nov 2018, at 05:39, Rick Harrison via use-livecode wrote: > > Hi Kee, > > I found that any search term input seems to just look > at the Mac?s HelpViewer app that is located under the > system library core services. I haven?t found where > it stores it?s files yet or if I can put my own stuff in there > somewhere. > > What I do instead of that is provide links to my > user manual, website and feedback support email. > I provide a search routine on my website that > accesses my app?s user manual etc. > > If you come up with a better solution, I?m all > eyes and ears on it! > > Rick > > > > >> On Nov 17, 2018, at 10:11 PM, kee nethery via use-livecode wrote: >> >> Building a macOS app and in the Help menu, the top menu item is ?Search? with a search field. How do I populate the data that gets searched so that answers to questions about the app can live there? Trying to search for ?search? and ?Menu? is not useful. >> >> Thanks, >> >> Kee Nethery > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From panos.merakos at livecode.com Mon Nov 19 08:06:27 2018 From: panos.merakos at livecode.com (panagiotis merakos) Date: Mon, 19 Nov 2018 15:06:27 +0200 Subject: [ANN] This Week in LiveCode 155 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 #155 here: https://goo.gl/XWwUDg 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 you 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 iowahengst at mac.com Mon Nov 19 08:47:28 2018 From: iowahengst at mac.com (Randy Hengst) Date: Mon, 19 Nov 2018 07:47:28 -0600 Subject: OT: iOS Policies In-Reply-To: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> References: <83171BD1-8FC2-4827-8003-3F2E72063FAF@hindu.org> Message-ID: <9F2D6492-842B-4D2E-BBDE-805D495473CB@mac.com> I?ve had an app rejected for metadata, too. I put an app of 20 single verse poems on the store. In my description of the app I mentioned that the poems were ?under development? and I looked forward to feedback and adding new verses. The rejection stated that no ?beta? software can be on the app store. All I did was remove ?under development? from the description and then it was accepted. be well, randy www.classroomFocusedSoftware.com > On Nov 18, 2018, at 8:12 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > > Well, by setting the target to iOS 8. The apps went through. ?but then > > FWIW > It was rejected: > > I got a message saying that "you have unfilter access to YouTube, you must set the app for (age) 12+) > I had it sent for age 4+ > > Send for review; wait a day.. > > Rejected Again! > Guideline 2.3.10 - Performance - Accurate Metadata > > We noticed that your app or its metadata includes irrelevant third-party platform information. > Specifically, your app includes Android references in the ?app news? section. > Referencing third-party platforms in your app or its metadata is not permitted on the App Store unless there is specific interactive functionality. > > Next Steps > To resolve this issue, please remove all instances of this information from your app and its metadata, including the app description, promotional text, What's New info, previews, and screenshots. > In the "App News" (which called from the server) I made the mistake of saying > ======= > Version 1.3 > With version 1.3, we hope to have resolved some issues for Android users. The operating system is more robust. The app is less likely to quite.] > > So, if the see any reference to android, Rejected! > Somehow that feels "just wrong" to me? I use Macs but?. "greed incarnate" keeps coming up in my word cloud > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From andre at andregarzia.com Mon Nov 19 09:28:59 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Mon, 19 Nov 2018 14:28:59 +0000 Subject: [ANN] LiveCode Advanced Application Architecture book available In-Reply-To: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> References: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> Message-ID: Aloha Friends, There was a mistake in the final book generation, a chapter was missing. I've issued a two new updates today to fix this. All the readers should have received an email about it. If you purchased and did not receive the email, please, let me know. Cheers andre On 11/15/2018 7:44 PM, Andre Alves Garzia wrote: > Hi Friends, > > I've just released a new LiveCode book in the wild. It is called > "LiveCode Advanced Application Architecture" and it deals with Best > Practices from our community and the MVC pattern. > > With the techniques contained in it you will build applications that > are easier to maintain and adapt leading to a more fun and profitable > future. > > The book is offered here for GBP 15 and is comes in a zip file > containing the book in PDF, Mobi and ePub formats without DRM and the > source code, you can buy it by clicking here: https://sowl.co/cqnKW > > BUT WAIIIIITTTT!!!! > > I've made a delicious bundle for you! I am offering a bundle of: > > ? * DB Lib: The most user friendly database library for LiveCode. > > ? * The book: The newest LiveCode book. > > ? * Network Tracer: A handy utility to help you debug your standalones. > > ? * AAG | Tools: A collection of little plugins for the IDE > > For GBP 100, which is a heavy discount, basically the book is free and > all the rest is 30% discounted. But there is moooooore! > > The first 50 people to get this bundle will be able to schedule a > one-on-one call with me to help them out with LiveCode related issues, > which is something I don't usually offer. You can get this bundle at: > https://sowl.co/BAAZl > > Don't forget to check all things LiveCode at my home page: > https://andregarzia.com/livecode > > I hope you folks like this bundle and book. My plans is to schedule > the one-on-one calls between November 2018 and March 2019, first come, > first served. > > Cheers > > andre > > From ludovic.thebault at laposte.net Mon Nov 19 11:37:53 2018 From: ludovic.thebault at laposte.net (Ludovic THEBAULT) Date: Mon, 19 Nov 2018 17:37:53 +0100 Subject: [ANN] LiveCode Advanced Application Architecture book available In-Reply-To: References: <5443b500-54ec-3186-26b9-60e6f81fb207@andregarzia.com> Message-ID: > Le 19 nov. 2018 ? 15:28, Andre Alves Garzia via use-livecode a ?crit : > > Aloha Friends, > > There was a mistake in the final book generation, a chapter was missing. I've issued a two new updates today to fix this. All the readers should have received an email about it. If you purchased and did not receive the email, please, let me know. > > Cheers > > andre Hello, I got it but in the spam folder. Thanks for this book ! Ludovic From mark at canelasoftware.com Mon Nov 19 12:05:22 2018 From: mark at canelasoftware.com (Mark Talluto) Date: Mon, 19 Nov 2018 09:05:22 -0800 Subject: Array editing or Validate JSON string? In-Reply-To: <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> References: <7861DCF0-D127-4723-B63B-B8AF9E5F02E0@gmail.com> <829FC9F4-B0A0-4E59-A254-C4122D8367FB@canelasoftware.com> <1C833F64-981B-4E3C-A533-85E7E82E2153@gmail.com> Message-ID: I always appreciate error reporting. I ran into the same problem. Sometimes you can see the error easily enough. But, in complex arrays, it is harder to see the error when looking at JSON. For this reason, I find dropping it into a validator to be useful. They can point you in the right direction to fix the JSON. But, if you are trying to pick up on this programmatically in an app, the best you can do is check for success or failure by looking for data in the array. If it is not there, an error took place. Best regards, Mark Talluto livecloud.io nursenotes.net canelasoftware.com > On Nov 17, 2018, at 3:39 PM, William Prothero via use-livecode wrote: > > Folks: > I guess I could have been more clear. I am editing the JSON directly in a text field. If I make a mistake, then use JSONToArray, the program just fails silently. What I would like to do is get a dialog that the JSON wasn?t formed correctly. Of course, since I?m using it for my personal development of my app, I can know that it failed if I don?t get the answer dialog I put in after it. but, it seems a kludge. Shouldn?t there be some kind of an error result if the JSON is ill-formed? > Best, > Bill > >> On Nov 16, 2018, at 1:57 PM, Mark Talluto via use-livecode wrote: >> >> Hi Bill, >> >> My favorite JSON validator is: https://jsonformatter.curiousconcept.com >> >> >> Best regards, >> >> Mark Talluto >> livecloud.io >> nursenotes.net >> canelasoftware.com >> >> >> >> >>> On Nov 15, 2018, at 3:09 PM, William Prothero via use-livecode wrote: >>> >>> Hi, I?m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string. >>> >>> Or, perhaps there is an easier way to display and edit a pretty simple array. >>> >>> Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script. >>> >>> Best, >>> Bill >>> >>> William A. Prothero >>> http://earthlearningsolutions.org >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 kee.nethery at elloco.com Mon Nov 19 12:50:08 2018 From: kee.nethery at elloco.com (kee nethery) Date: Mon, 19 Nov 2018 09:50:08 -0800 Subject: where can I learn about macOS app Help menu Search menu item? In-Reply-To: <86342CDD-2776-4AE3-84B6-BEAAABDBFD43@pidigital.co.uk> References: <45F65053-AC31-4582-8FDA-D2EE4B9ACF83@elloco.com> <2E88EF9F-6C32-4203-B110-69A2F01D0721@all-auctions.com> <86342CDD-2776-4AE3-84B6-BEAAABDBFD43@pidigital.co.uk> Message-ID: <2AD6EB10-4D56-4C5C-BF9D-DEEB01119CBA@elloco.com> Awesome. thanks! Kee > On Nov 18, 2018, at 11:55 PM, Pi Digital via use-livecode wrote: > > Here?s the link to the Apple Dev page for help view files > > https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/authoring_help/authoring_help_book.html > > Once you apply this with your app it is searchable along with menu items. > > Sean Cole > Pi Digital Prod Ltd From kaveh at rivervalleytechnologies.com Mon Nov 19 13:07:16 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 18:07:16 +0000 Subject: Selecting text in non-focused field Message-ID: Am I right that if a field is not focused on in a card, then the text in it cannot be selected? I have a search field that I type in and when I press enter, it finds the string in another text field. But when the search box is focused on again the selection goes. I want to be able to have the search box focused all the time so I can vary the search. Any ideas pls? -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From dunbarx at aol.com Mon Nov 19 13:24:22 2018 From: dunbarx at aol.com (dunbarxx) Date: Mon, 19 Nov 2018 12:24:22 -0600 (CST) Subject: Selecting text in non-focused field In-Reply-To: References: Message-ID: <1542651862636-0.post@n4.nabble.com> Hi. Not sure exactly what you mean. You have a ("search") field that you type into, and the text in that field is then found in another field? How different is that process from this? On a card with two fields, in fld 1 type some text that already exists in fld 2. Then in a button script: on mouseUp find the text of fld 1 in fld 2 end mouseUp The "search" field retains focus. The same if there is an "enterInField" handler in the search field. The search field retains focus. But what is the point of keeping focus? What can you do if that happens, that you cannot do if focus is lost? And how are you working this, that the search field loses focus in the first place Craig Newman Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From dunbarx at aol.com Mon Nov 19 13:58:19 2018 From: dunbarx at aol.com (dunbarxx) Date: Mon, 19 Nov 2018 12:58:19 -0600 (CST) Subject: Selecting text in non-focused field In-Reply-To: <1542651862636-0.post@n4.nabble.com> References: <1542651862636-0.post@n4.nabble.com> Message-ID: <1542653899846-0.post@n4.nabble.com> Ah. Maybe the point is that you can continue typing, finding other strings as you go. OK. But my search field, with its "enterInField" handler: on enterinField find me end enterinField will find any text in any field, and continue to find as you either continue typing or delete what you already have. The search field retains focus. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From kaveh at rivervalleytechnologies.com Mon Nov 19 14:30:44 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 19:30:44 +0000 Subject: Selecting text in non-focused field In-Reply-To: <1542653899846-0.post@n4.nabble.com> References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> Message-ID: Hi Craig Thanks for your time. I should have given more details... i am indeed using enterInField (actually returnInField), and the focus remains the search box I started with the Find command, but then changed to using matchChunk, because: - The Find command shows a thin black border that is hard to see (any way of controlling this? - I want to do more complex stuff, e.g. - regex searches - Find all (extract lines containing the text) - Live search, so highlight item or items found as I type - Perhaps using different highlight colors for different types of finds Looking again, I have to reinvent some aspects that Find already has, e.g. - Searching from last item found - Options for whole word etc So thanks for that reminder! My questions now: - When I use matchChunk and select some text that is found (as if selecting manually), that selection disappears when the text field is not focussed. Any way around that? I am thinking I might use backgroundcolor, depending on speed - What control do I have on the style of the item found ? other than thin black line? - Has anyone written a full text editing or word processing program I can get ideas from? Thanks again Craig. :-) On Mon, 19 Nov 2018 at 18:59, dunbarxx via use-livecode < use-livecode at lists.runrev.com> wrote: > Ah. Maybe the point is that you can continue typing, finding other strings > as you go. OK. > > But my search field, with its "enterInField" handler: > on enterinField > find me > end enterinField > > will find any text in any field, and continue to find as you either > continue > typing or delete what you already have. The search field retains focus. > > Craig > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From kaveh at rivervalleytechnologies.com Mon Nov 19 14:30:44 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 19:30:44 +0000 Subject: Selecting text in non-focused field In-Reply-To: <1542653899846-0.post@n4.nabble.com> References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> Message-ID: Hi Craig Thanks for your time. I should have given more details... i am indeed using enterInField (actually returnInField), and the focus remains the search box I started with the Find command, but then changed to using matchChunk, because: - The Find command shows a thin black border that is hard to see (any way of controlling this? - I want to do more complex stuff, e.g. - regex searches - Find all (extract lines containing the text) - Live search, so highlight item or items found as I type - Perhaps using different highlight colors for different types of finds Looking again, I have to reinvent some aspects that Find already has, e.g. - Searching from last item found - Options for whole word etc So thanks for that reminder! My questions now: - When I use matchChunk and select some text that is found (as if selecting manually), that selection disappears when the text field is not focussed. Any way around that? I am thinking I might use backgroundcolor, depending on speed - What control do I have on the style of the item found ? other than thin black line? - Has anyone written a full text editing or word processing program I can get ideas from? Thanks again Craig. :-) On Mon, 19 Nov 2018 at 18:59, dunbarxx via use-livecode < use-livecode at lists.runrev.com> wrote: > Ah. Maybe the point is that you can continue typing, finding other strings > as you go. OK. > > But my search field, with its "enterInField" handler: > on enterinField > find me > end enterinField > > will find any text in any field, and continue to find as you either > continue > typing or delete what you already have. The search field retains focus. > > Craig > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From gcanyon at gmail.com Mon Nov 19 15:32:50 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 19 Nov 2018 12:32:50 -0800 Subject: bignum math library In-Reply-To: <229944E3-2702-4560-906C-A6621C9AB639@hyperhh.de> References: <229944E3-2702-4560-906C-A6621C9AB639@hyperhh.de> Message-ID: There are libraries for this stuff in C. I'm sure if they incorporate something in the engine my stuff would be entirely unnecessary. Anything in C is going to *far* outclass/speed anything I've done in script. On Sun, Nov 18, 2018 at 11:15 PM hh via use-livecode < use-livecode at lists.runrev.com> wrote: > On LC Global (Nov 2018, Monthly report) Kevin and Ali announced among > others "Decimal Number Implementation", see my screenshot > http://forums.livecode.com/viewtopic.php?f=76&t=31797 > > This is probably close to an arbitrary-precision Decimal type, > I know the javascript version: > https://github.com/MikeMcl/decimal.js/ > > Perhaps it is possible to have "synergetic effects" by joining your work? > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Mon Nov 19 15:35:51 2018 From: david.bovill at gmail.com (David Bovill) Date: Mon, 19 Nov 2018 20:35:51 +0000 Subject: iOS sharing extension Message-ID: 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? From dunbarx at aol.com Mon Nov 19 16:11:22 2018 From: dunbarx at aol.com (dunbarxx) Date: Mon, 19 Nov 2018 15:11:22 -0600 (CST) Subject: Selecting text in non-focused field In-Reply-To: References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> Message-ID: <1542661882611-0.post@n4.nabble.com> Have you tried selecting the foundChunk? If you are going to write a routine that checks all the fields on a card and catalog them, you can avoid the standard "find" command, and roll your own. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From kaveh at rivervalleytechnologies.com Mon Nov 19 16:30:31 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 21:30:31 +0000 Subject: Selecting text in non-focused field In-Reply-To: <1542661882611-0.post@n4.nabble.com> References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> <1542661882611-0.post@n4.nabble.com> Message-ID: Didn't know about foundChunk. Useful, thanks. :-) It is just one text field I am working on. On Mon, 19 Nov 2018 at 21:12, dunbarxx via use-livecode < use-livecode at lists.runrev.com> wrote: > Have you tried selecting the foundChunk? > > If you are going to write a routine that checks all the fields on a card > and > catalog them, you can avoid the standard "find" command, and roll your own. > > Craig > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From kaveh at rivervalleytechnologies.com Mon Nov 19 16:30:31 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 21:30:31 +0000 Subject: Selecting text in non-focused field In-Reply-To: <1542661882611-0.post@n4.nabble.com> References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> <1542661882611-0.post@n4.nabble.com> Message-ID: Didn't know about foundChunk. Useful, thanks. :-) It is just one text field I am working on. On Mon, 19 Nov 2018 at 21:12, dunbarxx via use-livecode < use-livecode at lists.runrev.com> wrote: > Have you tried selecting the foundChunk? > > If you are going to write a routine that checks all the fields on a card > and > catalog them, you can avoid the standard "find" command, and roll your own. > > Craig > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From brian at milby7.com Mon Nov 19 16:56:05 2018 From: brian at milby7.com (Brian Milby) Date: Mon, 19 Nov 2018 16:56:05 -0500 Subject: Selecting text in non-focused field In-Reply-To: References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> <1542661882611-0.post@n4.nabble.com> Message-ID: Are you meaning that you need to highlight text found in another field? ?Easiest way to describe what I?m referring to is the LC dictionary. ?If you type a term in the search box, the matches are highlighted yellow where they are found (syntax and synonym fields). ?Implementation would be completely different since the dictionary is coded in JavaScript. But, if that is what you are needing, then setting the style of the found chunks should give what you need (subject to the potential issue of performance). Thanks, Brian On Nov 19, 2018, 4:31 PM -0500, Kaveh Bazargan via use-livecode , wrote: > Didn't know about foundChunk. Useful, thanks. :-) > > It is just one text field I am working on. > > On Mon, 19 Nov 2018 at 21:12, dunbarxx via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Have you tried selecting the foundChunk? > > > > If you are going to write a routine that checks all the fields on a card > > and > > catalog them, you can avoid the standard "find" command, and roll your own. > > > > Craig > > > > > > > > -- > > Sent from: > > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From kaveh at rivervalleytechnologies.com Mon Nov 19 17:02:27 2018 From: kaveh at rivervalleytechnologies.com (Kaveh Bazargan) Date: Mon, 19 Nov 2018 22:02:27 +0000 Subject: Selecting text in non-focused field In-Reply-To: References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> <1542661882611-0.post@n4.nabble.com> Message-ID: Thanks Brian. I want to have a flexible search capability and that is indeed one of the things that would be good to have. I have a feeling it is going to be a bit slow so will need some tricks or compromise. For instance, only search if no key pressed for .5 seconds, so it not interrupting typing.. On Mon, 19 Nov 2018 at 21:57, Brian Milby via use-livecode < use-livecode at lists.runrev.com> wrote: > Are you meaning that you need to highlight text found in another field? > Easiest way to describe what I?m referring to is the LC dictionary. If you > type a term in the search box, the matches are highlighted yellow where > they are found (syntax and synonym fields). Implementation would be > completely different since the dictionary is coded in JavaScript. > > But, if that is what you are needing, then setting the style of the found > chunks should give what you need (subject to the potential issue of > performance). > > Thanks, > Brian > On Nov 19, 2018, 4:31 PM -0500, Kaveh Bazargan via use-livecode < > use-livecode at lists.runrev.com>, wrote: > > Didn't know about foundChunk. Useful, thanks. :-) > > > > It is just one text field I am working on. > > > > On Mon, 19 Nov 2018 at 21:12, dunbarxx via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > Have you tried selecting the foundChunk? > > > > > > If you are going to write a routine that checks all the fields on a > card > > > and > > > catalog them, you can avoid the standard "find" command, and roll your > own. > > > > > > Craig > > > > > > > > > > > > -- > > > Sent from: > > > > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > > > > > _______________________________________________ > > > use-livecode mailing list > > > use-livecode at lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > > -- > > Kaveh Bazargan > > Director > > River Valley Technologies ? > Twitter > > ? LinkedIn > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode 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 -- Kaveh Bazargan Director River Valley Technologies ? Twitter ? LinkedIn From bobsneidar at iotecdigital.com Mon Nov 19 17:26:09 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 19 Nov 2018 22:26:09 +0000 Subject: Selecting text in non-focused field In-Reply-To: References: <1542651862636-0.post@n4.nabble.com> <1542653899846-0.post@n4.nabble.com> <1542661882611-0.post@n4.nabble.com> Message-ID: I have a FindBar "object" (group of objects) that I use for querying a sql database. I ues rawKeyUp and a delay to do what you are trying to do. I think I have a demo stack up too with a datagrid and sqlite database. Look for it under Robert Sneidar. Bob S > On Nov 19, 2018, at 14:02 , Kaveh Bazargan via use-livecode wrote: > > Thanks Brian. I want to have a flexible search capability and that is > indeed one of the things that would be good to have. I have a feeling it is > going to be a bit slow so will need some tricks or compromise. For > instance, only search if no key pressed for .5 seconds, so it not > interrupting typing.. > > On Mon, 19 Nov 2018 at 21:57, Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Are you meaning that you need to highlight text found in another field? >> Easiest way to describe what I?m referring to is the LC dictionary. If you >> type a term in the search box, the matches are highlighted yellow where >> they are found (syntax and synonym fields). Implementation would be >> completely different since the dictionary is coded in JavaScript. >> >> But, if that is what you are needing, then setting the style of the found >> chunks should give what you need (subject to the potential issue of >> performance). >> >> Thanks, >> Brian >> On Nov 19, 2018, 4:31 PM -0500, Kaveh Bazargan via use-livecode < >> use-livecode at lists.runrev.com>, wrote: >>> Didn't know about foundChunk. Useful, thanks. :-) >>> >>> It is just one text field I am working on. >>> >>> On Mon, 19 Nov 2018 at 21:12, dunbarxx via use-livecode < >>> use-livecode at lists.runrev.com> wrote: >>> >>>> Have you tried selecting the foundChunk? >>>> >>>> If you are going to write a routine that checks all the fields on a >> card >>>> and >>>> catalog them, you can avoid the standard "find" command, and roll your >> own. >>>> >>>> Craig >>>> >>>> >>>> >>>> -- >>>> Sent from: >>>> >> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at lists.runrev.com >>>> Please visit this url to subscribe, unsubscribe and manage your >>>> subscription preferences: >>>> http://lists.runrev.com/mailman/listinfo/use-livecode >>>> >>> >>> >>> -- >>> Kaveh Bazargan >>> Director >>> River Valley Technologies ? >> Twitter >>> ? LinkedIn >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode 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 > > > > -- > Kaveh Bazargan > Director > River Valley Technologies ? Twitter > ? LinkedIn > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From hh at hyperhh.de Mon Nov 19 18:02:12 2018 From: hh at hyperhh.de (hh) Date: Tue, 20 Nov 2018 00:02:12 +0100 Subject: bignum math library Message-ID: Here's a scenario that makes your scripts nevertheless valuable. If they implement "Decimal number" for LC Builder, what I hope, because the numbers implementation in LCB is rather uncomplete. From gcanyon at gmail.com Mon Nov 19 18:26:04 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Mon, 19 Nov 2018 15:26:04 -0800 Subject: bignum math library In-Reply-To: References: Message-ID: Well, the code is theirs to use if it's useful. We'll see. On Mon, Nov 19, 2018 at 3:02 PM hh via use-livecode < use-livecode at lists.runrev.com> wrote: > Here's a scenario that makes your scripts nevertheless valuable. > > If they implement "Decimal number" for LC Builder, what I hope, > because the numbers implementation in LCB is rather uncomplete. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From andre at andregarzia.com Tue Nov 20 07:17:14 2018 From: andre at andregarzia.com (Andre Alves Garzia) Date: Tue, 20 Nov 2018 12:17:14 +0000 Subject: [OT] Send me your blogs Message-ID: Hey Friends, Recently I've returned to blogging and resumed reading and subscribing to interesting blogs. I've posted about it at: http://andregarzia.com/2018/11/reading-blogs-with-thunderbird.html So, if you folks have your own blogs, please their URL to me so that? I can subscribe. The more LiveCode blogs on my feed the better. This is in part motivated by the "I want to read your blog" lightning talk from "View Source 2018" conference. It is a great talk an is on YouTube, it makes you want to go back to the blogosphere days. Cheers andre From bobsneidar at iotecdigital.com Tue Nov 20 10:55:13 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 20 Nov 2018 15:55:13 +0000 Subject: [OT] Send me your blogs In-Reply-To: References: Message-ID: <100778E8-FB16-4302-9005-3109CEDFC4BE@iotecdigital.com> Ahh. The golden days of internet blogging. It looked for all the world like we were going to solve all the worlds problems. Then the trolls came... ? On Nov 20, 2018, at 04:17 , Andre Alves Garzia via use-livecode > wrote: This is in part motivated by the "I want to read your blog" lightning talk from "View Source 2018" conference. It is a great talk an is on YouTube, it makes you want to go back to the blogosphere days. Cheers andre From benr_mc at cogapp.com Tue Nov 20 11:33:19 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 20 Nov 2018 16:33:19 -0000 Subject: What is LC's internal text format? In-Reply-To: <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> Message-ID: <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Hi Monte, Thanks for this, sorry for delayed reply - I've been away. >> Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? > > Internally we have different types of values. So we have MCStringRef which is the thing which either contains a buffer of native chars or a buffer of UTF-16 chars. There are others. ... > The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size & byte count. > > So: > put textEncode(?foo?, ?UTF-8?) into tFoo # tFoo holds MCDataRef > > Then if we do something like: > set the text of field ?foo? to tFoo > > tFoo is first converted to MCStringRef. As it?s an MCDataRef we just move the buffer over and say it?s a native encoded string. There?s no checking to see if it?s a UTF-8 string and decoding with that etc. So my question would be, is this helpful? If, given any MCDataRef (i.e. 'binary string') LC makes the assumption - when it needs an MCStringRef - that the binary string is 'native' - then I would think it will be wrong more often that is correct! IIUC, the chief ways to obtain an MCDataRef are by reading a file in binary mode, or by calling textEncode (or loading a non-file URL???). Insofar as one could make an assumption at all, my guess is that in the first case the data is more likely to be UTF8; and whatever is most likely in the second case, 'native' is about the least likely. (If the assumption was UTF16 it would at least make more sense.) Would it not be better to refuse to make an assumption, i.e. require an explicit conversion? If you want to proceed on the assumption that a file is 'native' text, read it as text; if you know what it is, read it as binary and use textEncode. If you used textEncode anyway (or numToByte) then obviously you know what it is, and when you want to make a string out of it you can tell LC how to interpret it. Wouldn't it be better to throw an error if passing an MCDataRef where an MCStringRef is required, than introduce subtle errors by just making (in my opinion implausible) assumptions? And now that the thought has occurred to me - when a URL with a non-file protocol is used a source of value, what is the type of the value - MCStringRef or MCDataRef? thanks for the continuing education! Ben On 13/11/2018 23:44, Monte Goulding via use-livecode wrote: > > >> On 14 Nov 2018, at 6:33 am, Ben Rubinstein via use-livecode wrote: >> >> That's really helpful - and in parts eye-opening - thanks Mark. >> >> I have a few follow-up questions. >> >> Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? > > Internally we have different types of values. So we have MCStringRef which is the thing which either contains a buffer of native chars or a buffer of UTF-16 chars. There are others. For example, MCNumberRef will either hold a 32 bit signed int or a double. These are returned by numeric operations where there?s no string representation of a number. So: > > put 1.0 into tNumber # tNumber holds an MCStringRef > put 1.0 + 0 int0 tNumber # tNumber holds an MCNumberRef > > The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size & byte count. > > So: > put textEncode(?foo?, ?UTF-8?) into tFoo # tFoo holds MCDataRef > > Then if we do something like: > set the text of field ?foo? to tFoo > > tFoo is first converted to MCStringRef. As it?s an MCDataRef we just move the buffer over and say it?s a native encoded string. There?s no checking to see if it?s a UTF-8 string and decoding with that etc. > > Then the string is put into the field. > > If you remember that mergJSON issue you reported where mergJSON returns UTF-8 data and you were putting it into a field and it looked funny this is why. >> >>> CodepointOffset has signature 'integer codepointOffset(string)', so when you >>> pass a binary string (data) value to it, the data value gets converted to a >>> string by interpreting it as a sequence of bytes in the native encoding. >> >> OK - so one message I take are that in fact one should never invoke codepointOffset on a binary string. Should it actually throw an error in this case? > > No, as mentioned above values can move to and from different types according to the operations performed on them and this is largely opaque to the scripter. If you do a text operation on a binary string then there?s an implicit conversion to a native encoded string. You generally want to use codepoint in 7+ generally where previously you used char unless you know you are dealing with a binary string and then you use byte. >> >> By the same token, probably one should only use 'byte', 'byteOffset', 'byteToNum' etc with binary strings - would it be better, to avoid confusion, if char, offset, charToNum should refuse to operate on a binary string? > > That would not be backwards compatible. >> >>> e.g. In the case of &, it can either take two data arguments, or two >>> string arguments. In this case, if both arguments are data, then the result >>> will be data. Otherwise both arguments will be converted to strings, and a >>> string returned. >> The second message I take is that one needs to be very careful, if operating on UTF8 or other binary strings, to avoid 'contaminating' them e.g. by concatenating with a simple quoted string, as this may cause it to be silently converted to a non-binary string. (I presume that 'put "simple string" after/before pBinaryString' will cause a conversion in the same way as "&"? What about 'put "!" into char x of pBinaryString?) > > When concatenating if both left and right are binary strings (MCDataRef) then there?s no conversion of either to string however we do not currently have a way to declare a literal as a binary string (might be nice if we did!) so you would need to: > > put textEncode("simple string?, ?UTF-8?) after pBinaryString > >> >> The engine can tell whether a string is 'native' or UTF16. When the engine is converting a binary string to 'string', does it always interpret the source as the native 8-bit encoding, or does it have some heuristic to decide whether it would be more plausible to interpret the source as UTF16? > > No it does not try to interpret. ICU has a charset detector that will give you a list of possible charsets along with a confidence. It could be implemented as a separate api: > > get detectedTextEncodings(, []) -> array of charset/confidence pairs > > get bestDetectedTextEncoding(, []) -> charset > > Feel free to feature request that! > > Cheers > > Monte > > > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Nov 20 12:11:47 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 20 Nov 2018 17:11:47 +0000 Subject: What is LC's internal text format? In-Reply-To: <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: <8F10CA9A-3B91-421C-8522-A34DEC6647E6@iotecdigital.com> I'm not grasping the import of the question here, but it seems to me that the question is about what happens "under the hood", in relation to the format of the data as it is exposed to any I/O. It seems to me that in this context it's academic. If there is a problem with what's going on "under the hood", that of course needs to be addressed. But if it's not affecting what the developer/user "sees" in terms of the format of the data, I don't see the point. Bob S > On Nov 20, 2018, at 08:33 , Ben Rubinstein via use-livecode wrote: > > Hi Monte, > > Thanks for this, sorry for delayed reply - I've been away. > > >> Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? > > > > Internally we have different types of values. So we have MCStringRef which is the thing which either contains a buffer of native chars or a buffer of UTF-16 chars. There are others. > ... > > The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size & byte count. > > > > So: > > put textEncode(?foo?, ?UTF-8?) into tFoo # tFoo holds MCDataRef > > > > Then if we do something like: > > set the text of field ?foo? to tFoo > > > > tFoo is first converted to MCStringRef. As it?s an MCDataRef we just move the buffer over and say it?s a native encoded string. There?s no checking to see if it?s a UTF-8 string and decoding with that etc. > > So my question would be, is this helpful? If, given any MCDataRef (i.e. 'binary string') LC makes the assumption - when it needs an MCStringRef - that the binary string is 'native' - then I would think it will be wrong more often that is correct! > > IIUC, the chief ways to obtain an MCDataRef are by reading a file in binary mode, or by calling textEncode (or loading a non-file URL???). Insofar as one could make an assumption at all, my guess is that in the first case the data is more likely to be UTF8; and whatever is most likely in the second case, 'native' is about the least likely. (If the assumption was UTF16 it would at least make more sense.) > > Would it not be better to refuse to make an assumption, i.e. require an explicit conversion? If you want to proceed on the assumption that a file is 'native' text, read it as text; if you know what it is, read it as binary and use textEncode. If you used textEncode anyway (or numToByte) then obviously you know what it is, and when you want to make a string out of it you can tell LC how to interpret it. Wouldn't it be better to throw an error if passing an MCDataRef where an MCStringRef is required, than introduce subtle errors by just making (in my opinion implausible) assumptions? > > And now that the thought has occurred to me - when a URL with a non-file protocol is used a source of value, what is the type of the value - MCStringRef or MCDataRef? > > thanks for the continuing education! > > Ben > > On 13/11/2018 23:44, Monte Goulding via use-livecode wrote: >>> On 14 Nov 2018, at 6:33 am, Ben Rubinstein via use-livecode wrote: >>> >>> That's really helpful - and in parts eye-opening - thanks Mark. >>> >>> I have a few follow-up questions. >>> >>> Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string? >> Internally we have different types of values. So we have MCStringRef which is the thing which either contains a buffer of native chars or a buffer of UTF-16 chars. There are others. For example, MCNumberRef will either hold a 32 bit signed int or a double. These are returned by numeric operations where there?s no string representation of a number. So: >> put 1.0 into tNumber # tNumber holds an MCStringRef >> put 1.0 + 0 int0 tNumber # tNumber holds an MCNumberRef >> The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size & byte count. >> So: >> put textEncode(?foo?, ?UTF-8?) into tFoo # tFoo holds MCDataRef >> Then if we do something like: >> set the text of field ?foo? to tFoo >> tFoo is first converted to MCStringRef. As it?s an MCDataRef we just move the buffer over and say it?s a native encoded string. There?s no checking to see if it?s a UTF-8 string and decoding with that etc. >> Then the string is put into the field. >> If you remember that mergJSON issue you reported where mergJSON returns UTF-8 data and you were putting it into a field and it looked funny this is why. >>> >>>> CodepointOffset has signature 'integer codepointOffset(string)', so when you >>>> pass a binary string (data) value to it, the data value gets converted to a >>>> string by interpreting it as a sequence of bytes in the native encoding. >>> >>> OK - so one message I take are that in fact one should never invoke codepointOffset on a binary string. Should it actually throw an error in this case? >> No, as mentioned above values can move to and from different types according to the operations performed on them and this is largely opaque to the scripter. If you do a text operation on a binary string then there?s an implicit conversion to a native encoded string. You generally want to use codepoint in 7+ generally where previously you used char unless you know you are dealing with a binary string and then you use byte. >>> >>> By the same token, probably one should only use 'byte', 'byteOffset', 'byteToNum' etc with binary strings - would it be better, to avoid confusion, if char, offset, charToNum should refuse to operate on a binary string? >> That would not be backwards compatible. >>> >>>> e.g. In the case of &, it can either take two data arguments, or two >>>> string arguments. In this case, if both arguments are data, then the result >>>> will be data. Otherwise both arguments will be converted to strings, and a >>>> string returned. >>> The second message I take is that one needs to be very careful, if operating on UTF8 or other binary strings, to avoid 'contaminating' them e.g. by concatenating with a simple quoted string, as this may cause it to be silently converted to a non-binary string. (I presume that 'put "simple string" after/before pBinaryString' will cause a conversion in the same way as "&"? What about 'put "!" into char x of pBinaryString?) >> When concatenating if both left and right are binary strings (MCDataRef) then there?s no conversion of either to string however we do not currently have a way to declare a literal as a binary string (might be nice if we did!) so you would need to: >> put textEncode("simple string?, ?UTF-8?) after pBinaryString >>> >>> The engine can tell whether a string is 'native' or UTF16. When the engine is converting a binary string to 'string', does it always interpret the source as the native 8-bit encoding, or does it have some heuristic to decide whether it would be more plausible to interpret the source as UTF16? >> No it does not try to interpret. ICU has a charset detector that will give you a list of possible charsets along with a confidence. It could be implemented as a separate api: >> get detectedTextEncodings(, []) -> array of charset/confidence pairs >> get bestDetectedTextEncoding(, []) -> charset >> Feel free to feature request that! >> Cheers >> Monte >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 Tue Nov 20 12:55:46 2018 From: ahsoftware at sonic.net (Mark Wieder) Date: Tue, 20 Nov 2018 09:55:46 -0800 Subject: What is LC's internal text format? In-Reply-To: <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: On 11/20/18 8:33 AM, Ben Rubinstein via use-livecode wrote: > Would it not be better to refuse to make an assumption, i.e. require an > explicit conversion? While I'd love to have the option of strongly typed variables at the scripting level, I know better than to expect that this will ever happen. -- Mark Wieder ahsoftware at gmail.com From benr_mc at cogapp.com Tue Nov 20 13:24:58 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 20 Nov 2018 18:24:58 -0000 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: This isn't about strongly typed variables though, but about when (correct) conversion is possible. LC throws an error if you implicitly ask it to convert the wrong kind of string to a number - for example, add 45 to "horse". (Obviously multiplication is fine: the answer would be "45 horses".) LC throws an error if you implicitly ask it convert the wrong kind of string or number to a colour: try setting the backcolor of a control to "horse". LC throws an error if asked to convert a number, or the wrong kind of string, to a boolean: try setting the hilite of a button to 45. In all these cases, LC knows it cannot do the right thing, so it throws an error to tell you so, rather than guessing, for example, what the truth value of "45" is. I'm just suggesting that it cannot know how to correctly convert binary data into a string - so it should throw an error rather than possibly (probably?) do the wrong thing. On 20/11/2018 17:55, Mark Wieder via use-livecode wrote: > On 11/20/18 8:33 AM, Ben Rubinstein via use-livecode wrote: > >> Would it not be better to refuse to make an assumption, i.e. require an >> explicit conversion? > > While I'd love to have the option of strongly typed variables at the scripting > level, I know better than to expect that this will ever happen. > From gcanyon at gmail.com Tue Nov 20 13:31:14 2018 From: gcanyon at gmail.com (Geoff Canyon) Date: Tue, 20 Nov 2018 10:31:14 -0800 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: I'll chip in and point out that the implicit conversion caused significant hiccups in figuring out the offsets issues -- several people (including me) were fooled by the fact that conversion to UTF-32 results in binary data, but can be transparently treated as text. Or maybe I'm mistaken/misremembering, which reinforces the fact that it's confusing. :-) On Tue, Nov 20, 2018 at 10:25 AM Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> wrote: > This isn't about strongly typed variables though, but about when (correct) > conversion is possible. > > LC throws an error if you implicitly ask it to convert the wrong kind of > string to a number - for example, add 45 to "horse". (Obviously > multiplication > is fine: the answer would be "45 horses".) > > LC throws an error if you implicitly ask it convert the wrong kind of > string > or number to a colour: try setting the backcolor of a control to "horse". > > LC throws an error if asked to convert a number, or the wrong kind of > string, > to a boolean: try setting the hilite of a button to 45. > > In all these cases, LC knows it cannot do the right thing, so it throws an > error to tell you so, rather than guessing, for example, what the truth > value > of "45" is. > > I'm just suggesting that it cannot know how to correctly convert binary > data > into a string - so it should throw an error rather than possibly > (probably?) > do the wrong thing. > > > On 20/11/2018 17:55, Mark Wieder via use-livecode wrote: > > On 11/20/18 8:33 AM, Ben Rubinstein via use-livecode wrote: > > > >> Would it not be better to refuse to make an assumption, i.e. require an > >> explicit conversion? > > > > While I'd love to have the option of strongly typed variables at the > scripting > > level, I know better than to expect that this will ever happen. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From benr_mc at cogapp.com Tue Nov 20 13:40:04 2018 From: benr_mc at cogapp.com (Ben Rubinstein) Date: Tue, 20 Nov 2018 18:40:04 -0000 Subject: iOS sharing extension In-Reply-To: References: Message-ID: 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 > From bobsneidar at iotecdigital.com Tue Nov 20 13:55:05 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 20 Nov 2018 18:55:05 +0000 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: <9A511327-A047-477B-AA57-E3F12DF287A0@iotecdigital.com> > On Nov 20, 2018, at 10:24 , Ben Rubinstein via use-livecode wrote: > > This isn't about strongly typed variables though, but about when (correct) conversion is possible. > > LC throws an error if you implicitly ask it to convert the wrong kind of string to a number - for example, add 45 to "horse". (Obviously multiplication is fine: the answer would be "45 horses".) > > LC throws an error if you implicitly ask it convert the wrong kind of string or number to a colour: try setting the backcolor of a control to "horse". > > LC throws an error if asked to convert a number, or the wrong kind of string, to a boolean: try setting the hilite of a button to 45. > > In all these cases, LC knows it cannot do the right thing, so it throws an error to tell you so, rather than guessing, for example, what the truth value of "45" is. > > I'm just suggesting that it cannot know how to correctly convert binary data into a string - so it should throw an error rather than possibly (probably?) do the wrong thing. Too many assumptions about the "string" would be necessary here. What if I wanted to write a utility that displayed in ascii format a sector on a disk like the old MacOS DiskEdit used to do? Certainly, much of the data would be impossible to format, but some might be discernible. I'm suggesting that there is nothing intrinsic about binary data that can absolutely identify it as the type of string or data you are expecting, whereas with typed data there is. So when it comes to binary data, it seems to me to be better to assume nothing about whether or not the data is valid. Again, I am not terribly versed in data processing at this level, but it seems to me that referring to binary data as "typed" data is a bit of a misnomer. ALL data is in the end stored as binary data. Typing is a predefined way to structure how the data is stored, partly for efficiency, and partly to preclude the volatility of processing the wrong type of data at the machine level. Imagine if every time an addition process was called by a microprocessor it had to do error checking to see if the values the binary data actually represented were integers. The processing overhead would be impossibly voluminous. So this is enforced by the compiler, hence data typing. It only matters to the higher level language what the binary data represents. In the case of LC, and other non-typed languages, this is determined at run time, and not at compile time. That is really the big difference. In C++, typing prevents me as a developer from trying to add 45 to "horses" before I compile the entire application, as with that kind of environment, compiling a large application can (or used to) take a really long time, and debugging to find out where you went wrong could be immensly tedious. Since LC "compiles" scripts as it goes, it isn't really necessary anymore to type variables, and that frees us, the developers to think about the flow of the application rather than get bogged down in the minutia of programming faux pas. I freely admit though that when it comes to this subject matter, better minds than I are more suited to the discussion. Bob S From martyknappster at gmail.com Tue Nov 20 14:59:25 2018 From: martyknappster at gmail.com (Knapp Martin) Date: Tue, 20 Nov 2018 11:59:25 -0800 Subject: Datagrids and LC 9.0.2 rc1 Message-ID: <9AF17EC4-706D-4B29-8906-2F34D3D8B44E@gmail.com> Anybody having trouble with data grids in LC 9.0.2 rc1? I have a forms-based data grid that works fine under 9.0.1 but on 9.0.2 rc1, in a standalone when I try to open the stack with the data grid it locks up on both Mac and Windows. I can drag windows by the titlebar but everything else is unresponsive. When I rebuild under 9.0.1 all is fine. I can file a bug report but thought I?d see if anyone else is having a similar problem. Marty From monte at appisle.net Tue Nov 20 16:38:26 2018 From: monte at appisle.net (Monte Goulding) Date: Wed, 21 Nov 2018 08:38:26 +1100 Subject: Datagrids and LC 9.0.2 rc1 In-Reply-To: <9AF17EC4-706D-4B29-8906-2F34D3D8B44E@gmail.com> References: <9AF17EC4-706D-4B29-8906-2F34D3D8B44E@gmail.com> Message-ID: > On 21 Nov 2018, at 6:59 am, Knapp Martin via use-livecode wrote: > > Anybody having trouble with data grids in LC 9.0.2 rc1? I have a forms-based data grid that works fine under 9.0.1 but on 9.0.2 rc1, in a standalone when I try to open the stack with the data grid it locks up on both Mac and Windows. I can drag windows by the titlebar but everything else is unresponsive. When I rebuild under 9.0.1 all is fine. I can file a bug report but thought I?d see if anyone else is having a similar problem. Yes please open a report. It sounds like the behaviors aren?t being included in the standalone, however, I don?t think any work was done on anything that would impact that between 9.0.1 and 9.0.2 rc 1. Cheers Monte From montero.je at gmail.com Tue Nov 20 16:54:45 2018 From: montero.je at gmail.com (Jose Enrique Montero) Date: Tue, 20 Nov 2018 17:54:45 -0400 Subject: Clipboard mobile Message-ID: <6AE1C354-BC99-46F2-AAAD-83B01FD93D2F@gmail.com> I've checking the new sticker for whatsaap, but I need to send to whatsaap the images in a obj. Anyone have a Idea, maybe using JavaScript script in a browser widget ? Best regards Jos? Enrique Montero Enviado desde mi iPhone From martyknappster at gmail.com Tue Nov 20 17:45:28 2018 From: martyknappster at gmail.com (Knapp Martin) Date: Tue, 20 Nov 2018 14:45:28 -0800 Subject: Datagrids and LC 9.0.2 rc1 In-Reply-To: References: <9AF17EC4-706D-4B29-8906-2F34D3D8B44E@gmail.com> Message-ID: <09B432A7-A08C-4230-BBC6-D6CDE5CB4387@gmail.com> It does it in the ide too. The data grid can display 10 lines of data at a time and with very small data sets it will work, although slugishly. I just created a stripped down stack that demonstrates the issue and with a few hundred lines it will open but only display 10 lines and that?s it. On a dataset of several thousand lines it won?t open (at least in the time frame I gave it). I have tried typing Command-period and have gotten it to sometimes open but no data displayed. It works fine in LC 9.0.1. Can I send the stack to someone privately? Marty > On Nov 20, 2018, at 1:38 PM, Monte Goulding via use-livecode wrote: > > > >> On 21 Nov 2018, at 6:59 am, Knapp Martin via use-livecode wrote: >> >> Anybody having trouble with data grids in LC 9.0.2 rc1? I have a forms-based data grid that works fine under 9.0.1 but on 9.0.2 rc1, in a standalone when I try to open the stack with the data grid it locks up on both Mac and Windows. I can drag windows by the titlebar but everything else is unresponsive. When I rebuild under 9.0.1 all is fine. I can file a bug report but thought I?d see if anyone else is having a similar problem. > > Yes please open a report. It sounds like the behaviors aren?t being included in the standalone, however, I don?t think any work was done on anything that would impact that between 9.0.1 and 9.0.2 rc 1. > > Cheers > > Monte > _______________________________________________ From monte at appisle.net Tue Nov 20 18:13:26 2018 From: monte at appisle.net (Monte Goulding) Date: Wed, 21 Nov 2018 10:13:26 +1100 Subject: Datagrids and LC 9.0.2 rc1 In-Reply-To: <09B432A7-A08C-4230-BBC6-D6CDE5CB4387@gmail.com> References: <9AF17EC4-706D-4B29-8906-2F34D3D8B44E@gmail.com> <09B432A7-A08C-4230-BBC6-D6CDE5CB4387@gmail.com> Message-ID: <622250A7-E7DE-4F7C-AC0D-DDEEBA60FBDE@appisle.net> > On 21 Nov 2018, at 9:45 am, Knapp Martin via use-livecode wrote: > > It does it in the ide too. The data grid can display 10 lines of data at a time and with very small data sets it will work, although slugishly. I just created a stripped down stack that demonstrates the issue and with a few hundred lines it will open but only display 10 lines and that?s it. On a dataset of several thousand lines it won?t open (at least in the time frame I gave it). I have tried typing Command-period and have gotten it to sometimes open but no data displayed. It works fine in LC 9.0.1. Can I send the stack to someone privately? If you open a report Panos will give you instructions on where to send the stack. Thanks Monte From bobsneidar at iotecdigital.com Tue Nov 20 18:30:50 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 20 Nov 2018 23:30:50 +0000 Subject: Max number of columns in a datagrid? Message-ID: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> Hi all. I'm importing a csv file with a LOT of columns, and I am running into an issue with setting the dgProp ["columns"] of the datagrid. It's choking on the number of columns it seems. What is the max? Bob S From martyknappster at gmail.com Tue Nov 20 18:44:16 2018 From: martyknappster at gmail.com (Knapp Martin) Date: Tue, 20 Nov 2018 15:44:16 -0800 Subject: Printing Crashes in LC 9 Message-ID: Anybody besides me having occasional crashes while printing in LC 9? I don't have a recipe but it happens every once in a while in both LC 9.0.1 and LC 9.0.2 rc1. In the IDE and in a standalone (Mac). I have filed bug report 21473 (first reported in August) and have added crash reports from 4 different incidents. Please add yours if you're experiencing this. Marty From dunbarx at aol.com Tue Nov 20 22:36:54 2018 From: dunbarx at aol.com (dunbarxx) Date: Tue, 20 Nov 2018 21:36:54 -0600 (CST) Subject: Max number of columns in a datagrid? In-Reply-To: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> Message-ID: <1542771414915-0.post@n4.nabble.com> Hi. Never thought about this. But I made a DG, and put this into a button: on mouseup repeat 300 put random(9999) & tab after temp end repeat set the dgText of grp 1 to temp end mouseup No problem. With a horizontal scrollbar, I can zoom to each side of the DG. But If I try to change the count to more than 300, the DG loses its hScroll, and it seems that many separate numbers appear overlapped in column 1. Further, a lot of time is spent while the DG is digesting this new property change. Trevor is the one to address this, assuming anything I just did makes sense. Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From brahma at hindu.org Wed Nov 21 04:17:15 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Wed, 21 Nov 2018 09:17:15 +0000 Subject: Creating Array - Auto Numeric References: Message-ID: On 9/18/18 7:15 AM, Tore Nilsen via use-livecode wrote: You can not put the incrementing numeric key inside an associative array the way you want. The key of any array must be unique, and you can not have several instances of a key in an array. Think of the keys of the array it as the primary keys of a database table. It serves as a unique identifier. Best regards Tore Nilsen But each these is unique WordLocationA["Cut"][1][100,320] WordLocationA["Cut"][2][300,320] WordLocationA["the"][1][200,320] WordLocationA["the"][2][400,320] WordLocationA["apple"][1][500,320] WordLocationA["banana"][1][500,320] We may not be on the same page. I can create a json file that export From brahma at hindu.org Wed Nov 21 09:23:09 2018 From: brahma at hindu.org (Sannyasin Brahmanathaswami) Date: Wed, 21 Nov 2018 14:23:09 +0000 Subject: Accelerated Rendering -- When to use it, When not to use it Message-ID: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> I am trying to get my head around acceleratedRendering. Especially in a case where we are re-drawing the screen run time--use case: in games where objects move around. Either under user control or pre-scripted moves. The dictionary is too lean on this entry. It should tell us "How the accelerated rendering effects redraws of the pixel map?. * A guide why and when to set to it to True or False" This has been covered here in the past, sure would be nice to document it BR From bobsneidar at iotecdigital.com Wed Nov 21 10:39:19 2018 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 21 Nov 2018 15:39:19 +0000 Subject: Max number of columns in a datagrid? In-Reply-To: <1542771414915-0.post@n4.nabble.com> References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> <1542771414915-0.post@n4.nabble.com> Message-ID: I had set the dgProp ["columns"] to more than 900. :-) Not only did the DG fail to display any data, but it actually KILLED THE DG! I could no longer set the dgData to empty, nor could I edit the contents in the property inspector and delete the text. I had to delete the DG and create a new one. I have less than 100 now so all good. I don't consider this a bug though. I simply exceeded the limits of LC to handle that many columns of data. I think it has to do with the maximum width of a card. The fields would have to be created whether or not they are displayed. If they exceed the max card width, I can see how there would be problems. Bob S > On Nov 20, 2018, at 19:36 , dunbarxx via use-livecode wrote: > > Hi. > > Never thought about this. But I made a DG, and put this into a button: > on mouseup > repeat 300 > put random(9999) & tab after temp > end repeat > set the dgText of grp 1 to temp > end mouseup > > No problem. With a horizontal scrollbar, I can zoom to each side of the DG. > > But If I try to change the count to more than 300, the DG loses its hScroll, > and it seems that many separate numbers appear overlapped in column 1. > Further, a lot of time is spent while the DG is digesting this new property > change. > > Trevor is the one to address this, assuming anything I just did makes sense. > > Craig Newman From dunbarx at aol.com Wed Nov 21 11:08:12 2018 From: dunbarx at aol.com (dunbarxx) Date: Wed, 21 Nov 2018 10:08:12 -0600 (CST) Subject: Max number of columns in a datagrid? In-Reply-To: <1542771414915-0.post@n4.nabble.com> References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> <1542771414915-0.post@n4.nabble.com> Message-ID: <1542816492781-0.post@n4.nabble.com> I tested with a table field. It can hold far many more columns, but it, too, will go haywire if the tabStops are wide and the number of columns exceeds about 1500. I was surprised that the number of columns matters. Certainly they are not all drawn at once, but rather "exposed" based on internal workings and the current thumbPos. This really needs a response from the team. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From tom at makeshyft.com Wed Nov 21 11:13:41 2018 From: tom at makeshyft.com (Tom Glod) Date: Wed, 21 Nov 2018 11:13:41 -0500 Subject: Accelerated Rendering -- When to use it, When not to use it In-Reply-To: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> Message-ID: Please be advised that at the moment, accelerate rendering only works on the first group layer, meaning that a control inside a group inside a group no longer gets 'accelerated rendering. Layer mode is important too. However, this is getting fixed ANY DAY now :) On Wed, Nov 21, 2018 at 9:23 AM Sannyasin Brahmanathaswami via use-livecode wrote: > I am trying to get my head around acceleratedRendering. > > Especially in a case where we are re-drawing the screen run time--use case: > > in games where objects move around. Either under user control or > pre-scripted moves. > > The dictionary is too lean on this entry. It should tell us > > "How the accelerated rendering effects redraws of the pixel map?. > > * A guide why and when to set to it to True or False" > > This has been covered here in the past, sure would be nice to document it > > 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 iphonelagi at gmail.com Wed Nov 21 12:00:59 2018 From: iphonelagi at gmail.com (Lagi Pittas) Date: Wed, 21 Nov 2018 17:00:59 +0000 Subject: What is LC's internal text format? In-Reply-To: References: <5cddba86-e47e-d517-8a3c-94972839f338@cogapp.com> <941c7d14-3e80-4db9-688a-f03fc7a45c99@cogapp.com> <7ceea77446e359c72ac78b601a647f71@livecode.com> <332636cd-8f06-769d-9e36-985b0aece0ad@cogapp.com> <21F78EF5-BC5E-4FB8-8897-29CA7484C9B1@appisle.net> <2e7b04af-6918-dcc7-725e-02cb4f8ed104@cogapp.com> Message-ID: Hi Mark, I can't see any reason why not - except for time (and money). The fact that the language has been "forked - livecode builder" means there is a precedent for changes into the way the language works. I cannot see why LCB could not be one of the "open language" variants that uses the livecode hierarchy/gui/message path etc. My original reason for funding the Kickstarter WAS the open language - to be able to write in Python/LC/JS and Visual foxpro within the same environment (we can but dream). If you have code already written working and debugged in 1 language use it as long as each languages source is translated to the LC bytecode engine. Typescript adds static typing, classes and modules to JavaScript with a transpiler - I bet if there was a Kickstarter to add a JavaScript and python script to Livecode we would get over a Million dollars - who wants to use glade or pyQT or WxPython or Tkinter. How many JavaScript and Python programmers would love to create desktop applications? I would suggest that the coding in the LC for Filemaker is much more involved - It's worth a punt Kevin? Mark? And please don't come back with the usual ripost - "if you want to program in Python use Python" - It's the Environment and the tools and the multiple deployments and and and ....... and using all those libraries in Python and JavaScript land ..... Best Lagi On Tue, 20 Nov 2018 at 17:56, Mark Wieder via use-livecode < use-livecode at lists.runrev.com> wrote: > On 11/20/18 8:33 AM, Ben Rubinstein via use-livecode wrote: > > > Would it not be better to refuse to make an assumption, i.e. require an > > explicit conversion? > > While I'd love to have the option of strongly typed variables at the > scripting level, I know better than to expect that this will ever happen. > > -- > 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 harrison at all-auctions.com Wed Nov 21 12:25:58 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Wed, 21 Nov 2018 12:25:58 -0500 Subject: Mac Standalone/Pkg Weirdness In-Reply-To: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> Message-ID: I have a Macintosh stack that I have set the Application Icon and the Small Application Icon to .png icons on a card. They work fine in the IDE. (MacBook Pro, macOS High Sierra, LC 9.0.1) When I create a Standalone and test it. It works fine and they show up in my ask and answer dialogs. After packaging everything up in the Terminal I end up with a package that installs just fine. The standalone from that package works fine on my development computer - (MacBook Pro.) I copied the package to a USB Thumb-drive. I then plugged it into another older iMac running El-Capitan to test it. The package installs the app just fine. The app runs fine except that now the ask and answer dialogs do not display the icons! Also of interest, I had set the Destroy-stack property set to true so that when the user quits the application the application doesn?t stay in memory. (I tried this stack on a new mac mini running Mojave too, (yes I know that LC doesn?t officially support Mojave yet but I thought I would try it anyway.)) The app ran fine except for the icon problem again, and this time when I quit the application, the icon down in the dock that shows running applications never went away even after the app quit. It looks like Destroy-stack isn?t working. Suggestions? Thanks, Rick From tom at makeshyft.com Wed Nov 21 14:00:45 2018 From: tom at makeshyft.com (Tom Glod) Date: Wed, 21 Nov 2018 14:00:45 -0500 Subject: Mac Standalone/Pkg Weirdness In-Reply-To: References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> Message-ID: I'm not sure if this applies fully to your case ......i remember building mac standalones and having to manually replace the standalone icns icon in the resources folder. u can tell which one needs replacing because the byte size of the icon is 0. but i used to set the application icon in the standalone settings. maybe the problems are related. On Wed, Nov 21, 2018 at 12:26 PM Rick Harrison via use-livecode < use-livecode at lists.runrev.com> wrote: > I have a Macintosh stack that I have set the > Application Icon and the Small Application Icon > to .png icons on a card. They work fine in the IDE. > (MacBook Pro, macOS High Sierra, LC 9.0.1) > > When I create a Standalone and test it. It works > fine and they show up in my ask and answer dialogs. > > After packaging everything up in the Terminal I end up > with a package that installs just fine. The standalone > from that package works fine on my development > computer - (MacBook Pro.) > > I copied the package to a USB Thumb-drive. I then > plugged it into another older iMac running El-Capitan > to test it. The package installs the app just fine. > The app runs fine except that now the ask and answer > dialogs do not display the icons! > > Also of interest, I had set the Destroy-stack property > set to true so that when the user quits the application > the application doesn?t stay in memory. (I tried this > stack on a new mac mini running Mojave too, (yes > I know that LC doesn?t officially support Mojave yet > but I thought I would try it anyway.)) The app ran > fine except for the icon problem again, and this time > when I quit the application, the icon down in the dock > that shows running applications never went away > even after the app quit. It looks like Destroy-stack > isn?t working. > > Suggestions? > > Thanks, > > Rick > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Wed Nov 21 15:42:59 2018 From: harrison at all-auctions.com (Rick Harrison) Date: Wed, 21 Nov 2018 15:42:59 -0500 Subject: Mac Standalone/Pkg Weirdness In-Reply-To: References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> Message-ID: <06E83949-5FE3-4E61-B5D2-F854E8B58CB5@all-auctions.com> Hi Tom, I just checked the size of the icns icon in the resources folder, and it says it is 2.9mb in size so I?m assuming that is probably OK. Other ideas? Thanks, Rick > On Nov 21, 2018, at 2:00 PM, Tom Glod via use-livecode wrote: > > I'm not sure if this applies fully to your case ......i remember building > mac standalones and having to manually replace the standalone icns icon in > the resources folder. u can tell which one needs replacing because the > byte size of the icon is 0. > > but i used to set the application icon in the standalone settings. maybe > the problems are related. > > On Wed, Nov 21, 2018 at 12:26 PM Rick Harrison via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> I have a Macintosh stack that I have set the >> Application Icon and the Small Application Icon >> to .png icons on a card. They work fine in the IDE. >> (MacBook Pro, macOS High Sierra, LC 9.0.1) >> >> When I create a Standalone and test it. It works >> fine and they show up in my ask and answer dialogs. >> >> After packaging everything up in the Terminal I end up >> with a package that installs just fine. The standalone >> from that package works fine on my development >> computer - (MacBook Pro.) >> >> I copied the package to a USB Thumb-drive. I then >> plugged it into another older iMac running El-Capitan >> to test it. The package installs the app just fine. >> The app runs fine except that now the ask and answer >> dialogs do not display the icons! >> >> Also of interest, I had set the Destroy-stack property >> set to true so that when the user quits the application >> the application doesn?t stay in memory. (I tried this >> stack on a new mac mini running Mojave too, (yes >> I know that LC doesn?t officially support Mojave yet >> but I thought I would try it anyway.)) The app ran >> fine except for the icon problem again, and this time >> when I quit the application, the icon down in the dock >> that shows running applications never went away >> even after the app quit. It looks like Destroy-stack >> isn?t working. >> >> Suggestions? >> >> Thanks, >> >> Rick >> _______________________________________________ >> use-livecode mailing list >> use-livecode 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 jjs at krutt.org Wed Nov 21 16:27:10 2018 From: jjs at krutt.org (JJS) Date: Wed, 21 Nov 2018 22:27:10 +0100 Subject: Max number of columns in a datagrid? In-Reply-To: <1542816492781-0.post@n4.nabble.com> References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> <1542771414915-0.post@n4.nabble.com> <1542816492781-0.post@n4.nabble.com> Message-ID: what the h*ll you're going to do with 1500 columns? who's gonna work with that? Op 21-11-2018 om 17:08 schreef dunbarxx via use-livecode: > I tested with a table field. It can hold far many more columns, but it, too, > will go haywire if the tabStops are wide and the number of columns exceeds > about 1500. > > I was surprised that the number of columns matters. Certainly they are not > all drawn at once, but rather "exposed" based on internal workings and the > current thumbPos. > > This really needs a response from the team. > > Craig > > > > -- > Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From dunbarx at aol.com Wed Nov 21 16:39:24 2018 From: dunbarx at aol.com (dunbarxx) Date: Wed, 21 Nov 2018 15:39:24 -0600 (CST) Subject: Max number of columns in a datagrid? In-Reply-To: References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> <1542771414915-0.post@n4.nabble.com> <1542816492781-0.post@n4.nabble.com> Message-ID: <1542836364530-0.post@n4.nabble.com> People with wide monitors? -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html From tom at makeshyft.com Wed Nov 21 18:49:08 2018 From: tom at makeshyft.com (Tom Glod) Date: Wed, 21 Nov 2018 18:49:08 -0500 Subject: Max number of columns in a datagrid? In-Reply-To: <1542836364530-0.post@n4.nabble.com> References: <2F9DC4C4-1D53-4FCE-8A39-241D0288D478@iotecdigital.com> <1542771414915-0.post@n4.nabble.com> <1542816492781-0.post@n4.nabble.com> <1542836364530-0.post@n4.nabble.com> Message-ID: hahaha!...It never occured to me that people would have such large numbers of columns .......it sounds like lots of fun..... what is the data? also....wondering .....if there is another way..... would a graph database help? On Wed, Nov 21, 2018 at 4:39 PM dunbarxx via use-livecode < use-livecode at lists.runrev.com> wrote: > People with wide monitors? > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From tom at makeshyft.com Wed Nov 21 18:49:34 2018 From: tom at makeshyft.com (Tom Glod) Date: Wed, 21 Nov 2018 18:49:34 -0500 Subject: Mac Standalone/Pkg Weirdness In-Reply-To: <06E83949-5FE3-4E61-B5D2-F854E8B58CB5@all-auctions.com> References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> <06E83949-5FE3-4E61-B5D2-F854E8B58CB5@all-auctions.com> Message-ID: Hi Rick....unfortunately I don't even own a mac at the moment so I am afraid I cannot be of much help...but knowing this community, someone else will come along soon :) On Wed, Nov 21, 2018 at 3:43 PM Rick Harrison via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Tom, > > I just checked the size of the icns icon in the resources folder, > and it says it is 2.9mb in size so I?m assuming that is probably OK. > > Other ideas? > > Thanks, > > Rick > > > On Nov 21, 2018, at 2:00 PM, Tom Glod via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > I'm not sure if this applies fully to your case ......i remember building > > mac standalones and having to manually replace the standalone icns icon > in > > the resources folder. u can tell which one needs replacing because the > > byte size of the icon is 0. > > > > but i used to set the application icon in the standalone settings. maybe > > the problems are related. > > > > On Wed, Nov 21, 2018 at 12:26 PM Rick Harrison via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> I have a Macintosh stack that I have set the > >> Application Icon and the Small Application Icon > >> to .png icons on a card. They work fine in the IDE. > >> (MacBook Pro, macOS High Sierra, LC 9.0.1) > >> > >> When I create a Standalone and test it. It works > >> fine and they show up in my ask and answer dialogs. > >> > >> After packaging everything up in the Terminal I end up > >> with a package that installs just fine. The standalone > >> from that package works fine on my development > >> computer - (MacBook Pro.) > >> > >> I copied the package to a USB Thumb-drive. I then > >> plugged it into another older iMac running El-Capitan > >> to test it. The package installs the app just fine. > >> The app runs fine except that now the ask and answer > >> dialogs do not display the icons! > >> > >> Also of interest, I had set the Destroy-stack property > >> set to true so that when the user quits the application > >> the application doesn?t stay in memory. (I tried this > >> stack on a new mac mini running Mojave too, (yes > >> I know that LC doesn?t officially support Mojave yet > >> but I thought I would try it anyway.)) The app ran > >> fine except for the icon problem again, and this time > >> when I quit the application, the icon down in the dock > >> that shows running applications never went away > >> even after the app quit. It looks like Destroy-stack > >> isn?t working. > >> > >> Suggestions? > >> > >> Thanks, > >> > >> Rick > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode 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 tom at makeshyft.com Wed Nov 21 18:50:29 2018 From: tom at makeshyft.com (Tom Glod) Date: Wed, 21 Nov 2018 18:50:29 -0500 Subject: Mac Standalone/Pkg Weirdness In-Reply-To: References: <951F142B-AC9D-4A60-B9AF-E4ABFAF5D660@hindu.org> <06E83949-5FE3-4E61-B5D2-F854E8B58CB5@all-auctions.com> Message-ID: lol..you know what....2.9 megs for a icon seems awefully big...... try smaller files. ???? shot in the dark literally. On Wed, Nov 21, 2018 at 6:49 PM Tom Glod wrote: > Hi Rick....unfortunately I don't even own a mac at the moment so I am > afraid I cannot be of much help...but knowing this community, someone else > will come along soon :) > > > > On Wed, Nov 21, 2018 at 3:43 PM Rick Harrison via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi Tom, >> >> I just checked the size of the icns icon in the resources folder, >> and it says it is 2.9mb in size so I?m assuming that is probably OK. >> >> Other ideas? >> >> Thanks, >> >> Rick >> >> > On Nov 21, 2018, at 2:00 PM, Tom Glod via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> > >> > I'm not sure if this applies fully to your case ......i remember >> building >> > mac standalones and having to manually replace the standalone icns icon >> in >> > the resources folder. u can tell which one needs replacing because the >> > byte size of the icon is 0. >> > >> > but i used to set the application icon in the standalone settings. >> maybe >> > the problems are related. >> > >> > On Wed, Nov 21, 2018 at 12:26 PM Rick Harrison via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > >> >> I have a Macintosh stack that I have set the >> >> Application Icon and the Small Application Icon >> >> to .png icons on a card. They work fine in the IDE. >> >> (MacBook Pro, macOS High Sierra, LC 9.0.1) >> >> >> >> When I create a Standalone and test it. It works >> >> fine and they show up in my ask and answer dialogs. >> >> >> >> After packaging everything up in the Terminal I end up >> >> with a package that installs just fine. The standalone >> >> from that package works fine on my development >> >> computer - (MacBook Pro.) >> >> >> >> I copied the package to a USB Thumb-drive. I then >> >> plugged it into another older iMac running El-Capitan >> >> to test it. The package installs the app just fine. >> >> The app runs fine except that now the ask and answer >> >> dialogs do not display the icons! >> >> >> >> Also of interest, I had set the Destroy-stack property >> >> set to true so that when the user quits the application >> >> the application doesn?t stay in memory. (I tried this >> >> stack on a new mac mini running Mojave too, (yes >> >> I know that LC doesn?t officially support Mojave yet >> >> but I thought I would try it anyway.)) The app ran >> >> fine except for the icon problem again, and this time >> >> when I quit the application, the icon down in the dock >> >> that shows running applications never went away >> >> even after the app quit. It looks like Destroy-stack >> >> isn?t working. >> >> >> >> Suggestions? >> >> >> >> Thanks, >> >> >> >> Rick >> >> _______________________________________________ >> >> use-livecode mailing list >> >> use-livecode 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 Nov 22 05:02:39 2018 From: david.bovill at gmail.com (David Bovill) Date: Thu, 22 Nov 2018 10:02:39 +0000 Subject: iOS sharing extension In-Reply-To: References: Message-ID: Great - I was hoping that it would use the custom url stuff. Has anyone done this? Would be great to have some demo code + plist to work of a an example. On Tue, 20 Nov 2018 at 18:40, Ben Rubinstein via use-livecode < use-livecode at lists.runrev.com> 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 tore.nilsen at me.com Thu Nov 22 11:53:05 2018 From: tore.nilsen at me.com (Tore Nilsen) Date: Thu, 22 Nov 2018 17:53:05 +0100 Subject: Browser widget and PDFs Message-ID: <13409178-024E-4665-B95B-48F2500E8258@me.com> I have come across a puzzling phenomenon in how the browser widget handles pdfs. On my iMac I do no have Adobe Reader or Adobe Acrobat installed. Here, the browser widget displays pdf-files without any hiccups. On my MacBook I have Adobe Acrobat installed, and the browser widget seems to use Adobe Acrobat to display pdf-files inside the widget. When I remove Adobe Acrobat from the application folder, trying to view a pdf-file in the browser widget will prompt me to locate either Adobe Acrobat or Adobe Reader. Are there any way I can ?force? the widget to ignore Acrobat or Reader entirely, and will I be able to view pdf-files in the widget on bothMac and Windows if I do so? Best Regards Tore Nilsen From brian at milby7.com Thu Nov 22 11:56:56 2018 From: brian at milby7.com (Brian Milby) Date: Thu, 22 Nov 2018 11:56:56 -0500 Subject: Browser widget and PDFs In-Reply-To: <13409178-024E-4665-B95B-48F2500E8258@me.com> References: <13409178-024E-4665-B95B-48F2500E8258@me.com> Message-ID: <63945d3e-3380-4e9d-89c1-7b95fda90216@Spark> Could this be related to the default app that handles PDF on your Mac? Thanks, Brian On Nov 22, 2018, 11:53 AM -0500, Tore Nilsen via use-livecode , wrote: > I have come across a puzzling phenomenon in how the browser widget handles pdfs. On my iMac I do no have Adobe Reader or Adobe Acrobat installed. Here, the browser widget displays pdf-files without any hiccups. On my MacBook I have Adobe Acrobat installed, and the browser widget seems to use Adobe Acrobat to display pdf-files inside the widget. When I remove Adobe Acrobat from the application folder, trying to view a pdf-file in the browser widget will prompt me to locate either Adobe Acrobat or Adobe Reader. > > Are there any way I can ?force? the widget to ignore Acrobat or Reader entirely, and will I be able to view pdf-files in the widget on bothMac and Windows if I do so? > > > 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 tore.nilsen at me.com Thu Nov 22 12:01:06 2018 From: tore.nilsen at me.com (Tore Nilsen) Date: Thu, 22 Nov 2018 18:01:06 +0100 Subject: Browser widget and PDFs In-Reply-To: <63945d3e-3380-4e9d-89c1-7b95fda90216@Spark> References: <13409178-024E-4665-B95B-48F2500E8258@me.com> <63945d3e-3380-4e9d-89c1-7b95fda90216@Spark> Message-ID: <30CABF91-BC12-47DB-BABC-4877AE529601@me.com> I don?t think so, as the default app is set to be Preview on both machines. In fact I had forgot I had Acrobat installed on my laptop. Tore Nilsen > 22. nov. 2018 kl. 17:56 skrev Brian Milby via use-livecode : > > Could this be related to the default app that handles PDF on your Mac? > > Thanks, > Brian > On Nov 22, 2018, 11:53 AM -0500, Tore Nilsen via use-livecode , wrote: >> I have come across a puzzling phenomenon in how the browser widget handles pdfs. On my iMac I do no have Adobe Reader or Adobe Acrobat installed. Here, the browser widget displays pdf-files without any hiccups. On my MacBook I have Adobe Acrobat installed, and the browser widget seems to use Adobe Acrobat to display pdf-files inside the widget. When I remove Adobe Acrobat from the application folder, trying to view a pdf-file in the browser widget will prompt me to locate either Adobe Acrobat or Adobe Reader. >> >> Are there any way I can ?force? the widget to ignore Acrobat or Reader entirely, and will I be able to view pdf-files in the widget on bothMac and Windows if I do so? >> >> >> 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 > _______________________________________________ > use-livecode mailing list > use-livecode at 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 Thu Nov 22 12:06:32 2018 From: klaus at major-k.de (Klaus major-k) Date: Thu, 22 Nov 2018 18:06:32 +0100 Subject: Browser widget and PDFs In-Reply-To: <30CABF91-BC12-47DB-BABC-4877AE529601@me.com> References: <13409178-024E-4665-B95B-48F2500E8258@me.com> <63945d3e-3380-4e9d-89c1-7b95fda90216@Spark> <30CABF91-BC12-47DB-BABC-4877AE529601@me.com> Message-ID: <2A1C6003-7F1C-415C-B38C-68E4CA92371C@major-k.de> Hi Tore, > Am 22.11.2018 um 18:01 schrieb Tore Nilsen via use-livecode : > I don?t think so, as the default app is set to be Preview on both machines. In fact I had forgot I had Acrobat installed on my laptop. > Tore Nilsen >> Could this be related to the default app that handles PDF on your Mac? >> Thanks, >> Brian >>> I have come across a puzzling phenomenon in how the browser widget handles pdfs. On my iMac I do no have Adobe Reader or Adobe Acrobat installed. Here, the browser widget displays pdf-files without any hiccups. On my MacBook I have Adobe Acrobat installed, and the browser widget seems to use Adobe Acrobat to display pdf-files inside the widget. When I remove Adobe Acrobat from the application folder, trying to view a pdf-file in the browser widget will prompt me to locate either Adobe Acrobat or Adobe Reader. Are there any way I can ?force? the widget to ignore Acrobat or Reader entirely, and will I be able to view pdf-files in the widget on bothMac and Windows if I do so? >>> Best Regards >>> Tore Nilsen I don't think we can do anything against this, since if a user (like you) has installed Acrobat Reader and has checked "Use Web plugin" (or what the correct wording is) somewhere in the Acrobat preferences, that will override the "default" behavior of the underlying webkit on Mac, which Safari uses, too, to display PDFs "natively". Best Klaus -- Klaus Major http://www.major-k.de klaus at major-k.de From hh at hyperhh.de Thu Nov 22 12:43:47 2018 From: hh at hyperhh.de (hh) Date: Thu, 22 Nov 2018 18:43:47 +0100 Subject: Browser widget and PDFs Message-ID: <13D6C4BA-E4DC-4FCC-B596-EC72F9BF2156@hyperhh.de> If the PDF is embedded by ordinary HTML (= set url of the browser widget or use in its htmlText ,