Skip navigation.
 
mlRe: NSScanner question
FROM : Jason Wiggins
DATE : Wed Apr 23 20:55:37 2008

Thanks Michael for your reply. I guess I should be doing more validity 
checks. I'll play some more. Thanks for the suggestion.
Regards,
Jason

On 23/04/2008, at 7:57 PM, Michael Vannorsdel wrote:

> At first glance I'd say it's crashing because you're not checking if 
> scanUpToCharactersFromSet:intoString: was successful and trying to 
> add what may be an invalid object (foundStrings) to an array.
>
>
> On Apr 23, 2008, at 3:46 AM, Jason Wiggins wrote:
>

>> I've been playing with NSScanner to cut a string eg:      this is 
>> a test " So is this"test
>> from a search field into its components. ie. extract the quoted 
>> text to be placed into an array as well as the other components, 
>> pre and post quoted text. The other components will eventually be 
>> split with componentsSeparatedByString.
>>
>> My issue is that if I paste the above text into the search field, 
>> all is OK. But if I type in- "test
>> as a test case, it locks up and fails with The Debugger has exited 
>> due to signal 11 (SIGSEGV).The Debugger has exited due to signal 11 
>> (SIGSEGV).

>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlNSScanner question Jason Wiggins Apr 23, 11:46
mlRe: NSScanner question Michael Vannorsdel Apr 23, 11:57
mlRe: NSScanner question Jason Wiggins Apr 23, 20:55