Move menu items causing user to go bananas

  • Thread starter Thread starter Alistair George
  • Start date Start date
A

Alistair George

Every time I want to move a menu item (from one menu dropdown to to same
menu adjacent dropdown) by Cut in Microsoft Visual Studio 2005 it
immediately crashes on cut with error dialog 'an error occurred while
processing this command Object reference not set to an instance of an
object'
I remove the click event and the error still occurs. Have checked other
item references, and they are non manual entries.
Any advice? Thanks, Alistair.
 
Alistair said:
Every time I want to move a menu item (from one menu dropdown to to same
menu adjacent dropdown) by Cut in Microsoft Visual Studio 2005 it
immediately crashes on cut with error dialog 'an error occurred while
processing this command Object reference not set to an instance of an
object'
I remove the click event and the error still occurs. Have checked other
item references, and they are non manual entries.
Any advice? Thanks, Alistair.
Since nobody has replied to this post, then it must be an error that is
unavoidable. It is going to be interesting trying to fix it, as Visual
C# crashes every time I want to sort it. Why could not MS have designed
the menus such that you can drag any item to any position in the same
menu instead of this ridiculous cut and paste which inherently causes
problems.
 
Alistair said:
Since nobody has replied to this post, then it must be an error that is
unavoidable.

Or maybe it's just not a problem that most people run into. You should
be careful to draw conclusions from the _absence_ of information. That
hardly ever works.

For what it's worth, I do not have any trouble cutting or copying a menu
item from one menu and pasting it into another. This is true whether I
use a MenuStrip or the older MainMenu component. In fact, using the
MainMenu component I can actually drag-and-drop the menu item, rather
than being forced to cut/paste.

Furthermore, from your description it doesn't sound to me at all as
though Visual Studio is _crashing_. You got an error message, and IMHO
it is more likely related to some of your own code that is being
executed for some reason as a result of moving the menu item.

Whatever's going on here, it's not because Visual Studio has trouble
copying and pasting.

Now, if you want to provide a concise-but-complete example of code that
reliably reproduces the problem, there may be someone who is willing to
take the time to compile the code and try to help you. But so far you
really haven't given anyone anything concrete to go on, making it very
difficult to provide any sort of reasonable answer. The lack of an
answer has a lot more to do with the vagueness of the question than it
does with any inherent problem with Visual Studio.

Pete
 
Thank you Peter.
I am new to Visual C# but have over 20 years programming experience so
fully understand your points. I cannot place an example of the code
simply because its a huge project which I am only helping in do some
parts thereof, but I would have presumed that the removal of the onclick
event would have given the IDE no problems thereafter in moving the
item. I'll ask someone else on the project and see if they have the same
problem.
Kind regards,
Alistair.
 
Alistair said:
Thank you Peter.
I am new to Visual C# but have over 20 years programming experience so
fully understand your points. I cannot place an example of the code
simply because its a huge project

If it were truly a basic problem in the IDE itself, you would be able to
reproduce the problem from scratch.

An inability to reproduce the problem except in the context of a "huge
project" is further reinforcement that this is not a VS issue per se.
At the very least, there is some unusual interaction between your
project and the IDE, and I think it's at least as likely that it's
solely an issue with the project, and that the IDE is behaving as best
it can under the circumstances.

What could be causing it, I don't know, but IMHO your assumption that
the error is unavoidable and in particular that it's not the fault of
the code in your project seems unreasonable to me.

Pete
 
Peter said:
If it were truly a basic problem in the IDE itself, you would be able to
reproduce the problem from scratch.

An inability to reproduce the problem except in the context of a "huge
project" is further reinforcement that this is not a VS issue per se. At
the very least, there is some unusual interaction between your project
and the IDE, and I think it's at least as likely that it's solely an
issue with the project, and that the IDE is behaving as best it can
under the circumstances.

What could be causing it, I don't know, but IMHO your assumption that
the error is unavoidable and in particular that it's not the fault of
the code in your project seems unreasonable to me.

Pete
OK to put it another way, would there be a means to stop V C# from
closing because of this error. Basically, it doesnt give me any chance
to fix the code or remove any offending lines - it just shuts down.
 
Alistair said:
OK to put it another way, would there be a means to stop V C# from
closing because of this error. Basically, it doesnt give me any chance
to fix the code or remove any offending lines - it just shuts down.

I don't know. For what it's worth, it wasn't clear to me from your
original post that VS was exiting after the error. I would agree that
it's always a bug for an application to simply exit unexpectedly, even
if it does display some error first.

So, you probably do have an error in your code somewhere, but I think
you're right that VS is behaving badly too.

Pete
 
Back
Top