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 2 
Send Topic Print
Exporting links to SOME children / aliases (Read 4390 times)
Pat Maddox
Full Member
*
Offline



Posts: 66

Re: Exporting links to SOME children / aliases
Reply #15 - Apr 26th, 2016, 1:02pm
 
Quote:
Actually, your code ^include("child 1",... is asking Tinderbox to find the note named "child 1" within the entire TBX, and you have several. When matching notes, Tinderbox convention if a single match is required is to take the first match by $OutlineOrder (the first child note of the first container in your TBX)


Perhaps, but that's not what happens in practice. If you download the most recent test document, you'll see that that's not how it works. It doesn't find the first instance in the document with that name. It finds the first instance inside the current note. I guess I just got lucky.

And so far it's working in my main document.

Quote:
Aside, I'd repeat my earlier suggestion of avoiding using designator names in your test file (e.g. 'parent') as it may confuse Tinderbox in the exact scenario where you don't want confusion.


I'm not sure where I'm using a designator name? I'm using "parent 1" and "child 1" which is different than the designators "parent" and "child"...
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Exporting links to SOME children / aliases
Reply #16 - Apr 26th, 2016, 1:50pm
 
Mark Anderson is correct if you're looking at notes by path  (for example, /configuration/exchange/sterling).  You're correct if you're looking at notes by name.

More precisely, when Tinderbox looks for a note by name, it first examines the children of this note.  If that doesn't find a note, it examines the entire document for a note with that name. Tinderbox typically does return the first matching note in outline order, though you should not rely on that.

Other search-like facilities do examine the document in outline order, including agents and find() clauses.
Back to top
 
 
WWW   IP Logged
Pat Maddox
Full Member
*
Offline



Posts: 66

Re: Exporting links to SOME children / aliases
Reply #17 - Apr 26th, 2016, 2:36pm
 
Quote:
More precisely, when Tinderbox looks for a note by name, it first examines the children of this note.  If that doesn't find a note, it examines the entire document for a note with that name. Tinderbox typically does return the first matching note in outline order, though you should not rely on that.


Okay, very good to know. This makes my work easy: any time I want to render specific children, I can create a container, drop the children in, and specifically include that container.

Thanks both Marks for sticking with me...
Back to top
 
 
  IP Logged
Pages: 1 2 
Send Topic Print