package blah.blah.blah
{
interface IPredicate
{
function evaluate(): Boolean;
}
}
Then we can pass an implementing object to a subclass of UIComponent, which will trigger its visibility based on the evaluation of the object:
package blah.blah.blah
{
class UIVanishingComponent extends UIComponent
{
var predicateObject:IPredicate;
UIVanishingComponent( po:IPredicate )
{
super();
this.predicateObject = po;
}
.... but now what? The "visible" boolean triggers the dispatch of a SHOW event, which appears to simply alert the listener that the component is now visible... in other words, someone else controls the rendering of this object? So we either create a handler that listens for the Predicate to change its state, or we have to figure out how to intercept or redirect the renderer for this component... or do something else.
Maybe the answer is in using Flex's event model. Anyone know? More to come.
No comments:
Post a Comment