revprintfield and RIGHT tabalign?

Richard Gaskin ambassador at
Fri Feb 14 10:00:34 EST 2020

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. :)

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 

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 
       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:

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  Ambassador at      

More information about the use-livecode mailing list