GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Narrative Report "They" phrase only links to spouse


https://support.genopro.com/Topic28484.aspx
Print Topic | Close Window

By edanite - Saturday, June 4, 2011
On the family page, the paragraph at the top contains a link to the spouse and children, but not to the parent. For example, in the Harry Potter tree, we have "James and Lily were married in 1979.  They have a son named Harry." James is plain text, but Lily and Harry are links to the appropriate places.

I tried fixing this by modifying WriteNarrativeUnionsAndDivorces to use StrHtmlNarrativeName for both arguments of PhThey and changing PhThey to use {0h} instead of {0} as the first argument. Now I get "<a ...>James</a> and <a ...>Lily</a> They have a son named Harry." which doesn't make any sense at all.

There's also a secondary point: is there a debugger for the report generator?
By genome - Sunday, June 5, 2011
This is an odd one and proved a bit of a challenge.  In theory the approach you took should work I believe.  But they appears to be a bug in the Report Generator within GenoPro.   As I understand it when arguments are formatted by Util.FormatPhrase as already encoded (e.g. {0h} or {1h} in PhThey) then Genopro inserts a special code around such text.  Then when output to the report by Report.WritePhrase (e.g. via {0} in PhUnion) it knows not to re-encode those parts. The bug is that this only seems to work when there is no coded section at the very start of the argument, if there is one then the phrase gets corrupts as you have observed.  A circumvention is to ensure that there is always some other characters before the pre-encoded ones etc.).   Obviously it is desireable that such extra characters are not visible, so after a bit of Googling I tried the unicode numeric entity &#8204; (zero width non-joiner) at the start of PhThey T="&#8204;[{0h}][{?1}[{?0} and] {1h}][{?!0|1}{0=They}]" and this works.  I will make the changes in the next revision of the skin.

As for a debugger, I expect you are aware of the Phrase Editor in GenoPro's Tools Menu to check phrases, but I doubt if this would have helped here.  Personally I just add a few Report.LogComment statements here and there to debug my skin scripts.  There is a Microsoft Script Debugger but I am not sure if that would be of use either.
By genome - Wednesday, June 8, 2011
Fixed in version 2011.06.08