2006 8:27 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Dynamically Upcast to a class in the _global
tree?
no that is just the usual way of doing it.. I need to be able to
dynamically
upcast..
like: vart = new _global['somepackage']['someClass']();
something l
Aaron,
What are you trying to do..?
There's no point in dynamically casting. Casting is just used to
tell the compiler that you know what you're doing.
For example:
class A
{
function doSomething(){/**/}
}
class B extends A
{
function doSomethingElse(){/**/}
}
var someObject:A=new B();
so
no that is just the usual way of doing it.. I need to be able to dynamically
upcast..
like: vart = new _global['somepackage']['someClass']();
something like that.. i can't remeber how to do that.. with prototypes or
_global..
On 8/23/06, Hans Wichman <[EMAIL PROTECTED]> wrote:
Hi,
not sure
Hi,
not sure if this is what you mean but:
import com.somepackage.HomeView;
var bv:BasicView = getSomeBasicView();
var newHomeViewHomeView =HomeView( bv );
grtz
JC
On 8/23/06, aaron smith <[EMAIL PROTECTED]> wrote:
How do I cast to something that is in the _global tree. by that i mean.
cast
How do I cast to something that is in the _global tree. by that i mean. cast
referencing like this: _global.com.somepackage.SomeClass( var ) or is the
_prototype chain? I can't remember...
the situation is this, I have a BasicView class. that needs to dynamically
be upcast to other views that wou
5 matches
Mail list logo