Displaying 7 results from an estimated 7 matches for "my_button".
Did you mean:
fl_button
2007 Sep 10
2
syntax II
...for 2.0 for a little while, so...
1) Setting up event handlers
In most real apps, I think the most normal way to set up event handlers
is for the event to be dealt with by a corresponding method. At the
moment this has to be done using a block:
evt_button(AN_ID) { on_button_click }
evt_button(my_button.get_id) do | event |
on_button_click(event)
end
evt_size { | event | on_size(event) }
This is a sensible way to organise classes but it seems to have
redundancy in it. The bigger one is having to create a block, with
param, just to call a method; the smaller one is having to call a method
to...
2006 Oct 21
3
wxsugar question
I''ve only had the briefest play with wxSugar and already I like it a lot.
One small question - have you considered some more ''convention over
configuration'' like they do in rails, in particular for event connectors?
So instead of
listen(:button, my_button, my_button_pressed)
you can leave it out entirely and rely on the convention that a button has
a _pressed event (if it exists).
Jay Daley
2007 Sep 17
7
Re : syntax II
...ote :
>1) Setting up event handlers
>
>In most real apps, I think the most normal way to set up event handlers
>is for the event to be dealt with by a corresponding method. At the
>moment this has to be done using a block:
>
>evt_button(AN_ID) { on_button_click }
>evt_button(my_button.get_id) do | event |
> on_button_click(event)
>end
>evt_size { | event | on_size(event) }
>
>So I''d like to suggest as alternatives:
>
>evt_button(AN_ID, :on_button_click)
>evt_button my_button, :on_button_click
>evt_size :on_size
These are very useful addition...
2010 Mar 30
2
My first wxRuby app doesn't work, please help!
....new(@panel,-1,"Label")
@text1 = TextCtrl.new(@panel,-1,"Text Value")
@combo =ComboBox.new(@panel,-1,"Combo Text")
@button =Button.new(@panel,-1,"Submit")
#layout
@sizer = BoxSizer.new(VERTICAL)
@panel.set_sizer(@sizer)
evt_button(@my_button.get_id()) { |event| my_button_click(event)}
@sizer.add(@lbl1,0, GROW|ALL,2)
@sizer.add(@text1,0, GROW|ALL,2)
@sizer.add(@combo,0, GROW|ALL,2)
@sizer.add(@button,0, GROW|ALL,2)
show()
end
def my_button_click(event)
#añádir codigo
puts "Presionado"
end
en...
2007 Oct 23
6
wxRuby 1.9.2
...d-specific fixes in GUI classes
* New and improved samples and documentation, including threads sample
== SYNTAX CHANGES ==
All the syntax additions are backwards compatible. The main change is
that when setting up an event handler that just passes onto a method,
instead of writing:
evt_button(my_button.wx_id) { | e | on_button_click(e) }
You can just write
evt_button my_button, :on_button_click
Phew! There''s more information in the event handling tutorial in the
docs. Also, for simple apps, instead of having to create a custom
Wx::App subclass, you can run an app like this:
Wx::App...
2006 Sep 07
2
A little bit of sugar
Hi
Do a search on ''wxruby'' and you''ll see that people''s main gripes are 1)
stability 2) development progress 3) documentation and 4) syntax.
We''re making great progress on 1-3 so thought it seemed like a good time
to start looking at 4). So here''s announcing a first release of WxSugar.
It can be downloaded via gems (gem install wx_sugar)
2006 Dec 18
13
unit testing wxruby GUIs
paul.allton at uk.bnpparibas.com wrote:
> I''m a big fan of automated UI testing (i.e. driving the UI from some
robot API). I appreciate this
> is potentially a whole new project, but does wxwidgets provide a
method of clicking buttons,
> typing into components ... if so, would it be technically possible to
expose this in wxruby.
I like automated UI testing too, but