How to link SWC files to a TextMate Flex / Actionscript project

Open up Flex > Project > Project-config.xml. You’ll notice this is the schematic of a file which is created automatically when you create an Flex 3 project. Unfortunately, the Project-config.xml schematic in the Flex bundle lacks these two sample nodes that are in the ActionScript 3 bundle. These are:

<!-- Example library linkage -->

<!-- for swc's
  <library-path append="true">
<path-element>../lib/bin/</path-element> </library-path> -->

<!-- for src
<source-path append="true">
<path-element>../lib/src/</path-element> </source-path>
-->

This file acts as a project-level override to the general configuration file found in the SDK directory. Close the bundle editor. You’ll want to add the following to your project’s configuration xml which lives in ’src’:

<library-path append="true">
  <path-element>../libs/</path-element>      
</library-path>

Now you can create a new directory named ‘libs’ parallel to ’src’ and drop into here all SWC files that your project depends on. Save the configuration file and you should be able to build. Now anyone with the Flex SDK will be able to save your project directory locally and jump right into compiling

Gemfile syntax highlight in TextMate

Quick tip that I found when searching to find out how to get syntax highlighting in your Gemfile if you are using TextMate Ruby on Rails bundle.

In Textmate, select the Bundles menu => Bundles editor

Select languages instead of show all.

Select the Ruby on Rails language within the Ruby on rails bundle

Change this line:

fileTypes = ( 'rb', 'rxml', 'builder' );

to this:

fileTypes = ( 'rb', 'rxml', 'builder', 'Gemfile' );

Go to Bundles => Bundles Editior => Reload Bundles.

Reopen your Gemfile and you should now be getting the syntax highlighting.

Keeping Dreamweaver for global find and replace? Hell No...

I found that over time I stopped using Dreamweaver. It was a great program to go from MS Frontpage when I was learning HTML back in 2000. The program just got to be a bit too slow and packed with way too many things that I didn't need.

One thing that I always found myself using it for no matter what was it's global find and replace. From time to time I would run across someone else's project that was full of static html that I needed to globally change. Dreamweaver is always great at doing this for you. However I always felt a bit pissed about having to install Dreamweaver just to have this one feature. Well no more my friend. 

I have been a supporter and user of Textmate for a wile but never had to do the old global find an replace. That's because I don't spend a lot of time in html projects. I am currently on a project where I am again editing a tone of static html files. Well after a little searching you can find that Textmate has global find and replace. Yay!

Here is the step by step

(on a side note a Windows user, and friend of mine Andy Matthews says that EditPlus is great for this as well)

1. Make sure you have all your project files open in a Textmate project. Then choose Shift>Command>F

Screen_shot_2010-10-15_at_8
2. Then type some text or code in that you are wanting to replace. You will notice that replace all is grayed out and not selectable. That's ok > enter step 3.

Screen_shot_2010-10-15_at_8
3. Click Find (This will find all the instances of the text or code within all your project files.

Screen_shot_2010-10-15_at_8

4. Now you can choose replace all or you can choose to select the results one by one below and only do the replace on the files that you want.

5. After preforming the replace all you will notice that all the files that textmate preformed replace on will be gray in the project. This means they need to be saved. You can choose to save one by one or you can go to the menue and Save All.

Screen_shot_2010-10-15_at_8

 

File navigation and search for your fav text editors' on the mac

Text editor development has been stagnant for several years. It’s time for developers to take the text editing experience forward into 2010!

PeepOpen is a file navigation application that works with TextMate, Coda, MacVim, and Emacs (Mac OS X Snow Leopard on 64-bit Intel required, support for other editors is coming soon). Search on both paths and filenames, and easily open the file in your text editor with a single keypress. Useful metadata helps you quickly choose the file you’re looking for.

I am really pressing to make Textmate my editor of choice for most all my coding so when I find little gems like this that will make that environment even better I jump at the chance to give them a try. This plugin is simply, badass.

Autocomplete not working in the Flex Bundle for Textmate?

I am being very hard headed and determined that I am going to give Textmate a solid try for my actionscript and flex projects. Work on the bundle has been a little lacking but what has been developed so far is pretty great.

I have run into some slight issues but able to figure them out and get things set up pretty well and I have already dug in and started customizing the snippets to suit my needs.

One thing that I have not been able to fix, figure out or find a straight answer for is regarding working with MXML files. AutoComplete for Actionscript files seems to work great but I don't seem to get the same result when I am editing Actionscript inside the script block in a MXML file.

I am hoping that someone that uses Textmate all the time could through some suggestions my way to help track down the issue. If I am in the actionscript code block and hit (option + esc) I get "no completion available" message.

Please feel free to join the discussion if you have any suggestions stackoverflow.com, or by all means leave a commit here in this post if you like.

---------------------------- update -------------------------------------------

So I posted this "issue" on the textmate mailing list and I heard back from the creator of the flex bundle. Simon basically told me that he had not enabled autocomplete feature to the flex mxml script blocks yet. This is good to know that my shit wasn't broke and he offered the following solution so that auto complete will work in mxml script blocks.

There's no issues, I just haven't got around to supporting autocompletion from within script blocks embedded in mxml. Although it seems to be pretty stable if you just go ahead and add the right scope (text.xml.mxml source.actionscript.3.embedded.mxml) to the command, as I have done in my dev branch:

http://github.com/simongregory/actionscript3-tmbundle/blob/sg/Commands/Auto%20Complete.tmCommand

You can do the same thing with the auto import command and it'll add the import to the script block.

Cheers, Simon

 

Installing AS3 and Flex Bundle for Textmate

Textmate-bundle-editor

I am totally not a coding guru just yet, but I have my eyes on the prise and I hope to one day know my stuff, but for now I will admit that I have a little trouble understanding some simple tasks that most programmers would not have any trouble with. We all know and love Textmate. The great text editor for the Mac. Heck I even use it to write my blog posts. You have to check out the blogging bundle if you have not used it for that it is great. As soon as I got Textmate I started using it for all my actionscript. At the time the bundle was only for AS2. Now that I am starting to dig into AS3 and Flex it would be great to start coding using this editor. It launches way faster than Flex Builder or Eclips. There are some draw backs. The biggest being that you do not get the code hinting quite as much as you do with Flex Builder, but still it is a great tool to work in. In the next few steps I will show you how to install SVN (subversion) client for your Mac so you can utilize all the bundles and updates that are currently being developed for Textmate and most importantly there is an AS3 / Flex bundle that you can download.

Read the rest of this post »