Page 1 of 1

I read the scant help and it is not null

Posted: 12 Sep 2019 01:33
by Ron Melby
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?

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

Posted: 13 Sep 2019 09:59
by tatewise
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' )

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

Posted: 13 Sep 2019 12:36
by Jane
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.

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

Posted: 13 Sep 2019 17:33
by Ron Melby
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?

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

Posted: 13 Sep 2019 18:39
by tatewise
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.

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

Posted: 13 Sep 2019 20:19
by Ron Melby
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

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

Posted: 13 Sep 2019 21:17
by tatewise
Why do you need to copy those variables?
Only simple variables would be useful as tables don't show any values.

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

Posted: 14 Sep 2019 13:05
by Ron Melby
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.

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

Posted: 14 Sep 2019 14:30
by tatewise
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.

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

Posted: 14 Sep 2019 15:32
by Ron Melby
last screen shot I took, and pasted into wordpad, and uploaded it said too big. didnt investigate.

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

Posted: 14 Sep 2019 17:05
by tatewise
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.