News archive

Reusing script classes and functions

When using a script, it is possible to access regular gambas libraries and components. But if your purpose is to create a completely portable script, that relies only on standard gambas components then sometimes it is better to include/reuse classes you have developed. In this example I am going to cover the use of the Linux readline library something I commonly use in my scripts to obtain input from users with the usual shell recall/search and edit capabilities.

Part 3 - Quin's Gambas Application Framework - Module AG - Applicat…

Part 3 - Quin's Gambas Application Framework - Module AG - Application Global

I have a number of key variables that are common to all my projects and 5 utility subroutines.
The values of the variables obviously change from project to project but those variables that are then accessible to the rest of the Project.
Note # I'll expand on Cls_Toolbox_Folders in the next post as it relates directly to the GPic (Get Picture)…

Playground Examples are available

For those of you that want to do a little basic learning, the Gambas playground Examples and a basic learning environment is available by installing the scriptbuilder 2.2.2 from the gambas farm via the IDE. Examples were written by Charlie Ogier.


Image

Screenshot at 2025-12-06 15-55-33.png

Screenshot at 2025-12-06 15-55-33.png

Part 2 - Quin's Gambas Application Framework - Module AE - Applicat…

Part 2 - Quin's Gambas Application Framework - Module AE - Application Errors

When an error occurs in Gambas while running from the GUI, the project halts and the line on which the error occurs is highlighted.
When you are running the compiled executable and you have found a bug deep in the bowels of your brilliant code, you get a 'not too helpful' message and the application closes.

Something along the lines of…

Part 1 - Gambas Application Framework

Part 1 - Gambas Application Framework.

Standard Caveat # Everyone has a 'programming style'. Two devs may write vastly different solutions to the same problem. 
Efficiency aside, neither is 'wrong' as long as the code runs and the problem is solved. What follows is just my way of doing things.
What I've developed in Gambas over the years is a sort of framework. This framework allows me to develop applications quickly with 'less'(?)…

Before you Zip it up

There are some things you should do before you zip up a project source code to send to the forum showcase or testers helping you debug.
Not a technical requirement but more courtesy/professionalism. I've been guilty of most if not all of these in the past and it made me reflect on the individual steps required.


Delete the applicationname.gambas file if it exists. It's not required in your source code and it will just be baggage in your zip…

Names

I use two/three letter names for Modules and some often used variables and these are standard across almost every project that I make. 
This is against 'best practice' but if you keep it to a minimum for the most frequently used elements in your applications, then it will increase your programming speed and debug time.

Module Names:
AG - Application General - Global variables and subroutines that are standardised across all of my…