From: dpvc v. a. <we...@ma...> - 2008-10-02 10:55:57
|
Log Message: ----------- avoid side-effect of loading String context that sets the string context to being the current context. (This fixes bug 1520) Modified Files: -------------- pg/macros: parserPopUp.pl Revision Data ------------- Index: parserPopUp.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/parserPopUp.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -Lmacros/parserPopUp.pl -Lmacros/parserPopUp.pl -u -r1.7 -r1.8 --- macros/parserPopUp.pl +++ macros/parserPopUp.pl @@ -49,7 +49,7 @@ =cut -loadMacros('MathObjects.pl','contextString.pl'); +loadMacros('MathObjects.pl'); sub _parserPopUp_init {parserPopUp::Init()}; # don't reload this file @@ -62,7 +62,14 @@ # # Setup the main:: namespace # -sub Init {main::PG_restricted_eval('sub PopUp {parserPopUp->new(@_)}')} +sub Init { + ### Hack to get around context change in contextString.pl + ### FIXME: when context definitions don't set context, put loadMacros with MathObject.pl above again + my $context = main::Context(); + main::loadMacros('contextString.pl'); + main::Context($context); + main::PG_restricted_eval('sub PopUp {parserPopUp->new(@_)}'); +} # # Create a new PopUp object |