New topic: Syntax coloring in the IDE....
<http://forums.realsoftware.com/viewtopic.php?t=38389> Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message BrianOBrien Post subject: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 3:54 pm Joined: Wed Jul 07, 2010 2:55 pm Posts: 260 Location: University Of Calgary, Faculty Of Medicine I'm having trouble and making a lot of mistakes when I'm formatting my sql statements... sql = "'" + str + "'" quote tick quote... looks really hard for me to see in the IDE.. Is there any way that the tick can be a different color than the quotes?? _________________ If at first you don't succeed... Try REALBasic. Top jlawrence Post subject: Re: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 4:01 pm Joined: Thu Dec 16, 2010 1:22 pm Posts: 56 I know exactly what you mean.. grrr! maybe not the most elegant solution, but change the Code Editor font to a fixed-width font, like Courier and those single quotes will pop out. Top jlawrence Post subject: Re: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 4:19 pm Joined: Thu Dec 16, 2010 1:22 pm Posts: 56 ugh, the side effect is lower-case L and number 1 are indistinguishable as well as upper-case O and number 0. Stupid font designers! Why do they do that??? Maybe a different font would be better... Top mjh Post subject: Re: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 4:38 pm Joined: Sun Feb 19, 2006 3:10 pm Posts: 1165 Location: Hamburg, Germany jlawrence wrote:Maybe a different font would be better... On the Mac, Monaco has always been a good choice (no way to confuse 0 and O or 1 and l). _________________ Michael J. HuÃmann http://digicam-experts.de Top jlawrence Post subject: Re: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 4:49 pm Joined: Thu Dec 16, 2010 1:22 pm Posts: 56 Bravo! and quote-tick-quote looks great too. I think I'm sold! here's a link to the font file for windows if anyone is interested (thanks google) http://www.webdevkungfu.com/files/MONACO.TTF Remember you have to restart any running applications after installing a font for it to show up as a font choice. Top Bob Keeney Post subject: Re: Syntax coloring in the IDE....Posted: Tue Mar 29, 2011 9:20 pm Joined: Fri Sep 30, 2005 11:48 am Posts: 2264 Location: Lenexa, KS What we do is make a function that extends the string class. Call it something like SQLizeText and all it does is add a single quote to each side of the string so code looks something like this: sql = str.SQLizeText Specifically we do this for database queries and escape all the necessary characters so that the name O'Neil doesn't cause an error (because of the apostrophe). This function is part of our standard project when we create new projects. Very handy for database work. _________________ Bob K. 30+ hours of Real Studio Video Training (including over 6 hours of Web Edition) at http://www.bkeeney.com/ Real Studio Consulting http://www.bkeeney.com/consulting/real-studio-consulting BKeeney Briefs Blog For Real Studio Developers http://www.bkeeneybriefs.com/ Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 6 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
