Home Download Buy Blog Forum Support

Build 3010

Re: Build 3010

Postby facelessuser on Fri Feb 08, 2013 10:22 pm

I am seeing an issue with Build 3010 where if you create a global variable in plugin_loaded, it does not always make it to globals.

For instance, if I create a settings object to access later, I find that sometimes it won't exist when the plugin gets loaded:

Code: Select all
def plugin_loaded():
    global sh_settings
    sh_settings = sublime.load_settings('scope_hunter.sublime-settings')

And then when the plugin tries to access it later:
Code: Select all
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 205, in on_selection_modified
  File "C:\Users\muse_i\AppData\Roaming\Sublime Text 3\Packages\ScopeHunter\scope_hunter.py", line 178, in on_selection_modified
  File "C:\Users\muse_i\AppData\Roaming\Sublime Text 3\Packages\ScopeHunter\scope_hunter.py", line 171, in clear_regions
    if self.enabled and bool(sh_settings.get("highlight_extent", False)) and len(view.get_regions("scope_hunter")):
NameError: global name 'sh_settings' is not defined

I have at least confirmed this on Windows so far.
Posts: 1780
Joined: Tue Apr 05, 2011 7:38 pm

Re: Build 3010

Postby facelessuser on Sat Feb 09, 2013 12:03 am

It appears what actually happened is a little weirder. I was dynamically importing some library based on the system platform inside of plugin_loaded on the first plugin, and that caused some kind of error, then in the second plugin I was seeing the issue where the settings initialization in the other plugin in plugin_loaded did not work. There seems to be some kind of dynamics involved if one plugin screws up in plugin_loaded, others can have side-effects in plugin_loaded as well.
Posts: 1780
Joined: Tue Apr 05, 2011 7:38 pm

Re: Build 3010

Postby unphased on Sat Feb 09, 2013 3:01 am

So today's my first day with my new rMBP and the performance of scrolling on ST2 leaves **much** to be desired.

I actually came onto the forum here to start a thread about how I figured that using a GPU texture buffer to perform scrolling would help for the framerate and also would provide a battery life improvement.

Needless to say I am glad to find out about this build :)

Is there any way I can evaluate it without ponying up 70 bones? I've been spending a lot lately.

Update: Just went through with my purchase. Went quite smoothly, too, I like the process (and how I am free to install on all my computers). Already gotten a hell of a lot more than $70 worth of productivity out of ST2 already anyhow.
Posts: 29
Joined: Thu May 17, 2012 5:16 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 12 guests