Type padding in FlexBuilder?

Can FlexBuilder be asked to automatically fill in operator types?

For instance:

var g = this.graphics;

      

It will issue aa "no type declaration" warning that Eclipse magic will "fix this line, please" won't fix ... So is there any other way to fix this other than manually typing "g: Graphics" manually?

+1


a source to share


2 answers


At least up to FlexBuilder 3, including, unfortunately, you have to declare a type if you want to comply with the strict typing rules of the compiler, and I am not aware of the existing "infer this variable type" anywhere.

I'm sure by design, though, those who want the benefits of strong typing will get them by explicitly declaring them, while those who might prefer to change what "g" means at runtime might appreciate the ability to switch (Project> Properties> Flex Compiler) and do it.



Wish I had the best answer for you! Perhaps someone else knows something and may echo a more satisfying solution. :)

If these are extra characters that fool you, you can try using Eclipse / FlexBuilder shortcuts (like Ctrl + Space for type completion) - there is a great list of them .

+1


a source


There is a plugin for writing code snippets on the fly for eclipse, maybe you can build something that solves your problem:



More details here:

+1


a source







All Articles