Index

Classes

Class

Class Banana.Util.CopyTo


Defined in: Utils.js.

Class Detail
Banana.Util.CopyTo(newdata, olddata, identifier, reference)

Copies all new properties from newdata to olddata All references in olddata stay intact

NOTE: arrays should contain objects with an identifier, or objects identified by their position in the array. Mixing them will lead to problems.

NOTE2: olddata will be identical to newdata in the end. Properties of olddata that are not in newdata will be removed.

example
old [a,b,c] new [a,x,d] with x having identifier result [a,b,d] cause x is overwritten by d

Parameters:
{Object} newdata
{Object} olddata
{String} identifier
{Object} reference
to parent object. used by framework. usefull to keep references intact
Returns:
{Object} instance of olddata with newdata recursively copied inside

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 05 2012 22:02:08 GMT+0100 (CET)