Forum is live again

Started by Paul Squires, June 02, 2025, 09:10:26 AM

Previous topic - Next topic

Paul Squires

After an incredibe and relaxing year and a half of post retirement awesomeness, I am back to my beloved programming hobby. The PlanetSquires forum is now live again so feel free to post.

I hope that everyone has been well and that I will see some familiar faces frequent the forum again.
Paul Squires
PlanetSquires Software

Joerg B.

Hello Paul and José

I am very pleased that you are active and creative again and that the forum is now active again. :)
You could certainly use your free time as a "pensioner" in other ways. Programming is a great hobby if you enjoy it and is certainly good for the brain cells.
I'm already looking forward to the new editor.

@José
Many thanks also to you for taking the trouble to supplement your framework and make it DDT-compatible!
This opens up completely new possibilities in FreeBasic for those who don't have this know-how or want to switch from Powerbasic.

Greeting from Germany

Joerg

Paul Squires

I had been programming in C++ a lot over the past 3 years but I finished the application that I needed to write in C++ so I had been looking for something new. However, motivation in retirement to code hours upon hours a day just wasn't there and we have a new little dog so she demands attention which is not good for concentrating on programming.

I have started work on a language server for FreeBasic in order to integrate that into Visual Studio Code. That will certainly help bring new user attention to the FB language because a lot of new coders these days use Visual Studio Code. I have a fair amount of that project written (the guts of it at least) so I have to finish that project (it is written in FreeBasic).

However, I happened to email José after I noticed that he started coding again. Of course, anything that José does immediately piques my interest! José was using a very old version WinFBE and rather than customize that old version to his liking, it became the motivation I needed to create a better editor, The Tiko Editor. Something that I've wanted to do for a long time because I knew that WinFBE needed an overhaul. I also wanted an editor without the built in visual designer. Something smaller, snappier, and easier to customize and work on.

I must admit, programming again makes me much happier. I always get so much enjoyment from programming and building things.
Paul Squires
PlanetSquires Software

José Roca

#3
Hi Paul,

The intial beta version of Afx2 is ready to use. Of course this is only the beginning, but the more essential things are ready.

DWSTRING provides Unicode dynamic strings.

AfxStrProcs2 provides the same functionality that the PowerBasic string functions and Regular Expressios.

AfxArrays2.inc provides macros to work with arrays of any kind and AfxSort2.inc provides procedures for sorting them.

CDialog is the class that replicates de DDT dialog engine, with the addition of custom dialogs using your own class name and an easy system to anchor controls for automatic resizing.

DDT.inc provides a wrapper to use CDialog in a procedural way with a DDT-like syntax.

All the DDT Dialog and Control statements have been implemented in DDT.inc, with the exception of the TAB control because as it uses generic dialogs for the pages and I needed first to get the dialogs working.

To use the messages of controls not covered by DDT, you can use the macros and functions provided in windowsx.bi, commctrl.bi and AfxCtl2.inc. Together, they cover all the messages of all the controls, with the exception of the Rich Edit control for wich I'm going to create a control wich will allow to use all the messages and the TOM interfaces.

With all that and what it is implemented natively in FreeBasic, it is enough to get started. Of course, I will continue to add many goodies: this is going to be a hot summer :)

Paul Squires

Awesome, thanks José. I will do another tiko_suite release and include your Afx2 files in the toolchain's \inc folder similar to the already there Afx folder.

I use your original Afx framework of files extensively.
Paul Squires
PlanetSquires Software

José Roca

Afx is great, but Afx2 will be more up to date with the new technologies. I was a little afraid of experimenting to not break existing code. Now that I don't have to work with broken import libraries and outdated headers, I will write a more modern framework.

José Roca

#6
I have added a little ListView template using the DDT-like syntax ( https://github.com/JoseRoca/WinFBX2/blob/main/Templates/EX_DDT_ListView_01.bas ). The anchor resizing is great, not only because it is automatic, but because it works equally well no matter if you have used dialog units or pixels. Having avvess to the internal callback procedure allows to automate many things.

With the options of DialogNewPixels you can work like with CWindow with the exception that you will use WM_INITDIALOG inestead of WM_CREATE, and that you don't have to call DefWIndowProcW. I have managed to eliminate the differences between the different options. DialogEnd even sends a PostQuitMessage just in case you use a message pump, which will needed in certain cases, like working with graphics.

José Roca

Quote@José
Many thanks also to you for taking the trouble to supplement your framework and make it DDT-compatible!
This opens up completely new possibilities in FreeBasic for those who don't have this know-how or want to switch from Powerbasic.

To date, the remaining DDTer's don't have shown any interest. Maybe they're afraid of abandoning his comfort zone. The Tiko suite will be great for people new to FreeBasic since they won't need to first look for an editor, then install the compilers, tools, headers and libraries, etc. It will work out of the box.

Joerg B.

Quote from: José Roca on June 14, 2025, 08:54:57 PMTo date, the remaining DDTer's don't have shown any interest. Maybe they're afraid of abandoning his comfort zone. The Tiko suite will be great for people new to FreeBasic since they won't need to first look for an editor, then install the compilers, tools, headers and libraries, etc. It will work out of the box.
Hi José

I think you have analyzed this aptly.
Most of the active programmers on the PowerBasic forum are already retired and have no reason to switch, as their knowledge of DDT in conjunction with PowerBasic is sufficient for their needs and there is no reason for them to give up that comfort zone. I don't necessarily exclude myself from this. But my curiosity is even greater than maintaining my comfort zone.
And yet there are people who want and hope for a 64bit compiler for PowerBasic.
As far as I know, Jürgen Kühlwein is responsible for this project.
It is a lot of work and there is still a lot of water flowing down the river until a compiler works properly and can be used reliably.
Building a compiler is not trivial.
In this respect, the Tiko editor in combination with your AFX2 framework is an alternative that is already available for newcomers or beginners.
I can also well imagine that the editor and the framework can give FreeBasic a boost.

You both have my respect for the realization of this project!
Greeting from Germany

Joerg

Joerg B.

Quote from: José Roca on June 14, 2025, 07:58:22 PMNow that I don't have to work with broken import libraries and outdated headers, I will write a more modern framework.
Hello José

Does this mean that you will be working on an additional framework?
Greeting from Germany

Joerg

José Roca

#10
Afx2 IS a new framework. Like DDT, it is based in the Windows Dialog Engine. It is implemented in the class CDialog, DDT.inc being a thin wrapper to allow to use CDialog in a procedural way with a DDT-like syntax. Like DDT, you can use any Windows API with them, but the DDT wrappers won't work with a SDK window created separately with CeateWIndowsEx because it needs all the information stored in the underlying CDialog class.

But you don't need to create your main Window separately, since there are two DialogNewPixels options. With the option that accepts your own custom class, it is almost as if you were using CreateWindowEx, with the exception that you will receive a WM_INITDIALOG message instead of WM_CREATE, that you don't have to call DefWindowProcW in your callback procedure and that you will use DialogEnd instead of PostQuitMessage. Although custom classes work differently in some aspects to the ones created using the standard dialog class, the internal dialog procedure handles the differences, so the user callback procdure will work exactly no matter wich DialogNew option you use to create the dialog.

This avoids the need to have two different classes, CDialog for dialogs and CWindow for SDK windows. It is like adding to CWindow the advantages of dialogs, and adding to dialogs the advantages of SDK windows.


Joerg B.

Quote from: José Roca on June 15, 2025, 11:02:55 AMAfx2 IS a new framework.
Hello José

Thanks for the feedback and clarification.
Sorry, then I misinterpreted the previous post.
It is now clear that AFX2 is the new framework and not an intermediate step to something further.
Greeting from Germany

Joerg

José Roca

It provides the foundation for further development. New things will we added, like a Rich Edit control.