[Gambas-user] comment blocks on gambas3?

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri Jun 6 13:13:38 CEST 2008


Benoit Minisini schrieb:
> On vendredi 06 juin 2008, Rolf-Werner Eilert wrote:
>> Jason Hackney schrieb:
>>> I'd have to agree with you there. When I first grabbed Gambas, I tried
>>> to insert a long, multi-line comment using /*, */. After I figured out
>>> that wasn't going to work, I looked around and saw the " ' '" method
>>> and said to myself, "aw crap, just like VB!".
>>>
>>> So, I empathize with ya, but I've gotten to the point where I don't
>>> care either way now.
>> Don't know if anyone is still following this thread, but the other day I
>> thought that it might be nearly impossible to implement this in the
>> editor at least. Let me add my ideas here :-)
>>
>> I had some experiments with the editor for one of my own projects some
>> months ago. Trying to make it suitable for my own type of Printer Forms,
>> I found that it does not properly support block mode. At least I didn't
>> find a sensible way of having a block of lines optically changed, e. g.
>> by just saying "from line x to line y" or following an expression in {}
>> over more than one line.
>>
>> For instance, it did make a number of lines gray or whatever, but when
>> you went up with the cursor line by line through the block, the
>> information was lost and they changed back to the color codes within the
>> specific line (each line was parsed for itself again). The same thing
>> happened when you edited one of the lines in the block. It didn't help
>> either to try stopping this intentionally, or at least I didn't find a
>> way to do so ;-)
>>
>> Sure, at this time, for a usual BASIC dialect, only line mode is
>> important. But wouldn't block mode be an important feature in case of
>> block comments?
>>
>> Rolf
>>
> 
> The highlighter can highlight text blocks spanning multiple lines. Just open 
> an html file in the editor and create some html comments if you don't trust 
> me!
> 
> This is done by keeping for each line the state of highlighter for the 
> beginning of the next line. You define the state at beginning of the next 
> line by setting the Highlight.State property in the Highlight event handler.
> 
> Regards,
> 

You're damn right, man! :-) Just tried the HighlightEditor example, it 
just does what it's supposed to do.

Ok, so it was my problem as I changed the HighlightEditor example to fit 
my specific file format. Maybe I did something wrong.

Thanks for this hint, Benoit, have a nice weekend!

Regards

Rolf




More information about the User mailing list