On Sun, 31 Jul 2011 14:27:40 -0700 (PDT)
SegundoBob <[email protected]> wrote:

> I'm writing a plugin and I want to allow the user to select one set of
> preferences for the current .leo file and another set of preferences
> to be the current defaults for all .leo files.  I want these
> preferences to persist from one Leo-Editor session to another.  That
> is, they must be saved on disk somehow, somewhere.

In some situations they probably should be written into the outline of
the Leo file in question where they can be edited as plain text.  In
other cases you probably want the dict like creatures c.db and
g.app.db, .leo specific and global respectively.

Note that c.db doesn't exist until the files been saved to a specific
name.

These are probably what you were thinking of in terms of caching,
they're related to the caching machinery, I think it uses them as well,
they're not the outline caches exactly, perhaps the storages mechanism
for the outline caches.

Cheers -Terry

> Naively one might think that the preferences for a particular .leo
> file should be saved in the .leo file itself, but I understand and
> agree with Edward that such things as these plugin-specific
> preferences should not be written to the .leo file.  I believe Edward
> advocates writing them to the "cache."  How do I do this?  That is,
> write them to "cache" and read them from "cache" so they are
> associated with a particular .leo file?
> 
> Should the current defaults for all .leo files also be written to the
> "cache"?  Is there cache access not associated with any specific .leo
> file?
> 
> Or should the current defaults for all .leo file be written to To
> myLeoSettings.leo?  Or to a file specific to my plugin in the
> directory containing (or that would contain) myLeoSettings.leo?
> 
> Or ?
> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to