I’m trying to learn how to update the quick panel. Here’s a simple example:
class PanelTestCommand(sublimeplugin.WindowCommand):
def run(self, window, args):
args = "wait 5 seconds..."]
window.showQuickPanel("", "", args)
print "Wait"
import time
time.sleep(5)
args.append("Done!")
print "Done"
window.showQuickPanel("update", "", args)
I’m not sure how the first parameter, called “key” in the docs, actually does. My understanding is that if it’s not blank, the panel gets updated, but I’m not sure.
Anyway, the problem is that it looks like both output to the output panel and updates to the quick panel are buffered. The net result is that, when I invoke the above code using
window.runCommand("panelTest")
nothing happens for 5 seconds, and then (1) the two lines of text are shown in the output panel, and (2) the quick panel pops up, again showing both lines of text.
I’m probably doing something really silly, but I’m running out of ideas. Anyone? Thanks! M