[Gtk-osx-devs] [python] Multiple python instances of gtk_osxapplication



Hi there,

I'm using the python bindings to gtk_osxapplication.

A couple of days ago I tried instantiating two  
gtk_osxapplication.OSXApplication()s, which the source seems to  
suggest is ok (at least under C) as the underlying object is a  
singleton. This was to avoid coupling the highest level of my program  
with one of the lowest, which needs access to the bundle paths.

Unfortunately it didn't work (I'm afraid I don't remember the  
details; if anyone is interested I can try to reproduce it).

However it led me to think that it would be an improvement to make  
the functions for querying the bundle info module functions.

   +ve Easier to use as the question of whether or not it is safe to  
instantiate multiple instances of gtk_osxapplication does not arise.
   +ve Less coupling as bundle_id(), bundle_info(), resource_path()  
etc do not actually use their self parameter
   -ve Presumably self is passed to make the python bindings easier;  
probably more work to implement, possibly more work to maintain.

It would be used thus:

   bp = gtk_osxapplication.get_bundle_path()

etc.

Comments appreciated,

cheers,
Richard.





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