Le 24 nov. 05, à 20:27, Ian Thomas a écrit :
Why not just pass each module a callback function to call when it's
done?
Then TestSequence can do all the work.
For example:
class TestModule
{
public function runTest(callback:Function)
{
// Do some testing...
// When done...
callback();
}
Good point.
But I will be more lazy :)
class TestModule
{
public function runTest (callback:Function)
{
// Call an implemented method on subclass interface
beginSubclassTest ();
// OK launch the TestSequence
callback ();
}
}
BTW this process is only available for the stack sequence of functions.
Imagine that I need an asynchrone test in my sequence.
Something like evualuating the time for example and need to call the
callback later…
Le 24 nov. 05, à 20:59, Scott Hyndman a écrit :
class ModuleBase {
public function startTest() {
runTest();
endTest();
}
public function runTest() {
throw new Exception("implemented in subclasses");
}
public function endTest() {
dispatchEvent({type:"end"});
}
}
Same here.
Thanks for you both.
-----------
erixtekila
http://blog.v-i-a.net/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders