Unsupported 16 bit resource error when compiling

This may help someone (including me next time I get this error, as I
always forget how to fix it ;-)

All of a sudden, while developing an application, it won't compile and
gives:

Unsupported 16 bit resource in <some_form_name>.dfm

This seems to happen at random, and I haven't found any pattern except
that you're always desperately coding and haven't backed up this
particular form for a while.

I always set text-file dfm format as default, but this time, for some
unknown reason, this particular form has been saved in stream-format.

At first I used to grab a backup from say the previous day, but then I
tried comparing (using ExamDiff Pro) the stream-format dfm with its
stream-format ~dfm backup. What did I see?

all 0x0A caracters in the ~dfm had been given a preceding 0x0D

So I opened the dfm file in EditPad Pro, and replaced all 0D 0A character
sequences with 0A. (after checking the number of 0D 0A's found, just in
case).

On saving the dfm file, Delphi was then able to work with it as normal.

I quickly told Delphi to save it as text, and now I can go on coding!

--
Chris
.

posted @ 2010-12-14 09:12  清秋  Views(521)  Comments(0)    收藏  举报