FDT Templates Specifier Feature
Posted 25 July 2010 by Matan UbersteinQuick tip for the FDT templates
Have you ever wondered how to make one of those nifty little “drop-downs” in your templates? Well it’s really easy! Here is a tutorial on how to create a generic variable declaration for your AS3 classes.
Open your preferences FDT -> Editor -> Templates
Create a “New” template
At the “name” field enter “var” – remember that this field is the one that is recognised by FDT‘s auto-complete, so keep it lower case. “Context” and “Automatically insert” will be correct at default. Enter a nice description which will display when the auto-complete list comes up.
Okay, getting to the fun part, the “Pattern” field. There you can pretty much do what you want, but in this small tutorial we are focusing on the “specifier” feature most people don’t know about. It works the same as inserting a variable in, so the syntax starts off the same.
${specifier:value(item1,item2,itemN)}
You can specify as much items as you want, also the order you provide is preserved. I usually use “protected” variables the most so I have it first here, so in most cases I just press enter, otherwise I just use the up/down arrow keys to select the one I need.
Results
Using the specifier will speed up your development and cut down on some frustration. Hope you all find joy in using the specifier feature, I certainly have.












Pingback: Tweets that mention FDT Templates Specifier Feature | Matan Uberstein | AS3 Blog -- Topsy.com