Thanks, Krzys. toggle is listed as a 'common' element, so I thought it would apply. I should have investigated the problem the way you did myself. Besides, toggling buttons between hide and show probably doesn't make much sense. Toggling between disabled/enabled or readonly/enabled might make more sense.
Thanks again, Ray On Fri, Mar 27, 2009 at 4:34 PM, Krzysztof B. Wicher <[email protected]>wrote: > I wouldn't call it a bug ... this method is apparently not implemented for > Shoes::Button class. > Check this: > > Shoes.app :title => "Testing!" do > > @play = button("play", :width=> "100px") > @toggle = button("toggle", :width=> "100px") > > @toggle.click { > > debug("Responds to hide - #[email protected]_to?("hide")}") > debug("Responds to toggle - #[email protected]_to?("toggle")}") > > @play.toggle() > } > end > > Krzys > > > On Fri, Mar 27, 2009 at 7:50 PM, Ray Case <[email protected]> wrote: > >> simple code snippet: >> >> Shoes.app :title => "Testing!" do >> >> @play = button("play", :width=> "100px") >> @toggle = button("toggle", :width=> "100px") >> >> @toggle.click { >> @play.toggle() >> } >> >> end >> >> >> I am using button.toggle for the first time, however when my code hits >> the @play.toggle(), Shoes throws "undefined method 'toggle' for >> (Shoes::Button):Shoes::Button" - I am assuming this is a bug?... >> Also, based on this post, I have a feature request: it would be nice to be >> able to cut and past from the 'Shoes Console' >> >> Thanks, >> Ray Case >> > >
