5 of 6
5
TEA for Espresso, 1.0
Posted: 01 June 2009 11:24 AM   [ Ignore ]   [ # 61 ]
Member
RankRankRank
Total Posts:  51
Joined  2009-04-07

It all seems to work correctly here, thanks

Profile
 
 
Posted: 01 June 2009 06:33 PM   [ Ignore ]   [ # 62 ]
Sr. Member
RankRankRankRank
Total Posts:  205
Joined  2008-10-28

I feel like a dummy. I forgot the sugar installer doesn’t overwrite already installed sugars. Working great now. Looks good!

 Signature 

PHP.sugar

“Quick! Get in the Tardis!”

Profile
 
 
Posted: 01 June 2009 09:05 PM   [ Ignore ]   [ # 63 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Heh, glad it was something simple.  :-)

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 04 June 2009 07:49 AM   [ Ignore ]   [ # 64 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Sure, I just released beta 14, but TEA 1.0b15 is now ready for use.  There are no significant changes in this one; however, all outstanding bugs are quashed, and I don’t have any other features I want to implement before I’m ready to call this a real, official version 1.0 release, so you can consider this a release candidate.

Please let me know if there is anything glaringly missing, broken, or problematic.  Once 1.0 is finalized, I won’t be changing certain things (like environmental variable names, generic action API, etc.) without providing backwards-compatible fixes.  So if you’ve noticed something that bugs you, speak now!

Unless I find any bugs or glaring omissions, beta 15 will be my last release for a week or two.  I’m going to take some time before releasing the final 1.0 version to test features that I haven’t used much, prep some documentation on TEA’s default actions, and so forth, so you’ve got a bit of time to play with TEA before I lock things down and release it.

Improvements and bug fixes
- New rows in custom shell variables preferences are now selected on creation
- Example text for XHTML self-closing string in preferences now updates accurately (and an empty string can be stored, if you want to force the issue of never using XHTML)
- Improved zen coding document skeleton snippets, switched default language to English instead of Russian

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 26 June 2009 04:53 AM   [ Ignore ]   [ # 65 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Thanks to oprah_mantra’s impassioned pleas, I added a couple new actions for the TEA beta 16.  Aside from the new generic action, this is otherwise a minor bugfix improvement on beta 15, and should be considered a second release candidate for 1.0 final.

New features
- Actions->Select: this includes select word, line, and line contents and uses Textmate’s default shortcuts.  The only difference between Line and Line Contents is that the latter doesn’t select leading and trailing whitespace
- The selection actions are running on a new generic action: goto.  Aside from allowing you to select the current word or line, goto also allows you to search the document for a given string (can be regex, even).  The find-and-select functionality isn’t currently in use by any TEA actions, but could be used to jump from a function call to the function definition, for example (assuming they’re in the same file).

Improvements and bug fixes
- XHTML closestring functions are now much more future-capable; XHTML detection still just uses whatever is defined in TEA’s preferences, but I’ll be able to add smarter detection down the road without breaking any tea_action utility functions
- Fixes an error that could occur when custom user shell variables were blank
- Fixes bug in Expand Abbreviation that was preventing the action from running in some documents

Let me know if you find any show-stopper bugs, performance issues, etc.!

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 26 June 2009 05:16 PM   [ Ignore ]   [ # 66 ]
Newbie
Rank
Total Posts:  8
Joined  2009-05-01

Hey Ian, great work!
I was wondering if there is a way to get the current file name for use in snippets or actions? I briefly went through the documentation on github, but couldn’t find anything.

Profile
 
 
Posted: 26 June 2009 06:03 PM   [ Ignore ]   [ # 67 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

There isn’t currently any way to access the current file name for snippets.  If you need access to the file name in a shell script that’s run through TEALoader, you can use the $E_FILENAME environment variable.

I’ve added support for environment variables in snippets as a possible future TEA feature.  In the meantime, if you’re comfortable doing a little Python editing you could easily expose the filename to your snippets.  Just duplicate TEA for Espresso.sugar/TEA/insert_snippet.py and place it here:

~/Library/Application Support/Espresso/TEA/Scripts/insert_snippet.py 

Add the following code after line 23 (make sure to match the indentation level, using four spaces instead of a tab):

filepath context.documentContext().fileURL()
snippet snippet.replace('$E_FILENAME'filepath.path().lastPathComponent()) 

This works because TEA will override the bundled version of any given script if it finds an identically named script in your TEA/Scripts folder.  After making that change, you would just use $E_FILENAME in your snippets and it should be replaced with the name of the active file.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 27 June 2009 07:32 PM   [ Ignore ]   [ # 68 ]
Newbie
Rank
Total Posts:  2
Joined  2009-06-27

When I open Espresso with this installed loads of error boxes come up- and the actual program doesn’t open…

Any help!?

Thanks

Profile
 
 
Posted: 28 June 2009 05:31 AM   [ Ignore ]   [ # 69 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Welcome to the forums!  I can’t really help without more information.  For instance:

- Does Espresso launch fine with beta 15 or earlier?  Does it launch fine when you don’t install a TEA beta?
- What specific errors are you getting?
- What OS are you using?
- Have you installed any custom versions of Python or PyObjC?

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 28 June 2009 03:58 PM   [ Ignore ]   [ # 70 ]
Newbie
Rank
Total Posts:  2
Joined  2009-06-27

Thank you! Apologies for not being specific enough!

I have not used an earlier version of TEA, in fact this is the first sugar I have used with Espresso. It runs / opens fine without TEA installed.
Here is a screenshot of the errors: http://imglot.com/uploads/62310Picture_1_14-55-35.png
I am using the most up to date MAC Leopard
No I haven’t!

Thank you very much, Ian!

Gareth

Profile
 
 
Posted: 28 June 2009 05:40 PM   [ Ignore ]   [ # 71 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Hey Gareth,

Thanks!  Seeing the errors helps a lot; I’m pretty sure that you’re using an out-of-date version of Espresso.  You can check what version of Espresso is installed by first uninstalling TEA to avoid the errors, then launching Espresso and checking Espresso->About Espresso.  If the version number is less than 1.0.5, make sure to download the latest version from MacRabbit’s homepage before trying TEA beta 16 again.

All versions of Espresso have had TEA bundled with them, but earlier versions would not override bundled Sugars with Sugars installed in the user’s app support folder.  The error you’re seeing is a result of the out-of-date version of TEA trying to understand TEA beta 16’s action definitions and failing (the action API change slightly between the version bundled with early Espresso versions and the latest betas).

Let me know if you have any further problems!

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 29 June 2009 09:05 PM   [ Ignore ]   [ # 72 ]
Newbie
Rank
Total Posts:  8
Joined  2009-05-01

Ian, thanks for your earlier reply, this helps a lot.
Too bad it’s not available for snippts by default yet.

Profile
 
 
Posted: 27 July 2009 05:13 AM   [ Ignore ]   [ # 73 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

TEA for Espresso 1.0b17 is now out.  This is a very minor update as I near the final 1.0 release, and should be considered the third release candidate.

Improvements
TEA now supports a new folder structure for custom user TEA actions or TEA actions in third party Sugars.  Instead of placing your action script files in MySugar.sugar/TEA or ~/Library/Application Support/Espresso/TEA/Scripts, place them here:

~/Library/Application Support/Espresso/Support/Scripts

—or—

MySugar.sugar/Support/Scripts

The old locations will continue to be supported for backwards compatibility, but are considered deprecated.  Full info on the proposed layout of the Support folder is available here:

http://wiki.macrabbit.com/forums/viewthread/449/

Bug fixes
When using the “selected lines to snippet” action, snippets now properly handle classic Mac line-endings.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 09 August 2009 02:37 AM   [ Ignore ]   [ # 74 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

I just released TEA 1.0b18.  If you are using TEALoader to run custom shell scripts, this is a required update in order to be able to take advantage of the new Support folder layout.  Otherwise, not much has changed.  This is the fourth and hopefully last release candidate.  Unless I can find any further show-stopping issues, the only difference between this release and 1.0 will be the version number.

Improvements and bug fixes
- Added logic to search Support/Scripts as well as the old TEA folder for shell scripts
- Fixed bugs with empty custom environmental variables
- Fixed various bugs related to trimming lines (used by Select Line Contents, etc.)
- Improved word-detection regex to stop not only at HTML tags, but also PHP/ASP/JSP delimiters, HTML comments, and ColdFusion comments
- Fully tested zen-coding, swapped ‘en’ for ‘ru’ in language strings

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 25 August 2009 05:55 AM   [ Ignore ]   [ # 75 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

TEA 1.0b19 is now in the wild; this is the fifth release candidate.  Again, very little has changed, but I’ve done a minor restructuring of the underlying class structure to allow easier sharing of common functionality, and added the ability to disable snippets both based on syntax context and whether the correct number and type of selections are present.

Improvements and bug fixes
- Automatic conversion to strings when using tea.log(); no more random errors because you accidentally forgot to turn a number into a string before you logged it
- Added new selection-context option to XML to choose what type of selection is required for the action: none, one, one+ (one or more), multiple
- Added multiple selection support to line sorting actions
- Added a complementary Insert Tag option that is enabled when there is no selection for Wrap Selection In Tag. Works identically (and same shortcut) except that you get a tab stop in the middle of the tag
- Added a generic action class to share common syntax-context and selection-context capabilities between TEAforEspresso, TEALoader, and any future TEA classes

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
   
5 of 6
5