Oh, sorry, I guess I misunderstood. I thought you wanted it to be String and the compiler was outputting Object.
We get these definitions from the Google Closure Compiler. They have defined it as String. I think you could propose a patch to their project. You could propose a patch for our flex-falcon repo that patches their copy until it gets fixed on their end, but I think you can workaround it for now. Try adding the asdoc: /** * @flexjsignorecoercion String */ around any function that needs to assign an Object to fillStyle, as in: myCanvasRenderingContext2D.fillStyle = myCanvasGradient as String; We have a missing.js that we use when the definitions we get from Google Closure Compiler are missing. If you find lots of errors like this we'll think about some other way to fix up the definitions. -Alex On 12/6/15, 7:20 PM, "lizhi" <s...@qq.com> wrote: >i have try last. >but saydely. >public class CanvasRenderingContext2D extends Object > { > public var canvas : HTMLCanvasElement; > public var fillColor : String; > public var fillStyle : String; > > > >-- >View this message in context: >http://apache-flex-development.2333347.n4.nabble.com/CanvasRenderingContex >t2D-fillStyle-type-is-a-object-not-a-string-tp50368p50525.html >Sent from the Apache Flex Development mailing list archive at Nabble.com.