Jump to content
John Kouraklis

EReadError "Property does not exist"

Recommended Posts

Hi everyone,

 

I've got a visual component with a property which refers to an image list.

 

In IDE, the component is installed without any problems but when I run the app, I get the error that the property does not exist.

 

Obviously, the property is published and it exists in the dfm file. Every time I change the source code of the component I Uninstall/reinstall the package to avoid conflicts.

 

How can I debug this? Any idea anyone? I thought of serialiazing/deserializing the component in code to test but this may not be that useful.

 

Any ideas anyone?

 

In any case, thanks and happy new year and Merry Christmas to everyone.

 

 

Share this post


Link to post

I'd say it's the TReader and the property does not exists in the class not in the dfm. Seems like you have different versions in the path or the component's package is used in other packages which are not rebuilt? Try to create a batch file which rebuilds everything from scratch, it could be helpful to debug such things.

Share this post


Link to post

This usually happens, if the code in the packages (used in the IDE) and the code in your program is out of sync. Did you maybe update these components and forgot to adapt the search path in your project?

Share this post


Link to post

Have you tried a search in Windows Explorer looking for mycontrol.dcu?

  check the filedatetime of dcu(s) found.

   Use Projects>build all Projects and see which one recompiles.  

 

Next open code window and click on mycontrol in uses cause to open it.

  then hover over the tab to see the file's path in the hint.

 Since you have mycontrol open put a breakpoint on Tmycontrol.create

    and see if it is called. 

 

For some reason I need to set Target "Release configuration - ... platform" search path  

     then setting "Value from ""Release...xxx platforms""    

     needs to have all config path set for each config. 

   directly setting Search path does not take 

    

Share this post


Link to post

Just got the similar case, I was removing published properties from existing visual components and did not open every dfm in the IDE so there were dfm's having old non-existent properties complaining at runtime. Can't remember the error message though.

Share this post


Link to post

Hi,

 

I found what the problem was. There was a path in the library pointing to another version of the component. I must have spent 4-5 hours today on this

 

Thanks 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×