> var lib = @com.ruchi.bundle.client.Resource::INSTANCE;
>  var style = [email protected]::button()();
>  var css = [email protected]::gwtbutton()();
>   
> i tried this but i got class cast exception. 
>

Why do you write: [email protected]::gwtbutton()()  ?? 

Your style variable is not of type Button, its a MyCssResource instance. 
Also the gwtbutton() method is probably not defined on your Button class 
and I think Eclipse should have marked that red (if you use the Google 
Eclipse Plugin).

 

> hey i want to ask you one thing more while calling we have to write 
> button()() or button() ?
>

You always have to use ()(). The first parenthesis contain the parameter 
signature while the second parenthesis contain the actual parameters. So if 
you have a method that takes a String parameter it would look like 
myMethod(Ljava/lang/String;)(myStringInstance). Read: 
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html 


Please write steps of code to explain exactly what should i do ?
>

No. If you fix the Button thing I mentioned above you are already done.


-- J.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to