473,411 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

VS Editor Irritation

Hi All,

Not sure if this is limited to VB.NET or if it affects the C# editor too,
but here goes.

In a new solution, inside a blank code file create an empty class inside a
Namespace. Then, at the bottom of the code after End Namespace, add code
for an Enum, as shown below:

' ================
Namespace Test1

Public Class Class1

End Class

End Namespace

Public Enum ABC
foo
bar
snay
End Enum
' ================

Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted but
the cursor doesn't move to a new line! I've searched through the options
dialog but strangely can't find anything that says "Don't go to a new line
after inserting a carriage return when there's a Namespace, Class,
Enum....etc", so all I can assume is that it's a bug in the editor? Please
someone correct me if I'm wrong!

Cheers,
Alex Clark
Nov 20 '05 #1
15 1106
While not exactly related to the question, why do you have your enum sitting
outsid of the namespace? The only reason I can think of is you are putting a
namespace within the default namespace for the project. If so, you can still
break the enum out into a different file, which would help code maintenance.

Your issue may well be a bug, but it is, overall, unlikely many people will
encounter it, as it is very specific.The collapse region is a bit buggy
overall, if you ask me, but it is rather easy to get around with a single
mouse click to another section of the page. If you hit one more carriage
return, you will likely see the new line. I am not sure why it takes two to
actually show up, but it is the nature of the IDE ... at least for now.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Alex Clark" <al**@theclarkhome.spamtin.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi All,

Not sure if this is limited to VB.NET or if it affects the C# editor too,
but here goes.

In a new solution, inside a blank code file create an empty class inside a
Namespace. Then, at the bottom of the code after End Namespace, add code
for an Enum, as shown below:

' ================
Namespace Test1

Public Class Class1

End Class

End Namespace

Public Enum ABC
foo
bar
snay
End Enum
' ================

Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted but the cursor doesn't move to a new line! I've searched through the options
dialog but strangely can't find anything that says "Don't go to a new line
after inserting a carriage return when there's a Namespace, Class,
Enum....etc", so all I can assume is that it's a bug in the editor? Please someone correct me if I'm wrong!

Cheers,
Alex Clark

Nov 20 '05 #2
Hi Gregory,
I came across it a while ago but hadn't had time to report it. I think I'd
put the Enum down below the Namespace because for reasons which I cannot
remember, it didn't belong in that Namespace, but as it was only a small one
I didn't see the need for a whole new code file. I generally use the Class
Explorer to find things like that in my solutions anyway, so it I don't have
too many concerns putting code in places like that.

Although I agree it's a quirky one, I was pretty much posting to ask if this
really was a by-design feature or if it's a known/accepted bug. Let's face
it, we've gotta wait till halfway through 2004 (at the earliest) for a new
version anyway, so MS might as well get all the niggles sorted out that we
can find.

Cheers,
Alex Clark
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:el**************@TK2MSFTNGP10.phx.gbl...
While not exactly related to the question, why do you have your enum sitting outsid of the namespace? The only reason I can think of is you are putting a namespace within the default namespace for the project. If so, you can still break the enum out into a different file, which would help code maintenance.
Your issue may well be a bug, but it is, overall, unlikely many people will encounter it, as it is very specific.The collapse region is a bit buggy
overall, if you ask me, but it is rather easy to get around with a single
mouse click to another section of the page. If you hit one more carriage
return, you will likely see the new line. I am not sure why it takes two to actually show up, but it is the nature of the IDE ... at least for now.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Alex Clark" <al**@theclarkhome.spamtin.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi All,

Not sure if this is limited to VB.NET or if it affects the C# editor too, but here goes.

In a new solution, inside a blank code file create an empty class inside a Namespace. Then, at the bottom of the code after End Namespace, add code for an Enum, as shown below:

' ================
Namespace Test1

Public Class Class1

End Class

End Namespace

Public Enum ABC
foo
bar
snay
End Enum
' ================

Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted

but
the cursor doesn't move to a new line! I've searched through the options dialog but strangely can't find anything that says "Don't go to a new line after inserting a carriage return when there's a Namespace, Class,
Enum....etc", so all I can assume is that it's a bug in the editor?

Please
someone correct me if I'm wrong!

Cheers,
Alex Clark


Nov 20 '05 #3
* "Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM> scripsit:
Your issue may well be a bug, but it is, overall, unlikely many people will
encounter it, as it is very specific.


I am not able to repro the problem on a VS.NET 200*2* machine.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
On Mon, 15 Dec 2003 14:11:39 -0000, Alex Clark wrote:

Although I agree it's a quirky one, I was pretty much posting to ask if this


I have a bug that's been bothering me: if I pound my PC with a sledge
hammer, the computer will crash! Sometimes it will not reboot!

:)

I am always amused to read about bugs like this. I agree that MS might as
well fix it, but I'd rather they fix other bugs that have been around since
the early days of .Net that are still not fixed. For example, a string
that has a Chr(0) embedded in it will not correctly display in the IDE's
watch window. It will cut off at the null byte, even though the length is
correct.

Cheers

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #5
Hi Herfried,
It's VS2003 I have the problem on (sorry I should have mentioned it in my
post)

Cheers,
Alex

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
* "Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM>

scripsit:
Your issue may well be a bug, but it is, overall, unlikely many people will encounter it, as it is very specific.


I am not able to repro the problem on a VS.NET 200*2* machine.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #6

Chris,
I have a bug that's been bothering me: if I pound my PC with a sledge
hammer, the computer will crash! Sometimes it will not reboot!


Your analogy is incorrect. Pounding a PC with a sledge hammer is not an
accepted way of using it (though many will argue it is a very tempting way
of using it on occasion). A more precise analogy would have been "I have a
problem where 1 time out of every 10 I click shutdown and Windows doesn't
shut down". That's why this is a bug, not a feature which occurs during
improper operation.

I also know that if someone were to inform me of a bug like this in any of
my software, I would fix it, regardless of whether I thought it was petty or
wouldn't affect many people because it is A BUG.

Personally, I would much rather MS fix *ALL* the problems with VS, not just
the ones they deem to be more deserving of a fix.

Cheers,
Alex Clark


Nov 20 '05 #7
Hi Herfried,
It's VS2003 I have the problem on (sorry I should have mentioned it in my
post)

Cheers,
Alex

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
* "Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM>

scripsit:
Your issue may well be a bug, but it is, overall, unlikely many people will encounter it, as it is very specific.


I am not able to repro the problem on a VS.NET 200*2* machine.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #8

Chris,
I have a bug that's been bothering me: if I pound my PC with a sledge
hammer, the computer will crash! Sometimes it will not reboot!


Your analogy is incorrect. Pounding a PC with a sledge hammer is not an
accepted way of using it (though many will argue it is a very tempting way
of using it on occasion). A more precise analogy would have been "I have a
problem where 1 time out of every 10 I click shutdown and Windows doesn't
shut down". That's why this is a bug, not a feature which occurs during
improper operation.

I also know that if someone were to inform me of a bug like this in any of
my software, I would fix it, regardless of whether I thought it was petty or
wouldn't affect many people because it is A BUG.

Personally, I would much rather MS fix *ALL* the problems with VS, not just
the ones they deem to be more deserving of a fix.

Cheers,
Alex Clark


Nov 20 '05 #9
On Mon, 15 Dec 2003 16:18:26 -0000, Alex Clark wrote:
That's why this is a bug, not a feature which occurs during
improper operation.
My apologies, I didn't mean to suggest that you discovered the bug through
misuse, but rather the seemingly uncommonness of the bug.
I also know that if someone were to inform me of a bug like this in any of
my software, I would fix it, regardless of whether I thought it was petty or
wouldn't affect many people because it is A BUG.

Personally, I would much rather MS fix *ALL* the problems with VS, not just
the ones they deem to be more deserving of a fix.


I agree completely. But if MS hasn't fixed bugs which are more serious,
what are the chances they will fix this one anytime soon?
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #10
On Mon, 15 Dec 2003 16:18:26 -0000, Alex Clark wrote:
That's why this is a bug, not a feature which occurs during
improper operation.
My apologies, I didn't mean to suggest that you discovered the bug through
misuse, but rather the seemingly uncommonness of the bug.
I also know that if someone were to inform me of a bug like this in any of
my software, I would fix it, regardless of whether I thought it was petty or
wouldn't affect many people because it is A BUG.

Personally, I would much rather MS fix *ALL* the problems with VS, not just
the ones they deem to be more deserving of a fix.


I agree completely. But if MS hasn't fixed bugs which are more serious,
what are the chances they will fix this one anytime soon?
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #11
* "Alex Clark" <al**@theclarkhome.spamtin.net> scripsit:
Hi Herfried,
It's VS2003 I have the problem on (sorry I should have mentioned it in my
post)


The problem doesn't even occur on my /German/ VS.NET 2003 machine.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #12
I agree completely. But if MS hasn't fixed bugs which are more serious,
what are the chances they will fix this one anytime soon?


<rant>

I know what you mean. Can anyone remember when us developers used to get
those... oh, what are they called again..... Service Packs! That's it, I
remember now! A whole handful of bug's would accumulate in Visual Studio,
or a particular language's runtime library, and MS would release a Service
Pack!

I'd say everyone on this newsgroup has probably accumulated their own small
handful of favourite VS bugs by now, but something tells me we're all still
gonna have to wait until Whidbey before we get even one of them fixed. On a
separate group, I'm discussing a hugely annoying bug in Windows Forms that
I've found lately, which causes nasty memory leaks when you do something
totally crazy---open up a context menu. Unfortunately it looks like that's
going to be plaguing me (and as a result the customers using my software)
for the next 6 or 7 months, minimum.

If we all kick up as much of a stink about these problems as the security
folks do about their buffer overrun flaws, ya think we all might get a few
hotfixes?? ;-) (lol)

</rant>

Cheers,
Alex Clark
Nov 20 '05 #13
Hi Alex,

I can not reproduce the problem on my vs.net 2003 , windows xp+sp1 when I
follow the steps as you said.
Can you provide more application for me to reproduce the problem.

If you have any concern on this issue, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #14
On Mon, 15 Dec 2003 21:20:08 -0000, Alex Clark wrote:
gonna have to wait until Whidbey before we get even one of them fixed. On a
separate group, I'm discussing a hugely annoying bug in Windows Forms that
I've found lately, which causes nasty memory leaks when you do something
totally crazy---open up a context menu. Unfortunately it looks like that's
going to be plaguing me (and as a result the customers using my software)
for the next 6 or 7 months, minimum.


Have you tested to see if the bug still exists in Whidbey? If so, you
could post it in the Whidbey groups and perhaps they'll fix it before
Whidbey launches. They seem pretty good about opening bug reports.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #15

Sadly I don't have a Whidbey Beta :-(

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:c9****************************@40tude.net...
On Mon, 15 Dec 2003 21:20:08 -0000, Alex Clark wrote:
gonna have to wait until Whidbey before we get even one of them fixed. On a separate group, I'm discussing a hugely annoying bug in Windows Forms that I've found lately, which causes nasty memory leaks when you do something
totally crazy---open up a context menu. Unfortunately it looks like that's going to be plaguing me (and as a result the customers using my software) for the next 6 or 7 months, minimum.


Have you tested to see if the bug still exists in Whidbey? If so, you
could post it in the Whidbey groups and perhaps they'll fix it before
Whidbey launches. They seem pretty good about opening bug reports.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mike Kamermans | last post by:
I hope someone can help me, because what I'm going through at the moment trying to edit XML documents is enough to make me want to never edit XML again. I'm looking for an XML editor that has a...
15
by: JC Home | last post by:
Hi all, I am just learning JavaScript and would love to find a good editor that helps with syntax and debugging. Any suggestions? Thanks!! -- Jeff Ciaccio Dallas, GA
71
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's...
0
by: 356523600 | last post by:
HTML To PHP Converter 4.2.1.8 Free download Get more for less ... HTML To PHP Converter 4.2.1.8 Get more for less! With a new version of HTML To PHP Converter 4, we've dropped the price and given...
1
by: Steve Teeples | last post by:
I have class that also uses a custom editor that, when compiled directly into my project, works just fine in a propertygrid. However, it was necessary to place that class into a DLL, hense the...
0
by: foldface | last post by:
Hi As the subject says. If you run VS with an asp.net solution then your program just runs. If you do a ctrl-f5 to restart the solution then it first breaks in the javascript before continuing....
10
by: Tom Dacon | last post by:
One thing that drives me nuts about coding in VB.Net is the behavior of the IDE when you split the code window in two by dragging down the separator at the top of the vertical scroll bar. If you...
4
by: David Lozzi | last post by:
Howdy, I'm using a WYSIWYG editor called TinyMCE. When I edit some text and then save it back to my SQL server using a SQLCommand, all HTML characters are changed to HTML code, i.e. &gt;strong&lt;...
3
by: danesh1354 | last post by:
Hi All, First I need to construct a text editor by python programming and add this code to a biger code that has been written before, and i would like that by my code for this editor have a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.