Sarah Allen wrote:
> So, I've got a couple of 5th grade assistants-in-training experimenting
> with lessons for tomorrow's Shoes class #2.  They have been exploring
> boundaires and came up with this app:
> 
> Shoes.app do
>     fill yellow
>     stroke blue
>     rect :left => 1, :top => 1, :width => 100000000
> end
> 
> we were puzzled by the results (see image here:
> http://skitch.com/raptorx/bt8qe/shoes ) which appear to create a really
> tiny box instead of a really big one.  I wondered whether there is some
> size limit or rollover  which causes this behavior.
> 
> Thanks,
> Sarah
> 
> 
> 

>From your screen shot it looks like you are on a mac so:

$ irb
>> 100000000.class
=> Fixnum
>> 100000000.size
=> 4

The size is 4 bytes, so the max size of a Fixnum on a mac is
2^((4*8)-1), or 2,147,483,648.

On my kde linux system, your example blows up with a segmentation fault.
 Removing one of the zeros and I duplicate your tiny box.  Removing
another zero and the box drawn is beyond the window boundaries.  As an
exercise, you might have them discover at what width value the problem
occurs and does the problem occur at the same width if the height is
varied.  ;)

My first WAG would be to suspect a window manager limitation is being
exceeded.

Have fun,
Roy

Reply via email to