Thursday, March 18, 2010

New InstEd release coming soon

The last release featured a fairly large re-architecture, which introduced a few annoying bugs.

There was even a comment in the code saying something to the effect "Changed this, hope it doesn't break anything."
Sure enough that change broke something.

The next release fixes those (the ones I know about) and introduces an oft-requested feature: Replace and Replace All.

This will hopefully speed up repackaging even more. (Already I hear independent claims of repackaging work which used to take one and a half hours under Wise can be done in 15 minutes in InstEd/InstEd Plus. I can't verify that, but I am impressed.)

Finally, the Table and Column filters in the Find dialog will actually have some real value. They were added a long time ago with Replace/ReplaceAll in mind, but probably didn't hold much value when doing manual Finds. But being able to filter automatic replacements is quite important.

Working on this feature highlighted a Windows 7 specific bug related to the Table and File column dropdowns in the Find dialog. I noticed on Windows 7 (my development OS now) that the "buttons" to show the dropdown list didn't do anything when clicked. ALT+down still worked, however. When testing the dialog in Visual Studio's dialog editor, the buttons worked as expected. So it was a simple matter of firing up Spy++ and comparing the combobox window styles between InstEd's Find dialog and the equivalent test dialog launched by Visual Studio.

I used to add the WS_HSCROLL window style to the combo boxes which, on older OS's, added a scrollbar to the bottom of the dropdown window, allowing long strings to be viewed completely by scrolling. However it seems that on Windows 7 WS_HSCROLL breaks the combobox "button".

I did some checking and the resource script docs don't list WS_HSCROLL as a valid style for a combobox, so I guess technically I can't expect it to work on new OS's. But, I also know that MS strive for strong backward compatibility, for which they failed here.

Still, I managed to catch it in time for when the comboboxes might be used in anger with the new Replace/ReplaceAll features.

Of course, there are some scenarios where an automatic replace can't take place:
  • Replacing a complete string with an empty string (null) on a non-nullable field
  • The replacement text would create a duplicate column
  • Replacing text in a non-editable table (e.g. _Columns)
Also, auto replacement only works on string fields, not integer or binary fields. For auto-replacement of integers, you are best off cutting the relevant rows into a spreadsheet, and using the excellent batch cell editing features in there before pasting the edited rows back into InstEd.

Finally, while you can do ReplaceAll with Row Reference Tracking enabled, you may get constant requests to update referencing rows. For example, when many component names are changed using Find/ReplaceAll, you will likely get a dialog for each component asking to update all referencing rows as well. And depending on your filter, these referencing rows may be automatically updated by the ReplaceAll anyway.

In these situations, it is best to turn off Row Reference Tracking before doing the ReplaceAll.


ZaxXxaR said...

Neil, you're awesome! :)
Please, everyone is literally begging you for two years to make that Replace engine available.;)
Finally everyone will get rid of Wise PackStudio for that purpose or exporting tables to .idt just for a single char replace.:)

We're crossing fingers for your success!

ZaxXxaR said...

...By the way, you've got a competitor in MSI Database Editors - new player on field: SuperOrca from Pantaray. First overlook of it shows it stands no chances - it's most PR'ed feature is Compare, which is present in InstEd for a very long time already.