Board index » delphi » Strange error...

Strange error...

Hi,

I've got a question..

The other day Delphi2 returned an error message which didn't make no
sense. Delphi said 'Error in RegisterClasses, missing or incorrect.'.
In the end in turnd out I accidently removed the 'End.' from my
source.
So the question is: Why does Delphi create this strange error message,
instead of an syntax error (Because Delphi checks the source syntax
first).

If anyone knows the answer, please let me know, because I am curious..

Thnx,
          John

 

Re:Strange error...


On Wed, 25 Sep 1996 08:09:18 GMT, fistagi...@neuroknf.azl.nl (John van

Quote
Alphen) wrote:
>The other day Delphi2 returned an error message which didn't make no
>sense. Delphi said 'Error in RegisterClasses, missing or incorrect.'.
>In the end in turnd out I accidently removed the 'End.' from my
>source.
>So the question is: Why does Delphi create this strange error message,
>instead of an syntax error (Because Delphi checks the source syntax
>first).

>If anyone knows the answer, please let me know, because I am curious..

Delphi's IDE is trying to parse the source file at design time. That's
how Delphi finds method names to display in the Object Inspector.
That's how Delphi inserts event handler methods and component fields.
Delphi needs to parse the source file to add unit names when you
choose File|Use Unit... Borland realizes that you will not always have
a syntactically correct source file while you are editing the file.
Nonetheless, Delphi needs to parse that file at design time. Thus, it
does not use a complete Pascal parser, but tries to guess what you
mean. Unbalanced comments and begin-end blocks confuse the design-time
parser.
--
Ray Lischner, Tempest Software, Corvallis, Oregon, USA
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Other Threads