I made quick progress on reimplementing my Find function, until I ran into a snag. Somehow the Find wasn’t correctly ignoring Behold’s hidden text.
Behold will hide all the tags you’re not interested in. The Show/Hide button will easily make them appear or disappear as you desire. When they are shown, they are shown in a light grey color so that you’ll know you normally want to hide these.
When you search and the hidden tags are shown, you want to search through them. But when they aren’t shown, you don’t want to search in them.
I had to go into the bowels of TRichView to find this and add a few kludges. It took almost all day today. I have one tiny bug left relating to highlighting that found item (it does it correctly 99.9% of the time) and this should be done.
But the test case I built up was somewhat amusing. I needed some text that I knew would alternate between hidden and displayed. Then I thought of the GEDCOM tag: “SEX” which is used to display whether the person is Male or Female. Normally that is obvious, and by default it is turned off so that it doesn’t add an extra line that you usually don’t want to every person in the Everything Report.
The simplest set of commands I could generate to obtain the error I was encountering was to open my test file with hidden items being displayed. Search for “sex” three times. Click the icon to hide the hidden tags. Search for “sex” three more times. Change the search direction to “up” and search once more for “sex”. Voila - Behold crashed.
The bottom line is that I must have searched for “sex” two thousand times today. And most of the time I found it! Sometimes I bombed out.
When discussing the humor of this with my family, my younger daughter said to me that maybe I should call it “gender” instead of “sex”. After all (as most comedians would say), the answer to give to “Sex?” is not male or female, but “yes”.
The official GEDCOM term for the tag is SEX. But there’s no reason why I couldn’t set the default text that is displayed for that tag to “Gender” instead. I believe the two terms are interchangable. Searching for “gender” doesn’t sound as dirty.
I hope this post doesn’t blacklist my site for all the “sex” talk in it. :-)