iOS / Android differences on a scrolling list field

2018-06-15 Thread Ludovic THEBAULT via use-livecode
Hello, I’ve a card with a scrolling list field. On iOS, the user can scroll the field (with native scroller) and then select (hilite) a line like expected. On Android, as soon as you touch the field, there is an hilitedline and then the scroll. It’s not really expected and nice. Is there a

Re: Listfield Questions

2018-06-15 Thread Charles Szasz via use-livecode
Thanks Richard for your help. Unfortunately, using keyboard arrow keys may hilite a line but it does not put a value associated with the line into an input field. Sent from my iPad ___ use-livecode mailing list use-livecode@lists.runrev.com Please

Re: Listfield Questions

2018-06-15 Thread Richard Gaskin via use-livecode
Charles Szasz wrote: > Does anybody know how to script a listfield to hilite a line using > arrow keys on the keyboard? That should be happening automatically whenever the field has focus. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and

Re: merge()

2018-06-15 Thread Mike Bonner via use-livecode
Cool, thanks! On Fri, Jun 15, 2018 at 7:58 PM Brian Milby wrote: > I think that as long as you control the string that is passed to merge you > should be fine. But if the user were able to directly influence the string > that is passed to merge, then they certainly could inject something. > >

Re: merge()

2018-06-15 Thread Brian Milby via use-livecode
I think that as long as you control the string that is passed to merge you should be fine. But if the user were able to directly influence the string that is passed to merge, then they certainly could inject something. put the text of field 1 into tMerge put merge(tMerge) into tDangerousUse put

Re: Regex (matchChunk) help...

2018-06-15 Thread Mike Bonner via use-livecode
Hey cool! I'd use Jims (an marks) method. MUCH simpler. On Fri, Jun 15, 2018 at 7:06 PM Jim Lambert via use-livecode < use-livecode@lists.runrev.com> wrote: > Building on what Mark Wieder elegantly wrote: > > > MarkW wrote: > > > > filter lotsOfText with "*selkirkst*skyrider1*” > > function

merge()

2018-06-15 Thread Mike Bonner via use-livecode
I just had a thought while pondering some code from another thread. I have done things like put merge("This is a random number: [[random(tNum)]]") Since merge can do what do can, is there a way this method could be taken advantage of using an injection type of attack? I'm thinking the answer

Re: Regex (matchChunk) help...

2018-06-15 Thread Jim Lambert via use-livecode
Building on what Mark Wieder elegantly wrote: > MarkW wrote: > > filter lotsOfText with "*selkirkst*skyrider1*” function extractStrings lotsOfText, startWord, endWord replace cr with space in lotsOfText -- Makes sure lotsOfText is just a single line replace startWord with cr

Re: Open recent File Menu

2018-06-15 Thread Monte Goulding via use-livecode
Hmm… ok then > On 16 Jun 2018, at 1:11 am, Bob Sneidar via use-livecode > wrote: > > One reason is that sometimes I have to go to a backup or archive of a stack > to revert some script or object deletion. When that happens I get 2 instances > of the recent stack, but now they are prepended

Re: LiveCode - Andoid SDK - Java compatibility chart?

2018-06-15 Thread Monte Goulding via use-livecode
Hi Folks Just to clarify as I have looked into this. Android SDK itself requires you to install Java 8 max. So while we have a bug about this in our db it’s not really fixable by us. We do have some ideas about presenting dialogs if you have the wrong one installed though. Note this mainly

Re: calling an api from a stack?

2018-06-15 Thread Mike Bonner via use-livecode
Thanks for the tip, and clarification. On Fri, Jun 15, 2018 at 3:34 PM Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Yes, but you found more utility than I was thinking of. My thing is that > when tracing/debugging, I need to see what a function returns, and I can >

Re: calling an api from a stack?

2018-06-15 Thread Bob Sneidar via use-livecode
Yes, but you found more utility than I was thinking of. My thing is that when tracing/debugging, I need to see what a function returns, and I can only do that if I put the returned value or it or the result into a variable of some sort. Bob S > On Jun 15, 2018, at 14:28 , Mike Bonner via

Re: calling an api from a stack?

2018-06-15 Thread Mike Bonner via use-livecode
If you mean using merge inside the function, I guess one could do the merge beforehand and pass it in as a parameter, or alternatively do the merge in the function and return the generated url string as part of the returned value. IE change it like so.. function translate pText,pLang put

Re: Multiple Monitors ; However, LC IDE want a 0,0,X X working rect.

2018-06-15 Thread Bob Sneidar via use-livecode
I have a development menu which has, among other things a command that simply sets the loc of the top stack to the screenloc. Centers the stack in the monitor. I also have found it necessary to record the rect and loc of the stack on close so I can restore it on open. Bob S > On Jun 15,

Re: Regex (matchChunk) help...

2018-06-15 Thread Bob Sneidar via use-livecode
If the first search string can be anywhere before the second search string, and the second search string can be anywhere (or nowhere) after the first string, use LIKE '%selkirkst%' OR LIKE '%skyrider1%' I posted some code, and also a sample stack, for converting an array to a memory database

Re: Regex (matchChunk) help...

2018-06-15 Thread Bob Sneidar via use-livecode
I understood he wants lines with either or. Bob S > On Jun 15, 2018, at 10:05 , Mark Wieder via use-livecode > wrote: > > On 06/15/2018 08:45 AM, Glen Bojsza via use-livecode wrote: >> Any suggestions? > > filter lotsOfText with "*selkirkst*skyrider1*" > > -- > Mark Wieder >

Re: calling an api from a stack?

2018-06-15 Thread Bob Sneidar via use-livecode
Again, this is why I don't like to nest functions. You cannot tell what the function returned without pulling it apart. Bob S > On Jun 15, 2018, at 10:40 , Mike Bonner via use-livecode > wrote: > > jsontoarray returns an array, you'll have to dig through the array to find > where pieces of

Multiple Monitors ; However, LC IDE want a 0,0,X X working rect.

2018-06-15 Thread Sannyasin Brahmanathaswami via use-livecode
There on old LED Cinema display that was not worth seeing (slightly dimmed) and I tried hooked it up my may book program on with the 32inch LG curved display, this giving three monitors. The effective working screenrect(s) are as follows 0,455,3440,1872 # Display 1 the LG

Re: Regex (matchChunk) help...

2018-06-15 Thread Mike Bonner via use-livecode
Glad it worked. If it turns out there is a reason not to use trueword and a for each loop, the same basic algorithm can be used with offset() but it would be a bit more convoluted. Basically, find the first offset for the beginning string, then use that to skip chars to look for both the

Re: Regex (matchChunk) help...

2018-06-15 Thread Glen Bojsza via use-livecode
Hi Mike, Yes this worksnever used or knew about trueword. thanks! Glen On Fri, Jun 15, 2018 at 1:21 PM, Mike Bonner via use-livecode < use-livecode@lists.runrev.com> wrote: > Try this.. > > on mouseup >local tCharOffset >--set the text of field 1 to the text of field 1 >put

Re: Regex (matchChunk) help...

2018-06-15 Thread Mike Bonner via use-livecode
Slightly cleaned up, and adjusted to empty tPair after a match. (on the off chance there is a second ending without a matching new beginning word) > on mouseup >put the text of field 1 into tText >put "beginning" into tstartword -- string begin >put "ending" into tEndword --

Re: calling an api from a stack?

2018-06-15 Thread Mike Bonner via use-livecode
jsontoarray returns an array, you'll have to dig through the array to find where pieces of information reside, but it pretty straightforward after you poke around. For example.. If you instead do this.. put jsontoarray(tResult) into tArray you have an array variable named tArray. If you-- put

Re: Regex (matchChunk) help...

2018-06-15 Thread Mike Bonner via use-livecode
Try this.. on mouseup local tCharOffset --set the text of field 1 to the text of field 1 put the text of field 1 into tText put "beginning" into tstartword -- string begin put "ending" into tEndword -- string end put 1 into tCounter -- tracks current word repeat for each

Re: calling an api from a stack?

2018-06-15 Thread Eric A. Engle via use-livecode
This works, sort of: put URL "https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180527T091305Z.7f33f9fb3f66f0bb.d573f1d9a6336a981504916600c45f49255938b3=hello%20world=en-de; into tResult put tResult into card field 1 --put JsonImport(tResult) into tResults --put

Re: Regex (matchChunk) help...

2018-06-15 Thread Mark Wieder via use-livecode
On 06/15/2018 08:45 AM, Glen Bojsza via use-livecode wrote: Any suggestions? filter lotsOfText with "*selkirkst*skyrider1*" -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to

Re: Regex (matchChunk) help...

2018-06-15 Thread Glen Bojsza via use-livecode
Mike, I believe that you are correct in understanding what I am trying to extract. I will need a bit more time to work through your solution. regards, Glen ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe,

Re: Regex (matchChunk) help...

2018-06-15 Thread Glen Bojsza via use-livecode
Hi Jerry, I may be wrong but it looks like your solution assumes that the line has the beginning and ending I am looking for in the first and last positions...in my example text that I gave it was all one line and the string I am looking for is somewhere in the middle. I may not have been clear

Re: Regex (matchChunk) help...

2018-06-15 Thread Glen Bojsza via use-livecode
Bob, this is an interesting approach using SQL. I will try and setup a simple test with SQLite. thanks On Fri, Jun 15, 2018 at 11:53 AM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > one way would be to populate a memory database, then query it with LIKE: > > SELECT *

Re: Regex (matchChunk) help...

2018-06-15 Thread Brian Milby via use-livecode
I’m a little confused about the requirements. Can the desired text span lines? If not, it changes things slightly. Offset is something you can use. Find location of end token. Find location of first start token. Find location of next start token. If before end token, try again until after or

Re: Regex (matchChunk) help...

2018-06-15 Thread Mike Bonner via use-livecode
If I understand correctly.. If you find the beginning string occurrence, and then find another beginning string, you want to ignore the first, and only take strings where beginning and end have no intermediate beginnings? Like this I mean.. beginning blah blah blah blah blah *beginning blah blah

Re: Regex (matchChunk) help...

2018-06-15 Thread Jerry Jensen via use-livecode
Will this do what you want? (untested) put empty into tExtract repeat for each line L in bigText if char -9 to -1 of L is “skyrider1” then if char 1 to 9 of L is “selkirkst” then put L & return after tExtract end if end if end repeat if char -1 of tExtract is return then delete

Re: calling an api from a stack?

2018-06-15 Thread Mike Bonner via use-livecode
/* A quick and dirty example of using yandex translator Fill in your key then use the 2 functions to try things out. Put this in your card or stack script, then call the desired function passing in the required parameters. */ constant kKey="put your key here" constant kGetTransURL="

Re: Regex (matchChunk) help...

2018-06-15 Thread Bob Sneidar via use-livecode
one way would be to populate a memory database, then query it with LIKE: SELECT * FROM memorydb WHERE stringtext LIKE 'selkirkst%' OR stringtext LIKE '%skyrider1' If you need lines that have both use a single comparison 'selkirkst%skyrider1' Sometimes SQL is the best way to find things. Bob

Regex (matchChunk) help...

2018-06-15 Thread Glen Bojsza via use-livecode
Hello, I have a couple of hundred pages of text where I need to extract out a different string. The ending of each string I need has the same endingskyrider1 The beginning of each string is the same selkirkst The middle of each string can be any text. The problem is that within each

Re: Listfield Questions

2018-06-15 Thread Bob Sneidar via use-livecode
> On Jun 14, 2018, at 23:01 , Peter Bogdanoff via use-livecode > wrote: > > Charles, > This is from something that I’m doing where the user can use the arrow keys > to hilite another line or even scroll the field (my field has hundreds of > lines). Also as a bonus, pressing the enter or

Re: Anything LiveCode Can Learn From GO

2018-06-15 Thread Mark Talluto via use-livecode
Sigh on me for I missed the ‘mobile’ part…also clearly stated. We are out of luck in that area. But, the idea works well for desktop solutions. Data access for mobile use should be pretty fast even if it is processed as a ‘sync’ process. Most mobile apps need to do more modest processing due

Re: Open recent File Menu

2018-06-15 Thread Bob Sneidar via use-livecode
One reason is that sometimes I have to go to a backup or archive of a stack to revert some script or object deletion. When that happens I get 2 instances of the recent stack, but now they are prepended by (sometimes) long paths. Also, I will open sample stack from time to time, and those stay

Re: Need help with a project

2018-06-15 Thread Bob Sneidar via use-livecode
> On Jun 14, 2018, at 18:23 , Peter Bogdanoff via use-livecode > wrote: > > Also, I want to add this: Yummy Interactive who is behind SoftwareShield has > responded to my tech support questions about what to do, but I’m somewhat > flummoxed with their responses. They assume I have more

Re: OT: Fascinating read

2018-06-15 Thread Bob Sneidar via use-livecode
Great article. One point I'd somewhat contend with is the notion that if technology is advanced enough it would be magic to someone first exposed to it. I think it would be better to say that it would seem like magic. If the inference is that magic is only technology advanced beyond current

calling an api from a stack?

2018-06-15 Thread Eric A. Engle via use-livecode
I am trying to make a call to the yandex translate api for a stack i am working on. i could do this pretty handily in HTML but I want to do it in livecode. I tried working with this but using yandex api instead of google

Re: LiveCode - Andoid SDK - Java compatibility chart?

2018-06-15 Thread panagiotis merakos via use-livecode
Hi Tiemo, Currently Java 9 and 10 are not supported, because of some packages being reshuffled/removed/renamed in these versions, so LC does not find the expected tools in the expected location. So this is a bug in LC, not a compatibility issue. There is a bug report here:

LiveCode - Andoid SDK - Java compatibility chart?

2018-06-15 Thread Tiemo Hollmann TB via use-livecode
Hello, Just wasted again one day with these nasty compatibility issues. I have followed the LC guide (https://livecode.com/resources/guides/mobile/android/) to install Android development requirements and failed, because the current versions of Android SDK and Java (10) are not compatible (at

Re: Listfield Questions

2018-06-15 Thread Peter Bogdanoff via use-livecode
Also look at the selectedLine in the dictionary for what to do with the currently hilited line. Peter > On Jun 14, 2018, at 11:01 PM, Peter Bogdanoff via use-livecode > wrote: > > Charles, > This is from something that I’m doing where the user can use the arrow keys > to hilite another

Re: Listfield Questions

2018-06-15 Thread Peter Bogdanoff via use-livecode
Charles, This is from something that I’m doing where the user can use the arrow keys to hilite another line or even scroll the field (my field has hundreds of lines). Also as a bonus, pressing the enter or return keys on the keyboard will do the same as clicking on the line. You probably