#region extras
+/- symbol to shorten code
#endregion
ID:260329
![]() Apr 2 2007, 9:57 am
|
|
Could we have 2 more preproccessor directives call regions like in C#?
|
![]() Apr 2 2007, 10:03 am
|
|
Mind giving perhaps a brief explanation of what this does? Having a personal hate set aside for C#, thus never wanting to learn it, I have no clue what this does, and you weren't exactly way too descriptive.
|
Jtgibson wrote:
Code folding is a compiler feature, not a language feature. More correctly, it's an editor feature, not a compiler or a language feature. =) It would be nice to have code folding, but it's definitely not in the top 10 most wanted features. And I wouldn't do it with silly preprocessor blocks, I'd just make it use levels of indentation. |
Yep, mine too. It was actually pretty easy to do. Mine uses the #region method and has an option to make it based on tabs. Just need to remember to make the IDE remove the #region and #endregion stuff before it compiles using dm.exe.
|
Crispy wrote:
Jtgibson wrote: Yeah, you're right. But I was thinking "IDE" in my head and I tend to refer to Dream Maker as the "compiler". So I was right too, and no one can say otherwise! ;-) |
Crispy wrote:
Jtgibson wrote: No, lets make the parenthesis (oh god I have no idea how to spell that) highlighting first! |
Collapsible code is certainly nice. Especially when you have mind numbingly long switch() statements. I could think of a number of places my Evaluate library could use it.
I'd probably have my IDE use // or /// in stead of # to make it compatable with the compiler. |
So... this is requested just because some people are too lazy to scroll down some relatively big block o' code or press PAGE_DOWN twice, or something? Man, I thought I was very lazy...
Also, personally I think you're better off having your code visible at all times. In addition, it may not happen, but I wouldn't like another subject to have help spam topics on: code randomly not working properly [because some related broken code is hidden and the topic poster is too noob-]. |
Kaioken wrote:
So... this is requested just because some people are too lazy to scroll down some relatively big block o' code or press PAGE_DOWN twice, or something? Laziness is a virtue when programming. ;-) Collapsible code makes things easier to read since it makes it more likely that you can have two related pieces of code on one screen at once. I wouldn't like another subject to have help spam topics on: code randomly not working properly [because some related broken code is hidden and the topic poster is too noob-]. So just make it automatically expand all code whenever you start Dream Maker (so restarting DM fixes the "problem"). And maybe have the feature off by default so people can't click it accidentally and think they've deleted stuff. |
I was going to make a post to request this in features, but since I searched the forums I decided I'll just bump the notion that #regions would be really nice.
|