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 >> Changing Rules en masse
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1220738988

Message started by Rafter T. Sass on Sep 6th, 2008, 6:09pm

Title: Changing Rules en masse
Post by Rafter T. Sass on Sep 6th, 2008, 6:09pm

Is there anyway to (re)set the Rules in a number of notes at once?
*(re)Setting in the prototype seems not to work, or work unevenly.
*Setting by agent action seems only able to insert about 15 characters.

Any ideas?

The point is to use it during tinkering with a test TBX.
I'm not looking to have agents running all over changing rules around as part of how a TBX functions.



Title: Re: Changing Rules en masse
Post by Paul Walters on Sep 7th, 2008, 9:23am

"Rule" is an attribute in the General group of attributes.  It is a string.  You may select notes and do a Quick Stamp.  Or make a stamp and use that.  Or give an adornment an OnAdd Action that sets the value of Rule (remember to put the Rule string in quotes) and drag the note(s) onto the adornment, which will set the rule.  There are probably other ways, but I've used all of these methods with success.

To clear rules, use

Code:
Rule=""


It is also valid to use the following to append to an existing rule

Code:
Rule = $Rule + ";" + <new rule string>
replacing <new rule string> with your new code.

Title: Re: Changing Rules en masse
Post by Mark Anderson on Sep 7th, 2008, 10:38am

As Rafter's TBX is using inheritance from prototypes, it's worth knowing the difference between:

Code:
Rule=""
...vs...
Rule=;

The first simply sets the current Rule to nothing (empty, no value). The second does that but also re-creates inheritance*. Don't quote the semi-colon, e.g. Rule=";" as that will literally set a meaningless Rule of ';'.

* once an attribute has been altered from it's default inheritance is broken even if the default value is manually set.  The above mechanism must be used to tell TB you want the attribute to inherit app pref/doc pref/prototype values (in that order - i.e. last one found applies).

How can one tell if a given attribute is inherited or set specifically for that note?  Open Info View (Cmd+Opt+i).  Any attribute listed in the left column in black (as opposed too mid-grey) is set specifically for that note.  The info view offers another way to re-inherit values. Click the value (right column) for an attribute that has been set an note level. Now click the middle button at the bottom of the view "Use defa..." and the value will be set to the inherited default and the attribute name (left column) will change from black to grey.

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.