\r
if( !user[ 'instanceOf' ]( X.UI.Box ) ){\r
//throw new Error( 'Box を継承したインスタンスだけが _Box のオーナーになれます' );\r
- }; \r
+ };\r
\r
this.User = user;\r
\r
/* Rellay */\r
initialize : function( root, rootData, parent, parentData ){\r
var uinodes = this.uinodes,\r
- i = uinodes && uinodes.length;\r
+ l = uinodes && uinodes.length, i = 0;\r
\r
- if( i ){\r
- for( ; i; ){\r
- uinodes[ --i ].initialize( root, rootData, this.User, this );\r
- }; \r
+ for( ; i < l; ++i ){\r
+ uinodes[ i ].initialize( root, rootData, this.User, this );\r
};\r
\r
XUI_AbstractUINode.prototype.initialize.apply( this, arguments );\r
addToParent : function( parentXNode ){\r
var uinodes = this.uinodes,\r
l = uinodes && uinodes.length,\r
- i;\r
+ i = 0;\r
\r
- if( l ){\r
- for( i = 0; i < l; ++i ){\r
- uinodes[ i ].addToParent( this.xnode );\r
- };\r
+ for( ; i < l; ++i ){\r
+ uinodes[ i ].addToParent( this.xnode );\r
};\r
\r
XUI_AbstractUINode.prototype.addToParent.apply( this, arguments );\r
/* Rellay */\r
creationComplete : function(){\r
var uinodes = this.uinodes,\r
- i = uinodes && uinodes.length;\r
- if( i ){\r
- for( ; i; ){\r
- uinodes[ --i ].creationComplete();\r
- }; \r
+ l = uinodes && uinodes.length,\r
+ i = 0;\r
+ \r
+ for( ; i < l; ++i ){\r
+ uinodes[ i ].creationComplete();\r
};\r
\r
XUI_AbstractUINode.prototype.creationComplete.apply( this, arguments );\r
},\r
\r
add : function( /* node, node, node ... */ ){\r
- X_Pair_get( this ).addAt( this.numNodes() + 1, X_Object_cloneArray( arguments ) );\r
+ X_Pair_get( this ).addAt( this.numNodes() + 1, X_Array_copy( arguments ) );\r
return this;\r
},\r
addAt : function( index /* , node , node, node ... */ ){\r
var nodes;\r
if( index < 0 ) index = 0;\r
- nodes = X_Object_cloneArray( arguments );\r
+ nodes = X_Array_copy( arguments );\r
X_Pair_get( this ).addAt( nodes.shift(), nodes );\r
return this;\r
},\r
remove : function( /* node, node, node ... */ ){\r
- X_Pair_get( this )[ 'remove' ]( X_Object_cloneArray( arguments ) );\r
+ X_Pair_get( this )[ 'remove' ]( X_Array_copy( arguments ) );\r
return this;\r
},\r
removeAt : function( from, length ){\r