librelist archives

« back to archive

button question (yes, button question)

button question (yes, button question)

From:
J. Kaiden
Date:
2011-08-23 @ 23:23
hey folks,

  i've got a quick question about buttons...  is there a way to tell a
button it's been clicked, even if it hasn't?  i remember in ruby-gtk there's
an #activate method for buttons which would allow you to do something like
this...

  btn = button{para "hi"}
  btn.activate

  ...and you'd see your para without clicking on the button.  i've looked
through all the methods for `button`, and haven't found anything - can i
fake the thing out somehow?

  thanks,

  - j

Re: [shoes] button question (yes, button question)

From:
Steve Klabnik
Date:
2011-08-24 @ 01:24
hm. I don't think so, at least in Red Shoes... eventually, we'll want
something like this for shoes-cucumber, though. :)

Re: [shoes] button question (yes, button question)

From:
ashbb
Date:
2011-08-24 @ 11:26
Hi J and folks,

How about this one?

Shoes.app do
  blk = proc{para 'hi'}
  button 'say', &blk
  blk.call
end

This is FAKE, though... :-P

ashbb

Re: [shoes] button question (yes, button question)

From:
J. Kaiden
Date:
2011-08-24 @ 15:30
>
> How about this one?
>
> Shoes.app do
>   blk = proc{para 'hi'}
>   button 'say', &blk
>   blk.call
> end
>
> This is FAKE, though... :-P



  fake will work just fine in this case ;)
  thanks for the idea!

 - j