Re: [pygtk] Hooking into Gtk iterations

1999-02-25 Thread Hrvoje Niksic

James Henstridge [EMAIL PROTECTED] writes:

 As for doing a python no op, I have no idea how python triggers the
 calling of signal handlers

The signal handlers are queued up somewhere; Python will empty the
queue as soon as it gets the chance -- I'm certain of that.  A no-op
would be quite sufficient for that.

 (does it have anything to do with the threading code?).

I don't think so, no.
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Hooking into Gtk iterations

1999-02-25 Thread Hrvoje Niksic

Aaron Optimizer Digulla [EMAIL PROTECTED] writes:

 The only solution I see is to add a timer:
 
 def wakeup:
   pass
 
 timeout_add (100, wakeup)

I know of this solution and I will not use it, because it disallows my
program from ever being swapped out -- it continually consumes CPU
instead of simply waiting in poll() when nothing happens.  This is
(for me) inexcusable.

   (does it have anything to do with the threading code?).
  I don't think so, no.
 
 Yes, that's the same. Threading doesn't work with the current
 implementation of Gtk because all Python threads are dead as long as
 Gtk waits in its mainloop for events (no Python code is executed -
 Python can't switch the threads).

This is brain-dead on the part of Python, but that's another matter.
:-(
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Hooking into Gtk iterations

1999-02-25 Thread Aaron Optimizer Digulla

Quoting Hrvoje Niksic [EMAIL PROTECTED]:

(does it have anything to do with the threading code?).
   I don't think so, no.
  Yes, that's the same. Threading doesn't work with the current
  implementation of Gtk because all Python threads are dead as long as
  Gtk waits in its mainloop for events (no Python code is executed -
  Python can't switch the threads).
 This is brain-dead on the part of Python, but that's another matter.
 :-(

No, actually it´s braindead of Gtk but then, all X toolkits work this way.
Tcl has the same problem as well as Motif. I don´t know how Qt handles
this but I doubt that they can do this.

-- 
Aaron "Optimizer" Digulla Team AMIGA AROS Head of Development
Author of XDME, ResTrackLib, CInt. http://www.aros.org/
"(to) optimize: Make a program faster by improving the algorithms rather than
by buying a faster machine."   [EMAIL PROTECTED]
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] I can't make work set_active

1999-02-25 Thread James Henstridge

Do you get the same errors if you call set_active before connecting to its
signals?  That is what I usually do.  The way you have your code, that
page of the property box will always look as if it has had changes applied
to it, since the call to changed() will always be made.

As for the segfault, at the time when you call set_active(), had you added
any pages to the property box?  My guess is that the segfault was caused
because there wasn't an `active page'.

James Henstridge.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Thu, 25 Feb 1999 [EMAIL PROTECTED] wrote:

 I have a really really weird and nasty bug in my aplication with
 set_active.
 I instance to RadioButtons and try to set active the one that isn't
 pressed by default, and my application dumps a core.
 The worst thing is that I tried to program a simple example where I can
 show the bug. But the simple example doesn't dump any core and works
 correctly . I can't repeat my bug :-(
 
 Does anyone know I can use the core for something I doesn't have any
 simbol information attached, just hex adresses.
 If any one cares to se the program it is in
 ftp://uxmcc3.iimas.unam.mx/pub/gvoice/gvoice_bug.tar.gz
 you run it with gvoice.py and for instaling it needs to be in your path
 go to the directory were you untared it and run PATH=$PATH:$PWD
 For see the bug go to the menu configure and chosse properties.
 
 Here is the funccion where it happends (the last instruccion is were it
   breaks):
 
 def create_bit_num(self):
   bit_num_box = GtkHButtonBox()
   self.pack_start(bit_num_box)
   bit_num_box.show()
   bit_label = GtkLabel()
   bit_label.set_text("Choose sample size:")
   bit_num_box.pack_start(bit_label)
   bit_label.show()
   self.bit_num_button16 = GtkRadioButton(None, "16 bits")
 self.bit_num_button16.connect("clicked",self.properties_box.changed)
   bit_num_box.pack_start(self.bit_num_button16)
   self.bit_num_button16.show()
   self.bit_num_button8 = GtkRadioButton(self.bit_num_button16, "8 bits")
 self.bit_num_button8.connect("clicked",self.properties_box.changed)
   bit_num_box.pack_start(self.bit_num_button8)
   self.bit_num_button8.show()
   set_active_8_button = GtkButton ("set_active_8_button")
   set_active_8_button.connect("clicked", self.set_active_8)
   bit_num_box.pack_start(set_active_8_button)
   set_active_8_button.show()
   self.bit_num_button8.set_active(1) # HERE I GET THE CORE
   
   Thanks...
 
 To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] gnome-python in 1.0 pre

1999-02-25 Thread James Henstridge

Yeah I know ... I put it there.  Anyhow, you aren't supposed to be looking
in that directory right now :)  The copy in /pub/GNOME/sources/latest is
the same, except for the version number.

James Henstridge.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Thu, 25 Feb 1999, David M. Cook wrote:

 gnome-python has finally made it into the gnome distribution:
 
 ftp://gnomeftp.wgn.net/pub/gnome/sources/gnome-1.0-pre
 
 Dave Cook
 To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]