[Chameleon-dev] [Bug 1329] [Chameleon-Core]Text on some popup widgets is encoded

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Wed Mar 8 14:21:19 EST 2006


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





------- Additional Comments From nsavard at mapgears.com  2006-03-08 14:21 -------
The problem is as follow:

When an application is loaded, the language resource for each widgets that
appear in the template are loaded. The new global MLT instance is created and
the $aszMLT array is filled with language resources stored in the cache if this
cache exist. Then the MLT loadResource() method is called at the creation of
each widget. The loadResource method fills the MLT array with the widget
resources.  After this step the cache is rewritten completely with the new
resources stored in the $aszMLT array.  When the cache is written each resource
is encoded.

When a popup is opened a new MLT instance is created and filled with the
resources stored in the cache but Not decoded.  The MLT loadResource() method is
called and the resources are loaded if there are not found in the cache.  If new
resources are added the cache is rewritten encoded.  The text in the popup
window is created by calling the MLT get() method which uses urldecode() function.

To explain what is going on lets go through a scenario.

Supposed we have an application with three widgets:  MapDHTML, PrintProduction,
Locate.  When the application is loaded the PrintProduction and Locate widget
resources are loaded and saved to the cache encoded.

The Locate popup widget is opened but the resources are already in the cache
encoded.  The text is displayed in the popup window by calling the MLT get()
method.  The text is displayed correctly.  The popup is closed.

The PrintProduction widget is opened and the resources in "production.fr-ca.txt"
and "production.en-ca.txt" files are loaded via the MLT loadResource() method. 
The cache is rewritten and the Locate widget resources are encoded again.  The
text appears correctly in the popup.  The window is closed.

If the Locate widget is opened again text appears encoded.



------- 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