Page 1 of 1

Property StyleTemplates does not exists

Posted: Tue Jul 17, 2012 12:09 pm
Hello, all,

I have a problem in running a form with RichView control, on new installed Delphi environment.

Have no compilation or build errors, but when the form is started, I get a message :

Project test.exe raised exception class EReadError with messages 'Property StyleTemplates does not exists'.

I assume It has to do something with RichView versionm but when comparing installation with original development machine, could not see any differences.

What could be the problem ?

Thanks and best regards,
Zoran Kuret

Posted: Tue Jul 17, 2012 12:23 pm
by Sergey Tkachenko
It happens because of a version mismatch.
One version of TRichView is installed in Delphi IDE, but another version is used to compile applications.
Find files of the old version of TRichView and delete them.

Posted: Fri Jul 20, 2012 8:16 am
Could you please give me som more details, which files exactly are the problem ?

And how is possible that Delphi uses another version to compile applications, besides the one which is installed in IDE ?

Thank you very much in advance,

Best Regards,
Zoran

Posted: Sun Jul 22, 2012 12:43 pm
by Sergey Tkachenko
When compiling application, Delphi does not actually use units installed in IDE.

(in applications that do not use run-time packages) Delphi searches for pas and dcu files in the paths listed in the library paths (in new version of Delphi IDE, they are in menu Tools | Options, page Environment Options | Delphi Options | Library, Library path.
Directories are processed in the order they are listed in the "Library path", so, if the path of the older version is listed before the path of the new version, the old files will be used.

So you need to find a directory where the old files (RichView.pas, RichView.dcu and others) are located, and delete them (or at least move them to another directory, not listed in "Library path".

In future, the simplest way to upgrade is copying files to the same directory, overriding the old files. Then recompiling packages.