<div dir="ltr">Actually, never mind. The shorter version doesn't work because LoadString can return false.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 6, 2022 at 7:46 PM Robert Patterson <<a href="mailto:robert@robertgpatterson.com">robert@robertgpatterson.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You can combine these like this, also (Lua magic incoming):</div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">local result = (tm.LoadStringA and tm:LoadStringA(...)) or tm:LoadString(...)<br></span></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 6, 2022 at 7:44 PM Robert Patterson <<a href="mailto:robert@robertgpatterson.com" target="_blank">robert@robertgpatterson.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Jake,</div><div><br></div><div>Thank you for the bug report. It will be fixed in 0.61. It should be LoadString on both platforms. In the meantime, you can test for the existence of LoadStringA and call that instead if it exists:</div><div><br></div><div><span style="font-family:monospace">if tm.LoadStringA then</span></div><div><span style="font-family:monospace"> tm:LoadStringA(...)</span></div><div><span style="font-family:monospace">else</span></div><div><span style="font-family:monospace"> tm:LoadString(...)</span></div><div><br></div><div>That will handle all cases until I can get a fix out there.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 6, 2022 at 7:18 PM Jacob Winkler <<a href="mailto:jacob.winkler@mac.com" target="_blank">jacob.winkler@mac.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Robert,<br>
<br>
I was working on the JetStream script today on my Windows machine, and RGP started complaining about LoadString() not being a defined command for FCTextMetrics. I looked it up in the class browser and RGP Lua lists LoadStringA() instead… so I added some logic that tested for IsRGPLua that used LoadStringA() instead. <br>
<br>
Then I went over to my MacBook and executed the same script from RGP Lua, and it complained that LoadStringA() was not a defined command. So I’m not sure what’s going on exactly, but there’s definitely some odd behavior!<br>
<br>
-Jake<br>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>