instance names problem will pay $2 for solution

2003-04-02 Thread Michael Ni
i will pay $2 usd if you can solve my problem. i'll send check by mail or paypal. my problem is i have a String variable s which stores the name of the instance i want to create. how do i convert that variable to java code so that i can use it in my java code. for instance this is what i wa

RE: instance names problem will pay $2 for solution

2003-04-02 Thread Barney Hamish
IL PROTECTED] > Subject: instance names problem will pay $2 for solution > > > i will pay $2 usd if you can solve my problem. i'll send > check by mail or > paypal. > > my problem is i have a String variable s which stores the name of the > instance i want t

RE: instance names problem will pay $2 for solution

2003-04-02 Thread Michael Mattox
Interface (for example they all have a method called "use") and use that instead of SomeObject. > -Original Message- > From: Michael Ni [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 12:24 PM > To: [EMAIL PROTECTED] > Subject: instance names problem will

Re: instance names problem will pay $2 for solution

2003-04-02 Thread Serges N. Zubkoff
Hello Michael, Wednesday, April 2, 2003, 2:24:21 PM, you wrote: MN> i will pay $2 usd if you can solve my problem. i'll send check by mail or MN> paypal. MN> my problem is i have a String variable s which stores the name of the MN> instance i want to create. how do i convert that variable to

RE: instance names problem will pay $2 for solution

2003-04-02 Thread Donie Kelly
This is a free service :) Don't think you can buy your answers here :) Donie -Original Message- From: Michael Mattox [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 11:31 To: Tomcat Users List Subject: RE: instance names problem will pay $2 for solution When you create the instances

Re: instance names problem will pay $2 for solution

2003-04-02 Thread Stephen Peterson
perhaps you might benefit from exploring the 'Big Moose Saloon' at http://www.javaranch.com. I've found it to be a great place for folks who have java language questions. I think it would be beneficial all around if this list could be kept to tomcat user problems :-). Stephen Peterson --- Michae

Re: instance names problem will pay $2 for solution

2003-04-02 Thread Ramsay Domloge
Michael, I think what you need is some reflection to sort out your problem: String className = "red"; Class c = Class.forName(className); Object o = c.newInstance(); Red red = (Red)o; Does this help? Ramsay Michael Ni wrote: i will pay $2 usd if you can solve my problem. i'll se

Re: instance names problem will pay $2 for solution

2003-04-02 Thread Hans Wichman
hi, i think you need to use the java.lang.reflect api for this kind of stuff. greetz Hans At 02:24 AM 4/2/2003 -0800, you wrote: i will pay $2 usd if you can solve my problem. i'll send check by mail or paypal. my problem is i have a String variable s which stores the name of the instance i wan

Re: instance names problem will pay $2 for solution

2003-04-02 Thread Michael Ni
<% String tempname = temp.getInstance_name(); beangame.Earthquake counter1 = (beangame.Earthquake)getServletContext().getAttribute(tempname); if (counter1 == null) { out.println("is null "); counter1 = new beangame.Earthquake(); getServletContext().setAttribute(tempname, coun

RE: instance names problem will pay $2 for solution

2003-04-02 Thread Barney Hamish
ubject: Re: instance names problem will pay $2 for solution > > > class="beangame.GameInstance" /> > > > > <% > String tempname = temp.getInstance_name(); > > beangame.Earthquake counter1 = > (beangame.Earthquake)get

RE: instance names problem will pay $2 for solution

2003-04-02 Thread Michael Ni
implemented From: Barney Hamish <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: 'Tomcat Users List' <[EMAIL PROTECTED]> Subject: RE: instance names problem will pay $2 for solution Date: Wed, 2 Apr 2003 13:24:27 +0200