Search found 456 matches

by marksmithhfx
Sat Oct 24, 2020 8:39 pm
Forum: iOS Deployment
Topic: Suddenly resizing for a different size device
Replies: 1
Views: 28

Re: Suddenly resizing for a different size device

So just to add to this tale, I selected a project I previously compiled on the other (newer) laptop and installed it from this older backup laptop. It scaled perfectly on my iPhone. So this suggests to me that the reason it is appearing larger has something to do with compiling this on the older mac...
by marksmithhfx
Sat Oct 24, 2020 8:19 pm
Forum: iOS Deployment
Topic: Suddenly resizing for a different size device
Replies: 1
Views: 28

Suddenly resizing for a different size device

Here is a conundrum (at least for me). I had to drop off my usual development device (a 2018 macBook Pro, retina 13 inch) for a new battery and will be without it for (up to) a week. So I fired up an early version I've used off and on, a 2015 macBookPro, retina 13 inch). It synced my desktop through...
by marksmithhfx
Sun Oct 11, 2020 1:26 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

Re: sorting array on two values

FourthWorld wrote:
Sat Oct 10, 2020 10:31 pm
If the data is tabular you can get and set a DG's dgText property, which is tab-delimited. A couple quick sorts on that list, tuck it back into the object, and you're done.
Ok, good to know. Things are working splendidly at the moment so I daren't fiddle too much :)

M
by marksmithhfx
Sat Oct 10, 2020 8:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

Re: sorting array on two values

using what's there already would seem useful to save a little development time. Did I miss something? No, probably more likely I did. When, historically, I first went looking for a solution to sort the grid I had already adopted the example that defines the grid by reading the data into a db cursor...
by marksmithhfx
Sat Oct 10, 2020 4:21 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

Re: sorting array on two values

Does the DG's built-in sorting not cover what you're looking for? http://lessons.livecode.com/m/datagrid/l/7325-how-do-i-sort-by-a-column No, the kind of sorting (more like ordering) I was looking for is more defined by an assessment of the content. For example, lets say you build a list of the ste...
by marksmithhfx
Fri Oct 09, 2020 9:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

Re: sorting array on two values

Associative arrays are hashes, and as such have no inherent sense of order. What are you aiming to do? Hi Richard, Thanks for asking. I was maintaining a list in the new DG2 and as you know you can re-order items. Very handy, but of course if you save it out to a database as I was doing you don't w...
by marksmithhfx
Fri Oct 09, 2020 8:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

Re: sorting array on two values

jacque wrote:
Fri Oct 09, 2020 5:08 pm
Add a second sort command after the first one:

Code: Select all

sort lines of it numeric by pArray[each]["dgOrder"]
sort lines of it by pArray[each]["category"]
That adds the category sort after the first one, and the rest of the handler can run as-is.
Very cool. Thanks Jacque
by marksmithhfx
Fri Oct 09, 2020 9:16 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: sorting array on two values
Replies: 13
Views: 408

sorting array on two values

Even though I use the following code, I don't fully understand how works ( I got it from the LC lesson "How do I sort an array") and just modified it for use. However, now I would like to sort on two values: category and dgOrder. Does anyone know how I could modify this to do that? function sortArra...
by marksmithhfx
Tue Oct 06, 2020 7:58 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Adding a 2nd datagrid to a stack
Replies: 10
Views: 443

Re: Adding a 2nd datagrid to a stack

Apologies for the delay getting back. So I tested this out in 2 different stacks, one of which was the same one I had the problem in before, and I could not reproduce the problem. Gremlins in the system I suppose. Anyway, this does not appear to be a major recurring problem.

Mark
by marksmithhfx
Sun Oct 04, 2020 10:57 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Skin a control with SVG Widget in Datagrid
Replies: 37
Views: 1836

Re: Skin a control with SVG Widget in Datagrid

Take a look at this thread: http://forums.livecode.com/viewtopic.php?f=10&t=30411&hilit=svgicontool The SvgIconTool isn't exactly what you are asking for, but it does pull the icons from the current family and display them in a grid format. I'm pretty familiar with the Icon Family code since I subm...
by marksmithhfx
Sun Oct 04, 2020 10:55 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Adding a 2nd datagrid to a stack
Replies: 10
Views: 443

Re: Adding a 2nd datagrid to a stack

Is this possibly a Windows thing? Anyone else see this? If so, it needs to go to the team right away. I'll do some more testing tomorrow and report it if I still have problems. This was on a Mac, and was not even on the same card as the previous control. It was a brand new blank card in the stack. ...
by marksmithhfx
Sun Oct 04, 2020 10:42 pm
Forum: Databases
Topic: searching for "todo" in SQLite field fails
Replies: 6
Views: 617

Re: searching for "todo" in SQLite field fails

if -> todo is not the only content of a field in your database, you should use LIKE! https://www.w3schools.com/sql/sql_like.asp That will find everything that CONTAINS the string "todo" (among other text). Maybe this is the problem? ... SELECT * from "table1" WHERE category LIKE "%todo%" ... Good p...
by marksmithhfx
Sun Oct 04, 2020 10:37 pm
Forum: Databases
Topic: searching for "todo" in SQLite field fails
Replies: 6
Views: 617

Re: searching for "todo" in SQLite field fails

this works flawlessly in your db: put "SELECT * FROM table1 WHERE (`complete` = 'todo') OR (`category` = 'todo');" into tSQL The fields containing "todo" are both text fields, so "todo" must be quoted in your tSQL. Use single quotes for strings. Both fields have names that smell like "reserved word...
by marksmithhfx
Sun Oct 04, 2020 5:50 pm
Forum: Databases
Topic: searching for "todo" in SQLite field fails
Replies: 6
Views: 617

Re: searching for "todo" in SQLite field fails

Sure. Send the database so we can look at its structure. And what about the queries you're trying ? What are they ? We need them too. Thanks Bangkok, This is just a test db so only 10 records. Everything was created (including the sample records) with buttons on the card so you can see the code. Th...
by marksmithhfx
Sun Oct 04, 2020 3:47 pm
Forum: Databases
Topic: searching for "todo" in SQLite field fails
Replies: 6
Views: 617

searching for "todo" in SQLite field fails

I'm having a very strange problem and wonder if anyone has an sqlite database handy they could try duplicating it on. When I query any field on the word "todo" (the string is in the field) nothing is found. I can query on anything but when I change the content of a field to "todo" the program fails ...

Go to advanced search