Tiko Editor, a few thoughts

Started by walt decker, Today at 01:16:11 PM

Previous topic - Next topic

walt decker

I am currently on a project to translate PowerBasic syntax to (perhaps FreeBasic) a free compiler.  At this  point I have next to no knowledge of FreeBasic. 

I may be out of line here, but I acquired the latest version of Tiko, ran quite a number of the provided examples.  Most failed at the link stage.  Those that failed are in the sub-dirs of the examples dir.  I suggest that you remove those from the down-load.

I read in the Tiko help about the debugger.  I mentions that one can put break points in the the text and the debugger will stop and one can step through the code.  Although the help mentions that F9 enables the break point, there is no mention of how to step through the code.

I pasted a template that Jose Roca posted on the PB Users forum into the Tiko editor and attempted to compile it.  It failed with an error 1 message and referred to something.  I could not read the something because it was beyond the right edge of the status panel, but I assumed it was  an error log.  I could not find an error log.  I suggest that the status panel either be changed to perhaps a listview or have ha horz scroll bar.

Also, the debugger did not stop at the book mark.  Where the error was I have no idea.

Thank you for your hard work. 

Paul Squires

#1
Hi Walt,

Most likely the examples you are looking at are from the FreeBasic compiler itself. I distribute the entire FB compiler package in order to make it easier for users to get up and running with Tiko and FB.

The FB compiler does not ship with pre-compiled libraries (such as OpenGL, SQLite, etc... DLL's) so if the code you're attempting to compile depends on an external 3rd party library then you will need to manually install that yourself. This is well known within the FB community but I totally understand how it would be frustrating if you don't know this. There are a couple of sites IIRC where FB users have placed some of these precompile DLL's, etc. If I ever need such a DLL then I simply get it myself directly from the 3rd party.

The debugger is an interface to the GDB debugger which itself is old and cumbersome to interface to. Let's just say it's a work in progress to integrate the debugger and have it mutually cooperate with Tiko and ensure that it positions itself within the code correctly. Maybe even "work in progress" is an understatement.

You are correct that F9 toggles a breakpoint. There is also a setting in "Environment Options / Code Editor" that when enabled allows you simply click in the code line's margin to set a breakpoint rather than a bookmark. 

When the debugger is run, a popup dialog should appear that includes a toolbar with "Stop", "Continue", "Step Over", "Step Into", "Step Out", and "Run to Cursor". Those are the commands that allow you to step through your code and into (or over/bypass) a function. Those options are also available in Tiko's top menu under "Debug". There are also keyboard shortcuts for each of them.

The "Error 1" is most probably a linker error. If a compile fails then you can refer to the "Compiler Log File" file. That is the second tab in the bottom pane of the editor to the right of "Compiler Results" and to the left of "Search Results", "TODO" and "Notes".

Debugger will never stop at a bookmark. It "should" only stop at a breakpoint.

Paul Squires
PlanetSquires Software

Paul Squires

Quote from: walt decker on Today at 01:16:11 PMI am currently on a project to translate PowerBasic syntax to (perhaps FreeBasic) a free compiler.  At this  point I have next to no knowledge of FreeBasic.

I wish you luck with your project. It appears to be a HUGE undertaking. I'm sure that you have your reasons for doing so and maybe you simply enjoy the challenge. Personally, I would simply learn the new language, whether that is FreeBasic, C, C++, Rust, or whatever, rather than writing a transpiler. You would be surprised at how easy FB is once you get over a few initial learning curve issues that PowerBasic shielded us from. If you use FB paired with José's AfxNova library there is NOTHING that PB can do that FB can not do.  :-)

Paul Squires
PlanetSquires Software

José Roca

There are about half a dozen different projects. The only reason I can see for it is that they want to maintain the syntax. FreeBasic is much more modern and advanced, so all they're going to achieve is a downgrade of FreeBasic. But that's their business.

José Roca

I replicated the DDT dialog engine with a FreeBasic class, CDialog ( https://github.com/JoseRoca/AfxNova/blob/main/docs/Windows/Windows%20GUI%20/CDialog%20Class.md ), I fixed some historic bugs of DDT and added some features, like control's anchoring and the option  of use your own class name instead of #32770. I also added wrappers on top of CDialog to allow to use a PB-like syntax ( https://github.com/JoseRoca/AfxNova/blob/main/AfxNova/DDT.inc ). I also wrote some templates: https://github.com/JoseRoca/AfxNova/tree/main/Templates/DDT%20Templates

Thank God, nobody paid any attention, so I was able to detach myself from the project and not finish the tedious work of completing the documentation. Dialogs weren't designed to work as main windows and have many quirks and limitations. SDK syle programming is much more powerful.