Jump to content
Javier Tarí

DFM Serialization Properties order

Recommended Posts

Currently I'm migrating a project from D2007 to D10.3, and geting false differences on DFM files, due to a change on the order of some properties when the IDE saves a form to a DFM file

 

The properties have the same values, but with D10.3 they are saved on a different order

 

Any idea on how could I change that order? If the fix needs a change on the components, no problem: I use almost always my own components inherited from the standard ones, even TLabel

 

Thanks in advance

Share this post


Link to post

Found this:
The serialization order depends on the order the porperties have been published. So you the properties you publish on inherited components will be serialized after the the ancestor component published properties

 

So seems I'm mostly out of luck, unless I modify the VCL sources on D2007, publishing the properties that exists on both, but are unpublished on D2007

Share this post


Link to post
24 minutes ago, Javier Tarí said:

Any idea on how could I change that order?

AFAIR you just change the order in which the properties are declared.

Note though that I've seen cases where a component depended on properties being set in a specific order during load. Can't remember any specifics.

 

You could also use a diff tool that can recognize moves. For example Plastic Merge.

Share this post


Link to post
1 minute ago, Javier Tarí said:

So seems I'm mostly out of luck, unless I modify the VCL sources on D2007, publishing the properties that exists on both, but are unpublished on D2007

You can republish properties:

type
  TLabel = class(TLabel)
  published
    property Caption;
    property Align;
  end;

 

Share this post


Link to post

Re: Plastic Merge. It appears that the free Personal Edition isn't available anymore.

What you can do instead is download and install the Plastic client: https://www.plasticscm.com/download/downloadinstaller/9.0.16.4519/plasticscm/windows/client?flags=None and then just use the Diff/Merge utility: mergetool.exe

I've just tried a fresh install and it worked fine.

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

×