Sublime Forum

show_quick_panel() does not show anything?

#1

Just trying to use the show_quick_panell command to get a panel to show up - just that it doesn’t work and since I just started creating a plugin in Sublime Text2, I can’t figure out if I am doing something wrong.

Here is what I did

import sublime, sublime_plugin class QuickAccessCommand(sublime_plugin.WindowCommand): def run(self): self.window.show_quick_panel([1,2,3,4,5], self.on_done) def on_done(self, picked): # do nothing

Then I did a key binding to this command…

{ "keys": "ctrl+shift+q"], "command": "quick_access" }

I checked on show_input_panel command as well but that works as expected. Is there something I am doing wrong over here?

0 Likes

#2

import sys
window.show_quick_panel(map(unicode, range(10)), lambda i: sys.stdout.write(str(i)))

You need to pass a list of str/unicode objects

0 Likes