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
Changing Rules en masse (Read 4315 times)
Rafter T. Sass
Full Member
*
Offline



Posts: 100
Burlington, VT
Changing Rules en masse
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.


Back to top
 
« Last Edit: Sep 06th, 2008, 6:29pm by Rafter T. Sass »  
raughter   IP Logged
Paul Walters
Ex Member




Re: Changing Rules en masse
Reply #1 - 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.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Changing Rules en masse
Reply #2 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print