Bug 666 - HopObject.size() broken
: HopObject.size() broken
Status: RESOLVED FIXED
: Helma
HopObject Functionality
: CVS trunk
: Other Linux
: P5 normal
: 1.7.0
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2009-05-25 14:34 by
Modified: 2009-05-27 13:59 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-05-25 14:34:59
return value of size() does not change when removing children of a collection. 

e.g. this does not work as expected:

{{{
   res.debug('###pre');
   res.debug('size ' + forum.size());
   res.debug('children ' + forum.list());

   var len = forum.size();
   for (var i=len-1;i>=0;i--) {
      var comment = forum.get(i);
      comment.remove();
      forum.removeChild(comment);
   }
   res.debug('###post');
   res.debug('size ' + forum.size());
   res.debug('children ' + forum.list());

---------- output ---------
###pre
size 3
children Comment#51006863,Comment#51006313,Comment#51005791
###post
size 3
children
}}}

this works as expected in the official helma 1.6.3. release.
------- Comment #1 From 2009-05-25 14:47:56 -------
tested with oracle 10g and mysql 5.0

i first encountered the problem with generic ref collections ($id, $prototype),
but 'normal' collections (no matter the cachemode) are effected as well.
------- Comment #2 From 2009-05-27 13:59:49 -------
Should be fixed in svn.