By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,887 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,887 IT Pros & Developers. It's quick & easy.

Vanishing Declarations

P: n/a
Ok, this has got to be an IDE bug, but I can't seem to track down any
discussion on it. Perhaps I don't know the right words to search for.

This has happened occasionally for as long as I have been using VB.net, but
at the moment, I can't fix it any more:

For no apparent reason, all of a sudden, a windows form, which has been
working fine all along, will suddenly generate an error "XYZ is not a member
of myForm"

Now I look at the code, and there, in the declarations section of the form
is the line of code:

Private WithEvents XYZ as SomeControl

Looks like it is properly declared to me!!! The fix had always been to
delete this line of code and re-enter it. Poof - all errors go away,
everything is fine.

TODAY I CAN NO LONGER FIX IT.

The reason? As soon as I retype the line for XYZ, a DIFFERENT item pops up
as not being a member of a form. 'ABC is not a member of SomeForm"

I re-enter the line:

Private WithEvents ABC as SomeControl

and the ABC error goes away but the XYZ error returns! This is worse than
DLL Hell.

Has anyone seen this happen?

It also happens where Implementations are not 'seen' any more. I will have
at the top of the form,

Implements Ixyz

and the next line might be:

Sub foo () Implements Ixyz.abc

Yet the task list shows:

SomeForm must implemnt Sub abc for interface Ixyz!

I'm really stuck here today.

This is version 1.1.


Feb 9 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Zorpiedoman wrote:
Ok, this has got to be an IDE bug, but I can't seem to track down any
discussion on it. Perhaps I don't know the right words to search for.

This has happened occasionally for as long as I have been using VB.net, but
at the moment, I can't fix it any more:

For no apparent reason, all of a sudden, a windows form, which has been
working fine all along, will suddenly generate an error "XYZ is not a member
of myForm"

Now I look at the code, and there, in the declarations section of the form
is the line of code:

Private WithEvents XYZ as SomeControl

Looks like it is properly declared to me!!! The fix had always been to
delete this line of code and re-enter it. Poof - all errors go away,
everything is fine.

TODAY I CAN NO LONGER FIX IT.

The reason? As soon as I retype the line for XYZ, a DIFFERENT item pops up
as not being a member of a form. 'ABC is not a member of SomeForm"

I re-enter the line:

Private WithEvents ABC as SomeControl

and the ABC error goes away but the XYZ error returns! This is worse than
DLL Hell.

Has anyone seen this happen?

It also happens where Implementations are not 'seen' any more. I will have
at the top of the form,

Implements Ixyz

and the next line might be:

Sub foo () Implements Ixyz.abc

Yet the task list shows:

SomeForm must implemnt Sub abc for interface Ixyz!

I'm really stuck here today.

This is version 1.1.


Do you make any API declararations in your program? I only saw this
flakiness when I made a win32 call but mistyped the declare statement.
I did a byval when it should have been byref. Program still ran but
gave me really screwy errors like you have.

Try deleting your obj file and then recompiling.

Chris
Feb 9 '06 #2

P: n/a
No, no API calls.

However, if I shut down the IDE, re-open it and do NOT attempt to recomile
and just run, sometimes it works. It's still very flaky. I'll try deleteing
the obj files as you suggest, and see if it helps.

I hope that 2.0 gets rid of this behavior.

Still looking for more feedback if anyone has any.
--
--Zorpie
Feb 9 '06 #3

P: n/a
> For no apparent reason, all of a sudden, a windows form, which has been
working fine all along, will suddenly generate an error "XYZ is not a member
of myForm"


I have seen something similar. When your problem shows up, see if a rebuild
(not a build) makes it go away. No guarantees, but if it solves your
problem, it is at worst a minor irritant.
Feb 9 '06 #4

P: n/a
I seem to have similar behaviour with a somewhat large "solution" that I
am working with. Like you, I have attributed it to an IDE bug.

I seem to have noticed a correlation with editing a class that contains
a delegate declaration. When I try to run after editing this class I
sometimes get a message that there were build errors in an unchanged
form belonging to another project. The message is always about an
undeclared symbol that is always an existing control on a form. It is
not always the same control or form.

I have found that simply doing a "Rebuild Solution" removes the problem,
but this is a definite nuisance as I have a large number of projects in
my solution and the rebuild can take significant time.

I don't see this problem with other classes in the solution, and this is
the only one that contains a delegate declaration, so I suspect it may
have something to do with that. But I haven't had the opportunity to
investigate further, so if you find a solution I'd be very interested.

Cheers,
Randy
rpiedoman wrote:
No, no API calls.

However, if I shut down the IDE, re-open it and do NOT attempt to recomile
and just run, sometimes it works. It's still very flaky. I'll try deleteing
the obj files as you suggest, and see if it helps.

I hope that 2.0 gets rid of this behavior.

Still looking for more feedback if anyone has any.

Feb 10 '06 #5

P: n/a
Interesting comment about the delegate. I use delegates in every form that
causes this problem. The rebuild SOMETIMES works, but lately (and the reason
for this posting) is that fixing one was creating anothier, and fixing the
other recreated the first one so I was stuck in a loop. My current work
around is to shut down the IDE, restart, (no errors come up) and RUN it
immediately without a rebuild.

Definetly a bugaboo. I'm upgrading to 2.0 this week, so hopefuly this will
go away. (And be replaced by more inexplicable behavior, of course! :-))

-zorpie
I don't see this problem with other classes in the solution, and this is
the only one that contains a delegate declaration, so I suspect it may
have something to do with that. But I haven't had the opportunity to
investigate further, so if you find a solution I'd be very interested.


Feb 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.