Hello SlickTeam,
while working on a GUI macro which uses the the Preview TB I've encountered a problem.
The idle update of the Preview TB interferes with the cb_refresh_output_tab() called by the macro.
_UpdateTagWindow already contains a hardwired 'hook' for the '_tbsearch_form'.
BTW: As I've seen '_tbfilelist_form' and '_select_tree_form' should also be added.
However, the current implementation can't be extended to cover custom (GUI-)macros using the Preview TB.
See below a change proposal how this COULD be solved. I've applied these patches and I've tested it successfully.
Non-GUI macros using the Preview TB are not considered, but I'm not sure if there is any use case for that.
tagwin.e
// HS2-CHG: proposal to avoid unintended idle update of the 'Preview TB' #1
_str def_tagwin_noupdate_forms = '_tbsearch_form _tbfilelist_form _select_tree_form';
tagwin.e - _UpdateTagWindow() [line 682]: (Rev. 1.53.2.2)
if ( focus_wid ) {
//if (!_get_focus()._isEditorCtl(false)) return;
//HS2-CHG: proposal to avoid unintended idle update of the 'Preview TB' #2
//if (focus_wid.p_active_form.p_name == "_tbsearch_form") return;
if (pos ('(^|:b)'focus_wid.p_active_form.p_name'(:b|$)', def_tagwin_noupdate_forms, 1, 'R')) return;
tagwin.e - maybe_add_tagwin_noupdate_form(): new function
// HS2-CHG: proposal to avoid unintended idle update of the 'Preview TB' #3
void maybe_add_tagwin_noupdate_form (_str formname)
{
formname = strip (formname);
if (!pos ('(^|:b)'formname'(:b|$)', def_tagwin_noupdate_forms, 1, 'R')) {
def_tagwin_noupdate_forms = strip(def_tagwin_noupdate_forms) :+ ' ' :+ formname;
}
}
In a macro module this function could be used to 'register' a new user form properly:
defload()
{
maybe_add_tagwin_noupdate_form (OLS_FORM_NAME);
}
It would be nice if you could take care about that and give some feedback please how this will be solved.
Thanks a lot,
HS2