Are you sitting comfortably readers? Then buckle yourself in because this is going to be a long ride! The Challenge It all started when Martyn Phillips of Revelation UK approached us for some assistance with toggling button states in his new sample app. Originally he was interested in capturing the various actions that could be used to update the cut/copy/paste buttons in his app and we were able to point him to Carl’s EDITSTATECHANGED blog post, which along with some hints from our own blog on promoting HELP events got him to where he wanted to be. Then Martyn asked if we could do something similar for his Save/Clear/Delete buttons. This was a tougher challenge as what we really need is a FORMSTATECHANGED event, not dissimilar to the above, but triggered when the form changes in such a way that the save/clear/delete buttons should be updated. (SPOILER ALERT – it is coming, so treat this blog post as educational not proscriptive!). The problem is, that so many things c...
Our last blog article dealt with promoting a help event so that dictionary help could be displayed when the user pressed F1 on a prompt. This was well received but it was pointed out that the technique crashed and burned when used from a multi-column edit table. The reason for this is obvious - if an edit table has more than one column then it will logically also have more than one data dictionary item associated with it. So we need to determine which edit table column we are currently on and use this information to determine the correct dictionary item to use. When we ask for the COLUMN property of an edit table, what we are provided with is a sub-value mark delimited array of all of the columns in the edit table. (The reason for this using such an unusual delimiter is simply that the columns property is derived from a larger array maintained by the system behind the scenes - the "control semantics"). Then to establish what column we're currently on we simply get t...