开发者

Delphi - Where is the IDE picking the list of form names from?

Especially to populate the开发者_StackOverflow社区 "inheritable items" and "forms creation" dialogs

I am asking because since a few days, I cannot create inheritable items anymore as there is a space (or a tab?) appended to each form name so I end up with an error message when inheriting like 'basewindow 2 is not a valid identifier' (notice the space between basewindow and 2)

This is very blocking for me as all the forms in the project are inherited from a common ancestor ...

Note: on the newly created froms, there are no space and they work fine. It is a plan d2010 setup, no extra IDE tools or utilities loaded; Note 2: this relates to one project only

Any idea ?

thanks in advance Didier


I have done some investigation into this in relation to the question: Register custom form so I can inherit from it from multiple projects, without copying the form to the Object Repository folder. Although it isn't in my answer there, I have since concluded that the IDE will only let you inherit from items explicitely added to the project.

I would therefore say that it picks up those inheritable items from the dpr file. A line like

  UnitOKFrame in 'UnitOKFrame.pas' {OKFrame: TFrame},

would add an OKFrame to the inheritable items list.

So my "guess" is that somehow you have gotten extra spaces between the name of your forms/frames and the colon that separates it from its type. Something like:

  UnitOKFrame in 'UnitOKFrame.pas' {OKFrame : TFrame},

If that is indeed the case, I would file a QC report with Embarcadero. They could bother to make the parsing of the dpr a bit more robust and friendly to us poor programmers :-)...


As Uwe mentioned in the comments, forms are included without a type identifier:

  UnitLogonForm in 'UnitLogonForm.pas' {LogonForm},

in this case you might have extra spaces between the curly braces surrounding the actual name:

  UnitLogonForm in 'UnitLogonForm.pas' {LogonForm },
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜