Hi Gurus,
I'm working on my first Xcelsius custom component. I want to use the component to change a specified cell in a range in Excel. I set the propertyName "Target" in propertySheet and bind with:
proxy.bind(propertyName, null, bindingID, BindingDirection.BOTH, InputBindings.ARRAY2D, OutputBindings.ARRAY2D);
In AS file, I wrote getter and setter for property "Target":
[Inspectable(type="Array")]
public function get Target():Array
{
return _target;
}
[Bindable]
public function set Target(value:Array):void
{
_target = value;
}
When I change the cell in Array, if I write in these ways, it does not work:
_target<i>[j] = newValue; this.Target = _target;
this.Target<i>[j] = newValue;
var tempTarget:Array = _target; tempTarget<i>[j] = newValue; this.Target = tempTarget;
Only if I write in this way, I can change the target range:
var tempTarget:Array = new Array(); for (var i:int = 0; i < _target.length; i++) tempTarget.push(_target<i>); tempTarget[row][col] = newValue; this.Target = tempTarget;
My questions is:
1. I want to know why those 3 ways do not work;
2. If I change the whole target range (maybe 500 * 30) in the way of last one, will it lead to a performance issue? Can I modify only one cell instead of the whole range?
Thanks!