On Mon, Apr 7, 2008 at 12:13 AM, Alex Polite <[EMAIL PROTECTED]> wrote:

>
> I'd like to have a node that is a function of some other node/nodes.
> Sort of like in a spreadsheet. If node A is a function of nodes B and
> C it should get automatically updated in the view whenever B or C are
> changed. What's the simplest way of doing that?


Write a script :-)  p.bodyString() is the body text of node p, so what you
want is a script that will update your spreadsheet nodes.  Something like:

for p in c.allNodes_iter():
  if spreadSheetEval(p):
    myEval(p)

You define isSpreadSheetNode and spreadSheetEval.

This does a global re-evaluation, but it's a start.

To refine this, you can re-evaluate the neighbors of changed nodes.  To
determine when a node changes, you can create an event handler for one of
the 'select' events.

HTH.

Edward

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to