Dialog.WatchTab - tab properties after tab deactivation

When a watched tab is deactivated (but not closed) the associated Msg.Tab object appears to be a shell. The deactivated tab object's numeric identifier is available but associated properties such as .displayed_label and .path are "undefined". Is this intentional?

Test button and sample debug output as follows. In the example when the detached dialog starts Desktop is the current tab. User then switches to Downloads and issues >Go /temp NEWTAB command

Watching (1510116) (C:) Downloads
Watching (2624696) Desktop
2 open tabs. | Deactivated (2624696) undefined | Activated (1510116) (C:) Downloads
3 open tabs. | Deactivated (1510116) undefined | Activated (3673364) (C:) Temp
Watching (3673364) (C:) Temp

WTTest1.dcf (6.6 KB)

var cmd = DOpus.create.command, dlg = DOpus.dlg, msg_obj;
var opus_ver = "12.21";
var me = "WTTest";
var me_ver = me+" -6th August, 2020 - © AussieBoykie";
var watchedTabs = DOpus.Create.Map();
var currTab, currTabID, triggerTab, triggerTabID;
function OnClick(clickData)
{
	if (!DOpus.version.AtLeast(opus_ver)){
		dlg.request("DOpus version "+opus_ver+" or later is required.","OK","Version Check");
		return false;
	}
	dlg.template = me;
	dlg.window = DOpus.listers.lastactive; // Lock to active lister
	dlg.detach = true;
	dlg.title = me_ver;
	dlg.create;
	dlg.show;
	watchTabs(); // Watch the current set of tabs
	do{
		msg_obj = dlg.getmsg();
		if (msg_obj==false) break;
		if (msg_obj.event=="click"){
			DOpus.output(msg_obj.control+" : "+dlg.control(msg_obj.control).label);
			if (msg_obj.control=="button2") break;
		}
		else if (msg_obj.event=="tab"){
			triggerTab = msg_obj.tab; // Point to the tab that triggered the event
			triggerTabID = String(triggerTab);
			for (var i = 0; i < 5; i++){
				DOpus.listers.lastactive.Update(); // Tabs may have been added or removed
				currTab = DOpus.listers.lastactive.activetab; // Point to the current tab, which may be the same as the event triggering tab
				currTabID = String(currTab);
				if (currTabID=="0") DOpus.delay(125); // Introduce a short delay if the current tab is not yet fully established
				else break;
			}
			if (i>0) DOpus.output("Needed "+i+" delays to establish the new active tab");
			if (currTabID==0) DOpus.output("Unable to establish the new active tab!");
			else currTab.Update();
			var str = DOpus.listers.lastactive.tabs.count+" open tabs.";
			if (msg_obj.value=="navigate"){
				str = str+"Navigated from ("+triggerTabID+") "+triggerTab.displayed_label;
				str = str+"Navigated to ("+currTabID+") "+currTab.displayed_label;
				DOpus.output(str);
			}
			else if ((msg_obj.value=="activate") && (currTabID!=triggerTabID)){ // The event triggering tab was deactivated
				str = str+" | Deactivated ("+triggerTabID+") "+triggerTab.displayed_label;
				//str = str+" | Deactivated ("+triggerTabID+") "+watchedTabs(triggerTabID);
				str = str+" | Activated ("+currTabID+") "+currTab.displayed_label;
				DOpus.output(str);
				watchTabs();
			}
		}
	}
	while (msg_obj);
}
function watchTabs()
{
	var nextTab, currLister = DOpus.listers.lastactive;
	var currTabs = DOpus.Create.Map();
	for (var i = 0; i < currLister.tabs.count; i++){
		nextTab = currLister.tabs(i);
		nextTabID = String(nextTab);
		currTabs(nextTabID) = nextTab.displayed_label;
		if (!watchedTabs.exists(nextTabID)){
			dlg.watchtab(nextTab,"activate,navigate");
			watchedTabs(nextTabID) = nextTab.displayed_label;
			DOpus.output("Watching ("+nextTabID+") "+nextTab.displayed_label);
		}
	}
	for (var e = new Enumerator(watchedTabs); !e.atEnd(); e.moveNext()){
		var key = e.item();
		var value = watchedTabs(key);
		if (!currTabs.exists(e.item())) DOpus.output("Closed ("+key+") "+value);
	}
	watchedTabs.assign(currTabs);
}

Thanks, will be fixed in the next update.