Some news on the "Different Package Versions per Project" issue.

Some news on the "Different Package Versions per Project" issue.

Assume we have different packages each containing TMyComp with differences in the available properties. We have a project group with projects A and B. Project A uses version 1, while project B uses version 2 of TMyComp. We are working on project B with a form open containing an instance of TMyComp which has some of the new V2 properties set.

We switch to project A, unloading version 2 of the package and loading version 1. The IDE nicely closes the form with the V2 component, but keeps the PAS open.

Now switching to design view throws an error regarding those missing properties. Here the only option to keep things intact is to Cancel.

Switching back to project B unloads V1 and reloads V2. We can switch safely to design view now and all the properties are as expected.

So the only critical point is the reaction to the missing properties dialog. One has to Cancel, otherwise the DFM will be screwed.
Would that be acceptable for you?

BTW, this is no issue when all projects in the project group use the same package version, as changing the project group will close all files anyway. As this probably is the majority of use cases, the above scenario might be quite academic.

Comments

  1. I'm used to clicking cancel on this dialog anyway. It has become automatic.

    ReplyDelete
  2. I need to repair a huge app because someone not having the correct versions of components installed didn't click cancel, made a lot of code changes after wards then checked in everything. Think dozens of forms and data modules.

    ReplyDelete
  3. If... the .dfm was .dfmxml - variants could coexist.
    Look! A flying pig!

    ReplyDelete
  4. Lars Fosdal XML is far from the magic bullet. It can be abused to the extreme and often is.

    ReplyDelete
  5. Thomas Mueller Absolutely, but it also has it's uses. In this case, extra attributes could be ignored, and still be preserved.

    ReplyDelete

Post a Comment