On Wed, 5 Nov 2003 17:06:25 +0100
mc collilieux <[EMAIL PROTECTED]> wrote:

> Yes, I use ItemFactory, I have only imitate the example in the
> pygtk-tutorial. 

I'm not sure what's going on.  It is annoying, I can't replicate the
problem with the tutorial's example code.  I tried James' suggestion of
putting gc.collect() in the example code, but the menu still works fine
there.

> What do you mean by "keep a reference" ? How can I do that ? 

I just store a reference as a member variable.  e.g.

 self.item_factory = gtk.ItemFactory(gtk.MenuBar, "<main>", accel_group)

Storing it where I could retrieve it later prevents the garbage
collector from tidying it up.  A global variable would work to, but of
course "global vars are bad".

> Your idea is good, I have replace ItemFactory by 'hard' method and my
> menubar is always visible
> Ouf, an impossible problem has a answer (of course !) but I can't more
> understand the link between ItemFactory and MySQLdb !

It's strange!

> Thanks very much
> Who said amways at the end of the clip "I am happy" ?
> -- 
> Marie-Claude Collilieux
> Bretagne 
> 

Cheers, David.
http://www.linuxsoftware.co.nz
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to