Skip to content

Instantly share code, notes, and snippets.

@sophistifunk
Created February 8, 2010 00:54
Show Gist options
  • Save sophistifunk/297794 to your computer and use it in GitHub Desktop.
Save sophistifunk/297794 to your computer and use it in GitHub Desktop.
public function Tag()
{
super();
invalidator = InvalidationManager.forComponent(this);
invalidator.forProperty("node").commitFunctionIs(commitNode);
}
[Bindable]
public var node:XML;
// Called by IM during commitProperties if node has changed.
private function commitNode():void
{
// Does some stuff
//...
invalidateDisplaylist();
}
// IM automatically watches "node" and invalidates this component
override protected function commitProperties():void
{
super.commitProperties();
invalidator.validateProperties();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment