Help for a beginner.

Post Reply
Raspnex
Posts: 4
Joined: Thursday 26th March 2020 11:50pm

Help for a beginner.

Post by Raspnex » Friday 27th March 2020 12:01am

Does anyone know of any downloadable example programs. I'm using GAMBAS 3.8.4, I tried typing the example program from a downloaded book entitled "A Beginner's Guide to GAMBAS" by John W. Rittinghouse, and typed in his sample program to display how a drawing area is used. But I get an error that doesn't really suggest how to fix it. I downloaded a project "GPlanet" although It is in Spanish, so it is taking me a long time to try to break down how it accomplishes what it does with the drawing area. A group of sample programs that really just displays how all the tools in GAMBAS work would help get new programmers started. I really think an opportunity exists for a series of YouTube tutorials would also help.

Thanks

cage
Posts: 53
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Help for a beginner.

Post by cage » Friday 27th March 2020 3:38am

Could you explain more on what the error is so we might help you. There is one other manual that you can get it's called "How to use Gambas Building building GUI applications. Also Gambas 3.8.4 is rather a very old version of Gambas. You didn't say what operating system you are using however the latest version of Debian has 3.12 in it's repositories. If your using Ubuntu you can add the repository for Gambas on the Gambas Maintainers web site. Just do a search for Gambas stable PPA. For Arch you will find that latest version in the repository. As for the other OS's I can't help you there.

Raspnex
Posts: 4
Joined: Thursday 26th March 2020 11:50pm

Re: Help for a beginner.

Post by Raspnex » Friday 27th March 2020 4:42am

Ok, I'm using Linux Mint 18.3. The first line of the program entered is "Static Function TextHeight(Text as string) as Integer" which gives error "Unexpected Static in FMain.Class:4."
I also got an error on a line "Draw.ForeColor = Color.Black" I changed this one to read "Draw.Foreground = Color.Black" The sample program asked to name the drawingarea as "da", and then issue commands like "Draw.Font.Name = "Arial"". but then i'd get error "No Current Device in FMain:11." I'm certain it is just a matter of getting the correct set-up.

Thanks again for considering my struggles.

Raspnex
Posts: 4
Joined: Thursday 26th March 2020 11:50pm

Re: Help for a beginner.

Post by Raspnex » Friday 27th March 2020 4:50am

I found a similar book titled "How to Gambas 3 - Building GUI applications", but the link no longer leads to the book. It seems to link a site that reviews the book.

User avatar
Godzilla
Posts: 40
Joined: Wednesday 26th September 2018 11:20am

Re: Help for a beginner.

Post by Godzilla » Friday 27th March 2020 6:47am

This Youtube user has about 20 or 30 Gambas tutorial videos (scroll down a bit to find them). The videos cover all the basic functionality and controls, so they're probably exactly what you're looking for. They're fairly old, using Gambas 2. But the basic functionality should be the same.

https://www.youtube.com/user/TheReimber/videos

Gambas is very fun. Its really a blessing for Linux programmers. Before discovering Gambas, I could manage with C# using MonoDevelop. But progress was at a snail's pace. Because I'd spend 80% of the time fighting with the compiler, and only 20% of time doing actual programming. All that face-palm nonsense is a thing of the past with Gambas.

The Gambas community is a great set of people, and very happy to help anyone in need. Best of luck.

User avatar
Godzilla
Posts: 40
Joined: Wednesday 26th September 2018 11:20am

Re: Help for a beginner.

Post by Godzilla » Friday 27th March 2020 8:29am

Raspnex wrote:
Friday 27th March 2020 4:42am
Ok, I'm using Linux Mint 18.3. The first line of the program entered is "Static Function TextHeight(Text as string) as Integer" which gives error "Unexpected Static in FMain.Class:4."
I also got an error on a line "Draw.ForeColor = Color.Black" I changed this one to read "Draw.Foreground = Color.Black" The sample program asked to name the drawingarea as "da", and then issue commands like "Draw.Font.Name = "Arial"". but then i'd get error "No Current Device in FMain:11." I'm certain it is just a matter of getting the correct set-up.

Thanks again for considering my struggles.
I believe this code example you're trying to run is from "A Beginner's Guide to Gambas". I believe that code is so outdated, its not practical or functional in the current version of Gambas. For example, if I'm not mistaken, "Draw" has since been depreciated and has been replaced with "Paint".

However, its very easy and quick to get a fully-functioning example program that demonstrates "Paint".

Start Gambas > choose "Software Farm" from the list of options > click "All Software" > tick "Show Filters" > in filters, put "analogwatch" without the quotes > click on "AnalogWatch1 1.0.2" > choose "Download and install"

Close the "Software Farm" window. Click the "Installed Software" from the list of options and you'll see AnalogWatch1 1.0.2. Choose it and you can run the program and examine/study the code.

I hope this helps and best of luck.

Raspnex
Posts: 4
Joined: Thursday 26th March 2020 11:50pm

Re: Help for a beginner.

Post by Raspnex » Friday 27th March 2020 1:04pm

Yes, Thank you very much. AnalogWatch will work great. It certainly will be easier to figure out.

User avatar
cogier
Site Admin
Posts: 424
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Help for a beginner.

Post by cogier » Friday 27th March 2020 4:03pm

Regarding a book on Gambas please look here at Gerry Buzolic's efforts. The section on printing has some drawing examples.

Also there is an excellent drawing program on the Farm that should help here.

cage
Posts: 53
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Help for a beginner.

Post by cage » Friday 27th March 2020 6:57pm

Since your OS is Ubuntu based you can get the an updated version of Gambas by adding this ppa to your repository list. Open a terminal and run the following commands.
sudo add-apt-repository ppa:gambas-team/gambas3
sudo apt-get update
You then should be able to either download the updated version from your package manager or wait for the update to come from the update manager.

Post Reply