Archive for the ‘Gambas’ Category

Is this the easiest way to evaluate the latest Gambas?

January 8, 2015

I have just noticed that there is an easy path to Gambas 3.6.2 from the latest Puppy Linux Tahrpup.

Download the Tahrpup 6.0 CE ISO from

http://puppylinux.org/main/Download%20Latest%20Release.htm.

Burn to a CD (the download is only 200Mbyte). Boot and use the wizard to set up networking.

Click on the Install button and then choose the <Install applications> tab.

Choose <Gambas3-3.6.2.tahr.sfs>

After installation, Gambas will be found in the utility menu.

Can’t get much easier than that. You will need a hard disk to save the installation on when you close down. It is fully prompted.

Gambas on Ubuntu 14.04 LTS (Trusty Tahr)

April 27, 2014

I have just done a fresh install of Ubuntu 14.04. The Gambas3 in the Ubuntu repository is still 3.1.1 and so is presumably still brain-damaged. I cannot believe how much harm has been done to Gambas by the Debian maintainers inability to come to terms with the requirements for a Gambas installation.

Fortunately the instructions below which use Kendek’s PPA still work.

A point I did not mention in the original instructions is that you do not have to open terminal everytime you want to run Gambas.

Go back to Dash (click on the top left Ubuntu button in the menu bar), type ‘Gambas’ (without apostrophes) and the Gambas3 application will be displayed. You can then drag this onto the menu bar.

There is by-the-way a very complimentary four-page review of Gambas in the latest edition of my favourite Linux mag, Linux Format 184, June 2014.

Installing Gambas 3 on Ubuntu 12.10 (quantal quetzal)

October 25, 2012

Just a note to confirm that I have installed Gambas3 on a fresh install of Ubuntu 12.10 using the instructions for 12.04 below.

Installing Gambas 3 on Ubuntu 12.04 LTS (Precise Pangolin)

April 22, 2012

Sheldon Sobel has pointed out in a comment that the routine in “There’s an easier way!” does not work with Ubuntu 12.04. I have installed Ubuntu 12.04 Beta2 and muddled through the following to install Gambas3:

1. Click on ‘Dash Home’  (the top button on the menu bar/dock thingy on the left hand side). Type (yes, that’s right: from the keyboard!) ‘terminal’ without apostrophes and enter to display the terminal option. Click on terminal and the terminal window opens.

2. At the command line (which will look something like: Fred@homeComputer:~$) type: ‘sudo add-apt-repository ppa:nemh/gambas3’ and enter. Enter your root password and enter again to continue. You will have to enter the root password each time sudo is invoked below.

3. Type ‘sudo apt-get update’ and enter.

4. Type ‘sudo apt-get dist-upgrade’ and enter. This may report that nothing needs to be done. It depends on the history of your installation. In any event it can do no harm.

5. Type ‘sudo apt-get install gambas3’ and enter. This will take a little time and produce lots of verbiage on the screen.

6. Type ‘gambas3’ and enter. There may be a QT4 warning about being unable to load a translation. This definitely occurs from the UK using en_GB.UTF-8 but I don’t know what happens from elsewhere. Don’t worry (be happy). Gambas 3 should then load.

So there we are: something that could be done from the gui on earlier versions of Ubuntu now has to be done from the command line. I believe it is called progress.

Disappearing off on one of my notorious parabolic tangents (yes, yes I know you can’t do that but it sets my mind at rest that I will at some stage return. I am of an age where I worry about these things!), I do marvel at the polish of each new Ubuntu distribution. Ubuntu 12.04 is not for me but I do respect where Canonical is going and why they feel they have to go in this direction. The argument which persistently re-appears that Canonical ‘make little contribution to the Linux kernel’ and by inference make little contribution to Linux is just so much nonsense. Linux has not broken through on the desktop and I doubt now that it ever will. On the other hand, I shudder to think where Linux would be now without the sheer professionalism and attention to detail displayed by each successive Ubuntu release. The distributions I choose to use are derivatives of Ubuntu which in turn is a derivative of Debian. I could never get Debian to work FOR ME so that must be some kind of progress.

There’s an easier way!

February 25, 2012

There is now an easier way to install Gambas 3 than by compiling from source. It won’t be the latest version but is better than starting off now with Gambas 2 which has quite simply reached end-of-life.

A Gambas user, Kendek, has created a repository which works fine. You have to tell your operating system where to find this repository. I am doing this on Lubuntu 11.10 but I guess the process works on any Oneiric derivative. There are versions for earlier Ubuntu versions (and derivatives) described at:

https://launchpad.net/~nemh/+archive/gambas3/+packages.

Drag over the following address, and copy into the clipboard with Ctrl and then c, or file, copy from menu or right-click copy on the mouse. The address is:

deb http://ppa.launchpad.net/nemh/gambas3/ubuntu oneiric main

Go to preference, software sources and click on the ‘Other Software’ tab. Click the Add button and paste the clipboard into the apt line with the reverse of any of the three methods above (the keyboard shortcut is Ctrl and then v). Click on add source and provide a password. You will now see two lines added under the ‘other software’ tab.

Close the window. That tells the operating system where to look for an installable Gambas3. Open a terminal window (Accessories, LXTerminal on Lubuntu or equivalent). Type in:

‘sudo apt-get install gambas3’ (without parentheses) and enter.

Provide a password and Kendek’s Repository package will be installed. You can then run Gambas 3 with ‘gambas3’ from the terminal or add a menu entry or a desktop icon.

Is Gambas better than Python?

February 5, 2012

I have decided to turn a comment into a topic. Here is the comment to this blog by kelvonyrroh.

“Is Gambas better than python. I have a problem in designing a GUI with data grid capability in python. I discovered Gambas on Synaptic package manager in MINT LINUX 10-JULIA. Am very curious about gambas. Please shed some light on this one”

Is Gambas better than Python? Simple answer: No. Just different.

As you point out, Gambas is very well integrated with the gui process. Having said that the gui part of the Gambas application is separated from the program logic to a degree that is not possible with say Python and (wxWidgets or TKInter).

My requirements from a programming language are narrow. Most of what I enjoy doing is desktop-based database front-ending. I use SQLite and mySQL.

I do not think there is a finer front-end for SQL work than Gambas.

I accept that I am a victim of my history: I used Fortran on an IBM 360/50 at university and did a LOT of BASIC work in my first job using an HP9830. Interestingly this was really a programmable calculator and not even microprocessor controlled. For its time, it was simply wondrous. I wonder if any readers can date these activities?

I guess I am saying that if I were a youngster starting out, there is no way I would use any BASIC derivative. Fine as many versions of BASIC are, there is little standardisation and probably no guarantee of continuity. From various Clustr maps and forums, I suspect there are countries which are still teaching BASIC in schools. They shouldn’t be.

On the other hand, I am sick to death of the Pavlovian antipathy to BASIC which is found on forums like the Ubuntu Forum. It is the same kind of immaturity which turns Apple users into fanboys. Gambas is a fine modern language which on occasions smells more of coffee than another leading brand. And it’s quicker too!

Gambas has a high dependency count (it requires a large number of standard libraries) to run. Each of the libraries used by Gambas is itself subject to development which in turn impact on Gambas. For example, the discontinuation of QT3 in favour of QT4 has effectively killed off Gambas 2. The newly released Gambas 3 is quite simply the only way forward. Library inconsistency between Linux distributions also has an effect. Gambas is better suited to development for own-use or controlled distribution. If you develop an application for widespread distribution around the world then I think the dependency issue will destroy you. That’s a comment on Linux in general rather than Gambas itself.

There is team effort in Gambas but at the end of the day it is the creation of one very bright chappy, Benoit Minisini. Should he be run over by a bus or lose interest, Gambas is in trouble.

Gambas is also Linux only. Whether we like this or not, it is a disadvantage. I was looking through the RealStudio forum the other day. RealStudio is a commercial BASIC variant originating on the Mac but now working on Windows and Linux. It is ok but in my opinion can’t hold a candle to Gambas. Anyway, this forum contributor had written a piece of cross-platform software which he had managed to sell 7000 times. Of those 7000 sales, 4 were for Linux. This may be in part cultural (typical Linux user: “You want me to PAY MONEY for SOFTWARE?”) but is not a good indication.

Python is of course cross-platform. I often wonder whether it would have suffered the same oddity status as Gambas had it been Linux only.

I personally don’t like Python but accept that it is good software. If someone were to ask me to point them to a good Python application I would probably suggest Gramps, the genealogy program written in Python, pyGTK and using XML data. I am not sure I could suggest a similar demonstration of Gambas’s abilities. Would Gramps have been written this way if Python was Linux only? I wonder.

Compiling and Installing Gambas 3

July 1, 2011

Gambas 3 has now been released. Development of Gambas 2 and some of its components (particularly the QT3 toolkit) has ended. That, in itself, should not be a problem and Gambas 2 should be available from distributions for some time to come.

If you are new to Gambas, I would recommend that you start using Gambas 3 now. It is sufficiently different from Gambas 2 to make later conversion of Gambas 2 projects to gambas 3 a frustration.

Unfortunately Gambas 3 is not yet in any distribution repository yet so this involves installing Gambas 3 from source code. This might be intimidating for new Linux users so I have written the note on the right to show a hopefully easy-to-follow process. These instructions work on all Ubuntu versions (I have only installed on 11.04 in Gnome rather than Unity desktop) as well as Linux Mint 11 and I guess most Ubuntu derivatives. The process is similar for other distributions.

Am I still using Gambas?

March 19, 2011

There has been a comment left on this blog asking if I have given up writing code in Gambas. Well, the answer (as with most answers) is yes and no.

As you can see elsewhere on the blog, we were using POS software written in Gambas to run my small retail business. We had a major staff problem just less than a year ago and found that card transactions were being rung up on the (separate) card machine but were then being cancelled from the POS screen before finalisation. The theory being that the customer was generally happy with the card slips and did not need a separate till slip. The money was then taken from the till to cover the excess and the till balanced at the end of the day.

I decided that we would have to integrate the card acceptance with the POS programme. The only solution I could find here in the UK was Ocius from Commidea. Needless to say they did not have a Linux solution which surprised me as I thought Linux was ideally suited to POS. Even worse, it was written in the dreaded .Net. Talk about an elephant to crack a nut.

My Gambas software would not translate onto Windows so I went and bought Windows POS software from a vendor who specialises in our trade. The bought software is much more comprehensive than mine would ever have been (home grown software is always ‘work-in-progress’!) but by definition caters for requirements well beyond my needs. I am disappointed firstly because I enjoyed writing the software and secondly because I have walked back into the arms of M$.

I still use Gambas particularly for manipulation of text files but no longer use it on a daily basis. I still prefer Linux although I must admit that Windows 7 is not at all bad.

Using containers to make Gambas applications behave.

August 30, 2010

I have put a tutorial in a page on the right hand side. Containers are not actually something I use very much but I do think the existing documentation is not very helpful when you do need a window to behave like a window oughta.

Creating a database and tables from within Gambas.

May 16, 2010

I wrote this little demo program some time ago. It is in the pages on the right.

It might help somebody.