473,386 Members | 1,715 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,386 software developers and data experts.

Vanishing Declarations

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
5 1063
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
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
> 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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Michael Tobis | last post by:
Summary of my understanding of a recent interesting thread: General usage has "declaration" meaning "statement which does not generate executable bytecode but merely affects the compiler". My...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
2
by: Greg | last post by:
There is a repeating issue of controls vanishing from a form in the Dev environment which is starting to get annoying. What happens is that I will have a form open in the IDE. The form will have...
7
by: Andrew Ducker | last post by:
My unhandled exceptions seem to just vanish. If I put the line: int x = int.Parse("XXX"); in (which generates an exception, obviously) then the code that's executing just vanishes, leaving me...
4
by: Andrew Ducker | last post by:
I have a project with a variety of forms in it. The controls on those forms are from another project in the same solution. When I change from Debug to Release, I can do a build just fine (and...
0
by: Michael | last post by:
After trying to load my java applet from <OBJECT> tag (rather than <APPLET> tag), it renders fine, except when you click between the DESIGN view then back to HTML view, the <PARAM NAME="ARCHIVE"...
2
by: Linda | last post by:
Greetings, I am experiencing a problem similar to that mentioned in <a...
2
by: mark4asp | last post by:
The first intem in a DropDownList is vanishing! My code to load a DropDownList is shown below. Yet when I load the page after a postback there is no zeroth item present. ...
36
by: TC | last post by:
I've used Access for many years. Several times, I've encountered a bug which I refer to as the "Vanishing Joins" bug. When it happens, joins vanish randomly from queries. More specifically, all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.