On Wed, Jun 18, 2008 at 06:07:39PM -0700, Martin DeMello wrote:
> Shoes.app :width => 800, :height => 630 do
> 
>   fill "#2F2"
>   rect(0,0,200,200)
> 
>   keypress {|key|
>     fill "#22F"
>     rect(0,0,100,100)
>   }
> 
> end
> 
> $ shoes testapp.rb # press a key
> testapp.rb:8: [BUG] Segmentation fault
> ruby 1.8.6 (2007-09-24) [i486-linux]

Use `append` to add to a slot after it's been created:

  keypress do |key|
    append do
      fill "#22F"
      rect(0, 0, 100, 100)
    end
  end
 
Sorry about the segfault.  Since I've got the `start` event going
now, I should be able to handle that.

_why

Reply via email to