On Fri, 9 Oct 2009 09:28:44 -0500
"Edward K. Ream" <edream...@gmail.com> wrote:

> Ok then.  Let d3 be defined as in my post.  Why not have
> d3.get('_editable_attributes',[]) be the list of *names* of editable
> attributes names--a list of strings. Doesn't that suffice?  Isn't
> that the simplest thing that could possible work?

I think you might mean d2, but it doesn't really matter.

Yes, an editable attributes list would be a nice place to store things,
and would have 2 advantages, it would allow plugins to store there
editable attributes where ever they wanted in their uA entry, and it
would allows storage of type information if it was a list of
(attribute_name, type) instead of just name.

The disadvantage with all these convention approaches, as opposed to
having plugins registering the information, is that it would be
repeated on every uA the client plugin initialized.

Using your suggestion above v.uA might be:

  {'foo': {'_editable_attributes':['name','phone','cell'],
           'name':'me',
           'phone':'123',
           'cell':'456'
          }
  }

but the '_editable_attributes' will be the same and repeated on every
node.

You could store the _editable_attributes information in a .leo file
level place, but then nodes would lose (well, forget to display) their
attributes when the were moved from one file to another, if the second
file hadn't been set up with the same _editable_attributes info.

My option 2a would have the following v.uA instead of the above:

  {'foo': {'_edit': {
             'name':'me',
             'phone':'123',
             'cell':'456'
          } }
  }

which is better repetition wise (just repeating the '_edit' dict
wrapper), but forces client plugins to refer to their attributes as 
v.uA['foo']['_edit']['name'] instead of v.uA['foo']['name'] with your
'_editable_attributes' suggestion.

Cheers -Terry

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

Reply via email to