Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Agent that lists notes that touched an adornment (Read 5423 times)
Paul Walters
Ex Member




Agent that lists notes that touched an adornment
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
Back to top
 
« Last Edit: Apr 24th, 2008, 2:22pm by Mark Bernstein »  
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Agent that lists notes that touched an adornment
Reply #1 - 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!)
Back to top
 
 
WWW   IP Logged
Paul Walters
Ex Member




Re: Agent that lists notes that touched an adornment
Reply #2 - Apr 24th, 2008, 3:04pm
 
MB: Thanks for your answer and the clarifying edit!
Back to top
 
 
  IP Logged
Ioa Petra-ka
Full Member
*
Offline



Posts: 103
Portland, Oregon, USA
Re: Agent that lists notes that touched an adornment
Reply #3 - 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.
Back to top
 
« Last Edit: Apr 24th, 2008, 4:10pm by Ioa Petra-ka »  

Av
  IP Logged
Pages: 1
Send Topic Print