Getting the current line
Getting the current line
- Subject: Getting the current line
- From: Ricardo Diaz <email@hidden>
- Date: Thu, 23 Aug 2007 08:47:52 +0000
- Importance: Normal
How can I get the current line the insertion point is in? I tried modifying this code that gets the current column but got nothing:
NSRange selectionRange = [textView selectedRange];
unsigned int selection = selectionRange.location;
unsigned int end = [[textView string] lineRangeForRange:selectionRange].location-1;
unsigned int currentCol = (selection-end);
Any ideas?
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden