Skip to content

Instantly share code, notes, and snippets.

@whmountains
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whmountains/dc05d6bbe51fc3e0fa49 to your computer and use it in GitHub Desktop.
Save whmountains/dc05d6bbe51fc3e0fa49 to your computer and use it in GitHub Desktop.
Problems with Tracker.autorun()

I'm trying to write a radio automation app. The version that has to do with this gist is hosted at feathercaster-3e3055d.meteor.com

Pane one shows files and folders. That's irrelevant to the problem.

Pane two shows the contents of the currently open playlist. The toolbar at the top has a playlist switcher. When the user clicks on the dropdown to change the playlist, it fires the event listener located in playlistToolbar.js at line 72. That in turn update the openPlaylistID session variable like this: Session.set('openPlaylistID', playlistID);

I've got a Tracker.autorun() function in playlists.js:23 whose very first line is var openPlaylistID = Session.get('openPlaylistID'); I would expect that the computation would automatically be invalidated and re-run every time the Session variable is changed. That's how things used to work, but I've changed something (I don't know what.), and now that computation never gets re-run. At least, I assume so since my debugger (firebug) never catches breakpoints that I set there.

Help me, I'm sinking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment