[ANN] SoCal LiveCode User Group Meeting: June 5

2014-06-03 Thread Richard Gaskin
The next meeting of the SoCal LiveCode User Group is coming up next Thursday, June 5, in Pasadena. Details in the forum: -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode deve

Re: Wikipedia "UUID"

2014-06-03 Thread Richard Gaskin
Roger Eller wrote: I added "LiveCode", but had no supporting information to include. On Jun 2, 2014 6:36 PM, "Richard Gaskin" wrote: Anyone here have time to add LiveCode to the "Implementations" section?: Thank

Need to filter out items of list

2014-06-03 Thread Magicgate Software - Skip Kimpel
Good morning coders, I have a very, very large field that contains some text from a tab delimited dataset. Row 1 contains the headers. Here is my dilemma... I need to filter out lines where item 9=EMPTY or item 15 is greater than 0. Any help or guidance? Thank you! SKIP __

Re: Need to filter out items of list

2014-06-03 Thread Charles E Buchwald
Good Morning Skip, How about: put fld "super large blob of text" into tFieldText repeat for each line n in tFieldText if item 9 of n is empty OR item 15 of n > 0 then delete n end repeat ... not tested. But it seems like maybe you have something else in mind? - Charles On 03 Jun 2014, a

Re: Need to filter out items of list

2014-06-03 Thread Dar Scott
I think some new features to ‘filter' might help. If those are not in the dictionary, look at recent release notes. (Sorry for being even more brief and cryptic than usual; busy day.) Dar On Jun 3, 2014, at 8:02 AM, Magicgate Software - Skip Kimpel wrote: > Good morning coders, > > I have

Re: Wikipedia "UUID"

2014-06-03 Thread Roger Eller
Yep. That was my first idea too, but 6.02 was the latest online docs out there. ~Roger On Tue, Jun 3, 2014 at 9:32 AM, Richard Gaskin wrote: > Roger Eller wrote: > > I added "LiveCode", but had no supporting information to include. >> On Jun 2, 2014 6:36 PM, "Richard Gaskin" >> >> wrote: >>

Tree View in a Datagrid

2014-06-03 Thread Ray
Has anybody tried to create a tree view in a datagrid? I have a datagrid which I need to be able to 'collapse' group of lines in order to reduce excessive vertical scrolling. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit th

Re: Need to filter out items of list

2014-06-03 Thread Magicgate Software - Skip Kimpel
Thanks for the replies... Dar, that is what I was originally thinking but I have not wrapped my head fully around the filter command and the complexity of introducing regex commands to accomplish what I am attempting. Having said that, Charles might be on the right path as far as NOT overcomplica

Re: Import text file into sqlite

2014-06-03 Thread Peter Haworth
First thing to do is get a copy of Alex Tweedly's excellent handler for unpacking csv files. After that, a lot depends on the structure of your database versus the structure of the csv file but in general you just need to create a SQL INSERT statement for each line in the csv file (except the head

Re: Need to filter out items of list

2014-06-03 Thread Robert Brenstein
On 03.06.2014 at 9:35 Uhr -0500 Charles E Buchwald apparently wrote: Good Morning Skip, How about: put fld "super large blob of text" into tFieldText repeat for each line n in tFieldText if item 9 of n is empty OR item 15 of n > 0 then delete n end repeat ... not tested. But it seems li

ScreenRect bug or not

2014-06-03 Thread Terence Heaford
Mac OS X 10.9.3 LC 6.6.1 & LC 6.7 (dp4) I have been zooming a stack to the size of the screen using the screenRect function: set the rect of this stack to the working screenRect When I do this the top part of the stack window disappears beneath the OS X menubar. The documents suggest it shoul

Re: ScreenRect bug or not

2014-06-03 Thread Terence Heaford
In my case the working screenRect returned 0,22,1680,1046 if I add 22 to item 2 for 0,44,1680,1046 it seems to work correctly Having measured the screen with Apples screen grab the point directly below the OS X menubar is 22 and not 44. Surely LC should return the correct co-ordinate for Mac an

Re: ScreenRect bug or not

2014-06-03 Thread Richard Gaskin
Terence Heaford wrote: > In my case the working screenRect returned 0,22,1680,1046 > > if I add 22 to item 2 for 0,44,1680,1046 it seems to work correctly > > Having measured the screen with Apples screen grab the point directly > below the OS X menubar is 22 and not 44. > > Surely LC should retu

Re: ScreenRect bug or not

2014-06-03 Thread Terence Heaford
OK, This script put "the working screenRect = " & the working screenRect put return & "the effective working screenRect = " & tRect after msg put return & "the screenRect = " & the screenRect after msg Places the following in the msg box the working screenRect = 0,22,1680,1046

Re: Need to filter out items of list

2014-06-03 Thread Dar Scott
I recommend building a new string rather than deleting lines. On Jun 3, 2014, at 8:35 AM, Charles E Buchwald wrote: > Good Morning Skip, > How about: > > put fld "super large blob of text" into tFieldText > repeat for each line n in tFieldText > if item 9 of n is empty OR item 15 of n > 0

Re: Need to filter out items of list

2014-06-03 Thread Klaus major-k
Hi all, Am 03.06.2014 um 20:36 schrieb Dar Scott : > I recommend building a new string rather than deleting lines. and that is even mandatory, because "repeat for each xxx" is "read-only"! :-) > On Jun 3, 2014, at 8:35 AM, Charles E Buchwald wrote: > >> Good Morning Skip, >> How about: >> >>

Re: ScreenRect bug or not

2014-06-03 Thread Richard Gaskin
Terence Heaford wrote: > On 3 Jun 2014, at 19:10, Richard Gaskin wrote: >> >> In all xTalks "the rect" of a stack refers only to its content >> region. ... >> LiveCode now does this for us with "the effective rect", which >> accounts for the platform-specific window trimmings (title bar, >> borde

Re: ScreenRect bug or not

2014-06-03 Thread Terence Heaford
Sorry Richard, set the effective rect of this stack to the working screenrect I don’t, the traffic lights are still hidden beneath the Mac Menubar. All the best Terry On 3 Jun 2014, at 19:47, Richard Gaskin wrote: > And if you set "the effective rect" of the stack: > > set the effective re

Re: Need to filter out items of list

2014-06-03 Thread Dar Scott
Yes. I’m into short cryptic responses today. The loop shouldn’t be repaired with ‘repeat i = 1 to the number of lines of…; because that is slow for large files, not only in selecting lines but in deleting them. Use ‘for each L’ and ‘put L after…’. I think some changes in LiveCode make the l

Re: Need to filter out items of list

2014-06-03 Thread Magicgate Software - Skip Kimpel
True... forgot about the "read only" issue. Given that I have about 150,000 rows of data to process I am going to need to create some type of progress bar or counter. Using the "repeat for each xxx" method, how would I obtain the current line position? Thanks, SKIP On Tue, Jun 3, 2014 at 2:41

Re: Need to filter out items of list

2014-06-03 Thread Klaus major-k
Hi Skip, Am 03.06.2014 um 21:02 schrieb Magicgate Software - Skip Kimpel : > True... forgot about the "read only" issue. Given that I have about > 150,000 rows of data to process I am going to need to create some type of > progress bar or counter. Using the "repeat for each xxx" method, how wo

Re: ScreenRect bug or not

2014-06-03 Thread Richard Gaskin
Terence Heaford wrote: Sorry Richard, set the effective rect of this stack to the working screenrect I don’t, the traffic lights are still hidden beneath the Mac Menubar. All the best Terry On 3 Jun 2014, at 19:47, Richard Gaskin wrote: And if you set "the effective rect" of the stack:

Re: ScreenRect bug or not

2014-06-03 Thread J. Landman Gay
On 6/3/2014, 1:32 PM, Terence Heaford wrote: the working screenRect = 0,22,1680,1046 the effective working screenRect = 0,22,1680,1046 the screenRect = 0,0,1680,1050 If I now "set the rect of this stack to 0,22,1680,1046" then window top bar that contains the traffic lights is hidden beneath the

Re: ScreenRect bug or not

2014-06-03 Thread J. Landman Gay
On 6/3/2014, 1:51 PM, Terence Heaford wrote: set the effective rect of this stack to the working screenrect I don’t, the traffic lights are still hidden beneath the Mac Menubar. That's even better than the method I just posted. Odd it isn't working for you, it works here. The title bar is sn

Re: Need to filter out items of list

2014-06-03 Thread Magicgate Software - Skip Kimpel
I thought that might be a little inefficient, but once again, I am overthinking it! Thanks for all of your help. On Tue, Jun 3, 2014 at 3:05 PM, Klaus major-k wrote: > Hi Skip, > > Am 03.06.2014 um 21:02 schrieb Magicgate Software - Skip Kimpel < > s...@magicgate.com>: > > > True... forgot abo

Re: Need to filter out items of list

2014-06-03 Thread Magicgate Software - Skip Kimpel
Yep, just tried it and the counter slowed down the process in a VERY noticeable way. I will have to evaluate if it is worth it or not. SKIP On Tue, Jun 3, 2014 at 3:17 PM, J. Landman Gay wrote: > On 6/3/2014, 2:02 PM, Magicgate Software - Skip Kimpel wrote: > >> Given that I have about >> 150

Re: Need to filter out items of list

2014-06-03 Thread J. Landman Gay
On 6/3/2014, 2:02 PM, Magicgate Software - Skip Kimpel wrote: Given that I have about 150,000 rows of data to process I am going to need to create some type of progress bar or counter. Try it first without one, you might be surprised. The "repeat for each" construct is very fast. One time I

Scripting conference stacks

2014-06-03 Thread J. Landman Gay
Many of you are familiar with the scripting conference stacks we created 10 years ago. They are still being downloaded and used by new LC users and are referenced frequently in the forums as a valuable learning tool. Lately there has been a push on the forums to modernize them (they still refe

Re: Tree View in a Datagrid

2014-06-03 Thread zryip theSlug
Hi Ray, The DGH property palette is a datagrid table, using a tree of 1 sub-level depth: www.aslugontheroad.com/images/DGH/Properties_palette.png In the Excel Library documentation, the list on the left is a datagrid form www.aslugontheroad.com/images/Preview/Excel_Lib_Preview/XCEL_Lib_Doc_Pre

Re: Need to filter out items of list

2014-06-03 Thread Dar Scott
Overthinking is good! Here is how to think on this. The time to ‘get line i of…” or ‘delete line i of …” is proportional to the length of the string. If you do that in a loop, then the time doing that, total, goes up with the SQUARE of the length of the string. That is, each time you doubl

Re: ScreenRect bug or not

2014-06-03 Thread Paul Hibbert
My test agree with Richard's and confirms this as a bug in LC6.7(DP4), seems OK in other versions so it may be something to do with the Cocoa implementation, adding an extra line gets round the problem until it's fixed… set the effective rect of this stack to the working screenRect set the

Re: Need to filter out items of list

2014-06-03 Thread Dar Scott
Did you try every so often? To do that, check for ‘i mod 1000 = 0’ or the like. There might be a faster way, but that works. Dar On Jun 3, 2014, at 1:23 PM, Magicgate Software - Skip Kimpel wrote: > Yep, just tried it and the counter slowed down the process in a VERY > noticeable way.

Re: Tree View in a Datagrid

2014-06-03 Thread Ray
Zryip, Oooh! Many thanks. I'll look into this immediately. Sounds like just the docs I'm looking for. Ray On 6/3/2014 4:50 PM, zryip theSlug wrote: Hi Ray, The DGH property palette is a datagrid table, using a tree of 1 sub-level depth: www.aslugontheroad.com/images/DGH/Properties_palet

Re: Need to filter out items of list

2014-06-03 Thread Geoff Canyon
As always, YMMV. I created a stack with two fields. Ran this script once: on mouseUp repeat with i = 1 to 15 repeat 20 if random(4) > 1 then put random(100) - 30 after R put tab after R end repeat put cr into char -1 of R end repeat put R into fld

Re: Need to filter out items of list

2014-06-03 Thread Peter Haworth
Hi Skip, If this is related to your earlier post about loading a text file into an SQL database, it's probably just as easy/fast to load all the data into your database then delete the rows that have the columns corresponding to items 9/15 set to empty/greater than zero. Pete lcSQL Software