title: Accessing the Quick Panel in a Sublime Text 2 Plugin
body: <p>I'm in the process of learning how to create Sublime Text 2 plugins.  One of the things that I would like to do is take any highlighted text, check if a website will return a 200 at that address, and then place some information into the quick panel (and yes, I know that I should be doing the url lookup in a thread so that it doesn't block the main UI).  Currently I have:</p>
  
  <pre><code>import sublime
  import sublime_plugin
  import urllib2
  
  class CheckUrlPanel(sublime_plugin.WindowCommand):
  
  def quick_panel(self, messages, flags):
      self.window.show_quick_panel(messages, None, flags)
  
  class CheckUrlsCommand(sublime_plugin.TextCommand):
  
  def run(self, edit):
      urls = []
      selections = self.view.sel()
      for selection in selections:
          urls.append(self.view.substr(selection))
  
      messages = self.validate_urls(urls)
      panel = CheckUrlPanel()
      panel.quick_panel(messages, sublime.MONOSPACE_FONT)
  
  def validate_urls(self, urls):
      messages = []
      for url in urls:
          try:
              request = urllib2.Request(url, headers={ "User-Agent" : "Sublime URL Checker" }) 
              response = urllib2.urlopen(request, timeout=3)
              message = '"%s" is a valid URL.' % url
          except Exception as (e):
              message = '"%s" is an invalid URL.' % url
  
          messages.append(message)
  
      return messages
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>Traceback (most recent call last):
  File "./sublime_plugin.py", line 362, in run_
  File "./CheckUrls.py", line 19, in run
    panel = CheckUrlPanel()
    TypeError: __init__() takes exactly 2 arguments (1 given)
  </code></pre>
  
  <p>The problem is that I don't know how to initialize the WindowCommand class correctly, and I can't seem to find any documentation on it.  Any help or hints here would be much appreciated.</p>