--- In [email protected], "flexaustin" <[EMAIL PROTECTED]> 
wrote:
>
> I was wondering if someone can explain why you would need an 
interface
> so short? 
> 
> INTERFACE:
> 
> package my.package.area
> {
>       /**
>        * Interface for methods that evaluate an object and return a 
result.
>        */
>       public interface IEval
>       {
>               /**
>                * Evaluates the input object
>                * @o the object to evaluate
>                * @return the computed result value
>                */
>               function eval(o:Object=null):*;
>               
>       } // end of interface IEval
> }
> 
> USAGE OF INTERFACE:
> 
> if (value is IEval) { value = IEval(value).eval(o) };
> 
> Cairngorm has a short interface like this as well, though I cannot
> remember what it is. In Cairngorm they say its for naming or to make
> the code easier to understand? I am just not sure why you would do
> this? Help me see the light!

One example of what you get by implementing an interface is, for 
example, IDropInListItemRenderer.  If you implement this interface, 
then Flex will give your itemRenderer more information than you'd get 
with the data property.  I.e. you also get listData.

If the parent component doesn't see that you have implemented this 
interface, I don't think it will try to give you that information.

HTH;

Amy

Reply via email to