I can’t get sublime.questionBox to run in ST2, or ST3
**Any idea what is wrong?
**
~ Thanks.
~~Rob
I tried:
sublime.question_box("hi") # doesn't work...
Example, running this at Python console
( sublime.message_dialog(“Hello World!”) # works fine)
view.run_command(“message_dialog”)
import sublime
import sublime_plugin
# run this with at the Python console with:
# view.run_command("message_dialog")
class MessageDialogCommand(sublime_plugin.TextCommand):
""" presents a dialog box, with only a OK button """
def run(self, edit):
sublime.message_dialog("Hello World!")
sublime.questionBox("hi")
Ref:
sublimetext.com/docs/api-reference
[quote]questionBox(string) bool Displays a yes / no message box to the user, return True iff they selected yes.
[/quote]
Error:
File "./tp_message_dialog.py", line 13, in run
sublime.questionBox("hi")
AttributeError: 'module' object has no attribute 'questionBox'
Path on Mac
/Users/RAM_iMac/Library/Application Support/Sublime Text 2/Packages/User/tp_message_dialog.py