The method setValue within the Ajax.Web.Dictionary converter defined
as:

        setValue: function(k, v) {
                for(var i=0; i<this.keys.length && i<this.values.length; i++) {
                        if(this.keys[i] == k){ this.values[i] = v; }
                        return i;
                }
                return this.add(k, v);
        },

Notice that the loop will end anyway after the condition due to the
return statement.

Meanwhile I overrode this function with the following:
        setValue=function(k, v) {
                for(var i=0; i<this.keys.length && i<this.values.length; i++) {
                        if(this.keys[i] == k){
                                this.values[i] = v;
                                return i;
                        }
                }
                return this.add(k, v);
        }
In order to include the return only if the key was found.

Hope you'll fix it :)

Thanks a lot!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/

The open source project is now located at 
http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro
-~----------~----~----~----~------~----~------~--~---

Reply via email to