Ruben’s blog

Ruben Swieringa on Actionscript and a whole lot of other stuff..

Binding read-only accessors in Flex

When I first tried to bind a read-only getter-function (see example-code below) the Flex SDK decided to warn me that “[Bindable] on read-only getter is unnecessary and will be ignored.”.
private var _someProperty:String = "some value";
 
[Bindable]
public function get someProperty ():String {
return _someProperty;
}
// generates compile-time warning saying "[Bindable] on read-only getter is unnecessary and [...]

Functions: Passing arguments by value or by reference

By chance I just stumbled upon this article from the Livedocs about the way functions interpret the values of their parameters in Actionscript3.
Since I found I couldn’t put it any better than the LiveDocs did, here’s a quote:
In ActionScript 3.0, all arguments are passed by reference because all values are stored as objects. However, objects [...]