Thursday, February 1, 2007

Delphi/C++Builder 2006 Not Saving Changes

There is a bug where the type library editor may not save your changes: 29215. The current work around is to build your project after you do a save. The Quality Central entry states that the bug was introduced in Update 2, but the fact is the bug has been around since Delphi 3 and just now manifested itself differently. You can tell if the type library was completely saved if the save all icon on the toolbar is grayed out.

Chances are if you create COM objects and are using the type library editor you will never see this bug, but when it does happen you will loose the changes you made to the type library. If you close the project, open just the .tlb file in the Type Library Editor, add what would have been created and reopen your project everything will be back to where you expected it.

Not that it matters, but the reason for the bug is architectural in nature. When the IDE was redesigned (codename Galileo) lots of changes took place, one of which required a change with how the IDE interacted with the type library. This change exposed a flaw in the architecture of how the type library editor determines if the internal representation of the type library was modified or not (in other words does the .tlb need to be saved).

Update: This bug has been fixed in Delphi 2007

No comments:

Post a Comment