|
Like many Mac applications SuperCard doesn't properly handle the use of the 'forward delete' key in text. It also doesn't properly handle the use of the page up or down or the Home and End keys, inserting either invisible or empty block characters instead.
David Wickes offered a solution to this problem on the SuperCard list:
"A couple of weeks ago someone raised a question about noticing extra rectangle text characters. The thread that followed postulated that these were due to inadvertant use of control or option (alternate) key combinations in the Geneva font, probably by DOS or Windows users. I too have noticed extra rectangles on occasion, and usually when non-Mac users have used my SuperCard project. I've had this project for two years, but only recently noticed the problem.
I also noticed these strange characters on occasion in the title bar of file/disk windows (and not just SuperCard), even though the character could not be seen on the file or disk icon label. Highlighting each portion of the label eventually revealed a very narrow space with no visible character. I experimented by pasting the file's name into SimpleText and enlarging the font to size 36 - at that point the invisible anomaly became a visible rectangle. Further experimentation revealed it to be reproduced through the use of the Forward Delete key (ASCI 127) on an extended keyboard. I admit to not even knowing that the key existed, but apparently DOS users are used to deleting in that direction.
To block this in my projects I have now inserted the following project script:"
on openProject set allowKeyInField to true end openProject
on keyInField theKey set allowKeyInField to true if theKey = numToChar(127) then answer "Sorry, the Forward Delete key does not work in this application." else pass keyInField end keyInField
Dave Wickes
Later the same day Carl Backstrom added a useful amendment:
"Why not emulate the forward delete key instead? The following script will delete the selected chunk, if it is selected, or delete the next character."
on keyInField x if chartonum(x) = 127 then if the selection is "" then get word 2 of the selectedChunk select char it to it of cd field id 100 of wd id 100 end if delete end if end keyInField
Calle
|