Re: CSV again.

2015-10-17 Thread Alex Tweedly
Ummm surely at this point repeat for each item i in L add 1 to itemCounter put i into thisItem if howmany(quote,thisItem) mod 2 = 1 then return "This CSV data is not parsable (unclosed quotes in item)." end if ...

Re: CSV again.

2015-10-17 Thread Peter M. Brigham
My mistake, failed to include the offsets() handler: -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig --- function offsets str, pContainer -- returns a comma-delimited list of all the offsets of str in pContainer -- returns 0 if not found -- note:

LC8 Missing Dictionary entries

2015-10-17 Thread Peter Haworth
The propertynames includes loadExtensions and mirrored but there are no dictionary entries for them. Anyone know what they are? Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin

Re: CSV again.

2015-10-17 Thread Peter M. Brigham
So here's my attempt. It converts a CVS text to an array. Let's see if there's csv data that can break it. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig --- function CSVtoArray pData -- by Peter M. Brigham, pmb...@gmail.com -- requires getDelimiters(),

Re: CSV again.

2015-10-17 Thread Peter M. Brigham
On Oct 17, 2015, at 8:47 PM, Alex Tweedly wrote: > Also, I think (i.e. I haven't yet run the code, since I don't have offsets() > available) there is another mis-formed case you don't properly detect : > a,b,c,"def"""g"h",i,j,k if I put this as one of the lines of my CSV data, it gets sorted

Re: CSV again.

2015-10-17 Thread Mike Kerner
The other thing that we are going to be interested in is finding the fastest function that performs the task. On Sat, Oct 17, 2015 at 10:04 PM, Mike Kerner wrote: > I think that item is odd. Quotes are, if memory serves, only supposed to > appear if they are

Re: CSV again.

2015-10-17 Thread Mike Kerner
Peter, You're absolutely right, of course. While we're at it, it would be interesting to see what we come up with if we write it for LCB's modules... On Sat, Oct 17, 2015 at 10:17 PM, Peter M. Brigham wrote: > At this point, finding a function that does the task at all --

Re: CSV again.

2015-10-17 Thread Peter M. Brigham
At this point, finding a function that does the task at all -- reliably and taking into account most of the csv malformations we can anticipate -- would be a start. So far nothing has been unbreakable. Once we find an algorithm that does the job, we can focus on speeding it up. That said, I

Free date picker

2015-10-17 Thread William Prothero
Folks: In case you’re interested, here is a Date Picker made with a datagrid. Please let me know if you find any errors. I’m particularly interested in testing with international dates. Otherwise, please feel free to use it at your will.

Re: CSV again.

2015-10-17 Thread Alex Tweedly
Hi Peter, it also requires offsets() - I can guess what it does, but it would be safer to get the actual code you use :-) Thanks -- Alex. On 18/10/2015 00:41, Peter M. Brigham wrote: So here's my attempt. It converts a CVS text to an array. Let's see if there's csv data that can break it.

Re: CSV again.

2015-10-17 Thread Peter M. Brigham
Thanks for catching that. Change the if-then structure to: if howmany(openQuoteChar,thisItem) <> howmany(closeQuoteChar,thisItem) then return "This CSV data is not parsable (unclosed quotes in item)." end if Revised function: function CSVtoArray pData -- by Peter M. Brigham,

Re: CSV again.

2015-10-17 Thread Mike Kerner
I think that item is odd. Quotes are, if memory serves, only supposed to appear if they are double-quoted. Between "f" and "g" you have three quotes, and between "g" and "h" you only have one. I believe that is not a correct csv format. On Sat, Oct 17, 2015 at 9:24 PM, Peter M. Brigham

Re: Forcing string comparisons, or When is "0" not 0?

2015-10-17 Thread Kay C Lan
On Fri, Oct 16, 2015 at 7:42 AM, Mark Waddingham wrote: > I pondered 'is exactly' for the 'is really' semantics... I'm wondering > whether 'is strictly' is perhaps most appropriate I've come to this topic late but I'm wondering if all these language additions aren't making

Re: Forcing string comparisons, or When is "0" not 0?

2015-10-17 Thread Kay C Lan
On Sun, Oct 18, 2015 at 1:29 PM, Kay C Lan wrote: > but only by strictCompare set to 0 or 1 would it be possible to easily > determine that these numbers are in fact just strings in amongst words as > part of lines of strings. > Should read: but only by strctCompare

iOS Simulator crashes with externals

2015-10-17 Thread Monte Goulding
Hi LiveCoders I’m just making you all aware of an issue introduced in the recent releases of LiveCode where apps crash in the simulator if they have externals. The issue is a result of a change in the standalone builder. If you experience this issue there is an easy workaround which you can

Re: Looking for SVG Test files

2015-10-17 Thread Richmond
On 17/10/15 07:03, Alejandro Tejada wrote: Hi All, I have almost complete a rustic parser for SVG gradients, build on top of Ian Macphail's SVGL: http://livecodeshare.runrev.com/stack/112/SVGL For now, this rustic parser just works with Inkscape Optimized SVGs... but I want to know about other

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Glen Bojsza
Thanks for the clarification...this changes the direction I need to take. In creating an in memory database can you create one with a name? On Sat, Oct 17, 2015 at 12:25 PM, Peter Haworth wrote: > Sorry, I should have looked at your syntax more closely. > > You can't open an

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Mark Wieder
On 10/17/2015 09:42 AM, Glen Bojsza wrote: Thanks for the clarification...this changes the direction I need to take. In creating an in memory database can you create one with a name? Glen- sqlite works with data in memory. So if you open a disk database you'll be working in memory unless you

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Peter Haworth
No, no name is available because you have to use ":memory" as the name to indicate it is an in-memory db. Maybe if you explain what it is you're trying to achieve, we can help more. Pete lcSQL Software Home of lcStackBrowser and

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Paul Dupuis
On 10/17/2015 12:25 PM, Peter Haworth wrote: > Sorry, I should have looked at your syntax more closely. > > You can't open an existing database as an in memory database. If you want > to open an in memory database, the revopendatabase syntax is > revOpenDatabase("sqlite",":memory:") and it will

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Peter Haworth
You could but I can't think of a reason to do that offhand. As Mark said, most sqlite activity occurs in memory so unless you have a huge db that results in a lot of paging activity, you're basically working in memory anyway. If you really wanted to copy a disk based db to an in-memory db, you

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Dr. Hawkins
On Sat, Oct 17, 2015 at 9:42 AM, Glen Bojsza wrote: > In creating an in memory database can you create one with a name? > There really wouldn't be a point to that Once you open a database, Livecode refers to it by number, not name. New line there is no direct way to dump a

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Glen Bojsza
Essentially, I want to keep the database in its original form / content. While the user is running the app I want to be able to make changes to the database knowing that the changes are done in memory and will not be written to the original database. I could duplicate the database to a folder on

Re: CSV again.

2015-10-17 Thread Alex Tweedly
Naturally it must be removed. But I have a more philosophical issue / question. TSV (in and of itself) doesn't have any quotes, and so doesn't handle quoted CRs or TABs. Currently, the 'old' version - as in Richard's published article, doesn't handle TAB characters enclosed within a quoted

Re: Looking for SVG Test files

2015-10-17 Thread Richmond
On 17/10/15 07:03, Alejandro Tejada wrote: Hi All, I have almost complete a rustic parser for SVG gradients, build on top of Ian Macphail's SVGL: http://livecodeshare.runrev.com/stack/112/SVGL For now, this rustic parser just works with Inkscape Optimized SVGs... but I want to know about other

Difference between mobilesensorReading, mobileCurrentLocation and locationChanged

2015-10-17 Thread Ludovic THEBAULT
Hello I’m lost between these 3 methods to get GPS coordinates. Why the dictionary put as example : on locationChanged put mobileCurrentLocation() into theLocation updateMapPosition theLocation -- update the marker on the map showing the current location end locationChanged It is not

SQLite: how to open existing database in memory

2015-10-17 Thread Glen Bojsza
I am trying to open an existing SQLite database in memory. When I do this (or think I do this) I get a database connection ID but the it errors out when I try just to show the current data? On OS X Mavericks LC 8 DP4 *on* mouseUp *put* "/Users/Dev/Documents/Ratings.db3:memory:" into

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Peter Haworth
You created a database but you didn't create any tables in it. You'll need to issue a CREATE TABLE command after opening the db. On Sat, Oct 17, 2015, 7:22 AM Glen Bojsza wrote: > I am trying to open an existing SQLite database in memory. > > When I do this (or think I do

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Peter Haworth
I assume this is a single user application? When you say you want to make changes to the database, do you mean the user makes changes to the data in the database using your application? If the disk version never changes then the next time the user runs your app, whatever changes they made last

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Glen Bojsza
Thanks Pete. I will play with this as it looks to be the way I want to go. On Sat, Oct 17, 2015 at 2:56 PM, Peter Haworth wrote: > I assume this is a single user application? When you say you want to make > changes to the database, do you mean the user makes changes to the

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Glen Bojsza
I think we have a disconnect... I want to open an existing database but in memory. You are saying that I opened a new database in memory but need to create tables in it. So I guess the question is better put: Can you open an existing base in memory if so how? If you can't open an existing

Re: LC 8 Property Inspector

2015-10-17 Thread Richmond
More: http://forums.livecode.com/viewtopic.php?f=6=25526=133078#p133078 Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: SQLite: how to open existing database in memory

2015-10-17 Thread Peter Haworth
Sorry, I should have looked at your syntax more closely. You can't open an existing database as an in memory database. If you want to open an in memory database, the revopendatabase syntax is revOpenDatabase("sqlite",":memory:") and it will be a brand new, empty database with no tables. The

Re: CSV again.

2015-10-17 Thread Mike Kerner
I am going to put 4 on Git and have at it. 1) There are other assumptions being made, like assuming that the and don't appear in the incoming text. Instead of hardcoding the interim substitutions, determine what the interim substitutions are going to be (can also allow the user to specify

Re: CSV again.

2015-10-17 Thread Mike Kerner
I added it to my repository on GitHub if anyone wants to try to do this in Git. On Sat, Oct 17, 2015 at 10:53 AM, Mike Kerner wrote: > I am going to put 4 on Git and have at it. > > 1) There are other assumptions being made, like assuming that the and > don't appear