jisaacks / MaxPane

Sublime Text plugin to quickly maximize a pane in a multi pane layout without resetting the layout.
MIT License
78 stars 9 forks source link

Getting error in console #1

Closed aziz closed 10 years ago

aziz commented 11 years ago

Hope you can fix it asap

AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 205, in on_activated
  File "./sublime_plugin.py", line 154, in run_timed_function
  File "./sublime_plugin.py", line 204, in <lambda>
  File "./max_pane.py", line 162, in on_activated
  File "./max_pane.py", line 12, in isWindowMaximized
  File "./max_pane.py", line 52, in hasLayout
AttributeError: 'NoneType' object has no attribute 'id'
jisaacks commented 11 years ago

This line here is where it sets/grabs the window object. Later it tries to call id() on that window.

It looks like somehow it is not finding a window. This is weird because I am falling back to the active window:

w = view.window() or sublime.active_window()

I thought there should always be an active window. I would try printing w right below that line and see what it is. If is it none, maybe that function should just short circuit itself. If it does have a window at that point I would follow the stack trace and see at what point the reference becomes NoneType

jisaacks commented 10 years ago

@aziz Did you ever follow up on my instructions? Are you still having issues?

aziz commented 10 years ago

This one is fixed I guess, I don't see this error anymore. Thanks for this great plugin.

jisaacks commented 10 years ago

Cool. :)