[Gambas-user] How can I print my Gambas program code?
Bruce Bruen
bbruen at ...2308...
Wed Mar 30 12:41:11 CEST 2011
On Wednesday, March 30, 2011 08:00:09 PM Rolf-Werner Eilert wrote:
> Thanks for that hint, it certainly performed well with a Gambas2 code
> snippet. Actually, the only thing it did not understand was [] instead
> of ().
>
> In order to make it match Gambas syntax, you would have to rewrite a
> piece of code (filter) for adaptation and compile it into the project,
> did I get that right?
>
> My original idea, however, was to include some kind of library (made in
> Gambas) into the Gambas IDE with direct access to the other Gambas parts
> (editor, maybe even form editor), specialized to Gambas and offering
> some easy ways of printing this and that... directly out of the project,
> such as "currently selected text".
>
> The menu point I'd put it in would either be "File" or "Tools".
>
> Regards
>
> Rolf
But why re-invent the wheel? There are many utilities out there already for
syntax highlighting and printing. It is even fairly simple to write the
syntax config files for Kate ( I know I have :-) ) to handle Gambas source files.
What I would really like is an "add-in" handler for the Gambas IDE that would
allow us to access our own gambas based, or even other language based add-ins
from within the IDE.
For example, I have two prototype business object class generators, written in
Gambas that I use extensively to generate and regenerate business class source
files based on a class prototype file and a template file. These, I have to run
externally to the active gambas session, and every time I regen a class I have
to close and re-open the active project to get the new files loaded. It would
be really nice to be able to access the generator from within the IDE and then
have it automatically reload the project .... but I digress.
Regarding the printing issue, it would be fairly simple to write a little
utility that would allow the use to select one, some or all of the source files
in the current project and shell the printing out to an exiting tool that has
all the mentioned capabilities and probably many others (page headers/footers,
dating, etc etc). In fact we could choose the syntax highlighter each of us
preferred, rather than a single embedded option.
Remember that one of the principal precepts in the whole Unix system (n.b.
intentional use of the word Unix) is that there are small contained utilities
that do a single job well!
The gambas IDE has a single job, to provide a means to edit, run and debug
Gambas source code. IMO, adding a means to take advantage of the miriad of
existing and yet to be developed additional things that the IDE could do, by
providing an "add-in" mechanism, could be the best wish list item for the next
Gambas 3 release. That is after the current one, within its current scope, is
released.
regards
Bruce
--
best regards
Bruce Bruen
More information about the User
mailing list