shoes / shoes4

Shoes 4 : the next version of Shoes
Other
1.59k stars 194 forks source link

samples/simple-sphere.rb crashes #531

Open wasnotrice opened 10 years ago

wasnotrice commented 10 years ago

This looks like some missing argument parsing for image:

dingo:shoes4 eric$ bin/shoes samples/simple-sphere.rb
ArgumentError: wrong number of arguments calling `image` (3 for 2)
                  (root) at /Users/eric/code/shoes4/samples/simple-sphere.rb:2
           instance_eval at org/jruby/RubyBasicObject.java:1536
  create_execution_block at /Users/eric/code/shoes4/lib/shoes/app.rb:148
                    call at org/jruby/RubyProc.java:271
              eval_block at /Users/eric/code/shoes4/lib/shoes/slot.rb:47
              initialize at /Users/eric/code/shoes4/lib/shoes/slot.rb:19
              eval_block at /Users/eric/code/shoes4/lib/shoes/app.rb:142
              eval_block at /Users/eric/.rvm/gems/jruby-1.7.8@shoes/gems/after_do-0.2.2/lib/after_do.rb:89
              initialize at /Users/eric/code/shoes4/lib/shoes/app.rb:42
                     app at /Users/eric/code/shoes4/lib/shoes/app.rb:15
                  (root) at /Users/eric/code/shoes4/samples/simple-sphere.rb:1
                    load at org/jruby/RubyKernel.java:1103
                  (root) at /Users/eric/code/shoes4/lib/shoes/cli.rb:1
             execute_app at /Users/eric/code/shoes4/lib/shoes/cli.rb:73
                  (root) at /Users/eric/code/shoes4/bin/ruby-shoes:6
younes-io commented 10 years ago

I do have the same issue.

PragTob commented 10 years ago

This is basically #292 - e.g. the image use here oughts to create a new image given dimensions and a block. The sample uses this over and over again to paint things.

This is one of the more under used shoes functionalities afaik and I don't think it needs to be in the alpha (not even the rc..) moving it to 4.1 for now.

Please do argue for this feature if you want it in alpha/rc over at #292 !

ccoupe commented 10 years ago

It crashes in Shoes 3.2 but only for 64 bit architecture (blur) and it's totally undocumented in shoes what the filters do. It way down my list of things to fix for 3.2 and I've spent a lot of gdb keystrokes trying find it.

charlesetc commented 10 years ago

There are two issues in the sample. Blur doesn't work, and the shape changes self, so you have to define the app ( app = self ) and call things like app.oval inside the shape blocks.