Re: ordered Array
Posted: Mon Apr 13, 2020 11:22 pm
An array with sequential numerical keys starting at 1 will emit the values in numeric key order when looping using a “repeat for each element tVal of tArray” construct.
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Not needed, as I noted yesterday: while the sort command's default is alphabetical, you can use the "numeric" specifier to get a numeric sort. And, should you ever need it down the road, you can also sort by date and/or time with the "datetime" specifier.foosmaster wrote: Tue Apr 14, 2020 4:34 pm I ended up using padded numbers (because sort works on strings, not number)
an alternative is to put multi dimension array where the first element in the array is the order
Is it? I suppose everyone's a newbie in the beginning of anything. But I was introduced to LiveCode when I was hired to port a Mac software product to become multiplatform, and nearly all my LiveCode work since has been delivering commercial products or making in-house solutions businesses ranging in size from 5 to 50,000 employees.really ... I am amazed sometimes to the lack of 'standard' programming tools.
I know this is used to teach kids or newbies
If one language did everything best the TIOBE Index would have only one entry, and we wouldn't see new languages coming out nearly every year.and it's a shame that most of the world uses different methods to accomplish things - and this teaches workaround / non standards methods, shame
I see none of the delays you speak of (LC v.9.5.1, Mac 10.13).IDE performance which is VERY poor, not only save, sometimes opening a card, or switching to debug mode - more often than not, I have to wait over 5 seconds for the IDE to unfreeze, this is crazy, and the scale of the program is REALLY small (2 screens, a few hundrands lines of code, 800K all in all for the livecode binary)
...and if Bogs had been awake when he posted, he might have suggested something completely different, such as turning off a few of the options in the SE that have previously dragged things to a near stand stilldunbarx wrote: Thu Apr 16, 2020 3:00 pm I know people like Bogs are comfortable working in older versions.
such as the options highlighted in green below...
Feel free to pass my email address on to the teacher: ambassador AT fourthworld.comfoosmaster wrote: Thu Apr 16, 2020 11:43 am I meant no disrespect, every language has its benefits, I guess my main annoyance comes from the fact my son went to a course where they chose LiveCode as the environment (hence my insistning on LC for his first 2-3 projects) but his understanding of actual programming concept is little to none existing, most of it due to the teacher's fault and not LC (I had to explain what variable means, an array, function, etc. etc.)
I've discovered what appears to be a redundancy in the Script Editor's redraw, esp. noticeable when debugging. I'm working to pin that down so I can submit a fix.my main trouble comes right now from the IDE performance which is VERY poor, not only save, sometimes opening a card, or switching to debug mode - more often than not, I have to wait over 5 seconds for the IDE to unfreeze, this is crazy, and the scale of the program is REALLY small (2 screens, a few hundrands lines of code, 800K all in all for the livecode binary)
I spend most of my time on Ubuntu with an increasing amount of development time on Windows over the last year. LC is definitely faster overall on Ubuntu. Some things like debugging still show the effects of the aforementioned layout redundancy, but overall I find LC quite snappy on Ubuntu.so really, unless the linux experience is REALLY different (and I am half curious to install it on my Ubuntu box and test it there) - I Really can't understand how you'd use it nowaday for a real life scenario when you get lightening speed IDEs
Richard. I only use a Mac. Have you heard of these sorts of slowdowns there?That said, I often find it snappy on Windows too. But when it slows down, it slows down hard.
Not as noticeably, but if my hunch about the Script Editor's redraw redundancy is correct you should find a few things there a little snappier.dunbarx wrote: Thu Apr 16, 2020 5:12 pmRichard. I only use a Mac. Have you heard of these sorts of slowdowns there?That said, I often find it snappy on Windows too. But when it slows down, it slows down hard.
Code: Select all
function a
local tLocal, tB
put 1 into tLocal # place breakPoint here
put b() into tB # step into this
put 2 into tLocal # unless I put a breakpoint here - I can't reach it if I stepped into the fomer statement
return 1
end a
function b
local tTemp
put 1 into tTemp
return 1
end b
Given that there is such a problem pinning down recipes and the team are working without much specific direction to kill known bugs, but rather optimise situations that occur without consistent patterns, they are doing really well to improve performance of the IDE and specifically the Script Editor. Version 9.x improvements have included fixes for memory leaks and random behaviours, but they are not yet back at the performance of pre-unicode refacxxxxxx versions. Any recipe for problems that can be reproduced should be reported. My difficulty has been being able to create a recipe.FourthWorld wrote: Thu Apr 16, 2020 4:24 pm That said, I often find it snappy on Windows too. But when it slows down, it slows down hard. I haven't yet pinned down the specific differences causing the slowdown, and reviewing the bug reports for that it seems the core team has also had difficulty finding consistently reproducible recipes. So anything you find along those lines will be helpful - thanks in advance.
Something is awry. Are you sure you know how to use the "step into", "step over" and "step out" gadgets? And how to set either hard or soft breakpoints? I have never encountered any of the travails that you describe.another bad experience is if I step into a function, I can't step out, it just continues (unless I'd place a breakpoint in the enclosing function)