Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > When the cursor is...

When the cursor is...
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Apr 26, 2004, 03:36 PM
 
Hi guys,

I've been struggling for a while with a bit of code. What I want to do is, if the user has typed in "<", then carry on doing the method, if not don't do the rest of the method.

So I realized I needed the cursor to be in front of the "<" to recognize it and came up with this code:

Code:
if (myCursor.location = ...)
myCursor is an NSRange.

So basically, my question is what is the location part gonna be? What I'm stuck with is I don't know how to see if a user has typed in a < and if the cursor is after that. Any ideas appreciated.

Thanks,
Oliver
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2