On Thu, Apr 23, 2009 at 1:36 PM, Martin DeMello <[email protected]> wrote: > On Thu, Apr 23, 2009 at 10:55 PM, Seth Thomas Rasmussen > <[email protected]> wrote: >>> >>> Which version of shoes are you using? This worked nicely for me - they >>> aren't really instance methods, they're toplevel methods that access >>> the shoes bit via the global $canvas object (my philosophy of shoes is >>> that if you're writing something small and quick, globals are your >>> friend) >> >> shoes policeman (0.r1229) [i686-darwin8.9.1] >> >> The initial problem I had was that reset_grid was not defined on the >> Shoes::App object. I just moved everything in the app block and that >> worked. > > That's odd - I'm using shoes policeman (0.r1229) [i686-linux] and it > worked perfectly. Also, it really should work - reset_grid is defined > at top level, so it should be a valid "global method".
I'm not sure about this. My understanding is that the main app file is evaluated in the context of Shoes, so those methods would be instance methods on Shoes. The app block is an instance of Shoes::App. Something is broken here, I'm just not sure what. :) -- Seth Thomas Rasmussen http://greatseth.com
