James Henstridge <[EMAIL PROTECTED]> writes: > Christian Reis wrote: > > >Would it be correct, according to Python semantics, to pre-copy of > >the object then? And if so, what are the drawbacks of implementing > >things that way? > > > The drawback is that a number of GTK APIs simply don't work if you copy > the boxed arguments. We used to copy boxed arguments (which has the > benefit that it is safe to keep references to boxed objects passed as > arguments to signals), but we changed it for this reason.
Would it be worthwhile to mark the python object as invalid somehow when the signal handler finished? E.g. set a flag that it's invalid or simply set the pointer to the boxed object to NULL and all attempts to access attributes later on will raise an exception? This would have saved me some time when I tried to figure out why some things in Sketch didn't work anymore after switching to gtk2. Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://www.mapit.de/ _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
