HI all,
I'm writing an Interface
interface IDrawingElement
{
var id:Float;
var x:Float;
var y:Float;
var width:Float;
var height:Float;
var rotate:Float;
var parent:Float;
var scaledWidth:Float;
var scaledHeight:Float;
function clone( copy:Boolean = false ):IDrawingElement;
}
I have 2 classes that implements IDrawingElement
class A implement IDrawingElement
class B implement IDrawingElement
actually a.clone() give me an IDrawingElement and no more a A class.
So, i want to use generics in my interface too keep my class type
a.clone() -> A
b.clone() -> B
How to do that ?
thx