GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Narrative Report "They" phrase only links to spouse

Click to view RSS...
Author
Posted Saturday, June 4, 2011 - Post #28484
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Customers

Last Login: Friday, June 15, 2018
Posts: 28, Visits: 231
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?
Posted Sunday, June 5, 2011 - Post #28488
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 10:40 PM
Posts: 3,411, Visits: 26,357
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.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Wednesday, June 8, 2011 - Post #28513
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 10:40 PM
Posts: 3,411, Visits: 26,357
Fixed in version 2011.06.08


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse
Active: 4 - 1 guest, 2 members, 0 anonymous.
Refresh