Re: [code] [textadept] Saving state over reset

From: Mitchell <m.att.foicica.com>
Date: Fri, 6 Sep 2013 17:45:26 -0400 (Eastern Daylight Time)

Chris,

On Fri, 6 Sep 2013, Chris Emerson wrote:

> Hi,
>
> I have some state that I'd like to save over a Lua reset (command line
> history). I've found a way to do it - I stash it in _BUFFERS.some_unique_key
> in RESET_BEFORE and retrieve it in RESET_AFTER.
>
> Is there a cleaner way to do it?

No, I never anticipated this. You can use the `_G.arg` table if you want.
Keep in mind it is not available during the reset, but it is afterwards.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 06 Sep 2013 - 17:45:26 EDT

This archive was generated by hypermail 2.2.0 : Sat 07 Sep 2013 - 06:54:47 EDT