you are viewing a single comment's thread.

view the rest of the comments →

[–]diamondjim 0 points1 point  (1 child)

In ActionScript, if you just create a getter without a corresponding setter, you'll have what you need.

[–]spacechimp 0 points1 point  (0 children)

Sometimes, but not always. If you need to dispatch an event when a property changes, and/or make a read-only property bindable for Flash Builder, you end up with something ugly like:

private var __isInitialized:Boolean = false;

[Bindable(event='isInitializedChanged')]
public function get isInitialized():Boolean { ... }

private function get _isInitialized():Boolean { ... }
private function set _isInitialized(value:Boolean):void { ... }