<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Robert et al.,<br>
<br>
I noticed an undocumented difference in RGP Lua/JW Lua.<br>
<br>
FCStemMod.HorizontalUpOffset returns wrong values in JW Lua (signed
byte problem) and RGP Lua returns the correct values.<br>
It might have be fixed automaticaly because of a fix in the Fin26+
PDK. <br>
We (Robert and I) had talked about FCStemMod issues some time ago
and I wrote that I assume that there must have been some changes as
another FCStemMod problem didn't occur anymore in Fin64bit either.<br>
<br>
Test script which works with the attached file:<br>
<br>
if finenv.IsRGPLua then require('mobdebug').start() end<br>
local region=finale.FCMusicRegion()<br>
region:SetFullDocument()<br>
for entry in eachentry(region) do<br>
if entry and entry.StemDetailFlag then<br>
local stemmod=finale.FCStemMod()<br>
stemmod:SetNoteEntry(entry)<br>
if stemmod:LoadFirst() then<br>
print(stemmod.HorizontalUpOffset) --probably the same
with HorizontalDownOffset<br>
end<br>
end<br>
end<br>
<br>
In Finale 27 JW Lua returns: -125<br>
In Finale 27 RGP Lua returns: -3 (which is correct)<br>
<br>
In JW Lua I used this correction function, but it took quite some
time to find out, it wasn't necessary in RGP Lua anymore.<br>
<br>
function jalib_CorrectStemOffsetForJWLua(offset)<br>
if not finenv.IsRGPLua then<br>
if offset<0 then<br>
offset=-offset-128<br>
elseif offset>128 then<br>
offset=-(256-offset)<br>
end<br>
end<br>
return offset<br>
end<br>
<br>
I don't know if it makes sense to correct this in RGP Lua - maybe
for compatibility reasons? <br>
But as it is already like it and it actually fixes something, I
think we should keep it and know that this leads to problems only in
JW Lua.<br>
<br>
Jan<br>
</body>
</html>