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
path names for functions like inside() (Read 813 times)
Anand
Full Member
*
Offline



Posts: 16

path names for functions like inside()
Oct 01st, 2015, 1:14pm
 
I am interested in using inside() in a query or a rule. I have two questions about the argument provided to inside():

1) If the argument contains spaces or other mischievous characters, do I use quotation marks to specify the path? For example, inside("/folder/subfolder/adornment name with blanks")?

2) If I leave out the full path, will inside() look in the current path? For example, can I use inside("adornment name with blanks") for notes that are already in /folder/subfolder?

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: path names for functions like inside()
Reply #1 - Oct 1st, 2015, 1:31pm
 
inside() can only be used in a query, i..e in an agent or smart adornment. But an edge case is find(query) - which also uses query functions. find() is optionally used with many action codes that need to define an item or group scope. Must usually the latter is done using a designator, but find() can be useful if a particular scope is needed and which not designator can fulfil.

1. In short Yes, this is a good defensive measure. It may work without the quotes depending what the 'mischievous' characters are.  Of course, if in doubt, better to err on the side of safety.

2. In short, probably not. If only specifying a $Name rather than a full $Path and where a single match is expected, a general rubric is that TB will use the first matched object going by outline.

Unfortunately 'adornment' only works in a query context, thus ont in a rule.  This means a note can't ask: "am I on an adornment?" or "what is the name/path of the adornment upon which I am located?".
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