On Fri, Oct 3, 2008 at 8:48 PM, Seth Thomas Rasmussen < [EMAIL PROTECTED]> wrote:
> On Fri, Oct 3, 2008 at 7:35 AM, Jo Vermeulen <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I would like to create my own custom widgets since this is a lot easier > to > > keep things organized. What is the easy way to do this? It seems I can > > derive my custom widget from Shoes::Widget, but then I get other weird > > errors (e.g. "undefined method 'downcase' for Nil:NilClass", shoes.rb > line > > 359). > > If they are definied in an external file, you have to declare the > class in the Shoes namespace. > > class Shoes::Thing < Shoes::Widget > > I think the word is that this is changing sometime, but for now that > oughta do it. > Thanks, that works. Is there any documentation about the interface of Widget? I was wondering if there is something like a Paint method (maybe 'draw') that I can use to draw its contents. I'm doing everything in the initialize method now. It would be nice to be able to update the widget, and just call its draw method again, knowing that this draw method would actually be used to draw the widget's contents everytime. -- Jo
