Macro no longer works in Komodo 9

This little macro has worked for a long time for me, Now it does not. The developer extensions for Komodo do not seem to have been updated to Komodo 9 so I have no idea how to see what is happening.

var view = ko.views.manager.currentView;
var scimoz = view.scimoz;
var tab = view.parentNode._tab;
if (tab.style.backgroundColor) {
    tab.style.cssText = "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium;";
    if (scimoz.readOnly) scimoz.readOnly = false;
}  else {
    tab.style.cssText = "background: #FFE0E0;";
    scimoz.readOnly = true;
}

The readonly action works fine still - but the tab colouring does not. :disappointed:

– Peter

Try to play a bit with different CSS rules, you could install DOM inspector to easily test some CSS.

The style attributes are not accessible for some reason (eg. view.parentNode._tab.style.color is an attribute of the tab.style object but for some reason I cannot read or set it. Probably a new falvour of Mozilla that I am not familar with. However this works and does what I need:

// Toggle read only status

var view = ko.views.manager.currentView;
var scimoz = view.scimoz;
var label =  view.parentNode._tab.label;

if (scimoz.readOnly) {
    scimoz.readOnly = false;
    view.parentNode._tab.label = label.slice(1,-1);
} else {
    scimoz.readOnly=true;
    view.parentNode._tab.label= "[" + label + "]";
}

They’re anonymous nodes so you can’t access them as easily as regular nodes, because Mozilla … :wink:

Now he tells me … :joy: