There is something with star ... and also with arrow => only the head reacts to clicks.
This is not nice but works: s = image 100,100 do star 50,50, 5, 50, 50 end s.move 300,300 s.click do alert 'bryan' end On Sun, May 24, 2009 at 12:17 AM, Bryan Richardson <[email protected]> wrote: > Weird... the following works perfectly (pointer turns into a finger ready > for clicking and everything): > > t = oval 50, 50, 100 > t.click do > para "ole" > end > > However, the following does not (not even when the :click style is used), > and in this case the pointer doesn't even turn into a finger ready for > clicking: > > s = star :points => 5, :top => 255, :left => 255 > s.click do > alert 'bryan' > end > > Any ideas? Is it just something with star, or something with the arguments > I'm passing to the constructor? > > -- > Thanks! > Bryan > > > On Sat, May 23, 2009 at 4:34 PM, Devyn Cairns <[email protected]> > wrote: >> >> Try using the :click style >> >> Shoes.app do >> t = oval 50, 50, 100, :click => proc { para "ole" } >> end >> >> On Sat, May 23, 2009 at 12:28 PM, Krzysztof B. Wicher <[email protected]> >> wrote: >> > That works fine for me on OSX & latest build: >> > >> > Shoes.app do >> > t=oval 50, 50, 100 >> > t.click do >> > para "ole" >> > end >> > end >> > >> > K >> > >> > On Sat, May 23, 2009 at 7:02 PM, Bryan Richardson <[email protected]> >> > wrote: >> >> Hello all, >> >> >> >> I'm new to Shoes and am doing some testing to see if it will fulfill my >> >> needs. One of the things I'm wanting to use it for is to display a >> >> network >> >> graph, and be able to click nodes in the graph to have them >> >> expand/collapse. So one of my first tests was to create a shape and >> >> see if >> >> I could make things happen when I clicked on the shape. It seems as >> >> though >> >> the 'click' method exists for all Shoes objects, but when I click on >> >> the >> >> shape I created (a star), the code I have in the block passed to the >> >> 'click' >> >> method doesn't get executed. I made sure it wasn't something wrong >> >> with the >> >> code in my block by replacing the shape I created with a button, at >> >> which >> >> point it worked as expected. >> >> >> >> Long question short... is it possible to respond to clicks on shapes?! >> >> >> >> -- >> >> Thanks! >> >> Bryan >> >> >> > >> >> >> >> -- >> ~devyn > >
