Help for a beginner.
Posted
#1
(In Topic #390)
Trainee
Thanks
Posted
Regular

Posted
Trainee
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.
Posted
Trainee
Posted
Regular

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.
Posted
Regular

Raspnex said
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.
Posted
Trainee
Posted
Guru

Posted
Regular

Code (gambas)
- 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.
1 guest and 0 members have just viewed this.


