[pLog-svn] r3457 - plog/trunk/js/ui

Jon Daley plogworld at jon.limedaley.com
Wed May 24 11:23:29 GMT 2006


 	Why did you remove the length field?  Was it not working for you? 
try printing out 'userList.options.length' each time through the loop. 
And I think you will see that it is decremented when an item is set to 
null.  Not decrementing length will not break anything, but it will loop 
through non-existent items.

On Wed, 24 May 2006, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2006-05-24 08:25:33 +0000 (Wed, 24 May 2006)
> New Revision: 3457
>
> Modified:
>   plog/trunk/js/ui/common.js
> Log:
> This fix was introduced in revision r3441 but it broke removing multiple users because it always left the last one behind (it removed everything else except the last one)
> Jon, since you made the original fix, can you check if this breaks it again?
>
>
> Modified: plog/trunk/js/ui/common.js
> ===================================================================
> --- plog/trunk/js/ui/common.js	2006-05-24 08:06:21 UTC (rev 3456)
> +++ plog/trunk/js/ui/common.js	2006-05-24 08:25:33 UTC (rev 3457)
> @@ -435,7 +435,8 @@
> 	for( i = 0; i < length; i++ ) {
> 		if( userList.options[i].selected ){
> 			userList.options[i] = null;
> -            i--; length--;
> +            i--;
> +            //length--;
>         }
> 	}
> 	return( true );
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

Any tool, when dropped, will roll into the least accessible corner.
-- Anthony's Law of the Workshop


More information about the pLog-svn mailing list