No, I am not talking about the new Harry Potter book
, which is an excellent read by the way I'm talking about wizards for generating code, or in the case of our Midas Rich Text LSX
, for generating property strings. While most coding in Midas is pretty simple, one area of (I think) necessary complexity is the area of property strings. The following code generates a tabbed table, sets the tab values, and sets the initial text value for each tab. It also sets the table style to show alternate rows in different colors, and identifies those colors.Call rtchunk.AppendTable(3, 1, "TableWidth=FIT_TO_WINDOW TableColorStyle=ALTERNATING_ROWS TableColor=RGB255,255,224 TableBodyColor=RGB224,255,255 RowDisplay=Tabbed", "Text='Sales for Acme Ltd.' TabLabel='Sales'","Text='Sales Goals for Acme Ltd.' TabLabel='Goals'","Text='Performance Metrics for Acme Ltd.' TabLabel='Performance'",)
It isn't easy to read, but it is powerful. The problem is, if you simply mistype a property name, such as typing RowDsplay=Tabbed
, the effect is huge, as the table is not tabbed, so the rows all show, and the tab labels don't show.
One possible solution is to add error checking so that an error is raised if a an invalid property pair name is used, or if an invalid property pair value is specified. If raising an error seems too extreme, adding a validator to allow validation of a properties string could be used. This is good, but it still relies on the user to know all the names of the property pairs and their possible values. If you look in the Help db under the 02 Reference Guide/01 Working with .../Working with HTML generation, you will see all the names and choices, but you will also see how difficult it would be to memorize all of that. Yuck!
Another possible solution is to add a wizard. If the developer could be led through the process of determining the property string, the likelihood of error would be reduced, and the inquiry process could identify likely property pairs based on previous choices.
So, are wizards evil
? Obviously, some think so. What do you think? Should the Help db contain wizards for guiding people through the creation of these property string? This would obviously be optional, but is it a good use of our time, or is there another, better solution? Let me know what you think.
Copyright © 2003 Genii Software Ltd.