[Tb] Help with #last in rule/agent

From: Mark Bernstein <bernstein__AT__eastgate.com>
Date: Wed Mar 30 2005 - 14:10:03 EST

>I'm trying to create an attribute which will record the last child
>or descendant of a given container, or alternately create an agent
>that collects the last descendant/child of specified containers.

You're confusing queries (which begin with # and ask questions) with
export elements.

One way to do what you want might be something like the following.

a) make an agent that picks off the last note in your target container

        Agent Name: MyAgent
        Query: #last(MyFavoriteThings,1)

b) MyAgent can get the name of its child

        Rule: MyAttribute=^ getFor(child,Name)

c) You can grab ^getFor(MyAgent,MyAttribute) where you need it.

-- 
--------------------------------------------------------------------
Mark Bernstein             bernstein__AT__eastgate.com    (617) 924-9044
Eastgate Systems Inc       http://www.eastgate.com/  (800) 562-1638
134 Main Street            http://www.tekka.net/
Watertown MA 02472 USA     http://www.markbernstein.org/
Received on Wed Mar 30 19:10:03 2005

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 10:45:38 EST