开发者

Flex: Forcing an array to contain only a specific class?

I'm trying to create a class that contains an array. However i want to require that the items in the array are themselves of a specific class. Im told there is some sort of tag you can add to do this, but for the life of me i cannot find what it is.

What i hope for is something like:

public class myClass{
    public var foo:String;

    [ArrayType(class="BarClass")]
    public va开发者_JS百科r barArr:Array 
}

Cheers


what's wrong with a Vector ?

var barArr:Vector.<BarClass> = new Vector.<BarClass>();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜