ActiveBlog

Script access to open files
by

, November 9, 2007

I got a comment a while ago somewhere ( the exact circumstances escape me ) that there is nothing in the ko API to easily get and iterate over all of the open files in Komodo. And that statement is correct, sort of. There is a way right now to very easily get all open files, it just isn't documented that well outside of the Komodo sources:

var editorViews = ko.views.manager.topView.getViewsByType(true, "editor");

for(i in editorViews) {
  alert(editorViews[i].getURI());
}

An example use of this might be to do something to all open files, or files of a certain type, etc.

Subscribe to ActiveState Blogs by Email

Share this post: