Re: [Flashcoders] Design pattern for conditional Interfaces ?

2008-03-23 Thread Andrei Thomaz
Oh, yes, I misunderstood you. When I read "ugly runtime errors", I understood "a runtime action script error", like the ones are reported by flash player debug version. []'s andrei On Sun, Mar 23, 2008 at 7:30 AM, Jeroen Beckers <[EMAIL PROTECTED]> wrote: > Hi Thomaz, > > Wouldn't that be the

Re: [Flashcoders] Design pattern for conditional Interfaces ?

2008-03-23 Thread Jeroen Beckers
Hi Thomaz, Wouldn't that be the exact same thing as testing against the interface references that's stored which each analyzer (as I suggested in my post) ? Since there is no compile-time way to check this, i'm going to check all the items with all the analyzers in the analyze() method and give a

Re: [Flashcoders] Design pattern for conditional Interfaces ?

2008-03-22 Thread Andrei Thomaz
and if each IAnalyzer implements a function called getAnalyzedProperty(), returning a string, and if each item (using an IItem interface, for example) implements a function called hasProperty(), receiving a string as parameter? So, you could check if the item has the "getProperty()" function the an

[Flashcoders] Design pattern for conditional Interfaces ?

2008-03-22 Thread Jeroen Beckers
Hi list! Situation: I have a class that analyzes stuff. There are different analyzing classes, such as "HeightAnalyzer", "WeightAnalyzer", "LevelAnalyzer", etc. You can add an analyzer to the class by using 'myClass.addAnalyzer(newAnalyzer:IAnalyzer)'. As you can see, there is an IAnalyzer interfa