F.D.T. 3.0 + Code Templates
Posted: November 19, 2007 at 6:18 pmThe folks over at F.D.T. were kind enough to bestow me with an enterprise license for the QueueLoader and SoundManager project. Many thanks to them! I had dabbled with the beta version, but haven't had much of a chance to get back into the FDT world until recently. Now that I have been using it again, I remember how much I hate coding in the IDE. Here's some info to get you up and running.
Installing or updating to the new version is a breeze. Whereas before you needed to link a special FDT modified code library, now it automatically links to the global SWC file.
When installing or upgrading to 3.0 you'll need to do this: (I'm on a Mac so if you are on a PC, you'll need to find instructions.)
- Right click on the eclipse application and select show package contents. Open Contents/Mac Resources/Eclipse.ini and change -Xms40m to -Xms256m and -Xmx256m to -Xmx512m
Code Templates: Code templates or code snippets are one of the many ways to work quickly within FDT. Go to preferences FDT>Editor>Templates and click New and you can set up a new code template. The template will let you insert java variables that will automatically be replaced with page elements. ${enclosing_type} will turn into the Class name. ${enclosing_method} will turn into the function name. Once you have the templates set up when you are coding in a class you press control and space and the template menu will come up. Start typing the code template name and hit enter and there is your code snippet with the variables replaced by it's respective names. Here are some of my favorites you can paste into the template window:
Trace:
trace(">> ${enclosing_type}.${enclosing_method}() - args: "+[${enclosing_method_arguments}]);
Public Method:
public function ${methodName}():${type} { trace(">> ${enclosing_type}.${methodName}() args: "+[]); ${cursor} };
Browser Based Alert Debugging:
SendJavascript.getInstance().debug("${enclosing_type}.${enclosing_method}()");
Go here for info on this one.
The Discussion
see what everyone is saying
It's also much stricter than Flex Builder, and that's really helpful for Open Source development as it allows you to produce cleaner code.
FDT is awesomne.
Did you know, that when you want to create a swc file using the flex sdk with FDT and you use the Queueloader, it throws an error!! Thats really sad!
I can't work without the QueueLoader any longer!!!!
I must agree with carlos
I don't use flex so this is news to me.. I would need to have a flex user debug that.
"I remember how much I hate coding in the IDE"
… You used the Flash IDE for coding? Honestly? Wow LOL! I mean … nobody uses it! it's only there for mere hilarity!
However FDT is the best choice for coding AS3.