thanks, that fixed the error. i figured i bolloxed something up. 

another question though, i'm setting the default as you can see, but
in my updateDisplayList() i'm doing:
  this.graphics.beginFill(this._fillColor, this.alpha);
  this.graphics.drawRoundRect(0,0, this.width, this.height,
this.getStyle("cornerRadius"), this.getStyle("cornerRadius"));
  this.graphics.endFill();

but the call to this.getStyle() is just returning 0. have i set my
defaults incorrectly? the SDK examples are pretty confusing.

--- In [email protected], "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Since the styleName of a skin gets set to it's parent, there is no
need for
> inherit.
> 
> change
> 
> inherit="yes"
> 
> to
> 
> inherit="no"
> 
> Mike
> 
> On Thu, Aug 21, 2008 at 2:33 AM, bryancostanich
> <[EMAIL PROTECTED]>wrote:
> 
> >   hi all,
> >
> > i have a class: public class RoundedRectangle extends UIComponent
> >
> > and i have the style definition: [Style(name="cornerRadius",
> > type="uint", inherit="yes")], above it.
> >
> > then i've followed the docs to do the default style declaration:
> >
> > private static function classConstruct():Boolean
> > {
> > if
> > (!StyleManager.getStyleDeclaration("styledRoundedRectangle"))
> > {
> > // If there is no CSS definition for StyledRectangle,
> > // then create one and set the default value.
> > var styles:CSSStyleDeclaration = new
> > CSSStyleDeclaration();
> > styles.defaultFactory = function():void
> > {
> > this.color = 0x0;
> > this.width = 40;
> > this.height = 40;
> > this.cornerRadius = 3;
> > this.overColor = 0x00cc00;
> > this.alpha = 1.0;
> > }
> >
> > StyleManager.setStyleDeclaration("styledRoundedRectangle", styles,
true);
> >
> > }
> > return true;
> > }
> >
> > but when i try to build my project, i get the error: Declaration of
> > style 'cornerRadius' conflicts with previous declaration in
> >
> >
C:\[devlocal]\TixSmart\Flex\tixsmartFlexControls\com\tixsmart\flex\controls\RoundedRectangle.as
> >
> > but it gives me an unknown location and no path. i'm only decaring
> > that style once.
> >
> > any ideas? i'm still a little fuzzy on some of the style stuff, so i
> > likely cocked something up, but i'm not really sure what.
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix, LLC
> http://www.teotigraphix.com
> 
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
> 
> You can find more by solving the problem then by 'asking the question'.
>


Reply via email to