|
-
Sep 9th, 2024, 04:11 PM
#1
Annoying Non-Error Errors
This may be specific to WPF, as that's where I'm encountering this, but I'm not sure about that.
Consider this simple constructor:
Code:
Public Sub New()
InitializeComponent()
DataContext = globalPICListManager
spinSurveyYear.Value = Date.Now.Year
cbStreams.SelectedIndex = -1
cbCoordinator.SelectedIndex = -1
gdSurveyGrid.DataContext = Me
bGetCandidates.DataContext = Me
End Sub
All or part of every single line is an 'error'. InitializeComponent is an error, so it is little surprise that every object that would also be declared on the same code page as that function is also an 'error'. The thing is, the program runs just fine. It builds fine, it rebuilds fine, and it runs fine. The only consequence of the IDE not recognizing all those objects is that Intellisense doesn't work and case correction doesn't work when calling methods of objects that the IDE doesn't believe exists. They DO exist, though, and these supposed compiler errors don't prevent the program from running.
I've seen this happen several times, and it always goes away. Exactly what steps I have to take to make it go away, I'm not sure, but this is clearly an IDE bug, as it has lost track of the associated code file with the declarations of the 'missing' items, though the compiler has not lost track of the same page.
Any suggestions about this?
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|