Re: Checking For Keys
Re: Checking For Keys
- Subject: Re: Checking For Keys
- From: Allan Odgaard <email@hidden>
- Date: Mon, 21 Jun 2004 04:04:35 +0200
On 20. Jun 2004, at 18:50, Oliver Cameron wrote:
characters = [theEvent characters];
unicodeChar = [characters characterAtIndex:0];
I have seen this in a number of code snippets, and try to correct it
each time ;)
This is WRONG! The 'characters' method may return an empty string, and
then the 'characterAtIndex:' method will throw an exception! You may
want to use 'hasPrefix:' instead.
[...] What I am looking to do is only insert the "" only if it is
inside a "<" and not outside the ">".
Any ideas?
Other than retrieve the text from your superclass and search through
it? Unfortunately none from me...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.