[Gambas-user] CONTRIB: About The Editor addin used by Ron

ron ronstk at ...239...
Wed Mar 31 02:40:05 CEST 2004


Hallo everybody,

First a little story.

I was just switching over from wind..s to *nux and searching  
for something like VB. What I found was a small list.
Gambas was one of them but hbasic did look the solution.
However I had no good experience with it. Most  were crashes without a hint 
what was wrong. I don't say it is bad. My experience was bad. Second it is 
overwhelming with features, also not bad always, but if you start in a new 
environment you are confused by it.

So I decide to go for gambas. 
In the SuSE Distribution was 0.4x and I try this one.
Did download an original v0.63 and 0.65 , compile etc.
Compile was not a big problem, a few errors but quickly resolved.

For the view how it looks I was disappointed if I compare it to VB.
It is true if you want all the bells and wissels of VB but after playing
with the examples by changing them you will find it is not so bad after all.

It is the lack of experience that is playing with you. 
Also the (well) known syntax of VB can be a alien, as I had with the
ColumnView widget in the past  weekend.

My first add-in was in the version 0.65 as exercise.
One of the things I missed was the combo boxes VB has on top in the
editor. If I would have them in gambas too then I have to change it.
That is the power of free software this way we have.

Searching learns me that I had to change the FEditor.class and .form :)
I started  to change the form for the combo boxes. Then I started to change
the .class file. Programming and testing and had it finally ready.

Now the problem raises. What if there is a new version. 
My code is lost that way.  Remember I was just new and CVS??
I resolved by putting all my code in a well marked block at the end.
Sometimes for a few lines of code. Add in the original part also well
marked calls to my code at the end and accepted it was not running
in optimal condition as it should do by changing the original code 
completely for my wishes in my way.
At the end with 5 little interception points in the original code it was easy 
to reinsert it every time till v0.80. 

With the current v0.91 I made a missing listview, as in the UltraEdit 
text editor can be found, for the found places in the Find form and 
published it before here in the maillist with a snapshot.
Then I got the idea to add my missing comboboxes again in the code.
I had stopped to do it but now with 0.91 I could still place it again in the 
code. Screenshot is released. 

Now to the order of the day:
------------------------------------
I have seen already a message if it can be in gambas.
I like also to have it but till Benoit ask me for the code or allow me to do 
it I will not release any code public that is intercepting the way the IDE 
works.
This for respect to him and his work and he does not get the complains 
about incorrect  working of the IDE by stuff I publish on my own.
After all we want a good reliable and stable gambas.

I was happy to have it back and only show in the screenshot I had it.
I can only publish what I have and how it works by description and a snapshot. 
If there is enough responce requesting it and Benoit likes it to see if it can 
be implemented I will send him for investigation and he decide to implement 
it or not. 
This is now done for the Find add-in and you must wait what he does with it.

And yes there are  things he don't even consider to do. 
It is his creation and he is the maintainer of it, he has that right in my 
view, else it will be a fork and nobody is, at the end, helped with that.

The add-in I make are for personal use because I like what they do.
If they can be handy for others I can publish them here and see
for reactions.

REMEMBER THIS ADDIN IS NOT IN ORGINAL GAMBAS.
*** You can only ask nice if it can be implemented.

Happy fishing with gambas

Ron 

************************************************************
* So here is a description about the boxes in question. 
************************************************************
How the Editor Boxes work.

On the left side the Box has three kind of type as entries.
The right Box are the things that are associated with the
choice in the left box.

What can I choose in the left box?

1. (Global)
------------
If this is selected on the right hand side you get a list.
The first is (Declarations)
This is the part on top of the class or module where the
declarations are done for the class
The second partial list are the Specials if they exist.
The rest are all the Functions, Sub routines and widget 
events and methods in case insensitive way sorted.


2. (Special)
------------
When this one is selected you have on the right hand side 
a list of only these code start points and also in case 
insensitive way sorted.
i.e. _new, _free, _exit and _init

3. names
------------
This is the basic name of the widget as used in the code
and is the left part of the underscore in the name
On the right side the associated events and methods are
there in sorted order. This is the right part after the
underscore.

The other are the names of the functions and sub routines.
They show on the right side <entry>.
These are mixed and sorted on name.
At the time I made this code there was no easy place to find the
difference of these kind names. 
May be in the future I can split them as two groups.
The simple rule is to give names to widget that start with
the control name they get on create time and change the number
to what you need. 
A abbreviation of the widget name if it is to will give you in the code 
also a good reference point.
i.e. tbxSearch for TextBoxSearch or lbxXYZ for ListBoxXYZ.


Usage:
------------
Usage is simple and if you have a wheel mouse you can quick 
scan through your code.
Select in the left box 'Form' or a name of a widget.
In the right side you get the list with the sub functions.
With the mouse above the box and using the wheel you jumps
real time in the code. In my case I do not have to click.

If after selecting in the left box you are satisfied with
what you see on the right then with a double click it goes
direct to that start point.
Special for Functions and Sub names when you see <entry>
this is the quick way to do.
Opening the right box and selecting something does the same.

The main advance compared to the build in 'Goto...' function
is that i.e. in the gambas FEditor.class the list is so big 
that it does not fit in one column anymore.

**********************************************************
REMEMBER THIS ADDIN IS NOT IN ORGINAL GAMBAS.
*** You can only ask nice if it can be implemented.






More information about the User mailing list