Database: INSERTS, speed and primary keys

2010-09-27 Thread David Bovill
I've spent the weekend refreshing on databases. I'm using LiveCode and also Trevor's fabulous sqlYoga, and beginning to realise how little I know about databases! The question I've got is about the database schema design and optimising it for the speed of adding records. * Exporting Handlers* I

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread Monte Goulding
Hi David However if I uses a surrogate primary key (ie the usual auto-incremented numeric id field), for each updated record I need to check first whether it is already in the database before adding it - this is a lot of overhead in terms of finding the ids based on other fields. I haven't

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread David Bovill
HI Monte - hows down-under :) On 27 September 2010 11:31, Monte Goulding mo...@sweattechnologies.comwrote: I haven't yet used SQLYoga but I'm sure Trevor has this all worked out. SQLite will handle the auto increment of integer primary keys when you INSERT without an ID field and then you

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread Monte Goulding
HI Monte - hows down-under :) Getting better all the time ;-) Only by making the primary key = name,type,location,hnum instead of id woudl you get a fast normalisation of the data inserted. You can create an secondary key for those fields and still use your primary key auto-increment field

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread David Bovill
OK - not getting very far with that - Google is not my friend :) Can you give me an idea of what the CREATE statement would look like? CREATE TABLE 'handler' ( 'name' VARCHAR(255) NOT NULL, 'type' VARCHAR(255) NOT NULL, 'location' VARCHAR(255) NOT NULL, 'handler_num' INTEGER

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread Monte Goulding
Try: -- - -- Table `handler` -- - CREATE TABLE IF NOT EXISTS `handler` ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(255) NOT NULL , `type` VARCHAR(255) NOT NULL , `location`

Re: Line Wrapping and Margins

2010-09-27 Thread Peter Brigham MD
On Sep 24, 2010, at 1:57 PM, Michael D Mays wrote: Thanks Mark and Craig, That's what I need. Unfortunately that property doesn't show up in the dictionary as a property of a field (only a button) so it makes it a little hard to find. :( And the syntax example for formatedWidth some

Re: Database: INSERTS, speed and primary keys

2010-09-27 Thread David Bovill
Thanks for that Monte, On 27 September 2010 13:44, Monte Goulding mo...@sweattechnologies.comwrote: UNIQUE INDEX `mykey` (`name`, `type`, `location`, `handler_num`) ); Or you can use a separate Create Unique Index statement. OK - will have to read up more on Indexes - I thought they were

SelectedChunk

2010-09-27 Thread Warren Kuhl
Is there an easy way to retrieve the word # of a field based on the SelectedChunk? The SelectedChunk contains the start/end position of a word of a field. Just am trying to determine which word without to much coding...if possible. Thanks for any help! Warren

Re: Stability in LC 4.5?

2010-09-27 Thread Peter Brigham MD
I found I could crash 4.5 reliably by clicking on a certain button in my rather complex clinical management stack. The button sets up an enhanced find function then lists the cards on which a textstring is found in a given field. I have not been able to track down at which point in my

ANN: Installer Maker Plugin 1.4

2010-09-27 Thread Mark Schonewille
Dear RunRev/LiveCode users, I am pleased to announce that Economy-x-Talk has just released a new version of the Installer Maker Plugin for Runtime Revolution/LiveCode. The Installer Maker Plugin is a tool to quickly wrap your RR/LC standalones in an installer for Mac OS X or Windows. This new

Re: SelectedChunk

2010-09-27 Thread Mike Bonner
I'm positive this can be shortened, but as is should do what you want. It could be simplified greatly of course if you are forcing only whole word selections, but this will account for partial word selects, and also just an insertion point. * on mouseUp -- Determine if there is actually a

Re: SelectedChunk

2010-09-27 Thread Warren Kuhl
Mike, Thank you very much for this. I really appreciate it. Looks exactly like what I was looking for. You mentioned forcing only whole words. Is this a command? Or something I would need to program? Thanks again! Warren On Mon, Sep 27, 2010 at 9:21 AM, Mike Bonner bonnm...@gmail.com

Re: SelectedChunk

2010-09-27 Thread Mike Bonner
Would have to program it, and now that i'm more awake, not sure you need to go through all the convoluted stuff I did. This is probably closer to what you can end up with. on mouseUp put word 2 of the selectedchunk into tChar put char 1 to tChar of field 1 into tTmp put the number of

Re: SelectedChunk

2010-09-27 Thread Warren Kuhl
Mike, Thank you very much. You have been most helpful! All the best! Warren On Mon, Sep 27, 2010 at 10:03 AM, Mike Bonner bonnm...@gmail.com wrote: Would have to program it, and now that i'm more awake, not sure you need to go through all the convoluted stuff I did. This is probably

Re: SelectedChunk

2010-09-27 Thread Mike Bonner
http://forums.runrev.com/phpBB2/viewtopic.php?f=7t=3199 Not the post I was thinking of, but some really useful stuff in that forum thread about whole word selections. On Mon, Sep 27, 2010 at 9:05 AM, Warren Kuhl warrenk...@gmail.com wrote: Mike, Thank you very much. You have been most

Re: use-revolution Digest, Vol 84, Issue 56

2010-09-27 Thread David Glasgow
On 27 Sep 2010, at 2:12 pm, Richmond Mathewson wrote: [ they cannot be that other-worldly ] Oh but they are! (or at least, too alien for my abilities) And yes, the point is not to have any set up panel run separately from the LiveCard standalone. Best Wishes, David Glasgow Carlton

What have I done?

2010-09-27 Thread James Hurley
Rev 4.0 is in revolt. (LiveCode is fine.) I write in script: put 3 into x and when I try to compile I get a message Can't create a variable by that name. Or any other name for that matter. I think I may have messed up the global variables. They are the same as before except for the

What have I done?

2010-09-27 Thread James Hurley
P.S. I can run preexisting scripts, I just can't make any changes. It is as if I have lost privileges. Jim Rev 4.0 is in revolt. (LiveCode is fine.) I write in script: put 3 into x and when I try to compile I get a message Can't create a variable by that name. Or any other name

Re: What have I done?

2010-09-27 Thread DunbarX
Did you change your preferences, checking strict compilation mode? This would require that you declare your variables, and not be able to load them on the fly. Craig Newman ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit

Re: What have I done?

2010-09-27 Thread Mark Wieder
James- Monday, September 27, 2010, 9:01:54 AM, you wrote: Rev 4.0 is in revolt. (LiveCode is fine.) I write in script: put 3 into x and when I try to compile I get a message Can't create a variable by that name. You have turned on the explicitVariables failsafe mechanism, which

What have I done?

2010-09-27 Thread James Hurley
Craig and Mark, That was the problem. I have a vague recollection of changing that in the preference dialog box just to see what would happen, and then the phone rang. By the time I got of the phone my short term memory bank had been reprogrammed. I used to have about 68 K short term

Re: What have I done?

2010-09-27 Thread Andre Garzia
at least you got 8k... all I have are a couple registers and a very short stack... On Mon, Sep 27, 2010 at 1:28 PM, James Hurley jhurley0...@sbcglobal.netwrote: Craig and Mark, That was the problem. I have a vague recollection of changing that in the preference dialog box just to see what

Re: What have I done?

2010-09-27 Thread DunbarX
You may want to back that up off site. Craig In a message dated 9/27/10 12:28:40 PM, jhurley0...@sbcglobal.net writes: I used to have about 68 K short term memory. It  has dwindled to about 8 k. ___ use-revolution mailing list

Re: What have I done?

2010-09-27 Thread Devin Asay
Luxury! I dream about having a register! All I have is the bottom of a rusty soup tin, and I have to scratch tick marks on it with a broken stick! On Sep 27, 2010, at 10:40 AM, Andre Garzia wrote: at least you got 8k... all I have are a couple registers and a very short stack... On Mon,

Re: What have I done?

2010-09-27 Thread Mark Wieder
Devin- Monday, September 27, 2010, 9:47:13 AM, you wrote: Luxury! I dream about having a register! All I have is the bottom of a rusty soup tin, and I have to scratch tick marks on it with a broken stick! Wow! A soup tin... all I have is... aw, I forget what I have... -- -Mark Wieder

Re: use-revolution Digest, Vol 84, Issue 56

2010-09-27 Thread Richmond
On 09/27/2010 06:22 PM, David Glasgow wrote: On 27 Sep 2010, at 2:12 pm, Richmond Mathewson wrote: [ they cannot be that other-worldly ] Oh but they are! (or at least, too alien for my abilities) And yes, the point is not to have any set up panel run separately from the LiveCard

Re: What have I done?

2010-09-27 Thread James Hurley
Message: 18 Date: Mon, 27 Sep 2010 09:59:01 -0700 From: Mark Wieder mwie...@ahsoftware.net Subject: Re: What have I done? To: How to use Revolution use-revolution@lists.runrev.com Message-ID: 28318156578.20100927095...@ahsoftware.net Content-Type: text/plain; charset=us-ascii Devin- Monday,

Re: SelectedChunk

2010-09-27 Thread Peter Brigham MD
The selectedChunk gives the segment of text selected, in the form char chartPosition to endPosition of field n If the selection is empty (insertion point only), the result is something like char 5 to 4 of field 9 -- in this case to get the number of the word containing the insertion

Re: SelectedChunk

2010-09-27 Thread Mike Bonner
Ok thats cool. So if its NOT just an insertion point then the number of words of char 1 to (word 2 of the selectedchunk) of field yourfield will give the number of words preceeding the selection? So this whole thing could boil down to on mouseUp if word 4 of the selectedchunk word 2 of the

Re: SelectedChunk

2010-09-27 Thread Mike Bonner
Nevermind. *sigh* Number of words prior to selection or insertion point is put the number of words of (char 1 to (word 2 of the selectedchunk) of field 1) Rev is far more amazing than I can make it be. So is Livecode! On Mon, Sep 27, 2010 at 11:50 AM, Mike Bonner bonnm...@gmail.com wrote:

Re: SelectedChunk

2010-09-27 Thread Peter Brigham MD
You can work out exactly what you want if you realize that the result of the selectedChunk is always char chartPosition to endPosition of field n, and this will be as you would expect if the selection is not empty: ie, in this is a sample string of text in field 1, selecting the

Re: What have I done?

2010-09-27 Thread theworcestersource.com
That reminds me of the chorus of a song that takes me well back to the mid 80s and being a schoolkid: Hey, hey 16k What does that get you today? It's not enough even for a letter Old school RAM packs were much better! Steve -- View this message in context:

RunRev, er, LiveCode on MacNN

2010-09-27 Thread Judy Perry
Posted an hour ago apparently: http://www.macnn.com Judy ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: RunRev, er, LiveCode on MacNN

2010-09-27 Thread Colin Holgate
Here's the direct link: http://www.macnn.com/articles/10/09/27/revamp.offers.new.ios.development.environment/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription