1 each method cannot break.
Example: Find the first even number in an array.
var myarr=[1,2,3,15,5,21,22];
var rs=0;www.hrbfc120.com
Myarr.each (function (VAL,IDX) {
if (val%2 ==0) {
Rs=val;
return; Return is not what I want, I want to be here convenient and quick to end each, what to do?
}
});
What I'm thinking now is throwing an exception with throw, and I don't know if you have a better solution.
(Of course, change the MOO source code can get a better solution)
The 2 element object has no SetValue method. www.120hrb.com
This comparison can not endure ah hehe, want to set the value of the page form field to do their own ways, do not understand why!
3 The HardCode in the Json.remote object.
See the code in this sentence people understand:
Send:function (obj) {
Return this.parent (This.url, ' json= ' + json.tostring (obj));
}
I want to use this method, the server can only accept JSON serialized string named JSON. It's too inflexible.
is 4 json.remote send should consider supporting the sending of multiple Json strings?
5. A bug in Class
var Class = function (properties) {
var klass = function () {
Return (Arguments[0]!== null && this.initialize && $type (this.initialize) = = ' function ')? This.initialize.apply (this, arguments): this;
};
$extend (Klass, this);
Klass.prototype = properties;
Klass.constructor = Class;
Return Klass;
};
var Class = function (properties) {
var klass = function () {
Return (Arguments[0]!== null && this.initialize && $type (this.initialize) = = ' function ')? This.initialize.apply (this, arguments): this;
};
$extend (Klass, this); www.hrbfkyy120.com
Klass.prototype = properties;
Klass.constructor = Class;
Return Klass;
};
If the first argument I'm going to pass is NULL, then the entire class mechanism will be invalidated.
For example, a class that constructs a method has two parameters, and he has a subclass subclass as well
When I create a subclass, I'm going to pass NULL if I construct the first parameter of the method.
Then the method of calling the parent class in the subclass will fail.
Modify the method to replace null with another special value.
In the new version of Moo, a moo-defined $empty
Arguments[0]!== $empty
MooTools's flaws