Michael

I noticed in the changelog for 6.4.25.2 that a fix for MS.Browser.isIE
had been implemented for check for Opera which uses
navigator.userAgent. Basically, don't! Use object detection instead:
check for the existence of window.opera (all Opera versions that count
expose this), and the entire isIE check can be altered to boot:
MS.Browser.isIE=!!(document.all&&!window.opera&&(/microsoft/i.test(navigator.appName)));

Also, this.arguments (deprecated) is being used when the built-in
Array.prototype.slice.call function can be used instead (example code
generated by HtmlControls example):
Object.extend(AJAXDemo.Examples.HtmlControls.Demo_class.prototype,
Object.extend(new AjaxPro.AjaxClass(), {
        GetSelectedValues: function(select) {
                return this.invoke("GetSelectedValues", {"select":select},
this.GetSelectedValues.getArguments().slice(1));
        },

should become:
Object.extend(AJAXDemo.Examples.HtmlControls.Demo_class.prototype,
Object.extend(new AjaxPro.AjaxClass(), {
        GetSelectedValues: function(select) {
                return this.invoke("GetSelectedValues", {"select":select},
Array.prototype.slice.call(arguments,1));
        },

The use of a self-referential call to a self-referential argument
inside the invoke methods (all the this'ing down the code branch) is
then rendered obsolete, meaning you can get rid of
Object.extend(Function.prototype, {getArguments:fn}) in prototype.js .

Array.push is forcibly overriden with a method as Object.extend()
doesn't take into account the third argument (the override if present
boolean). This applies to all other object extending using this
argument BTW. I noticed that the overriding function does not return
the same as the native one; native Array.push returns the value pushed,
the override returns nothing. Emulated methods should exactly mimic
missing functionality if possible.


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

Reply via email to