#36 addContext call of contextInitialize

closed
WebKit (45)
5
2003-01-15
2002-11-20
Stuart Donaldson
No

The Application addContext() method will not call
contextInitialize() if the module defining the context
has already been loaded. This is a problem if some
other module tries to import something the context
module prior to the context being added. The result is
that a context may be loaded without
contextInitialize() being called.

This patch fixes the above problem by calling
contextInitialize() if the module is not in a the
loaded self._contexts list, or if the module is being
re-loaded under a different name.

It goes on to also print out an error if there is a
problem with importing the module context.

Discussion

  • fix Application.py addContext() method to call contextInitialize()

     
    Attachments
  • Logged In: YES
    user_id=326269

    This will be addressed in the near future, and should be in
    the 0.8 release.

     
    • assigned_to: nobody --> stuartd
     
    • status: open --> closed
     
  • Logged In: YES
    user_id=326269

    Resolved and fixed in CVS.