Why would you want to force implementation of a private class?
Or are you actually trying to create an abstract class - and are
trying to ensure that a subclass provides an implementation of an
internal method? (Labelled as 'private' in AS2 or 'protected' in AS3.)
In which case, neither AS2 nor AS3 have built-in support for abstract
classes, which is a little annoying! The easiest way to achieve a
similar result is to write a default implementation in the parent
class (which the child class is supposed to override) and throw an
error inside it.
e.g. (in AS3)
protected function doSomething():void
{
throw new Error("You should have overridden this!");
}
If that's not your problem/what you're trying to achieve, what _are_
you trying to achieve?
Ian
On Mon, Aug 4, 2008 at 9:13 AM, S0 F1 <[EMAIL PROTECTED]> wrote:
> How can you force a set of classes to define a private method if Interface
> members cannot be declared public, private, protected, or internal?
>
> Create an abstract class with private method(s) that throw an error, unless
> overwritten by subclasses? Is this the only way?
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders