-
1 Attachment(s)
Hi René,
I spent some time on code of thinICE.
I cannot say how happy I was to see such a great code. Never thought we could get so complex in the positive sense.
I mean, your code is so great and full of complexity that I cannot believe thinBasic is able to execute.
It is really a piece of code I will study for long long time as a source of inspiration!
Based on that, yesterday I added a kind of rudimentary profile in thinCore.
It is activated by adding #TRACE (in next thinBasic version it will be called #PROFILE) at the beginning of the code.
When you will execute your script, if #TRACE is ON, you will have a profile text file with all the functions present in you code and for each: how many times it has been executed and for how long (ms)
It can be opened with a spreadsheet in order to sort by execution time or by number of executions (see image)
It is quite rudimentary and numbers (especially timing) are still not perfect but can give an idea where a script spent most of the time and maybe it can help to improve the script or, for me, improve thinBasic.
Ciao and a big thanks.
Eros
-
fixed US-keyboard-layout to print correct Y & Z
fixed displaying last line in codefield.
-
replaced previous tControl_Textfield -an editeable textfield- with a new version derived from codefield
- it has Undo+Redo built in - see testProject_009 for an example
+ a few fixes to tUI
still unsolved mystery why it crashes when starting thinICE in max resolution - obviously other tUI-projects don't have this issue so it must be something with thinICE.
-
todays main-improvement:
I made use of #Trace-directive and optimized rendering-speed of syntax-highlighting for codefield.
Guess you'll feel it, especially on slower engines.
Download as usual at first post of this thread.
-
New #Minversion 1.9.16.9
made use of new keyword App_Inifile to both projects ("thinICE" & "tUI" where thinICE is based on)
further speed improvement to tControl_Basetype.Render & new resizing-routines for tUI due to new #PROFILE-analizing
extended tUI: now can have timers , added new Type tTimer to be included in tUI-unit
- see demo testProject_009 how to create and use, look for "Notes" in code-browser-tree to find a list of all controls.
-
thinICE now able to execute scripts, either F5 or F8 - same as in thinAir.
Astonishing:
It will even work if you run thinICE from thinAir. thinICE is not required to be bundled before.
thinBasic.exe seems able to interpret more than just one script at once!
New function: tCodefield.CheckParens()
Before a script gets executed, thinICE will check the script and all included units for balanced parenthesis.
So it might take a while before it runs.
I don't know if I'm gonna keep it that way,
(if you dont like it comment line 392 in thinICE.tBasic, Sub ScriptExecute)
Code:
lLine = cf.CheckParens(sCheck)
You also may check for parenthesis in the current scriptunit if you right-click into codefield and select "check script" or just press CTRL+P.
It does not show the exact line where the parenthesis are unbalanced but it goes for keywords & newline-char ":" that can not be within parenthesis and shows the line where the last parenthesis were found.
+ fixed some crashing-issue of thinICE
+ added the forgotten UNIONs to the project.
Codetree will now also list Unions and autocomplete of course will know them if you type something like "Dim myVar(123) As "
-
Thank you Rene,
pretty impressive...
Petr
-
another last new version for the year 2015.
Mostly fixes of some crashing-issues - now also largest resolution will work fine.
New function to tControl_Treeview to kill nodes that have a certain user-value allows correct refreshing - a renamed/removed or in another way changed global now gets removed or replaced instead of keeping the outdated information.
Download at first post of this thread.
I think i will re-write thinICE with a few changes.
mainly to make use of new cTokenizer (urging for overview/documentation)
Look forward to the year 2016 and await the unexpected.
-
It is becoming faster and faster every version.
I have still some issues with keyboard. I have a full keyboard in my laptop with full numeric keyboard on the right and separated arrows in the center.
Arrows are not recognized while if I use arrows on numeric keyboard while numbers are de-activated, it works.
This should not be related to keyboard nationality but mapped extended keys.
I will work on tokenizer module class help by the next thinBasic version.
-
Petr already reported similar issues on some keyboards using %VK_Right.
I don't know what to do since i use the equates for that - is it possible the numbers of keyboard-keys are outside the range of Byte (1 to 255) ? Is there some %VK-equate higher than 255?
Is it possible to read keyboard-nationality from OS (windows) so my script knows what char to print if the user presses a key?