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
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
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();
What would be the point of that? The only point of upcasting is to have
things compile with strict typing, and the compiler can't tell what the
class is if it's dynamically determined.
Are you talking about dynamic *instantiation*? Then you could use
something like this:
// Import all classes
4 matches
Mail list logo