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
Inheritance in map view (Read 3618 times)
Lew Friedland
Full Member
*
Offline



Posts: 50

Inheritance in map view
Jun 6th, 2013, 10:08am
 
Mark or Mark, feel free to redirect me to another thread if more appropriate.

[I've bumped this to a separate thread as we're really discussing actions rather than the more general topic. Split from this thread at post #9. Mark A]

Am also working on an academic book project and I believe that Sumner has pointed to the answer to a problem. As I am taking notes on readings (books), I set up a set of OnAdd criteria for each book; chapters are then added to the book note inheriting key attributes (title, etc.). áI then set the master chapter note with an OnAdd for the chapter title. But then, in maps, I am at the same level, so OnAdd does not work to add the chapter title unless I go up a level and drag a note into the original chapter note. áSumner points to a syntax that will allow each level to inherit its parent's attributes, the $Title|=$Title(parent).
I have just created a set of attributes that seems to work at the lowest level:
$Prototype|=$Prototype(parent);$Author|=$Author(parent);$Chapter|=$Chapter(paren
t);$Title|=$Title(parent); $Publisher|=$Publisher(parent);$PubDate|=$PubDate(parent);

This is great, but I want to understand why and how it is working.
Can someone point me to a thread that explains this form of inheritance?

Also, I tried to create a QuickStamp with this syntax, but cannot actually apply it when a note is open and I try to invoke it in the OnAdd section of the note because the QuickStamp menu is not available. Obviously, I can copy and paste, but is there a better solution?

Thanks as always.
Back to top
 
« Last Edit: Jun 06th, 2013, 1:20pm by Mark Anderson »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: sprawling non-fiction project: ideas?
Reply #1 - Jun 6th, 2013, 11:26am
 
If you are viewing a map, and add a note, the $OnAdd of the map's parent container is run when a note is added to the map. Thus consider us looking at a map of a chapter notes, i.e. 'Note about ch15' and siblings - the children in  layout below:

Chapter 15
   Note about ch15
   Another note re ch15

When adding a new note to the current map it is the $OnAdd of 'Chapter 15' that gets run. I'll admit to being a little unclear as to your file's hierarchy. What relationship to the chapter are notes about it? Parent/child or siblings.  In the latter case the Chapter's $OnAdd wouldn't be invoked.

For any note - via code inherited or set locally - to set $MyAttribute to that of it's parent:

$MyAttribute = $MyAttribute(parent)

If the code is running in or on and alias we get the parent of the alias unless we use:

$MyAttribute = $MyAttribute(parent(original))

Does that help? If not please ask. I'll bump this to a separate thread as we're really discussing actions rather than the more general topic.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Inheritance in map view
Reply #2 - Jun 6th, 2013, 11:54am
 
You might find this article on the Hierarchy of Contents to be of use.



In the image above, selecting 'Grandparent' and open a new map (Cmd+Opt+M) would show a map with one item that is itself a container. Opening a map on a note opens a map of the contents of its patent container. This is logical, it is the map which shows the item we have selected. If we select 'First Sibling', then the map shows 3 siblings all of which are just notes.  And so onů
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