Inner scope like putting it in the main app file or something? I mean, we can do that, but it makes the code less convenient and means I have to pass things like template helper functions into every template.

I don’t have quite the hatred of globals most JS people seem to have, but only when they make sense. Global collection objects seem sane, but if it really bugs you I can probably change it.
- Matthew Riley MacPherson | lonelyvegan.com


On November 26, 2013 at 10:24:52 AM, sole (notifications@github.com) wrote:

In www/js/views/checkins.coffee:

> @@ -133,6 +133,12 @@ define ['zepto', 'underscore', 'backbone', 'cs!geo', 'cs!models/checkin', 'cs!mo
>        .fail ->
>          window.alert "Error getting venues!"
>   
> +    showCheckinOptions: (event) ->
> +      window.GLOBALS.Venues.get($(event.currentTarget).data('venue')).done (venue) ->
wow, are globals tucked into window.GLOBALS? I thought there would be some sort of inner scope.
I mean if it works, then fine, but it sort of looks fragile.

—
Reply to this email directly or view it on GitHub.