Hello
In VO i can turn off a Method or Function with the simple word Textblock.
I am missing it
Horst
Textblock
Re: Textblock
Hi Horst,
in X# you can use
I have seens several issues caused by textblocks during the migration to X#.
Wolfgang
in X# you can use
Code: Select all
/* method xyz()
return */
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Re: Textblock
Hello Wolfgang
I know that. But when i have a big Function and inside also comments with /*many lines*/ then your solution doesnt work.
Maybe they can put something inside like Textblock and EndTextblock
Horst
I know that. But when i have a big Function and inside also comments with /*many lines*/ then your solution doesnt work.
Maybe they can put something inside like Textblock and EndTextblock
Horst
Re: Textblock
Guys,
I was also thinking about this, maybe we can introduce another pair of block comment markers like (* ... *) that could nest with the existing markers /* ... */
I was also thinking about this, maybe we can introduce another pair of block comment markers like (* ... *) that could nest with the existing markers /* ... */
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Textblock
Chris,
But TextBlock .. End Textblock should work too.
If we do this, what do you expect to see in the editor:
- should the new comment or textblock contents have the comment color?
- should it have the normal color
And what should happen with tooltips etc.?
Robert
That should not be too difficult to implement.
But TextBlock .. End Textblock should work too.
If we do this, what do you expect to see in the editor:
- should the new comment or textblock contents have the comment color?
- should it have the normal color
And what should happen with tooltips etc.?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Textblock
Robert,
I think it should be like normal comments, so also no tooltips etc.
But, Horst, another idea to disable a method, is to surround it with #ifdef...#endif directives, like
#ifdef Exclude (or donotcompile, or anything like that)
METHOD Test()
....
#endif
This way, it will be excluded from compilation.
I think it should be like normal comments, so also no tooltips etc.
But, Horst, another idea to disable a method, is to surround it with #ifdef...#endif directives, like
#ifdef Exclude (or donotcompile, or anything like that)
METHOD Test()
....
#endif
This way, it will be excluded from compilation.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Re: Textblock
In older times before VO 2.8 I used textblocks in the program quite a lot to store SQL code/macro code in textblocks. I had overwritten the previously functions QOut and made a function GetTextblock() to return the textblock as a string to the program. It was a possibility to store texts with syntax other than VO nearby the text. When the QOut-Functions vanished with a newer VO version I started to store these textblocks in script filesoutside the program.
Now the textblock command as a type of "named" textblocks has returned in our macro scripts to store complex SQL code in macros scripts. The macros can retrieve these textblocks as GetTextblock ("xxx"), change some variables or add some code and then execute them.
So I haven't any direct need in X#, but it can be useful. It brought me useful ideas.
Arne
Now the textblock command as a type of "named" textblocks has returned in our macro scripts to store complex SQL code in macros scripts. The macros can retrieve these textblocks as GetTextblock ("xxx"), change some variables or add some code and then execute them.
So I haven't any direct need in X#, but it can be useful. It brought me useful ideas.
Arne
Re: Textblock
Hi Arne,
It's not exactly what you are doing, but in case you are not aware of it, X# has a feature to create such texts with the TEXT TO command which might be helpful:
It's not exactly what you are doing, but in case you are not aware of it, X# has a feature to create such texts with the TEXT TO command which might be helpful:
Code: Select all
LOCAL cText AS STRING
TEXT TO cText
some test text here
text in another line
ENDTEXT
? cText
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Re: Textblock
Hi Chris,
that's a nice feature. May be it can serve.
Thanks
Arne
that's a nice feature. May be it can serve.
Thanks
Arne
-
- Posts: 141
- Joined: Mon Jul 25, 2016 3:58 pm
- Location: Italy
Re: Textblock
In Visual Studio it is easy to comment out a function or method.
First collapse the method -> Select the whole line -> Ctrl + K + C
In this case the whole block is commented out.
Ctrl + K + U uncomments the method
Hansjörg
First collapse the method -> Select the whole line -> Ctrl + K + C
In this case the whole block is commented out.
Ctrl + K + U uncomments the method
Hansjörg