impaler/As3-Bloom — pull request #4 by impaler (2012-02-19 11:35:43+00:00)
Title: 2.x dev signals-brush-destory

Nice work on 2.x dev :)

A destroy function for memory optimization when removing components from memory. Using Bloom singleton Class we can have only one signal for Event.Draw for all components.
public function destroy () :void {
Bloom.onStageDraw.remove(draw);
_style = null;
}

Button Signals

Use a global mouseUp to limit the number of singals/eventlisteners
Signals used in button make a very simple api for developers;
eg;

var btn:Button = new Button(this, "Test");
btn.onDown.addOnce(function(e:MouseEvent) {trace("onDown")});
btn.onOver.addOnce(function(e:MouseEvent) {trace("onOver")});
btn.onOut.addOnce(function(e:MouseEvent) {trace("onOut")});
btn.onStageUp.addOnce(function(e:MouseEvent) {trace("onStageUp")});

Also signals with Components can dispatch their value Data type for example now test this;
numericStepper.onChanged.add(function(e:Number){trace("onChanged value - " + e + " - " + numericStepper.toString())});

Brush System;
public function update ( state:int , value:* , args:Object = null ):void
could not think of another way in the value does not have a type but uses an as Type in the Brush

Sindney I remember you mentioned something about this idea maybe you have a better approach?