Sha256: e76e506afa281da30bb661895fcd2e5c19decfe0f5debeac44839324afd3e6bf
Contents?: true
Size: 1.95 KB
Versions: 3
Compression:
Stored size: 1.95 KB
Contents
package com.fourD.core { public dynamic class Properties { /*----------------------------------------------------------------------------------------------------------- * Public Fields -------------------------------------------------------------------------------------------------------------*/ /** * If you need to specify a property that is called "id", you need * to use <code>_id</code> instead because Flex will normally use the <code>id</code> * property as the identifier for this tag. */ public var _id:*; /*----------------------------------------------------------------------------------------------------------- * Public static methods -------------------------------------------------------------------------------------------------------------*/ /** * This method will parse all the SmartObjects and set the real values in the * <code>target</code> Object */ public static function copyValuesToTarget(source:Object, target:Object):Object { for (var propertyName:String in source) { var realValue:* = source[propertyName]; try { target[propertyName] = realValue; } catch(error:ReferenceError) { } catch(error:TypeError) { } } if(source._id) target['id'] = source._id; return target; } /*----------------------------------------------------------------------------------------------------------- * Public Methods -------------------------------------------------------------------------------------------------------------*/ /** * Similar to <code>smartCopy</code> this method will copy the properties * to the target object. * The difference is that it will copy its own properties to the target. */ public function injectProperties(target:Object):Object { return copyValuesToTarget(this, target); } } }
Version data entries
3 entries across 3 versions & 1 rubygems