Displaying 20 results from an estimated 20 matches for "evt_close".
Did you mean:
el3_close
2007 Sep 16
1
evt_close
Salut Alex. Quand j''utilise:
evt_close() {|event| on_sortie}
def on_sortie
@fich1 = nil
end
dans mon application, ça désactive complètement la fermeture. Pourquoi?
J''aimerai pouvoir créer un évenement à la fermeture de mon application, quand je la ferme avec window manager, qui pourrait me permettre d''initialiser ma v...
2007 May 31
0
[1043] trunk/wxruby2/samples/bigdemo: Don''t manually call destroy
...lt;span class="cx">
</span><span class="cx"> button = Button.new(panel, -1, "Close me", Point.new(15,15))
</span><span class="cx"> evt_button( button.get_id ) { on_close_me }
</span><del>- evt_close { on_close_window }
</del><ins>+ evt_close { | e | on_close_window(e) }
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def on_close_me
</span><span class="c...
2009 Dec 11
2
Closing event on a Notebook page.
How do I catch a closing event for a Notebook page.
I have added a number of pages (class Panel) to a Notebook and I
can remove them via the default close button on the pane.
But I what to run some code before the page(Panel) is closed,
so I assumed that it gets a ''evt_close'', but that seems not to be
the case.
How do I get to run some code before the page(Panel) closes?
2007 Dec 27
1
Wx::SplashScreen, and events
...class TimeSplash < Wx::SplashScreen
PATH_MAIN = 1
PATH_SETUP = 0
def initialize(time, path=PATH_MAIN)
splash_bitmap = Wx::Bitmap.new(''timefly.png'', Wx::BITMAP_TYPE_PNG)
super(splash_bitmap,
Wx::SPLASH_CENTRE_ON_SCREEN|Wx::SPLASH_TIMEOUT, time, nil, -1)
evt_close() {|evt| on_close_window(evt, path)}
end
def on_close_window(evt, path)
if path == PATH_MAIN
print "main app!"
elsif path == PATH_SETUP
print "setup!"
end
self.destroy()
end
end
=======================================
Now I''m...
2005 May 08
1
ruby destructor hooks
...s "notify" method is called, it gives a "pure
virtual method call" error (wxruby 0.6.0).
I''ve tried several different things to clean up the subscribers list as
controls are destroyed, but without success:
WeakRef
ObjectSpace.define_finalizer(subscriber)
subscriber.evt_close() { | e | delete_subscriber(subscriber) }
The last seems to be the most promising, but it doesn''t work for all the
control types that can be subscribers - only for frames. Is there
something universal to all Wx controls that I could try?
cheers
alex
2008 Mar 06
2
How to set exit on close??
I want to set close window when press ''X'' in top-right I make wxruby GUI
from Farpy guie but I can''t close it (when I close I must press close in
cmd and the return -1) how can I set it??
Attachments:
http://www.ruby-forum.com/attachment/1521/untitled.JPG
--
Posted via http://www.ruby-forum.com/.
2005 May 03
4
Wx::HtmlWindow.on_link_clicked
...lt;/a><br />
<a href="mailto:dmiceman@mail.ru">mail me</a><br />
</body>
</html>
EOF
sizer.add html, 1, Wx::EXPAND
dialog.set_size Wx::Size.new(400, 300)
dialog.center_on_screen Wx::BOTH
dialog.show true
dialog.evt_close do exit_main_loop end
end
end
app = App.new
app.main_loop
=====================================================
--
Dmitry mailto:dmiceman@ubiz.ru
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.o...
2008 Jan 19
5
No joy from Wx::App.dispatch, Wx::App.yield...
OK, back with another iteration of the same problem... I updated my
game demo, but the Close button failed to respond when (and only when)
there were too many objects onscreen. The drawing loop is probably
lasting longer than my drawing timer interval. I was able to
reproduce the problem in my (probably familiar by now) test script
just by boosting the number of lines drawn per frame.
After
2004 Apr 21
2
Resizing a ListCtrl
...SITION, Size.new(250,
200),
LC_REPORT | LC_SINGLE_SEL)
fillListCtrl()
centerSizer.add(@fileList, 6, GROW|EXPAND)
# }}}
@dlgSizer.add(centerSizer, 1)
@dlgSizer.set_size_hints(self)
set_sizer(@dlgSizer)
# end main layout }}}
## global events {{{
evt_close {onClose}
evt_size() {|event| onSize(event) }
# }}}
end ## }}}
def onClose ## {{{
destroy()
end ## }}}
def onSize(event=nil)
frame_size = event.get_size
x = frame_size.x - 10
y = frame_size.y - 10
@fileList.set_size_xy(x, y)
event.skip() if event
e...
2007 Jul 25
11
taskbaricon
Salut alex, j''ai un petit souci.
quand j''utilise "demotaskbaricon" avec traducteur-wxruby, que j''ouvre mon application(donc l''icone apparaît dans la barre de lancement rapide) et que je ferme mon application, l''icone disparaît tout de suite.
Mais quand je l''utilise avec l''exemple Wizard et que je ferme mon application
2004 Jun 11
9
Handling Events that don''t take an ID
Hey Kevin,
Am I correct in assuming that if I want a particular widget to respond to an
event which doesn''t take an ID as an argument (like evt_size or
evt_left_down), that I have to inherit a new widget and define the event
handler within the inherited class? Here''s a little contrived code example
to illustrate what I mean:
class MyCtrl < Wx::TextCtrl
def
2007 Oct 03
0
[ wxruby-Patches-14416 ] Patch for Bug [#12747] Crash on exit
...e menu. Now the method close_all tries to close both windows. But one is already destroyed so the app crashes.
I solved this by defining an attribute @closed = false in the MinimalFrame and defining a method closed? which returns the @closed attribute.
The close event sets this attribute to true
(evt_close { |e| @closed = true, e.skip })
And then I changed the on_activate and close_all method to this:
def on_activate(event)
if !closed?
if event.get_active
puts "Frame ''#{get_title}'' became activated"
set_status_text ''Active''...
2006 Sep 17
1
run.rb
This is a first stab at a run.rb file that will let you run a sample in
the bigdemo directory by itself.
You have to add the following to the bottom of every sample file:
if __FILE__ == $0
load "run.rb"
run(File.basename($0))
end
Roy
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
....rb ====================================================
require ''wx''
require ''sample1.rb''
class DIA_Frame < DiaFrame
def on_init
set_affirmative_id(Wx::ID_YES)
set_escape_id(Wx::ID_NO)
end
end
class Main_Frame < MainFrame
def on_init
evt_close { confirm_closure }
evt_button(@m_butexit) {self.close}
end
def confirm_closure
dlg = DIA_Frame.new
if(dlg.show_modal==Wx::ID_YES) then
dlg.end_modal(Wx::ID_YES)
self.destroy
end
end
end
class MyApp < Wx::App
def on_init
main_frame = Main_Frame.new()...
2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
...LUE evt_set_focus(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_SET_FOCUS);
-}
-
-static VALUE evt_kill_focus(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_KILL_FOCUS);
-}
-
-static VALUE evt_close(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_CLOSE_WINDOW);
-}
-
-static VALUE evt_idle(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_IDLE);
-}
-
-static VALUE evt_show(int argc, VALUE *...
2006 Dec 02
7
Gauge Problem with XRC?
Hi
I''ve just started using wxruby2-preview-0.0.36-i386-mswin32
outsourcing layout part to the external XRC file. Almost everything
seems to be fine. Only that I can never retrieve Gauge objects in the
main script. What I''ve been trying is something like this:
class MainFrame < Wx::Frame
include Wx
def initialize(parent)
super(nil,-1, "")
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 Nov 13
7
[736] trunk/wxruby2/samples/dialogs/dialogs.rb: Fixed crashing bug in on_paint and made the code style more Ruby like.
...lt;/ins><span class="cx">
</span><del>- evt_button(DIALOGS_MODELESS_BTN) {|event| onButton(event) }
</del><ins>+ evt_button(DIALOGS_MODELESS_BTN) {|event| on_button(event) }
</ins><span class="cx">
</span><del>- evt_close() {|event| onClose(event) }
</del><ins>+ evt_close() {|event| on_close(event) }
</ins><span class="cx">
</span><span class="cx"> end
</span><span class="cx">
</span><del>- def onButton(event)
</del&...
2007 Jun 25
0
[1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
...CALENDAR_DAY_CHANGED => Wx::CalendarEvent,
- Wx::EVT_CALENDAR_MONTH_CHANGED => Wx::CalendarEvent,
- Wx::EVT_CALENDAR_YEAR_CHANGED => Wx::CalendarEvent,
- Wx::EVT_CALENDAR_DOUBLECLICKED => Wx::CalendarEvent,
- Wx::EVT_CALENDAR_WEEKDAY_CLICKED => Wx::CalendarEvent,
- Wx::EVT_CLOSE_WINDOW => Wx::CloseEvent,
- Wx::EVT_COMMAND_BUTTON_CLICKED => Wx::CommandEvent,
- Wx::EVT_COMMAND_CHECKBOX_CLICKED => Wx::CommandEvent,
- Wx::EVT_COMMAND_CHOICE_SELECTED => Wx::CommandEvent,
- Wx::EVT_COMMAND_LISTBOX_SELECTED => Wx::CommandEvent,
- Wx::EVT_COMMAND_LIST...
2005 Aug 15
16
swig_up
Tracing down some things to add in validators and I''ve run across
something that kinda bothers me...
In order to implement validators you have to override the clone method.
The directors seems to be set up to specifically handle this situation.
However, whenever C++ calls back to the object''s methods the swig_get_up
function is returning false. It seems like swig_up