* I read the scant help and it is not null

Writing and using plugins for Version 5 and above.
Post Reply
User avatar
Ron Melby
Superstar
Posts: 400
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

I read the scant help and it is not null

Post by Ron Melby » 12 Sep 2019 01:33

a record:

Code: Select all

0 @I24@ INDI
1 NAME Iver Bernard /Gonnering/
...
1 BURI
2 PLAC Port Huron, , St. Clair, MI, USA
2 ADDR Lakeside Cemetery, 3663 10th Avenue, Port Huron, MI, 48060, USA
2 SOUR @S1944@
3 PAGE www.findagrave.com/memorial/139142958
1 FAMC @F1260@
1 FAMS @F17@
...
code that sets up my output.

Code: Select all

    --[[ www.findagrave.com/memorial/1234567890 ]]
    GEDRCD[#GEDRCD].WEB = trim(WebPage)
    cwweb = cwweb or 0
    cwweb = math.max(cwweb,#WebPage)
    GEDRCD[#GEDRCD].pFaG = ptrWEB:Clone()
    cwptr = 0
    ...
    pFAG  = GEDRCD[k].pFaG
    table.insert(tblpFaG, pFaG)

debug @ptrWEB
ptrWEB item local == Where Within Source: www.findagrave.com/memorial/139142958
the table record

Code: Select all

[2] => (table .9)
		NAME => "GONNERING, Iver Bernard"
		iID => 24
		pGADR (item) => Address: Lakeside Cemetery, 3663 10th Avenue, Port Huron, MI, 48060, USA
		iPTR (item) => Individual: Iver Bernard GONNERING
		RMN => "B"
		GADR => "Lakeside Cemetery, 3663 10th Avenue, Port Huron, MI, 48060, USA"
		MML => "139142958"
		WEB => "www.findagrave.com/memorial/139142958"
		pFaG (item) => Where Within Source: www.findagrave.com/memorial/139142958


output text

Code: Select all

"24"	"GONNERING, Iver Bernard"	"B"	"www.findagrave.com/memorial/139142958"
1. fhOutputResultSetColumn('WEB',      'text', tblWEB,   #tblWEB,   dwweb,  'align_left')
2. fhOutputResultSetColumn('',         'item', tblpFaG,  #tblpFaG,  dwptr,  'align_mid',  0, true, 
and tblWEB is dark as though it is linked, but does not go to the record as if it is not a pointer but it is. What else can be wrong?
FH V.6.2.7 Win 7 64 bit

User avatar
tatewise
Megastar
Posts: 16315
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: I read the scant help and it is not null

Post by tatewise » 13 Sep 2019 09:59

It would help to see the Lua script that creates tblWEB and tblpFaG entries.
Have you debugged the contents of those tables ?
Are those tables both the same size ? i.e. #tblWEB == #tblpFaG
Remember to make them local so easier to see in debug pane.
tblWEB column is defined as 'text' so cannot be a pointer.
When setting the tblpFaG entries have you remembered to use pFaG:Clone() to preserve pointer?
Try outputting the tblpFaG column without the 'buddy' option so you can see what is actually there.

All this assumes that the tblpFaG column is meant to be a buddy but you did not include all the Lua line:
fhOutputResultSetColumn('', 'item', tblpFaG, #tblpFaG, dwptr, 'align_mid', 0, true, 'default', 'buddy' )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 7698
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: I read the scant help and it is not null

Post by Jane » 13 Sep 2019 12:36

Ron when posting code it would be helpful if you use the code tags, just select the code sections and press the </> to add the tags. It may make your posts easier to follow.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Ron Melby
Superstar
Posts: 400
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: I read the scant help and it is not null

Post by Ron Melby » 13 Sep 2019 17:33

I found it. it wasn't one thing....it was a combination of 4 different things, and 2 different programs.

I have been thru that code a million times (its one of my standard modules) and i have refined it and refined it. I have tried for absolute clarity and consistency, but as I upgrade the modules and programs that use them to record based processing instead of table based processing, I find inconsistencies and very small but ultimately significant to me subtle errors (not hard ones, or massively wrong, just small, nearly invisible gotchas).

you are seeing debugs. I wish that more of the stuff in FH was copy and pasteable for demonstration. it isn't. One thing I find as I am going thru debugs and several programs one after another is that the select indi records screen has entries in it that are not intended, is anyone else seeing this, and do you consider it a bug or feature?
FH V.6.2.7 Win 7 64 bit

User avatar
tatewise
Megastar
Posts: 16315
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: I read the scant help and it is not null

Post by tatewise » 13 Sep 2019 18:39

I don't understand what you mean by "the select indi records screen" ?
A screenshot to illustrate such problems would make it much clearer.

Which FH stuff is not copy and pasteable ?
Use a screenshot for that stuff.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Ron Melby
Superstar
Posts: 400
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: I read the scant help and it is not null

Post by Ron Melby » 13 Sep 2019 20:19

copy all the variables in the lower right quadrant debug screen. shift----drag mouse, paste into notepad.

fhPromptUserForRecordSel(pTYPE, 1) indi slt screen. it will gather records from repeated use
FH V.6.2.7 Win 7 64 bit

User avatar
tatewise
Megastar
Posts: 16315
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: I read the scant help and it is not null

Post by tatewise » 13 Sep 2019 21:17

Why do you need to copy those variables?
Only simple variables would be useful as tables don't show any values.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Ron Melby
Superstar
Posts: 400
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: I read the scant help and it is not null

Post by Ron Melby » 14 Sep 2019 13:05

a close-at-hand example of practical use would be upon such an instant I have been solicited whether or not I have debugged something, and what are the values? The table window is copyable, btw. It would be nice (as well as consistant) if the same were true of the variable window. an additional use, and equally as practical is if I am debugging a recursive or complex issue and need to study the value of several variables over time. My memory is not as picture perfect as it once was.
FH V.6.2.7 Win 7 64 bit

User avatar
tatewise
Megastar
Posts: 16315
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: I read the scant help and it is not null

Post by tatewise » 14 Sep 2019 14:30

Usually when debugging we have been talking about tables.
But yes, it would be useful to copy & paste the variables pane.
However, that is not possible, so you will have to take a screenshot.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Ron Melby
Superstar
Posts: 400
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: I read the scant help and it is not null

Post by Ron Melby » 14 Sep 2019 15:32

last screen shot I took, and pasted into wordpad, and uploaded it said too big. didnt investigate.
FH V.6.2.7 Win 7 64 bit

User avatar
tatewise
Megastar
Posts: 16315
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: I read the scant help and it is not null

Post by tatewise » 14 Sep 2019 17:05

Don't paste into Wordpad as that makes it even bigger.
Follow the Knowledge Base > Posting Topics guide and use the Snipping Tool to create a file.
If still too big then create a compressed ZIP file and attach that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply