2

I have a component that descends as follows:

StdCtrls.TCustomEdit -> MyStdCtrls.TMyCustomEdit -> MyVCLControls.TMyEdit

When I publish various properties for TMyEdt (properties which are defined as public or published in StdCtrls and other ancestor namespaces), the IDE's Object Inspector shows many Undefined property errors in unit MyVCLControls. A syntax check, however, gives no errors. The test project runs fine, and I can change and/or access any of the properties that the IDE says are undefined.

After saving and closing the test project containing MyControls, the error messages disappear from the Object Inspector upon reopening the test project. However, the errors return if I make any change in the MyControls unit. (By "any change", I mean even pressing the space bar.

Can anyone explain what's happening for me?

4
  • Can you show the actual code and the actual full error messages? What do the offending properties actually look like? Feb 27, 2012 at 4:27
  • @Remy: Well, they are just standard edit properties. If you don't mind here is a link that shows the problem I described in the IDE. Remember, though, the test program has no syntax errors, it runs just fine, and I can read and write the newly "introduced" properties. Feb 27, 2012 at 6:01
  • 4
    The Object Inspector is not the one displaying the errors. The Structure pane is. That is a big difference. The structure pane has to actually compile the code to get its information. Sometimes it can get confused, though the main compiler doesn't. I would not worry about it, but if you really want to eliminate the errors, then please provide an actual project that reproduces the errors, so someone can look for errors in the project's setup (misconfigured paths, etc). Feb 27, 2012 at 9:07
  • @Remy: Thanks for "Structure pane" correction. I am going to take your advice and not worry. Feb 28, 2012 at 5:46

1 Answer 1

0

Your problem is a well known bug of the Error Insight feature!

Closing and reopening the project is one possibility to get rid of the error messages (for a while, as you already discovered).

Since this is such an annoying bug, many Delphi users turn off Error Insight completely in the options dialog!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.