Developer Central Update: The CDB

January 16, 2010
84 Views

I have posted new versions of the SPSSINC MODIFY TABLES and SPSSINC MODIFY OUTPUT extension command dialog boxes to Developer Central.  Functionality is unchanged, but the dialogs have been redesigned. The dialog boxes for extension commands (among other things) are created with the Custom Dialog Builder (CDB).  The CDB, which is quite popular, was designed to…

I have posted new versions of the SPSSINC MODIFY TABLES and SPSSINC MODIFY OUTPUT extension command dialog boxes to Developer Central.  Functionality is unchanged, but the dialogs have been redesigned.

The dialog boxes for extension commands (among other things) are created with the Custom Dialog Builder (CDB).  The CDB, which is quite popular, was designed to make it really simple to create an SPSS Statistics-style dialog box.  An important part of that is the automatic layout of the controls.  To achieve this, controls are placed in two columns with an optional third column that holds only buttons.  Sizing is then automatic based on the size of the controls and accompanying text. (A tip: you can insert \n in text to force a line wrap in order to prevent a control from being too wide.)

Both the SPSSINC MODIFY TABLES and SPSSINC MODIFY OUTPUT dialogs have a lot of options and, hence, a lot of controls, so fitting these into the CDB layout model resulted in pretty large dialogs.  I could have pushed some controls to a subdialog, but one of our design guidelines is to make it possible to complete a valid specification without visiting a subdialog, and I couldn’t see a reasonable way to do that with these commands.

Although large, these dialogs worked well until Windows 7 came along.  It aggressively scrunches dialogs that are a little too big for the screen area generating a surprising amount of misbehavior.

I wasn’t really happy with these dialogs anyway, so I decided to violate the guideline and require a visit to a subdialog in order to complete a command specification.  Now the selection portions of the commands are on the main dialog and the actions to take are on the sub.  This not only results in smaller and more pleasing dialogs, thus solving the Windows 7 problem, it also allowed me to expand some of the controls to achieve better validation.

Some of the controls in the original design are not applicable unless you specify a particular choice in another control.  For example, in Modify Output, you can filter the selected objects based on the outline title.  But if you left text in the filter field without picking the filter choice, you would get a syntax error.

The proper way to handle control dependencies such as this is to use a checkbox group or a similar structure to disable the irrelevant controls, since when syntax is generated, the CDB 0mits disabled controls, but in the original design there was not room to do this.  The new design expresses these dependencies better and makes it clearer what to do.

Try out these new dialogs, and let me know what you think.