Sub ComboBox1_SelectionChanged (Index, Value)
treeg.RemoveAllNodes ' here instead of in the showkeytree sub
Stack1.Push(value)
If StrAt(value,1) = "I" Then
ShowKeyTree(Value)
st = StrReplace(value,"I","F")
If search(st) = 1 Then ShowKeyTree(st)
st = StrReplace(value,"I","O")
If search(st) = 1 Then ShowKeyTree(st)
st = StrReplace(value,"I","S")
If search(st) = 1 Then ShowKeyTree(st)
Else
ShowKeyTree(Value)
End If
End Sub
Sub search(s)
For i = 0 To combobox1.Count -1
If combobox1.Item(i) = s Then Return 1
Next
Return 0
End Sub
st = StrReplace(value,"I","F")
If GEDParser.htKeys.Contains(st) Then ShowKeyTree(st)
st = StrReplace(value,"I","O")
If GEDParser.htKeys.Contains(st) Then ShowKeyTree(st)
st = StrReplace(value,"I","S")
If GEDParser.htKeys.Contains(st) Then ShowKeyTree(st)
0 @I185@ INDI
1 NAME Yitzhak Meir /Hacohen Shwartz/
2 GIVN Yitzhak
2 SURN Hacohen Shwartz
2 NICK Meir
1 SEX M
1 BIRT
2 DATE 3.5.1866
1 DEAT
2 DATE 29.4.1936
1 FAMC @F170@
1 FAMS @F185@1 ADDR
2 CONT Hungaria Dragmirsht
2 _NAME n/a
2 CTRY Hungaria
2 CITY Dragmirsht
0 @F185@ FAM
1 HUSB @I185@
1 WIFE @I1217@
1 MARR
2 DATE 1882
1 CHIL @I602@
1 CHIL @I594@
1 CHIL @I593@
1 CHIL @I588@
1 CHIL @I581@
1 CHIL @I579@
1 CHIL @I551@
1 CHIL @I549@
0 @F170@ FAM
1 HUSB @I170@
1 WIFE @I169@1 MARR
2 DATE 7.6.1865
1 CHIL @I1232@
1 CHIL @I617@
1 CHIL @I203@
1 CHIL @I201@
1 CHIL @I199@
1 CHIL @I196@
1 CHIL @I194@
1 CHIL @I192@
1 CHIL @I190@
1 CHIL @I188@
1 CHIL @I186@
1 CHIL @I185@
Sub HandleINDI (key)
record = GEDParser.htKeys.Item(key)
item = GEDParser.Records(record).FirstSon
Do While item <> ""
Select GEDParser.Records(item).Tag
Case "FAMC", "FAMS":
Msgbox(GEDParser.Records(item).Value)
'Case "AAAA":
End Select
item = GEDParser.Records(item).NextSibling
Loop
End Sub
Public Sub FindRecord (root, tag)
If Records(root).Tag = tag Then Return root
son = Records(root).FirstSon
If son <> "" Then
Return FindRecordHelper (son, tag)
End If
Return -1
End Sub
Sub FindRecordHelper (root, tag)
If Records(root).Tag = tag Then Return root
son = Records(root).FirstSon
If son <> "" Then
res = FindRecordHelper (son, tag)
If res >= 0 Then Return res
End If
nextSibling = Records(root).NextSibling
If nextSibling <> "" Then
Return FindRecordHelper (nextSibling, tag)
End If
Return -1
End Sub
record = GEDParser.htKeys.Item("@I1@")
fams = GEDParser.FindRecord(record, "CAUS")
If fams > -1 Then
Msgbox(GEDParser.Records(fams).Value, fams)
End If
I add another version for the same application, in which the searches are implemented only through the Gedparser records, not in the tree nodes.
I really don't know which version works better, so the two options are valid.
The same disclaimer : it is not fully debugged and it does not show all the data in the Gedcom file - you have to tailor it to your needs.
Yes, but mainly at the android part of it.are you still looking at this forum?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?