|
|
|
[
Permlink
| « Hide
]
Dan Swaney - 29/Jan/08 02:00 PM
How do I attach examples?
When using replicated <text> views that are mapped to update directly from dataset changes, initially this will appear to work as expected.
After repeated changes to the dataset, eventually right-justified <text> views will randomly disappear and reappear. <text> views that always have the same values are not affected. My guess is that each new unique string that is displayed takes up an entry in a 'LzTextSprite.prototype._sizecache' that has an upper limit of 1000 (defined as LzTextSprite.prototype.__sizecacheupperbound). The _sizecache stores elements indexed by their 'style' value (that includes width & font size): Q: If the text is right-justified, doesn't the width vary after each update? Q: Perhaps a partial fix would be to not include the width if the text is right-justified? The returned value from _sizecache[style] is another cache called '_textsizecache'. This is indexed by two different keys: tagname and the actual display string. What this appears to mean is that every single text value ever displayed is stored in this cache? So over time would this cause memory problems? How is this released? Modified version affected and original bug description. From Dan:
The first description under The comment at the bottom is the correct description -- the attachment should help repro the problem easily. The defect also only repros using RingDing -- not 4.0.6. See attachment for code example that reproduces the problem.
Included in the attachment is a README file that explains the test steps to reproduce it. Change 20080214-Philip-4 by Philip@Philip-DC on 2008-02-14 08:54:44 EST
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Access text cache as LzTextSprite.prototype._sizecache New Features: Bugs Fixed: Technical Reviewer: max QA Reviewer: (pending) Doc Reviewer: (pending) Documentation: Release Notes: Details: The code used to access the global cache through 'this'. However, once the cache is full and is cleared, access through 'this' it not reliable. I changed this._ sizecache to LzTextSprite.prototype._sizecache. Although I only need to do this for the line that actually resets the cache, I changed all references to make it clear this is a global. Tests: See test in Files: M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080214-Philip-4.tar |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||