Accidental character in the Windows function Editor
Posted: Tue Apr 09, 2024 2:41 pm
Hi,
I am writing code relating to music, and am having a minor problem with the accidentals symbols '♭♮♯' (Unicode chars 9837 9838 9839) within the Windows function editor.
The following code appears in a function dealing with buttons to add them. Note the Captions:
I am using copying and pasting to get these glyphs into the editor.
It all appears to work, but within the editor these symbols they frequently convert to a small black square, but still appear correctly on the button within the form when displayed on screen.
Currently, every time I open the function in the editor, the final ' ♮ ' appear as the small black square. (NOTE I copied that string from the editor and pasted to here where it appears correctly.)
I know I can simply replace these glyphs via using , but the function is much easier to read if I can use the glyphs directly.
Any suggestion ?
Thanks Ray
I am writing code relating to music, and am having a minor problem with the accidentals symbols '♭♮♯' (Unicode chars 9837 9838 9839) within the Windows function editor.
The following code appears in a function dealing with buttons to add them. Note the Captions:
Code: Select all
f n s←'♭♮♯'
'Score.sharp'⎕WC'Button'(push)('Caption' ' ♯ ')('Posn'(frow(uw[2])))('Event' 'Select' 1)('FontObj' 'font')
'Score.flat'⎕WC'Button'(push)('Caption' ' ♭ ')('Posn'(frow(uw[3])))('Event' 'Select' 1)('FontObj' 'font')
'Score.natural'⎕WC'Button'(push)('Caption' ' ♮ ')('Posn'(frow(uw[4])))('Event' 'Select' 1)('FontObj' 'font')
It all appears to work, but within the editor these symbols they frequently convert to a small black square, but still appear correctly on the button within the form when displayed on screen.
Currently, every time I open the function in the editor, the final ' ♮ ' appear as the small black square. (NOTE I copied that string from the editor and pasted to here where it appears correctly.)
I know I can simply replace these glyphs via using
Code: Select all
⎕UCS 9837 9838 9839
Any suggestion ?
Thanks Ray