revprintfield and RIGHT tabalign?

Klaus major-k klaus at major-k.de
Fri Feb 14 10:10:22 EST 2020


Hi Richard,

> Am 14.02.2020 um 16:00 schrieb Richard Gaskin via use-livecode <use-livecode at lists.runrev.com>:
> 
> Klaus wrote:
> 
> > Am 14.02.2020 um 15:22 schrieb Richard Gaskin:
> >>
> >> The revPrintField command predates the tabAlign property. I suspect
> >> the handler just hasn't been updated to include a transfer of that
> >> property from your display field to the print stack's field.If my
> >> hunch is correct, adding that may be a one-line pull request, in the
> >> block where the other properties are transferred.
> >
> > AHA! Thank you, so this is a bug of some sort, if i translate
> > "predate" correctly? Looks like this has not been reported yet, will
> > do so and supply my teststack.
> It may be quicker to fix it than to submit a bug report.  In fact, I put that to the test, doing both. My hunch turned out to be correct: the fix took less than a minute, and the bug report slightly more than a minute. :)

OK :-)

> I used devolution's MPath tool to quickly list all the scripts in use, and found the revPrintingLibrary.  The goal there was to find the block where properties are transferred from the source field to the printing field, so I search for "set the textFont".  The first hit was for the header, but the second was in a block of code in a handler named revPrintText.
> 
> Sure enough, there was no assignment of the tabAlign property.  Adding one on line 138 of that script fixes the issue:
> 
>   if pSourceFieldRef is not empty then
>      set the tabStops of field 1 to the tabStops of pSourceFieldRef
>      set the hGrid of field 1 to the hGrid of pSourceFieldRef
>      set the vGrid of field 1 to the vGrid of pSourceFieldRef
>      set the fixedLineHeight of field 1 to the fixedLineHeight of pSourceFieldRef -- NEW
>      set the textHeight of field 1 to the effective textHeight of pSourceFieldRef -- NEW
>      set the textAlign of field 1 to the effective textAlign of pSourceFieldRef
>      set the tabAlign of fld 1 to the effective tabAlign of pSourceFieldRef --NEW from RG for Klaus
>   end if
> 
> Here's the report with the fix for the team to drop in so others will have this as well:
> https://quality.livecode.com/show_bug.cgi?id=22574

Hm, I applied the fix here, but now the last column is completely GONE (not visible in the printout)!?

And if the TABALIGN was not repected, why did the columns (NOT the TOTAL Line)
appear correctly aligned?

> -- 
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list