Search found 587 matches
- Thu Jul 09, 2015 7:43 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Server app+Client app+Database
- Replies: 3
- Views: 2807
Re: Server app+Client app+Database
Years and years ago in a galaxy far away, I worked with a database system that provided record level locking functionality in its api. So many of this type of issue would be solved in SQL provided the same functionality. I think you can get down to table level locking in mySQL (and maybe other imple...
- Thu Jul 09, 2015 7:38 pm
- Forum: Databases
- Topic: French char with SQLite database
- Replies: 6
- Views: 6577
Re: French char with SQLite database
SQLite does support unicode and you can set the encoding when the database is created. However, it doesn't do anything automatic to encode data when you insert data or decode it when you select it, that's your application's responsibility. If the OP is using LC 7 or later, it's really easy to encode...
- Fri Jul 03, 2015 10:46 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: datagrid reordering itself
- Replies: 5
- Views: 3066
Re: datagrid reordering itself
I agree, dgText is perfectly fine unless there's a good reason not to use it like multiple lines, special characters, etc. Not sure why what I suggested would be a kluge. I think it's a very common way of addressing the elements of an array when their keys are numeric, or at least I do it a lot :-) ...
- Fri Jul 03, 2015 7:23 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: datagrid reordering itself
- Replies: 5
- Views: 3066
Re: datagrid reordering itself
Try something like this:
Code: Select all
put the keys of tData into tKeys
sort tKeys numeric
repeat for each line rKey in tKeys
--do whatever with tData[rKey]
end repeat
- Thu Jul 02, 2015 8:50 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: String find-replace issue [Solved]
- Replies: 6
- Views: 4316
Re: String find-replace issue [Solved]
Save yourself a lot of time and trouble and get Alex Tweedly's csv omport hamdler. It's really fast and deals with a lot of corner cases.
Pete
Pete
- Thu Jul 02, 2015 8:47 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Undocumented Feature in Repeat?
- Replies: 2
- Views: 1897
Re: Undocumented Feature in Repeat?
That's correct Lagi. Don't think there are any downsides to it, I haven't seen it documented anywhere. I seem to recall there's another situation where a variable doesn't need to be explicitly declared but can't remember what it is - maybe matchtext?
Pete
Pete
- Thu Jul 02, 2015 8:43 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Local: name shadows another variable BUG!!!!
- Replies: 14
- Views: 8560
Re: Local: name shadows another variable BUG!!!!
The debugger angle sounds promising. I can't be 100% sure but I think that applies to !y experience too. I'll keep track of that grom now on.
Pete
Pete
- Thu Jul 02, 2015 2:32 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Local: name shadows another variable BUG!!!!
- Replies: 14
- Views: 8560
Re: Local: name shadows another variable BUG!!!!
I will try swithcing variable preservation off and see what happens. To be honest, I've never been quite sure what variable preservation does. I've assumed that if I have a script cloal variable and I make a change to a handler in the same script, it will preserve its value. If that's the case, then...
- Wed Jul 01, 2015 8:03 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Local: name shadows another variable BUG!!!!
- Replies: 14
- Views: 8560
Re: Local: name shadows another variable BUG!!!!
I've suffered form this this since the day I started using strict compilation mode. In my case, restarting LC seems to fix the problem but I sometimes end up having to do that several times a day.. In some cases, all works fine over the course of several compilations and suddenly, up pops the error....
- Tue Jun 30, 2015 3:16 am
- Forum: Databases
- Topic: Functionality of MySQL records showing in a data grid
- Replies: 11
- Views: 7503
Re: Functionality of MySQL records showing in a data grid
How are you loading the data into the database? Using a datagrid form introduces another level of complexity in that it's your responsibility to load the data from the dgData array into the controls in the datagrid. Rather than me try to explain it here, take a look at section 2.5 of the Datagrid Ma...
- Sat Jun 27, 2015 8:04 pm
- Forum: Databases
- Topic: Functionality of MySQL records showing in a data grid
- Replies: 11
- Views: 7503
Re: Functionality of MySQL records showing in a data grid
The datagrid library sends a selectionChanged message to your datagrid when you click on a line in it. Write a selectionChanged handler in your datagrid group's script to get the contents of the line and put them into whatever controls you want. For example: on selectionChanged pHilitedIndex, pPrevH...
- Sat Jun 27, 2015 12:30 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Sqlite: storing fields from multiple cards in one table
- Replies: 13
- Views: 7348
Re: Sqlite: storing fields from multiple cards in one table
Here's a few techniques, assuming you store your data in a custom property of your stack named cData. First, put all your data handlers in the script of your main stack. That way, if you decide to store your data in arrays or in a text file, you just have to change your central handlers. You might e...
- Fri Jun 26, 2015 9:39 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Sqlite: storing fields from multiple cards in one table
- Replies: 13
- Views: 7348
Re: Sqlite: storing fields from multiple cards in one table
I agree with Richard. SQLite is great but a lot of learning and overhead for only 20 records in one table. If I ever find myself with a schema that has only 1 table, it's a good sign that an SQL database probably isn't the right tool. I'd use a custom property of your stack to hold the data if you d...
- Wed Jun 24, 2015 10:08 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: SQLite column comes in with £
- Replies: 5
- Views: 3685
Re: SQLite column comes in with £
Things do "just work" as long as the data remains within Livecode. You have to do a little more work, but not much, when the data is read/written from/to any external file. To save you the trouble of getting the presentation, the trick is to use textDecode when fetching data from the database and te...
- Tue Jun 23, 2015 8:15 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Stack hangs on open
- Replies: 10
- Views: 5770
Re: Stack hangs on open
Oh yes, don't forget to disable "Suppress Messages" when you're ready to open the stack again! Another thing you might find useful if you don't already know about it. If you right click anywhere on your stack when it's open and you're in Edit mode, at the bottom of the popup menu, you'll see options...