Created
July 15, 2010 21:50
-
-
Save kristoferjoseph/477575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# encoding: utf-8 | |
require ENV['TM_SUPPORT_PATH'] + '/lib/ui' | |
skins_path = ENV['TM_FLEX_PATH'] + '/frameworks/projects/spark/src/spark/skins/spark' | |
file = TextMate::UI.request_file(:title => "Select Skin Class", :directory => skins_path) | |
contents = IO.read("#{file}") | |
File.open(ENV['TM_NEW_FILE'], 'w+') do |f| | |
f.write contents | |
end |
Removing the second GENERATED_FILE on line #11 solved the double creation issue.
Ah ha. Nice work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Flex 4 Skin Template program that creates a new skin based on an existing Spark skin. This is similar to the functionality that Flash Builder supplies, but it actually shows you where the skin classes live via the browse dialog. There is a bug in this code somewhere in lines 8-10. Basically two files are created in the TextMate project drawer, but in reality only one file has actually been created on disk.