I am trying to retrieve database rows into a Listbox, and when I select one row, if it includes any Carriage Return/LineFeed/trailing Space then I would like to show those characters in Textarea with other characters such as CR,LF,TS and so on.
I am not sure how I can detect those characters and replace it with other characters in Textarea.
Can you give me some ideas?
sure you can find and replace them… just like any other character… but if you put a printable character in its place, you lose the functionality (ie… no more linebreak)… And if you replace the endofline with a printable character AND endofline to maintain the functionality, then the user can simply edit them out, or add stuff afterthem.
JUST FYI since its not based on text input canvas there cocoa functionality that you cant ever get to work right using a canvas subclass
Proper Cocoa Keyboard handling is one
Its why we even created the text input canvas in the first place