We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › TextWrangler as a mid-level editor
Page Index Toggle Pages: 1
TextWrangler as a mid-level editor (Read 3505 times)
TextWrangler as a mid-level editor
Jan 12th, 2010, 10:31am
 
The PDE is pretty good for me at the moment, as I am not ready to transition to the heavier structural requirements of Java (read: not ready for new syntax, and my current farm of little projects won't benefit).  Switching over the the Eclipse IDE is a little too much, at the moment.

So, having tooled around with TextWrangler for Mac, I improved upon a script that was posted on these boards to better control running a pde project.  using TW, you can even apply the command-R key to it in the Window>Palettes>Scripts menu item.  The script will save your current pde file, quit Processing and reload the pde in processing each time it runs, so that the latest changes are always used.

I have also created a pretty good .plist file that will colorize strings/chars, highlight keywords, and also supports the function finder popup at the top of the window (that last bit was the most important thing I'd like in the PDE, by the way.)  It works ok.

The Applescript is below.  But, the plist is a little large to post.  Can anyone recommend a good cheap/free site that I can upload files to?  If so, I'll post the link to it.

Quote:
repeat while application "Processing 1.09" is running
     tell application "Processing 1.09" to quit
end repeat

tell application "TextWrangler"
     set topFile to file of window 1
     save topFile
     set topName to name of window 1
end tell

tell application "Finder"
     activate
     set mypath to path to application "Processing 1.09"
     open file topFile using application file mypath
end tell

tell application "System Events"
     repeat until application "Processing 1.09" is running
           tell application "Processing 1.09" to activate
     end repeat
     delay 2
     tell process "Processing"
           tell menu bar 1
                 tell menu bar item "Sketch"
                       tell menu "Sketch"
                             click menu item "Run"
                       end tell
                 end tell
           end tell
     end tell
end tell


Re: TextWrangler as a mid-level editor
Reply #1 - Jan 12th, 2010, 12:22pm
 
If it is not super-large, you can use one site where you can paste code, checking the option to keep the code forever.
pastebin.com is one of them, one of the oldest if not the first. pastebin.ca is also interesting as it offers some other services.
BTW, I think such thread belongs more to the Integration forum. FYI, as this thread might be moved by a moderator.
Re: TextWrangler as a mid-level editor
Reply #2 - Jan 12th, 2010, 2:14pm
 
Many thanks for the url info.  Sorry about the wrong post location.  I just put it where I saw other similar posts.

The url for the plist to use with textWrangler is:
Quote:
http://pastebin.ca/1748881


Place the code from the url to a file called "processing.plist" and save it to
Quote:
~/Library/Application Support/TextWrangler/Language Modules/


Restart TextWrangler.  Hope you like it.
Re: TextWrangler as a mid-level editor
Reply #3 - May 7th, 2010, 11:55am
 
Thanks for the help on getting things set up with TextWrangler - especially the run script. If anyone runs into the error "System Events got an error: Access for assistive devices is disabled" the fix is at http://forums.macrumors.com/showthread.php?t=567044  - you simply need to check 'enable access for assistive devices' under universal access in system preferences.

I attempted to grab the processing.plist from http://pastebin.ca/1748881 but it didn't work. Can anyone point me to the right place to find this

Thanks!
Re: TextWrangler as a mid-level editor
Reply #4 - May 7th, 2010, 12:18pm
 
Hi Romney, glad somebody finds it useful.  It looks like pastebin.ca is not feeling well at the moment.

Try this: http://pastebin.com/nZSp1WtV
Re: TextWrangler as a mid-level editor
Reply #5 - Jun 7th, 2010, 7:20am
 
Hi i was looking at using text wrangler for editing Pde, so your post is perfect,
what should i do in order for processing to appear on the language list and be able to  associate the extension after copying the plist to its location?,
thank you
Page Index Toggle Pages: 1