[Glade-users] RE : Re: RE : Re: Glade-3 with python



This was the right solution! Thanks!

The weird think is that with mono it works perfectly. Maybe this property is set to true within the wrapper...


Eric Streit <Eric.Streit at wanadoo.fr> a ?crit : -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,


I just tested your glade file (glade3) and, yes, you didn't set yhe
window visible: it's on the third tab on the property panel


after setting the window "visible", everything will be  fine


Eric!
- -----
ps: I join the file corrected



Alexandre Petitjean a ?crit :
The wrong things is that the nothing is visible and I can't find visible
property...

And the same glade file is working inside a mono project...

I attached python code and both glade 2 and 3 file.

*/Tristan Van Berkom /* a ?crit :

    Alexandre Petitjean wrote:
    [...]
    > this work with a glade-2 file but not with glade-3...
    > Is it a glade error or my python code wich is wrong ?

    Hi,
    Your python code that is binding to libglade should
    remain the same - can you please describe more precicely
    what you mean by "doesnt work" ?

    If your windows are not showing up - do they have the "visible"
    property set to TRUE ?

    Could you please send the glade file generated by glade-2, that
    after you saved it in glade-3 stopped working properly ?
    (This way we can quickly identify any possible bugs of that nature).

    Cheers,
    -Tristan


------------------------------------------------------------------------
D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos
questions ! Profitez des connaissances, des opinions et des exp?riences
des internautes sur Yahoo! Questions/R?ponses
.


------------------------------------------------------------------------

#!/usr/bin/env python

import sys
try:
 import pygtk
 pygtk.require("2.0")
except:
 pass
try:
 import gtk
 import gtk.glade
except:
 sys.exit(1)
 
class HellowWorldGTK:

 def __init__(self):
  #Set the Glade file
  self.gladefile = 'pyHelloWorld.glade3'
#  self.gladefile = 'pyhelloworld.glade2'
  self.wTree = gtk.glade.XML(self.gladefile) 

  #Get the Main Window, and connect the "destroy" event
  dic = { "on_btnHelloWorld_clicked" : self.on_btnHelloWorld_clicked,
     "destroy" : gtk.main_quit }
  
  self.wTree.signal_autoconnect(dic)
 
 def on_btnHelloWorld_clicked(self, widget):
  print "Hello world"
  
if __name__ == "__main__":
 hwg = HellowWorldGTK()
 gtk.main()


------------------------------------------------------------------------

_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFRwcJkouUNm4lemwRAmDPAKC6i0qiyVyCpekM3XwGXHdwbox8GACdELDt
eoQh2EWspVo8D2TTv8xiB14=
=v1W7
-----END PGP SIGNATURE-----




  
    
True

    
Hello ?

    
GTK_WIN_POS_CENTER

    
    
    
      
        
True

        
          
            
True

            
Please click on the button!

          
        
        
          
            
True

            
Click me!

            
          
          

            
1

          

        
      
    
  



                
---------------------------------
 D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! Profitez des connaissances, des 
opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20061031/09d18740/attachment.html 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]