cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Java Class Casting within Flow
Date Tue, 22 Feb 2005 16:25:20 GMT
Daniel McOrmond wrote:
> Here's a simple example:
> 
> 
> importClass( Packages.com.company.GenericObject );
> importClass( Packages.com.company.SpecificObject );
> importClass( Packages.com.company.ObjectLoaderUtil );
> 
> function doSomethingUseful() {
>   var loader = cocoon.createObject( ObjectLoaderUtil );
>   var myObject = loader.getGenericObject();
> }
> 
> 
> 
> Suppose I wanted to cast the GenericObject to a SpecificObject, like this:
> 
>   var myObject = (SpecificObject) loader.getGenericObject();
you do not need a cast - just call SpecificObject methods.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message