View unanswered posts | View active topics It is currently August 1st, 2010, 6:28 am



Post new topic Reply to topic  [ 2 posts ] 
CSSBuilder background-color property 
Author Message
User avatar

Joined: December 17th, 2009, 6:05 pm
Posts: 13
Location: Asturias, Spain
Post CSSBuilder background-color property
Hi guys,

Today I was giving a try to the CSSBuilder plugin 0.3 and I found that If I create the following stylesheet:

Code:
griffon-app/resources/styles.css

* {
   background-color: #999999;
}



and I use it like this:

Code:
griffon-app/lifecycle/Startup.groovy

...
import griffon.builder.css.CSSDecorator
...
CSSDecorator.decorate("styles",app.appFrames[0])
...



when I run my griffon application I get the following exception:

Code:
...
22-dic-2009 19:50:12 com.feature50.clarity.css.CSSUtils getColor
ADVERTENCIA: background-color value ('rgb(153, 153, 153)') not understood
java.lang.NumberFormatException: For input string: " 153"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:449)
        at java.lang.Integer.parseInt(Integer.java:499)
        at com.feature50.clarity.css.CSSUtils.getColor(CSSUtils.java:132)
        at com.feature50.clarity.css.DefaultCSSPropertyHandler.processStyles(DefaultCSSPropertyHandler.java:154)
        at com.feature50.clarity.css.CSSPropertyHandlers.handle(CSSPropertyHandlers.java:40)
        at griffon.builder.css.CSSDecorator.applyStylesheet(CSSDecorator.java:160)
        at griffon.builder.css.CSSDecorator.decorate(CSSDecorator.java:132)
        at griffon.builder.css.CSSDecorator.decorate(CSSDecorator.java:76)
        at griffon.builder.css.CSSDecorator$decorate.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
        at Startup.run(Startup.groovy:20)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1049)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:917)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:880)
        at groovy.lang.Closure.call(Closure.java:279)
        at groovy.lang.Closure.call(Closure.java:274)
        at groovy.lang.Closure.run(Closure.java:355)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


In the documentation it says that you can express the backgroud-color property value as a CSSColor2 name or a Hex value starting with #

Any idea??

Thanks!!!
Jorge.

_________________
Jorge Muñiz Morán
j.muniz.moran at gmail.com
http://jmuniz.wordpress.com/ (starting with it)


December 22nd, 2009, 8:03 pm
Profile E-mail WWW
User avatar

Joined: September 5th, 2009, 5:50 pm
Posts: 27
Post Re: CSSBuilder background-color property
Hmm looks like it tries to parse a number with a preceding space character and fails.
It is a bug indeed.

Would you care to register a JIRA (http://jira.codehaus.org/browse/griffon) ticket for it? thank you!

Cheers,
Andres

_________________
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and those who don't.
To understand recursion, we must first understand recursion.


January 6th, 2010, 11:10 pm
Profile E-mail WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum theme by Vjacheslav Trushkin for Free Forum/DivisionCore.