|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi I am using Name.Alternative for the English name and for addressing it in the Report Skin, I need the tag name for the Parents and Siblings.
Could you please help me in addressing the above issue of Name.Alternative Tag for Parents and / or Siblings
I could not understand how i.Father is arrived.
I am getting this:
Ram's father is అధికార్ల కృష్ణయ్య and his mother is నడిమింటి (అధికార్ల) లక్ష్మి.
whereas I want to get Ram's father is Krishnaiah and his mother is Lakshmi
The Italics are the names filled in as Alternative Names.
Thanks in advance for your comments / suggestions /help
Edited: Saturday, March 17, 2007 by
nadiminti
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 4 hours ago
Posts: 3,412,
Visits: 26,303
|
As I understand it, the default property of an Individual object is Name. i.Father points to an Individual object, and so by default the Name property is returned. But you can of course also say i.Father.Name.Alternative to return the Alternative name of i's father.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron,
Thanks for the suggestion. I have tried but it gives the following error.
Error at line 311 (Code/Util.vbs) generating 'ind00003.htm': Object required: 'obj' Microsoft VBScript runtime error 800A01A8
where as the line 311 of Util.vbs is
Report.WritePhraseDic "PhParents", strNameEng, ToBe(i.Father), StrHtmlHyperlink(i.Father.Name.Alternative), strPnR, ToBe(i.Mother), StrHtmlHyperlink(i.Mother)
If I give i.Father, it is working OK. In the above code, I have changed strNameEng where strNameEng=StrPossessiveProperNoun(i.Name.Alternative) and it is being picked correctly. I do not know where I am going wrong.
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 4 hours ago
Posts: 3,412,
Visits: 26,303
|
The i.Father.Name.Alternative will only work where a string result is expected, e.g. a name. the Function StrHtmlHyperlink requires an object as its parameter, not a string, and is used to generate a hyperlink to that individuals page. You could define a new function StrHtmlHyperlinkAltFunction StrHtmlHyperlinkAlt(obj) Dim coll Set coll = Util.NewGenoCollection() coll.Add obj StrHtmlHyperlinkAlt = coll.ToHtmlHyperlinks("Name.Alternative", StrNameNN(obj),,"target='detail' onclick='hidePopUpFrame();'") End Function |
and replace for example StrHtmlHyperLink(i.Father) with StrHtmlHyperLinkAlt(i.Father)
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Edited: Thursday, March 15, 2007 by
Ron
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron,
Needless to say that it worked. Great!!
Thanks a ton!! regards Sriram
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 4 hours ago
Posts: 3,412,
Visits: 26,303
|
The suggested function StrHtmlHyperlinkAlt is rather convoluted in that the Individual object is first added to a collection of objects before deriving the hyperlink via ToHtmlHyperlinks. The GenoCollections method ToHtmlHyperlinks has parameters to specify which tag to use for the hyperlink text, what to use instead if that tag is blank and also extra attributes for the hyperlink anchor tag such as target etc. Unfortunately the equivalent method ToHtmlHyperlink for a single GenoObject, such as an Individual, rather than a collection of such objects does does accept these extra parameters (according to the published SDK). It would be most useful if Dan could also provide this extra functionality in the ToHtmlHyperlink method. This would also allow simplification or even redundancy for the function StrHtmlHyperlink.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Thursday, January 16, 2025
Posts: 4,886,
Visits: 22,775
|
Ron (3/15/2007) It would be most useful if Dan could also provide this extra functionality in the ToHtmlHyperlink method. This would also allow simplification or even redundancy for the function StrHtmlHyperlink.This is a good suggestion. Ron, you pushed the report generator beyond anything I could dream of. I realize some of the core routines, especially the ones creating hyperlinks have limitations. One feature I have in mind is having an object containing all the parameters to create hyperlinks. This way, instead of passing half a dozen of parameters, a single object would do the trick. New parameters could be added without having to change the prototype of the function. At the moment, I cannot give an ETA. Tomorrow I have a meeting with a CEO to get a crash course how to structure an organization. I need someone to handle the sales, marketing and some of the support so I can focus on research and development.
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron, I have no luck with Siblings. The code works perfectly well with Parents, Parents.Parents (Grand parents) With siblings it seems to be very complicated to get the names out.
I am at the StrHtmlCollectionMFU portion of the Lang.VBS. Can you please give some direction / suggestion regards Sriram
Edited: Friday, March 16, 2007 by
nadiminti
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 4 hours ago
Posts: 3,412,
Visits: 26,303
|
Yes this code is buried a little deeper. The hyperlinks for the list of siblings is ultimately generated by the function StrHtmlNarrativeNames at about line 662 of Lang.vbs. This is used both for the full and short forms of names (Name & Name.Short). I suggest you change line 675
from strName = i.TagValue(strTagName) to strName = Util.FirstNonEmpty(i.Name.Alternative, i.TagValue(strTagName)) |
so that any Alternative name is used in preference to the full or short name.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron, Thanks again. I am struck a little further now.
It is PlurialCardinal. In telugu we do not have 's' added for plurality. So I tried to take the help on Genopro website about PlurialCardinal - it did not help. I have searched for PlurialCardinal in the support site and found no help there too.
As I understand, when PlurialCardinal is invoked, it gets two parts, one takes __FmtPlurial and the other based on the value of second part takes the appropriate Cardinal and return both values to the invoker.
I am using Lang.vbs
Now my Q: a. Is my understanding correct? b. How can I get rid of "s" but at the same time for English it remains same. c. How to trigger that it should use C1, C2 etc? d. Do I need to post this separately?
<_FmtPlurial T="{}" P="{}s" C1="{}" C2="{}" /> <_FmtPlurialCount T="{0} {1}" /> <_FmtPlurialCardinal T="{0} {1}" />
<_Cardinal_0 T="zero"/> <_Cardinal_1 T="one"/> <_Cardinal_2 T="ఇద్దరు"/> <_Cardinal_3 T="ముగ్గురు"/> |
Thanks and regards Sriram
Edited: Saturday, March 17, 2007 by
nadiminti
|