* GEDMatch Fact text problems

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 10:43

I am using Janes Gedmatch fact, and want to show %age as reported by Ancestry

This works fine for 'Normal' %ages, but entering less than 1% as <1% won't work, as the < is treated as an ignore symbol

i.e, Using <1% 24cM 2 Segs, fails to show anything.

I know it is to do with way LUA treats text, but is there any way round it? (I tried <<, but that don't work :lol: )

Do I have to use Less Than 1%, or is there a way to get < to print/display
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: GEDMatch Fact text problems

Post by tatewise » 13 Sep 2022 10:49

Try using the \ escape character.

Where exactly is your <1% text?
Which field is it in and where are you displaying it? Diagrams, Reports, etc?
You know all those details but we don't so are guessing a workaround.

Why are you mentioning LUA? That only applies to Plugins.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 11:03

Mike,
Jane’s query that accompanies this fact, extracts the text and displays it in the resultset table!
When I use the <, nothing displays. I’ll try the \ escape character when I’m back on my PC. ( I was using the extra < as an escape, but obviously it didn’t work :lol: )

NB. I only mentioened LUA because I thought FH was written in LUA. Only reason I could think of to prevent < being treated as normal text!
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 11:13

The underlying format for rich text notes relies on the < and > characters, hence they need escaping.

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: GEDMatch Fact text problems

Post by tatewise » 13 Sep 2022 11:28

Unfortunately, the FH Note Window help page does not mention the \ escape character needed for special characters like < and is only mentioned in the Plugin API help for Rich Text Syntax. So how are users meant to know how to include literal special characters? IMO that omission should be reported to CP.

FYI: FH is written in Microsoft Visual C++ and only Plugins use LUA.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 11:38

tatewise wrote:
13 Sep 2022 11:28
FYI: FH is written in Microsoft Visual C++ and only Plugins use LUA.
Perhaps worth mentioning that the standard language packs installed with FH of course use Lua; and so do some of the standard reports.

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 11:55

I’m not complaining, but why did CP feel the need to introduce another Language? What is wrong with wrinting plugins in C++? I would suggest that C++ has a greater userbase than LUA :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 12:16

Lua is very commonly used for user-written 'plugins'/'scripts'/ (or whatever another programme calls the equivalents.) Plus, it's much more light weight than C++, and doesn't need to be compiled, which rules out C++ (Who is going to ship a C compiler with their programme? Not Calico Pie, I suspect ). And, for non-programmers who don't come with any heavy-weight programming language baggage, it's probably easier to learn...

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 12:33

tatewise wrote:
13 Sep 2022 10:49
Try using the \ escape character.

Where exactly is your <1% text?
Which field is it in and where are you displaying it? Diagrams, Reports, etc?
You know all those details but we don't so are guessing a workaround.

Why are you mentioning LUA? That only applies to Plugins.
Thanks Mike, \ worked a treat
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: GEDMatch Fact text problems

Post by tatewise » 13 Sep 2022 12:35

ColeValleyGirl wrote:
13 Sep 2022 11:38
tatewise wrote:
13 Sep 2022 11:28
FYI: FH is written in Microsoft Visual C++ and only Plugins use LUA.
Perhaps worth mentioning that the standard language packs installed with FH of course use Lua; and so do some of the standard reports.
I presumed the term Plugins includes Standard Plugins, Language Plugins, Report Plugins and Source-Driven Data Entry Plugins (which you forgot to mention) that are all mentioned in Special Plugin Types within the How to Wite Plugins help pages.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 12:40

I didn't forget to mention anything. I pointed out that some standard elements of Family Historian (i.e. elements installed by the FH installation process) are now coded in Lua. They may use the plugin architecture, but they aren't per se plugins.

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 12:44

Just returning to the original question:

"Jane’s query that accompanies this fact, extracts the text and displays it in the resultset table!"

An ordinary query displays the < without a problem:
Screenshot 2022-09-13 133750.jpg
Screenshot 2022-09-13 133750.jpg (41.79 KiB) Viewed 862 times
So in theory a user never needs to know about the escape characters? So I wonder why it's necessary in this case...

Updated: the issue seems to be in GetLabelledText.

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 13:53

Helen, good point.
I have never had to consider ‘Rich Text’ special characters before, and as far as I was concerned Jane’s query was just extracting my plain text. One for CP perhaps?
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: GEDMatch Fact text problems

Post by ColeValleyGirl » 13 Sep 2022 14:09

Agreed, Mike L. Will you report it or shall i?

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: GEDMatch Fact text problems

Post by tatewise » 13 Sep 2022 14:13

Yes, =GetLabelledText(...) works fine with fully formatted Rich Text Notes that automatically escape any explicit < character.

The problem is when =GetLabelledText(...) operates on unformatted Note text and that text contains a Rich Text control character such as < that should be treated as plain text, but is treated as Rich Text so the subsequent text is discarded.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 13 Sep 2022 14:53

ColeValleyGirl wrote:
13 Sep 2022 14:09
Agreed, Mike L. Will you report it or shall i?
Oh well, if you insist :D

Ticket 114495 has been created
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

avatar
Gowermick
Megastar
Posts: 1632
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: GEDMatch Fact text problems

Post by Gowermick » 14 Sep 2022 11:01

CP accepts there is an error, and will fix it on next update
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

Post Reply