On Sat, November 18, 2006 3:39 pm, Emile SCHWARZ wrote: > I wanted to add to my simple text editor (small amount of text, else I use > - when possible - TextEdit or a true text processing software) the > LowerCase, UpperCase, TitleCase functions and so I started using > LowerCase. > > How can I get my code run faster ?
Preserving styles is tricky; I've got code that will do case changes but on an _entire_ EditField, not just the selected text. Trying to do it just on the selected text is tough as the selection might start and end in the middle of styleruns, which makes replacement complicated. It's probably doable: you'd have to detect that you're in the middle of a stylerun and then split that stylerun into two styleruns and replace that in the original. I can send you the code I have offline if you're interested. -- Marc Zeedar Publisher REALbasic Developer Magazine http://www.rbdeveloper.com _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
