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).

My hierarchy of an entry of a scholar for whom I am writing a note in TBX is as follows:

Scholar>Teachers>AuthoredWorks - CommenariesOn - AbridgementsOf>Notes

Each of the children and descendants will have their own children notes, depending on how many teachers, works, etc. the scholar had.

My question: when I now set 'scholar' as a prototype, and then create a note using that prototype, the new note inherits the children -- teachers, authoredWorks, notes -- but not their children -- in this case, CommentariesOn, AbridgementsOf. I do want them included. What do I do?

It appears PrototypeBequeathsChildren can only pass on 1 'layer' of children, but there is a workaround.

In you prototypes container, make a prototype called p_Scholar with the children Teachers, AuthoredWorks and Notes. Now make a second prototype called p_Works and give it the children CommenariesOn and AbridgementsOf. Now, in your p_Scholar protype's AuthoredWorks child, add this rule:if ($Prototype(parent)="p_Scholar") {$Prototype="_Works"}

That will result in your desired set of notes.

TIP: the if & else words in an action/rule conditional are case-sensitive. 'If' and 'Else' will cause a silent failure of the rule .... and wasted a fair amount of time here this evening! This fact is undocumented and I'd suggest the manual reflect this fact in forthcoming editions as the case sensitivity is not an obvious fact.

MB: In your scenario, I would still have to manually make an AuthoredWorks note, that would then interit the -CommentariesOn and -AbrdigmentsOf children?

MA: I tried your rule, but it didn't seem to do anything. I still have to make the AuthoredWorks note manually, just as in MB's scenario. Of course, I modified your Works to be AuthoredWorks. When creating a new note elsewhere, based upon p_Scholars, are you getting all -CommentariesOn and -AbridgementOf childrenfor AuthoredWorks automatically?

In short, I'm still looking for a way to have *all* descendants be inherited. Just for my understanding, is there a reason why all the descendants are not inherited, as opposed to just the children?

Well, you're probably making a minor syntax mistake somewhere - remember that in many cases user code syntax errors fail silently in TB, it's up to the user to figure out how/why. Anyway, to assuage your doubt that what you want is possible, please see the demo I just made. Download "multilevel_children.tbx.zip" from this page: http://homepage.mac.com/mwra/FileSharing5.html.

The demo proves the basic idea, albeit with a workaround of linked prototypes. However, it might help you with getting the basics running. Once you're happy with the basics, feel free to embellish and add other code. I hope this helps!

The Scholar's prototype bequeaths the immediate children, and sets their prototypes.

Setting the prototypes of the children now clones the grandchildren.

Just so I am clear: "now" meaning as of 4.1, or "now" in your to-be-released version? In other words, as of now, do I still have to do the work-around that Mark A kindly provided, or will the setting of the children's prototypes suffice?...because it didn't work for me when I tried it before.