On 2 December 2010 16:11, Hilco Wijbenga <hilco.wijbe...@gmail.com> wrote:
> my.css:
> @def BORDER-WIDTH 1px;
>
> MyCss.java:
> interface MyCss extends CssResource {
> �...@defname("BORDER-WIDTH")
>  int getBorderWidth(); // Returns 1.
> }
>
> Is there a way to achieve something like this?

I thought I had a solution when I found @eval but it *only* works with methods?

my.css
@eval BORDER_WIDTH org.example.MyCss.BORDER_WIDTH_PX;

interface MyCss extends CssResource {
  int BORDER_WIDTH = 1;
  String BORDER_WIDTH_PX = String.valueOf(BORDER_WIDTH) + "px";
}

This throws an exception. BORDER_WIDTH_PX *must* be a static method?

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

  • @def Hilco Wijbenga
    • Re: @def Hilco Wijbenga

Reply via email to