Customizing gambas

Feel free to talk about non programming issues here.
Post Reply
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Customizing gambas

Post by BruceSteers »

Just curious to know if anyone else out there is modifying and have their unique flavour of gambas ?

Here's a list of patches/mods in my forks branch bruces-patched...
https://gitlab.com/bsteers4/gambas


* Makefile speedup: "make install" only installs mimetypes if not already installed.
Some systems pause for a while during install when installing mimetypes.
This skips all 3 mimetype installs if not needed.
(Does not skip on OpenSuse or Fedora as xdg-mime cannot determine filetypes as root on these systems)

* Show "Trunk version" on Welcome screen.
This displays the Trunk version (commit number) in the welcome screen.
Useful for those helping with gambas development branch.

* Enable Quote wrapping if Alt key is pressed.
This will wrap text in quotes (like braces) but only when presisng alt key.
(this simply unquotes Benoits original code he disabled but adds an "If Key.Alt" to the condition)

* Private Property auto-variable.
If you type Property MyText As String and press return in normal gambas it adds the MyText_Read() and MyText_Write() functions.
In my version you can also press the Alt key when pressing return and it will also add Private $sMyText As String and put $sMyText in the Read / Write functions.

* Added a "Keep Search box Open" checkbox to the search window in case you want it to not close on search.

* Added Bonus tweaks (developer options) page to preferences.
All this has at the moment is "Custom Controls", you can adds custom controls/components that will load with the IDE. this makes the controls render properly in the form designer instead of just showing a box with it's name.
To enable developer options you must repeatedly click the "Name" label on the "Identity" page. (a bit like repeatedly clicking "build version" on an android phone to enable developer mode)
This feature can be risky if your coding is not strong and could cause problems with your gambas IDE. use it at your own risk.

Here's a video of how i've got the Bonus Tweaks working like enabling developer mode on an Android phone..

Last edited by BruceSteers on Thursday 11th March 2021 3:03pm, edited 1 time in total.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Customizing gambas

Post by PJBlack »

Bruce,
you know i really like your ideas and programming and i would REALLY like to have:
BruceSteers wrote: Monday 8th March 2021 12:39pm* Private Property auto-variable.
* Added Bonus tweaks (developer options) page to preferences.
BUT

i will not use a (one person) fork of gambas !

Benoit releases often three or more new versions per day or fix errors within minutes ... even if you try i did not believe that you able to do the same.

Just my opinion, sorry :)
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Customizing gambas

Post by BruceSteers »

all i have to do is type

git pull upstream master
that pulls Bens latest commits to my local dir. (you can also do this anytime)
Then...
git push
that sends the downloaded changes to my online branch

All Benoits latest commits are then merged to my fork.

why not mod your own?
when you have your own fork Benoits updates are merged to it so it is always up to date plus has your modifications.
Last edited by BruceSteers on Monday 8th March 2021 6:49pm, edited 1 time in total.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Customizing gambas

Post by BruceSteers »

PJBlack wrote: Monday 8th March 2021 2:41pm Bruce,
you know i really like your ideas and programming and i would REALLY like to have:
BruceSteers wrote: Monday 8th March 2021 12:39pm* Private Property auto-variable.
* Added Bonus tweaks (developer options) page to preferences.
BUT

i will not use a (one person) fork of gambas !

Benoit releases often three or more new versions per day or fix errors within minutes ... even if you try i did not believe that you able to do the same.

Just my opinion, sorry :)

you have a bit to learn about git I think my friend.

You could clone my fork.
Then in a terminal in the clone dir type
git remote add upstream https://gitlab.com/gambas/gambas.git

then all you do is type git pull upstream master each time and it updates from gambas/gambas
git pull updates any of my mods.

Easy.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Customizing gambas

Post by BruceSteers »

You could clone your own fork not mine.

:)

Rip any mods you like from mine and add them to yours then still just use git pull upstream master to get Bens updates as they come :)


you negative nancy you ;) :lol:
If at first you don't succeed , try doing something differently.
BruceS
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Customizing gambas

Post by PJBlack »

BruceSteers wrote: Monday 8th March 2021 6:40pmyou negative nancy you ;) :lol:
HAHAHAHAHAHAHAHA ... love you too baby :D
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Customizing gambas

Post by PJBlack »

BruceSteers wrote: Monday 8th March 2021 6:34pmyou have a bit to learn about git I think my friend.
next month i'm getting 59 and i still learn every day (mostly how things should not be done :roll: but ...)


E D I T :

nancy tried ...

nancy succeeded ...

nancy is very happy !
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Customizing gambas

Post by BruceSteers »

PJBlack wrote: Tuesday 9th March 2021 12:23am
BruceSteers wrote: Monday 8th March 2021 6:34pmyou have a bit to learn about git I think my friend.
next month i'm getting 59 and i still learn every day (mostly how things should not be done :roll: but ...)


E D I T :

nancy tried ...

nancy succeeded ...

nancy is very happy !
haha well you're only 10 years ahead of me and there's plenty of tricks for this old dog to learn yet :)

I'm glad you are happy :)

I couldn't believe it when i first realised how awesome it is to be able to clone gambas and modify it to do things i want that Ben isn't really interested in.
I've made a couple of merge requests to re-enable quote wrapping like brace wrapping when pressing alt but he does not seem to want to. Then i realised he didn't need to , i could just make my version do it :)

PS. if you either cloned my bruces-patched branch or cloned your own and made a branch if you have set the "upstream master" my gambas upgrade script and upgrade app both offer a "git pull upstream" function.

PPS. if you have cloned my branch or made your own and set upstream it works like this...

git pull upstream master will pull any updates from the main gambas repository and not pull any changes from my/your fork.

git pull will pull from the default branch of your/my fork (mine is bruces-patched)

if you have made your own fork and set a new default branch you can keep your online gitlab default branch up to date by occasionally running the following commands..

git pull upstream master
git push


That pulls the gambas updates to your local drive then pushes them to your default branch on your fork.
so if you "git pull" my fork it will be as up to date with Bens gambas as when i last did the git pull/push on it.

Hope that all makes sense :)


A note on using the custom controls..
it does a weird thing in the following scenario... (the only bug i have found)
if you are working on the custom control you load with gambas then you do not close gambas but open another project using the same IDE window , then re-open your control it has a problem as i think it tries to reload it or something. It's a problem of this feature being something gambas is not supposed to be able to do.
It just means you need to close gambas and re-open it again so it can reload the control info properly.
[EDIT]

Correction, i just discovered the error mentioned above has nothing to do with my function. the error happens without it enabled , it even happens on gambas master.


additional Note: if you think you have found a bug in gambas and are going to put it on the bugtracker try turning this feature off and seeing if the bug persists (just to be sure).

All the best
If at first you don't succeed , try doing something differently.
BruceS
Post Reply