Rob Brown-Bayliss <[EMAIL PROTECTED]> writes in message
<[EMAIL PROTECTED]>:
|
| On Thu, 2002-08-15 at 07:07, Pavel Zaitsev wrote:
| > Hi, gtker's
"Hi list!" from another noobie at pygtk (and gtk in general :)
| > What are advantages of using pygtk 2.0 over 0.6 or
| > 1.4, which are not based on 2.0 gtk?
|
| It's the future man, sooner or later the older versions of both GTK+ and
| pygtk are going to be unsupported, it might take a while, but it will
| happen.
|
| In the mean time, since you are just starting out you have no legacy
| code to hang on too so why not take the plunge today?
Damn, so I guess all that time i just spent getting to know
pygtk on my mandrake8.2 system is wasted?
korg@firewall ~ $ rpm -q pygtk
pygtk-0.6.8-7mdk
Doh!
(How embarrasing that redhat7.3 has pygtk-0.6.9-3 (and still only
python-1.5.2 :))
Anyway, stuff that i've learned in climbing the learning
cliff... (FAQbait?)
1) How do I make control-C work in the terminal window?
(Im assuming it's that environ variable Ive read about
but not bothered to set yet and now cant make google find
for me, nope, PYGTK_FATAL_EXCEPTIONS doesnt seem to do it )-:
def play1(s):
while gtk.events_pending():
gtk.mainiteration()
def play(s)
while s.active: s.play()
and if I call:
object.play()
that does it, but it should be in the faq (plus I need to keep
track of an active flag :)
2) If I use multiple boxes and hide()/show() to flip 'screen
modes', I cant pack a common object between them all?
I have a 4 HBox dice rolling program (that only every
hase one metaHBox show()ed and hide()s the rest) and I tried to
create a single 'back button' and pack it into each HBox
but it wouldnt appear (Im assuming you cant link an object
into multiple places in the widget structure?)
3) You cant access dir(object) or object.__dict__ ... ok,
scratch that, you can access dir(object)
I was going to say that that would be handy for finding
the 'right call' or what you can do to an object (rather
than just getting back _o, which is what __dict__ returns).
(for example, it took a while to find how to get the
number of rows in a CList, but maybe I was looking at ver2
doc's on the web, rather than 0.6)
[ ok, ignore this point :) ]
4) Docs :)
I found
http://gtkmm.sourceforge.net/docs/gtk/class_index.html
to be very useful (it mostly seems to apply to pygtk in
helping show what methods are avilable etc). Any chance
of creating an autogenerated thing like this? It rocks. :)
5) the tutorial is __EXCELLENT__!!!
http://www.moeraki.com/pygtktutorial/gtk-tut.html
It's a great learning tool!!!! Great work there!!
6) If I have a list of things that I want to turn into
buttons (skills for my roleplaying dice rolling program)
is there any kind of box that will just pack them all in
the space available?
The button text will be an unknown number of unknown
length strings like: "drive", "dodge", "leap to my feet", etc
so I cant just make it a list of 2*n buttons because it'd
look weird if it was
[drive][dodge]
[leap to my feet][hot wire f16]
vrs
[drive][dodge]
[leap to my feet]
[hot wire f16]
It would be better if there was a widget to pack stuff in
in an 'optimal' way. (I realise that is probably impossible
:)
Let me guess, I should make all the buttons, sort through
them using get_usize and then repack them myself? :)
ALl in all, pygtk is an excellent package wrapping an
excellent GUI ibrary :). It's suddenly made fighting
with UI's easy! :)
cheers,
cam
--
/ `Rev Dr' [EMAIL PROTECTED] Roleplaying, virtual goth \
< http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM >
\ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire /
---------- Random Quote ----------
This Fortune Examined By INSPECTOR NO. 2-14
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/