[Gambas-user] How can I print my Gambas program code?

Rolf-Werner Eilert eilert-sprachen at ...221...
Wed Mar 30 13:10:02 CEST 2011


Am 30.03.2011 12:41, schrieb Bruce Bruen:
> 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
>

Probably you both are right, and I can save my time to spend in a more 
sensible project :-)

The other day I had to print a little project of mine to re-code it in 
vb.net. As it is on a separate computer without a second monitor, I 
preferred it being printed as it is much easier to type in when you have 
the original text constantly before your eyes.

This thread reminded me it was somewhat bad to read the original code 
because it wasn't higlighted or sorted in some way, line wraps etc.

Such thing can be done by external tools, you're right. But then I 
thought it might be nice to just print what is selected in the IDE 
editor, or even more special, you click on an element of some form and 
it prints just what has to do with that element... or whatever.

But if nobody really needs that, it's clearly featurism...

Regards

Rolf





More information about the User mailing list