[Chameleon-dev] [Bug 1413] MLT implementation and resulting upgrade changes

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Tue Apr 18 08:30:26 EDT 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1413





------- Additional Comments From jlacroix at mapgears.com  2006-04-18 08:30 -------
The few lines of code in my comment will need to be added for users who wants to
use the old MLT function parameters. I don't want to add that in the code
because that code duplicate the MLT object and this leads to higher memory
usage...However I've come to another solution while writing this...

Simply add as the first thing in InitDefault() of each custom widget:
With PHP4:
            $oDummy = $this->moMLT;
            $this->moMLT =& $oDummy; 

With PHP5:
            $oDummy = $this->moMLT;
            $oWidget->moMLT = clone $oDummy;

Since the MLT is now a global object in Chameleon, there's no way to keep track
of the widget name in the MLT class. So the user who wants to use the MLT object
with old function prototype will have to copy it in each widget.

Do you think it's acceptable? 



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list