
{"id":1417,"date":"2010-06-16T11:27:46","date_gmt":"2010-06-16T10:27:46","guid":{"rendered":"http:\/\/www.matthijskamstra.nl\/blog\/?p=1417"},"modified":"2010-10-19T14:05:12","modified_gmt":"2010-10-19T13:05:12","slug":"moving-from-flashdevelop-to-fdt","status":"publish","type":"post","link":"https:\/\/www.matthijskamstra.nl\/blog\/2010\/06\/16\/moving-from-flashdevelop-to-fdt\/","title":{"rendered":"Moving from FlashDevelop to FDT"},"content":{"rendered":"<p>Yes, its time, I need to&#8230;<br \/>\nSo how to make the transition from FlashDevelop to FDT as easy as possible?<\/p>\n<h3>Let FDT react like FlashDevelop<\/h3>\n<p>And I don&#8217;t even have to break a sweat: the amazing <a href=\"http:\/\/www.stevensacks.net\/\">Steven Sacks<\/a> (creator of Gaia) wrote an article about it: <a href=\"http:\/\/www.stevensacks.net\/2010\/04\/30\/setting-up-fdt-to-look-and-behave-like-flashdevelop\/\">read here<\/a>.<br \/>\nThe only two thing that I&#8217;m using are:<br \/>\nOpen <strong>Window > Preferences<\/strong> <\/p>\n<p>Under <strong>FDT > Editor > Code Assist<\/strong> copy and paste this into Auto activation triggers for AS, and set the delay to 0ms (zero).<\/p>\n<div class=\"showcode\">\n<pre>\r\nabcdefghijklmnopqrstuvwxyz_. :<\/pre>\n<\/div>\n<p>and<\/p>\n<p>Under <strong>Problems > AS3 Problems<\/strong>:<br \/>\n<strong>Unresolvable<\/strong> > <strong>Unresolvable variable reference in E4X<\/strong> and <strong>Unresolvable member reference in dynamic object<\/strong> should both be set to Disabled (from Warning to Disabled).<\/p>\n<p>The shortcuts I just left them as they where: I&#8217;m working in another program so I should use the shortcut given by that program.<\/p>\n<div class=\"update\"><strong>Update #1:<\/strong> hmmm I noticed that I can&#8217;t live without CTRL+ENTER&#8230;. explanation here: <a href=\"http:\/\/cote.cc\/blog\/using-ctrl-enter-to-compile-actionscript-code-in-fdt\">Using CTRL-ENTER to compile ActionScript code in FDT<\/a>. So now I have CTRL+ENTER and debug run:  CTRL+SHIFT+ENTER  \ud83d\ude00 <\/p>\n<p>short explanation (so I can do this quickly if something happens to FDT):<\/p>\n<p>Under <strong>Preferences > Run\/Debug > Launching<\/strong> at the bottom at <strong>Launch Operation<\/strong>: Select &#8220;<strong>Always launch the previously launched application<\/strong>&#8221;<\/p>\n<p>then <\/p>\n<p>Under <strong>Preferences > General > Keys<\/strong> find (or type in &#8220;type filter text&#8221; &#8211; searchbox: &#8220;last&#8221;) a command called &#8220;<strong>Run Last Launched<\/strong>&#8221; and click Copy Command. Assign (binding) the shortcut CTRL-ENTER to the copied command and change &#8220;when&#8221; to <strike><strong>Editing ActionScipt Source<\/strong> (no spelling mistake: it really says that)<\/strike> <strong>Editing ActionScript Source<\/strong>.<br \/>\nDo the same thing for the &#8220;<strong>Debug Last Launched<\/strong>&#8221; command and assign the shortcut : CTRL-SHIFT-ENTER and change the when to <strong>Editing ActionScipt Source<\/strong>.<\/p>\n<p><strike>I&#8217;m not sure if the stuff I wrote here is only for FDT4 but the way it was explained on the site previous mentioned didn&#8217;t work in FDT4<\/strike>\n<\/div>\n<h3>Some templates\/snippets that are very useful<\/h3>\n<p>I used <a href=\"http:\/\/www.double-quotes.com\/fd\/dq.htm\">this plugin<\/a> for my trace in FlashDevelop, so how to do this in FDT?<\/p>\n<div class=\"update\"><strong>Update #2:<\/strong> I shouldn&#8217;t forget to mention CTRL+0 (read the <a href=\"http:\/\/www.fdt.powerflasher.com\/developer-tools\/fdt-3\/getting-started\/shortcuts\/\">shortcut list for FDT<\/a>) which is the shortcut for &#8220;Quick Trace&#8221;. This one I use to trace variable for example and the trace template below for functions.<\/div>\n<div class=\"update\"><strong>Update #4:<\/strong> This is really a reminder for myself, but if you need it you know where you can find it in FDT4.<br \/>\nSome minor adjustments like: <\/p>\n<p><strong>Preferences > FDT > Build Path <\/strong> change <strong>Source folders<\/strong> to &#8220;source&#8221; (I like source above src) and <strong>Output folder<\/strong> to &#8220;deploy&#8221; (I like deploy above bin)<\/p>\n<p><strong>Preferences > FDT > Code Style > Code Templates (Misc)<\/strong> to &#8220;<strong>Override System UserName &#8211; ${user}<\/strong>&#8221;<\/p>\n<p><strong>Preferences > FDT > Editor<\/strong> goto &#8220;Folding&#8221; and uncheck &#8220;Folding enabled&#8221; (I like to see everything, comment also)<\/p>\n<p><strong>Preferences > FDT > Tools > Flash\/Flash Help<\/strong> to add paths to Flash (in my case: &#8220;H:\\Program Files\\Adobe\\Adobe Flash CS4\\Flash.exe&#8221;) and the Flash help files (in my case: &#8220;H:\\Program Files\\Adobe\\Adobe Flash CS4\\en\\First Run\\HelpPanel\\Help&#8221;)<\/p>\n<p><strong>Preferences > General > Web Browser<\/strong> change to &#8220;Use external Web browser&#8221; to my favourite browser: Firefox <strike>(no Google Chrome there yet)<\/strike><br \/>\nYou can add any browser that you want.\n<\/div>\n<div class=\"update\"><strong>Update #5:<\/strong> visit <a href=\"http:\/\/www.rumblingskies.com\/blog\/?p=75\">http:\/\/www.rumblingskies.com\/blog\/?p=75<\/a> and add FTP capabilities to ANT.<\/div>\n<p>You have to create a code-template\/code-snippet:<br \/>\ngo to <strong>Preferences > FDT > Editor > Templates<\/strong><\/p>\n<p>This is a template that resembles the trace I used in FlashDevelop<br \/>\n<strong>Trace:<\/strong><\/p>\n<div class=\"showcode\">\n<pre>trace ( \"+ ${enclosing_type}.${enclosing_method}() - args: \" + [ ${enclosing_method_arguments} ] );<\/pre>\n<\/div>\n<p>and I found some other useful templates<\/p>\n<p><strong>Public method:<\/strong><\/p>\n<div class=\"showcode\">\n<pre>public function ${methodName}():${type} {\r\n    trace(\">> ${enclosing_type}.${methodName}() args: \"+[]);\r\n    ${cursor}\r\n};<\/pre>\n<\/div>\n<p>for some strange reason there is no shortcut for asdoc \ud83d\ude41<\/p>\n<p><strong>ASDoc:<\/strong><\/p>\n<div class=\"showcode\">\n<pre>\/**\r\n * ${cursor}\t\r\n * @example\t\r\n * @param\t\t${enclosing_method_arguments}\r\n * @return\t \t\r\n *\/\t\r\n *\/<\/pre>\n<\/div>\n<div class=\"update\"><strong>Update #3:<\/strong> (sadly if there are no param in the function &#8220;${enclosing_method_arguments}&#8221; will be printed..)<\/div>\n<p>a switch a use a lot with FlashDevelop:<\/p>\n<p><strong>Switch:<\/strong><\/p>\n<div class=\"showcode\">\n<pre>switch (${value}) {\r\n\tcase ${result}:\r\n\t\ttrace (\"${result}\" +${result} );\r\n\t\t${cursor}\r\n\t\tbreak;\r\n    default:\r\n        trace(\"case '\"+${value}+\"':\\r\\ttrace ('--- \"+${value}+\"');\\r\\tbreak;\" );\r\n}\r\n<\/pre>\n<\/div>\n<p>and the template for a singleton<\/p>\n<p><strong>Singleton:<\/strong> (from <a href=\"http:\/\/www.gskinner.com\/blog\/archives\/2006\/07\/as3_singletons.html\">gskinner<\/a>)<\/p>\n<div class=\"showcode\">\n<pre>package ${enclosing_package} {\r\n\r\n\t\/**\r\n\t* @author ${user}\r\n\t*\/\r\n\tpublic class ${enclosing_type} {\r\n\t\r\n\t\tprivate static var _instance:${enclosing_type};\r\n\t\tprivate static var _allowInstantiation:Boolean;\r\n\r\n\t\tpublic static function getInstance():${enclosing_type} {\r\n\t\t\tif (_instance == null) {\r\n\t\t\t\t_allowInstantiation = true;\r\n\t\t\t\t_instance = new ${enclosing_type}();\r\n\t\t\t\t_allowInstantiation = false;\r\n\t\t\t}\r\n\t\t\treturn _instance;\r\n\t\t}\r\n\r\n\t\tpublic function ${enclosing_type}():void {\r\n\t\t\tif (!_allowInstantiation) {\r\n\t\t\t\tthrow new Error(\"Error: Instantiation failed: Use ${enclosing_type}.getInstance() instead of new.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t${cursor}\r\n\t\r\n\t} \/\/ end class\r\n\r\n} \/\/ end package<\/pre>\n<\/div>\n<p>enough for now, here some other posts about the subject<\/p>\n<p><strong>Source:<\/strong><br \/>\n<a href=\"http:\/\/blog.hydrotik.com\/2007\/11\/19\/fdt-30-code-templates\/\">http:\/\/blog.hydrotik.com\/2007\/11\/19\/fdt-30-code-templates\/<\/a><br \/>\n<a href=\"http:\/\/www.breaktrycatch.com\/useful-fdt-templates\/\">http:\/\/www.breaktrycatch.com\/useful-fdt-templates\/<\/a><br \/>\n<a href=\"http:\/\/www.stevensacks.net\/2010\/04\/30\/setting-up-fdt-to-look-and-behave-like-flashdevelop\/\">http:\/\/www.stevensacks.net\/2010\/04\/30\/setting-up-fdt-to-look-and-behave-like-flashdevelop\/<\/a><br \/>\n<a href=\"http:\/\/www.gskinner.com\/blog\/archives\/2006\/07\/as3_singletons.html\">http:\/\/www.gskinner.com\/blog\/archives\/2006\/07\/as3_singletons.html<\/a><br \/>\n<a href=\"http:\/\/blog.flashmech.net\/2008\/08\/review-fdt-vs-flashdevelop\/\">http:\/\/blog.flashmech.net\/2008\/08\/review-fdt-vs-flashdevelop\/<\/a><br \/>\n<a href=\"https:\/\/fosswiki.liip.ch\/display\/FLASH\/Code+Snippets+for+FDT+and+Flex\">https:\/\/fosswiki.liip.ch\/display\/FLASH\/Code+Snippets+for+FDT+and+Flex<\/a><br \/>\n<a href=\"http:\/\/cote.cc\/blog\/using-ctrl-enter-to-compile-actionscript-code-in-fdt\">http:\/\/cote.cc\/blog\/using-ctrl-enter-to-compile-actionscript-code-in-fdt<\/a><br \/>\n<a href=\"http:\/\/www.fdt.powerflasher.com\/developer-tools\/fdt-3\/getting-started\/shortcuts\/\">http:\/\/www.fdt.powerflasher.com\/developer-tools\/fdt-3\/getting-started\/shortcuts\/<\/a><br \/>\n<a href=\"http:\/\/blog.flashmech.net\/2008\/10\/fdt-tip-boost-your-code-assist\/\">http:\/\/blog.flashmech.net\/2008\/10\/fdt-tip-boost-your-code-assist\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, its time, I need to&#8230; So how to make the transition from FlashDevelop to FDT as easy as possible? Let FDT react like FlashDevelop And I don&#8217;t even have to break a sweat: the amazing Steven Sacks (creator of Gaia) wrote an article about it: read here. The only two thing that I&#8217;m using [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,330],"tags":[68,408,411,398,159,65],"class_list":["post-1417","post","type-post","status-publish","format-standard","hentry","category-as3","category-fdt","tag-actionscript","tag-as3","tag-fdt","tag-flash","tag-flashdevelop","tag-templates"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/comments?post=1417"}],"version-history":[{"count":10,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1417\/revisions"}],"predecessor-version":[{"id":1621,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1417\/revisions\/1621"}],"wp:attachment":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/media?parent=1417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/categories?post=1417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/tags?post=1417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}