Re: Finding matched parentheses

2013-07-26 Thread Thierry Douez
2013/7/26 Mark Wieder mwie...@ahsoftware.net get matchChunk(pString,(\(.*\)).*,tstart,tEnd) but even that will fail when you have multiple parentheses in strings like this: hello (bucko) this (is) a test ​But this one will work and match the first occurence:​ if

Re: Finding matched parentheses

2013-07-26 Thread Geoff Canyon
The first answer to http://stackoverflow.com/questions/590747/using-regular-expressions-to-parse-html-why-notexplains the disconnect between regex and HTML better than I can. Here is a function that still requires correctness -- any unmatched ( or ) will cause it to return E with the position of

Re: Reliable script to handle selection/drag-and-drop in a list field?

2013-07-26 Thread Geoff Canyon
Thanks to Peter for pointing out some issues. Update to fix them: https://docs.google.com/file/d/0By_mW8YYOZpAZ19VUHdHcjViY28 On Wed, Jul 24, 2013 at 3:38 AM, Geoff Canyon gcan...@gmail.com wrote: Thanks for pointing out the new messages for behaviors. This

Re: Finding matched parentheses

2013-07-26 Thread Geoff Canyon
Arrgh. Well it certainly pays to check your output... I wasn't clearing one of the variables in the code I wrote outside the function to test it, hence the false good results in the first email. Here's the output once that was fixed. Hopefully I'm not overlooking something else. put stripHTML(

Re: keeping track of the open cards for update

2013-07-26 Thread Peter M. Brigham
Another question that should be tested with a benchmarking procedure. However, I doubt that even needing to update 50-100 fields would show much variation no matter which technique you decided on. It would begin to matter if you had a thousand windows open and several thousand fields, which is

Re: Finding matched parentheses

2013-07-26 Thread Peter M. Brigham
Sorry, in my previous post I did not consider nested parens (I was thinking English text, not C code). The function below should return the offset of the outermost closing paren, the match for the first opening paren. function offsetPair a,b,str -- returns offset(a,str) and loads in z

Re: Finding matched parentheses

2013-07-26 Thread Geoff Canyon
You have to account for the nesting of parens, something like: ((())) Sent from my iPad On Jul 26, 2013, at 8:17 AM, Peter M. Brigham pmb...@gmail.com wrote: If you want a more general solution, you could use offsets(a,str) along with offsets(b,str) and look at all the pairs, with item i of

Re: Finding matched parentheses

2013-07-26 Thread Peter Haworth
On Thu, Jul 25, 2013 at 7:38 PM, Mark Wieder mwie...@ahsoftware.net wrote: I think this is closer to what you're looking for get matchChunk(pString,(\(.*\)).*,tstart,tEnd) but even that will fail when you have multiple parentheses in strings like this: hello (bucko) this (is) a test OK,

Re: Finding matched parentheses

2013-07-26 Thread Peter Haworth
On Fri, Jul 26, 2013 at 12:10 AM, Thierry Douez th.do...@gmail.com wrote: But this one will work and match the first occurence: if matchChunk(mystring,(\([^)]*\)).*,tstart,tEnd) Regards, Thierry Nice Thierry! Doesn't handle nested parens though, but once again, that may not be a

SoCal LC User Group meeting Thurs., August 1, Pasadena

2013-07-26 Thread Richard Gaskin
The next SoCal LiveCode User Group meeting is happening Thursday, August 1, at 7PM in Pasadena - details in the LUG section of the LiveCode forums: http://forums.runrev.com/viewtopic.php?f=50t=16062 -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com

dispatch usage versus send

2013-07-26 Thread Thomas McGrath III
I am trying to figure out the 'correct' use of dispatch: I first set up a lot of details in an iOS app on launch. I load some text files and populate some custom props for use throughout the app. After that I want to load the appropriate fields and other aspects of the app from those custom

Re: Finding matched parentheses

2013-07-26 Thread dunbarx
I am old fashioned. And late. I think this works: on mouseUp answer findNests(fld 1) end mouseUp function findNests var repeat with y = 1 to the number of chars in var if char y of var = ( then put y return after lefts --build list of left paren if char y of var = ) then

Awesome!

2013-07-26 Thread Richard Gaskin
Ben's progress report in the latest newsletter includes some truly great additions, coming up faster than I'd thought would happen - thanks RunRev! Graphics Library Driven by Michael McCreary We have been working for some time on moving LiveCode's 2D rendering to use Skia, an open

Re: Finding matched parentheses

2013-07-26 Thread Thierry Douez
2013/7/26 Peter Haworth p...@lcsql.com On Fri, Jul 26, 2013 at 12:10 AM, Thierry Douez th.do...@gmail.com wrote: But this one will work and match the first occurence: if matchChunk(mystring,(\([^)]*\)).*,tstart,tEnd) Regards, Thierry Nice Thierry! Doesn't handle nested

[OT] Android FOSS Repository

2013-07-26 Thread Roger Eller
Fyi - https://f-droid.org/ ~Roger ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode

odin down again

2013-07-26 Thread Mark Wieder
no comment ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode

Re: dispatch usage versus send

2013-07-26 Thread Mark Wieder
Thomas McGrath III mcgrath3@... writes: I am using this code now: on openstack loadCustomPropsFromFile dispatch loadAllUsers to card Users of this stack if it is handled then dispatch loadCurrentUser to card Users of this stack if it is handled then

Re: keeping track of the open cards for update

2013-07-26 Thread Dr. Hawkins
On Fri, Jul 26, 2013 at 5:42 AM, Peter M. Brigham pmb...@gmail.com wrote: If you go with your initial solution, however, you have to use short ID (the straight ID contains more than one word), and you have to declare your global variables, either at the start of the script, or within each

Re: keeping track of the open cards for update

2013-07-26 Thread J. Landman Gay
On 7/26/13 1:38 PM, Dr. Hawkins wrote: On Fri, Jul 26, 2013 at 5:42 AM, Peter M. Brigham pmb...@gmail.com wrote: If you go with your initial solution, however, you have to use short ID (the straight ID contains more than one word), and you have to declare your global variables, either at the

Re: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin
J. Landman Gay wrote: Using ID is always the quickest way to access anything. Why is that? Mark, Monte - have you guys stumbled across how object references are resolved in the code base? -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com

Re: keeping track of the open cards for update

2013-07-26 Thread Monte Goulding
On 27/07/2013, at 6:15 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Using ID is always the quickest way to access anything. Why is that? Mark, Monte - have you guys stumbled across how object references are resolved in the code base? I haven't really looked into it but it makes

Re: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin
Monte Goulding wrote: On 27/07/2013, at 6:15 AM, Richard Gaskin wrote: Using ID is always the quickest way to access anything. Why is that? Mark, Monte - have you guys stumbled across how object references are resolved in the code base? I haven't really looked into it but it makes

Re: keeping track of the open cards for update

2013-07-26 Thread Monte Goulding
On 27/07/2013, at 6:38 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Yes, I've always believed that name was the slowest option, but it's the iteration that made me thinking that ordinal references would be at least as fast, and possibly faster since the lookup is ordinal by nature

OT: 1948 Newsreel of a Mechanical Differential Analyzer

2013-07-26 Thread Peter Bogdanoff
http://newsroom.ucla.edu/portal/ucla/video-1948-mechanical-computer-247581.aspx This 1948 short film by Popular Science magazine screened in movie theaters before Paramount Pictures features. It shows a mechanical differential analyzer in use by UCLA engineering students and researchers. In

Re: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin
Monte Goulding wrote: On 27/07/2013, at 6:38 AM, Richard Gaskin wrote: Yes, I've always believed that name was the slowest option, but it's the iteration that made me thinking that ordinal references would be at least as fast, and possibly faster since the lookup is ordinal by nature anyway

Re: OT: 1948 Newsreel of a Mechanical Differential Analyzer

2013-07-26 Thread Bill Vlahos
Wow. It would have been something to see this thing in action. Bill Vlahos _ InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure. lcTaskList: (http://www.infowallet.com/lctasklist/index.htm) RunRev lcTaskList

Re: keeping track of the open cards for update

2013-07-26 Thread Monte Goulding
On 27/07/2013, at 10:27 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Monte Goulding wrote: On 27/07/2013, at 6:38 AM, Richard Gaskin wrote: Yes, I've always believed that name was the slowest option, but it's the iteration that made me thinking that ordinal references would be

Answer Dialog location

2013-07-26 Thread Cal Horner
I have implemented a modified error checking handler in the topmost stack in a multi-stack application and the standard answer dialog is popping up over the topmost stack instead of in the middle of the screen. To me this is a problem. I was sure that I had seen an answer to my problem in the

Re: Answer Dialog location

2013-07-26 Thread Scott Rossi
Are you sure you don't have a handler somewhere that is positioning the dialog? Because the default behavior *is* to position the answer dialog in the middle of the main display. This is the routine I use when I want the dialog to appear at a specific location: on suspendStack if answer