hi again

just a clarification: when I do this

os.environ['TM_PROJECT_UUID'] = someobject

I get an error saying that only strings are accepted as possible values. 

is there any other approach for storing a non-string in the environment? 

many tx, mikele


On Mon, Aug 12, 2013 at 12:00 PM, Allan Odgaard <mailinglist@textmate.org> wrote:
On 11 Aug 2013, at 19:02, Michele Pasin wrote:

[…] each time I send a command, the socket is obviously re-created; I

wondered if I TextMate provides a mechanism to save the 'sock' binding in
the current  environment - so that I can reuse it later within other
commands.

Not per se, but TextMate does give you a TM_DOCUMENT_UUID and TM_PROJECT_UUID variable.

The former is unique per document and the latter is unique per project (window).

You can use these as keys into shared storage (such as files in TMPDIR) to store things that you wish to associate with a single document or project.

Presently though there is no cleanup callback, so if you spawn a server process for a document or project, you should have it shutdown automatically if it hasn’t seen any activity for some amount of time.

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate



--




--------------------------------
www.michelepasin.org