Here the DataSection block, the Structure block and the Enumeration one are not folded with folding feature enabled.
But sometimes when editing they appear folded. :roll:
No, Psychophanta is right: Folding with Macros is definetyl buggy!
I added a folding option at the IDE preferences; now I can fold Macros as esayly as Procedures. But sometimes, the folding-line does not go from Macro till the line containing 'EndMacro', but it goes till the next folding-keyword or till the end of the document.
To geet rid of this bug, I always save my work and re-start the IDE.
I already understand, trond. But "my" bug also occurs, when not nesting folding keywords.
In other words: Although I don't fold inside macros, this bug appears.
freak wrote:No folding inside macros. It is by design, not a bug.
Fr34k, can explain a little "why" for that answer?
I find no reason to avoid folding inside macros and not inside procedures for example.
Mmm, you have most times a quick answer. Remember when discussing about paragraph alignment in editor, you answered there was no solution for it, but finally you solved it...
Psychophanta:
Macros can contain very weird constructs that would screw up the folding of the entire document.
For example you could have a macro that only contains fold start words, but no end words. This
fold point would stay open for the entire document, because there is no end word.
Thats why it was disabled.
AND51:
You have to tell me how to reproduce it, or i can do nothing.
Your nice copyrighted image is of no help.
In this special case the procedure SetLanguage() existed before creating/editing the macro.
I just edited/inserted the macro Language(); when finishing the macro by typing EndMacro in line 3 the folding-line in line 4 did not disappear.
If I now collapse (fold) the macro by clicking on the [-] in line 1, the next procedure also disapperas.
Furthermore, this bug sometimes occurs, when writing code from top to bottom. Means, first I create the macro, then creating the procedure, it looks like in my picture.
My computer is brand new, I also installed PB and PB IDE new incl. Update 4.01. So I conclude that it's not my computer's fault. Moreover, this bug also occured in eralier PB version 4.00 (since macros exist).
freak wrote:Psychophanta:
Macros can contain very weird constructs that would screw up the folding of the entire document.
For example you could have a macro that only contains fold start words, but no end words. This
fold point would stay open for the entire document, because there is no end word.
Thats why it was disabled.
Again, if that is the excuse, then take a look at this and see yourself the incoherence of that explanation:
There is a problem with the Macro folding. It is not serious, just double take stuff. It may be cosmetic or a redraw thing.
Open a new document.
Type Macro hit enter
Type anything hit enter
Type EndMacro hit enter
Arrow up to the top, so the cursor is before the Macro
Hit enter a few times. You have an orphaned [-]
Hit backspace. You get the vertical folding line extend beyond the EndMacro.
The above happens almost 100% of the time here. I would say 100% but I may be lying. Very Often is accurate.
There is another problem, often but not always. In a document with code, scroll back towards the top.
Type Macro Name(par,whatever) hit enter.
Vertical Line extends down to EndMacro of macro below, or just extends (this is not the bug)
Type gobblydegook or something, hit enter.
Type EndMacro, hit enter. This EndMacro is not recognised, or is not shown to be recognised (no little horizontal line and the vertical still plunges down)
The above happens quite often. Not always. And clicking the [-] does not fold the macro, so this may not be cosmetic.
Not sure because ..
Have another document loaded. Hit the tab for the second doc so the original is hidden. Hit the tab for the original doc. Viola. All looks good. Click [-] and [+] to fold/unfold at will.
Trond wrote:Edit: AND51: Have you found the secret F12 key? You don't have to restart the entire IDE.
Hey, thanks a lot! I should "learn" the default hotkeys by hard... I just remember those, I use regularyly, but F12, for example, I don't use regularyly.