On Thu, Apr 23, 2009 at 1:20 PM, Martin DeMello <[email protected]> wrote: > On Thu, Apr 23, 2009 at 10:39 PM, Seth Thomas Rasmussen > <[email protected]> wrote: >> On Thu, Apr 23, 2009 at 12:55 PM, Martin DeMello >> <[email protected]> wrote: >>> Wrote a small shoes-based animation for this week's ruby quiz. Bit too >>> trivial to post to the shoebox, but I thought I'd post it here since >>> it's a nice example of drawing on a canvas rather than creating shapes >>> in the app itself. >> >> Cool! Couple problems I ran into, though: >> >> 1) The instance methods defined outside the app block are not >> accessible inside it. I moved them inside the app block and things >> worked well, except.. > > 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. -- Seth Thomas Rasmussen http://greatseth.com
