Dynamic Class Instantiation using Generators aka. A possible way around Class.forName?

2011-01-18 Thread Ryan Rathsam
Hi All, I've been doing some research into Class.forName and realize that it's not supported for some very good reasons. But in my google-fuing I came across a fellow that seemed to, in a previous version of GWT have come up with a possible solution using a Generator. I wanted to run t

Re: can I use Class.forName and newInstance in GWT ?

2010-12-30 Thread Danny Goovaerts
by GWT. > > regards > > didier > > On Dec 30, 7:33 am, metalhammer29a wrote: > > > > > > > > > can I use Class.forName and newInstance in GWT ? > > >    static Employee create (String name) { > >        try { > >          

Re: can I use Class.forName and newInstance in GWT ?

2010-12-30 Thread Didier Durand
Hi, You can't: if you go to http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html#Package_java_lang for Class, you will see that forName() is not emulated by GWT. regards didier On Dec 30, 7:33 am, metalhammer29a wrote: > can I use Class.forName and newInstanc

can I use Class.forName and newInstance in GWT ?

2010-12-29 Thread metalhammer29a
can I use Class.forName and newInstance in GWT ? static Employee create (String name) { try { return (Employee) Class.forName(name).newInstance(); } catch (Exception e) { throw new IllegalArgumentException ("Unable to instantiate&qu

Re: Class.forName

2009-08-27 Thread Jason Essington
Your database code should not be located in any *.client.* package. -jason On Aug 27, 2009, at 9:16 AM, Tom wrote: > > I am trying to compile the java class SlicrPopulatr, found here: > http://www.ibm.com/developerworks/library/os-ad-gwt2/index.html?S_TACT=105AGX44&S_CMP=EDU > > The following e

Class.forName

2009-08-27 Thread Tom
I am trying to compile the java class SlicrPopulatr, found here: http://www.ibm.com/developerworks/library/os-ad-gwt2/index.html?S_TACT=105AGX44&S_CMP=EDU The following error occurs though: Loading an instance of module 'slicr' Refreshing module from source Validating newly compiled un

Re: Class.forName and GWT

2009-06-22 Thread Paul Robinson
n we use Class.forName("com.test.TestClass") inside onModuleLoad()? > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolk

Class.forName and GWT

2009-06-22 Thread bnawalage
Can we use Class.forName("com.test.TestClass") inside onModuleLoad()? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email t

Re: Using Class.forName

2009-05-21 Thread Adligo
use it, bc java reflection is not supported. > The alternative is to use GWT.create(yourClass.class) and deffered binding. > > On Wed, May 20, 2009 at 2:27 PM, Pints wrote: > > > Hi, > > > I am tring to use Class.forName at cleint for object creation and >

Re: Using Class.forName

2009-05-20 Thread rudolf michael
hello,No you cannot use it, bc java reflection is not supported. The alternative is to use GWT.create(yourClass.class) and deffered binding. On Wed, May 20, 2009 at 2:27 PM, Pints wrote: > > Hi, > > I am tring to use Class.forName at cleint for object creation and > gettin

Using Class.forName

2009-05-20 Thread Pints
Hi, I am tring to use Class.forName at cleint for object creation and getting the following exception. [ERROR] Line 196: The method forName(String) is undefined for the type Class [ERROR] Line 197: The method newInstance() is undefined for the type Class Can't we use it? Any possibl

Re: Class.forName(String) Instance

2008-11-10 Thread jmpeace
s.put("boolean", new BooleanField()); > > > type = "simpletext"; > > DDOField field = availableFields.get(type); > > > That way I get the variable 'field' to point to a new instance of t

Re: Class.forName(String) Instance

2008-11-10 Thread gregor
lean", new BooleanField()); > > type = "simpletext"; > DDOField field = availableFields.get(type); > > That way I get the variable 'field' to point to a new instance of the > type 'simpletext' (new SimpleTextField()).  The problem is that I'm >

Re: Class.forName(String) Instance

2008-11-10 Thread yunhui song
quot;boolean", new BooleanField()); > > type = "simpletext"; > DDOField field = availableFields.get(type); > > That way I get the variable 'field' to point to a new instance of the > type 'simpletext' (new SimpleTextField()). The problem is that

Class.forName(String) Instance

2008-11-10 Thread jmpeace
ableFields.put("boolean", new BooleanField()); type = "simpletext"; DDOField field = availableFields.get(type); That way I get the variable 'field' to point to a new instance of the type 'simpletext' (new SimpleTextField()). The problem is that I'm cre