View Full Version : Some thinAir vaporware
ErosOlmi
04-01-2017, 00:03
I've got some results in thinAir development.
As told in other threads, I'm moving from old CodeMax editor to Scintilla Editor.
I had a lot of problems during the initial switch due to my lack of knowledge about Scintilla control. It is so vast: http://www.scintilla.org/ScintillaDoc.html
But now it seem I'm getting some puzzle pieces in the right place.
Attached an image that show some of the options I've already developed at least at the basic level:
syntax coloring
indentation guidelines
rough auto completion
folding
error checking in nested folding
It seems I'm on the right track but still a lot to develop.
Hope to have something to share in few weeks so you can test.
Ciao
Eros
Michael Hartlef
04-01-2017, 00:14
Beautiful! Still PB or a thinBasic app?
Michael Hartlef
04-01-2017, 00:16
And is the app skinable. I am slowly tending to dark themes these days. I guess my eyes get old. LOL. :D
ErosOlmi
04-01-2017, 00:27
PB, not possible to move to TB so far.
Once I will master Scintilla better, I will write some wrapper compiled functions into a module and maybe it will be possible to develop in TB
Yes, personalizing colors of every aspects/part of the editor is in my TODO list.
Michael Hartlef
04-01-2017, 16:35
I have some feature requests for thinAir which would enhance its functionality:
1) Add a Close button to the toolbar and and little X to close in the tab of the corresponding source file. Right now you have to co throught the menus to close a source file.
2) And a Find in Files Dialog.
3) Something Rene already has suggested; Being able to call thinBasic scripts as plugins and interact with thinAir.
How will autocomplete work. Only for commands or will it include parameter help? Will it work for functions/variables in your script too?
ErosOlmi
04-01-2017, 17:18
1) Add a Close button to the toolbar and and little X to close in the tab of the corresponding source file. Right now you have to co throught the menus to close a source file.
Please check right click over MDI Tab, see attached image. You will find a lot of useful features regarding current open tab
2) And a Find in Files Dialog.
Yes, it is in my todo list.
3) Something Rene already has suggested; Being able to call thinBasic scripts as plugins and interact with thinAir.
Something very basic and experimental is already there.
Paste following code into a new script and then right click on MDI Tab and use "Execute script inside thinAir" (see attached image)
'---ThinAir scripting test
Uses "Console"
String sSep = String$(79, "-")
Long nMDI
Long lCounter
PrintL sSep
PrintL "App_Path :", APP_Path
PrintL "App_Name :", APP_Name
PrintL "App_SourcePath:", APP_SourcePath
PrintL "App_ScriptPath:", APP_ScriptPath
PrintL "App_ScriptName:", APP_ScriptName
PrintL sSep
nMDI = thinAir_MDI_Count
PrintL "Number of MDI Windows currently present in thinAir:", nMDI
For lCounter = 1 To nMDI
PrintL "MDI", lCounter, ", file name:", thinAir_MDI_GetFullFileName(lCounter)
Next
PrintL sSep
PrintL "---press a key to close---"
WaitKey
How will autocomplete work. Only for commands or will it include parameter help? Will it work for functions/variables in your script too?
Premature to say something at the moment. I just figured out how it works.
The idea is to have an "intelligent" autocompletion dynamic on the code you are writing. This requires parsing of scripts on the go. It is not a problem but needs to be fast because I have to notify and rescan source code at every char change.
Parameter help is something else and I hope it will be there. In Scintilla it is called TipShow.
Michael Hartlef
04-01-2017, 19:12
About the Test script, thinAir_MDI_Count is unknown. Running 1.9.16.17.
I know the context menu. I just find buttons more convenient und more quick. But it isn't a big problem. :-)
Hi Eros,
If you create IDE with Scintilla, then TB users can automate the Editor control by using Scintilla's editor control object. That is a new world of programming.
ErosOlmi
05-01-2017, 11:16
About the Test script, thinAir_MDI_Count is unknown. Running 1.9.16.17.
Dir you executed using right click on MDI Tab and use "Execute script inside thinAir"?
That script cannot be executed directly because thinAir_* functions are not known outside thinAir.
Anyway it was just an experiment to demonstrate it could be done and seems it can be done.
[QUOTE=Michael Hartlef;93277]
I know the context menu. I just find buttons more convenient und more quick. But it isn't a big problem. :-)
Adding that [x] means personalizing standard Windows TAB control and it's a mess doing it in WIN32 API.
ErosOlmi
05-01-2017, 11:17
Hi Eros,
If you create IDE with Scintilla, then TB users can automate the Editor control by using Scintilla's editor control object. That is a new world of programming.
Yes something like https://bruderste.in/npp/ps/docs/1.0.1.0/scintilla.html
But I need to wrap thinAir Scintilla into an object.
I add into todo list
Michael Hartlef
05-01-2017, 14:16
[QUOTE=Michael Hartlef;93277]About the Test script, thinAir_MDI_Count is unknown. Running 1.9.16.17.
Dir you executed using right click on MDI Tab and use "Execute script inside thinAir"?
That script cannot be executed directly because thinAir_* functions are not known outside thinAir.
Anyway it was just an experiment to demonstrate it could be done and seems it can be done.
Adding that [x] means personalizing standard Windows TAB control and it's a mess doing it in WIN32 API.
Yes I did execute it via right click.
Regarding the [x]. No problem. I thought it was easy to add and most editors have it. But like I said, not a problem. There are other things for
important. :-)
Michael Hartlef
05-01-2017, 14:19
Sorry reagrding executiong from within thinAir. It works. I wonder what I did wrong. Guess I need a break.
Petr Schreiber
07-01-2017, 17:49
Eros,
this is great to see, thanks a lot for pushing thinAir forward!
I would also be the one appreciating the dark theme support, that is, even the GUI of thinAIR itself would be in darker/custom color.
Petr