[JW Lua] make staff names uppercase
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Fri May 1 22:18:12 CEST 2015
On 2015-05-01 19:50, Joseph Weidinger wrote:
> I'm modifying your Change Staff Instruments example to change my staff
> names to uppercase instead. I get hung up using Replace. It works
> great when you already know the name but I can't find a way to get it to
> work when the name is different and unknowable.
>
> I imagine it to work along the lines of:
> thestring:Replace(thestring, string.upper(thestring))
>
> This of course doesn't work because thestring is actually an object of
> some kind, not a literal string. But it's not a table I can parse
> either, maybe more specifically "userdata" whatever that is. Probably C
> and not Lua. Any suggestions?
If the object results in "userdata" when printed, it's most likely a PDK
Framework class (starting with the FC prefix). In this case, it's the
FCString class.
To access the documentation for that class, press the "Class Browser"
button on the "Development" tab in JW Lua. In the list of classes in the
Class Browser, select "FCString" and then press the "Class Documentation".
Hint: the method you're searching starts with "To". :-)
Best regards,
Jari Williamsson
More information about the JWLua
mailing list