Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Agent that lists notes that touched an adornment
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1209060224

Message started by Paul Walters on Apr 24th, 2008, 2:03pm

Title: Agent that lists notes that touched an adornment
Post by Paul Walters on Apr 24th, 2008, 2:03pm

I am working on a structure that seems too involved to be the best approach.  My objective is to enable agents that list notes that touched particular adornments.  Here is my approach:

1) Created an attribute called "myAdornment"
2) Created an adornment (call it "Objective")
3) Included an OnAdd Action for Objective: myAdornment="Objective"
4) Created an Action agent with the Query: myAdornment="Objective"

All seems correct, and this works well.  I have a "reset" adornment with OnAdd Action to cancel the assignment (myAdornment="") when I want to remove the note from the display list.

Is this too complex?  Could I have accomplished the same thing with fewer steps?

Paul

Title: Re: Agent that lists notes that touched an adornment
Post by Mark Bernstein on Apr 24th, 2008, 2:25pm

This doesn't seem that complex to me.

Your problem: "I want a list of every note that has touched an adornment".

In the nature of things, this means you'll need:

  • An adornment
  • An action the adornment can take when a note touches it
  • An agent to make the list


True, this seems like a bunch of moving parts.  But that's OK: all the parts are quite simple!

(I made a small edit in your post for clarity; feel free to correct it if that's not what you meant!)

Title: Re: Agent that lists notes that touched an adornment
Post by Paul Walters on Apr 24th, 2008, 3:04pm

MB: Thanks for your answer and the clarifying edit!

Title: Re: Agent that lists notes that touched an adornment
Post by Amber Vaesca on Apr 24th, 2008, 4:07pm

That's going to be the simplest way to match in a persistent way, yes. If all you need to do is track which notes are currently in an adornment, though, try using the #inside("Adornment Name") syntax. They'll stop matching as soon as you move it out, negating the need for a reset adornment. Note, overhangs are allowed. As long as part of the note is touching the adornment it will match. So if your problem is one of simply wishing to distinguish between soft and hard adornment assignment, you could try "dangling" notes and see if that visually pleases you. By implication, if adornments are adjacent, a note can be #inside two at once, and you can do further searching based on that kind of logic, too.

But of course, if you need to move the note entirely to some other part of the outline, or in another adornment entirely---then yes, the method you have set up is the best way to go about it.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.