[Tb] parent name in title?

From: Mark Anderson <mac>
Date: Mon Jun 13 2005 - 15:30:10 EDT

On 25/5/05 10:49, "Max Voegler" <voeglerm__AT__geschichte.hu-berlin.de> wrote:

> Dear Mark,
>
> many thanks for your Answer -- I did look at the wiki and that helped
> (the ^ ^get(ChildCount) is pretty neat!)
>
> But I can't seem to get it work work in other fields. I created a new
> field called "parent" and in it, I want the name of the parent. Using
> the same syntax, I tried, as a rule: "parent=^ ^getFor(Parent, Name)"
> but came up empty. Any ideas?
>
> best, Max

Hmm. 'parent' is not a good name for a User Attribute 9your 'field'), for
two reasons:
1. TB already uses 'parent' as a placeholder object name for a note's
parent.
2. Although not a hard rule, attributes by usage normally have
uppercase/CamelCase names.

Given the above, a better name for your user attribute would be "MyParent"
or "ParentName", etc.

Regardless of your field/attribute's name the following code...
> ^getFor(Parent, Name)
...has no effect because there is no such *object* as 'Parent' - it is
'parent 'sic'. For a list of objects, see
http://www.acrobatfaq.com/tbx/index/objectsc/itemobje.html (I don't recall
the wiki having any

This is an area where TB documents could do with more explicit guidance.
'Loose' naming is fine if you know how the code is written or have some
rules/expected usage. Without it, everything is guesswork - especially if
things fail by giving no output - you've no idea what you've done wrong.

If in doubt, I follow the 'apparent' naming conventions of TB's own
codes/attributes over case, quoting strings etc., as this gives more
consistently correct results to queries, actions, rules, etc.

HTH

Mark Anderson
Received on Mon Jun 13 15:30:01 2005

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 10:45:38 EST