• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
It doesn't work without the NSLog()... Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

It doesn't work without the NSLog()... Why?


  • Subject: It doesn't work without the NSLog()... Why?
  • From: Тимофей Даньшин <email@hidden>
  • Date: Wed, 29 Apr 2009 16:05:42 +0400

Hello.
It's a very funny thing. And i do hope i am not bonkers. But the following code works fine until i delete the line with "NSLog(....)". In the latter case it just returns an empty array. Are there any sane reasons why that can happen?


- (NSArray *) selectWordsBeginningWith:(NSString *) s {

NSLog(@"We do call SelectWordsBeginningWith...."); //<- here is that line.
NSString *searchString = [NSString stringWithFormat:@"%@%@", s, @"%%"];
NSMutableArray *mutableRet = [[NSMutableArray alloc]init];


[self intoArray:mutableRet addItemFromTable:@"english" usingStatement:readEnglish andSearchString:searchString];
[self intoArray:mutableRet addItemFromTable:@"russian" usingStatement:readRussian andSearchString:searchString];


	sqlite3_reset(readEnglish);
	sqlite3_reset(readRussian);
	NSArray *ret = [mutableRet copy];
//	NSLog(@"The number of items to be returned is: %i", [ret count]);
	[mutableRet release];
	return ret;
}

Thank you in advance,
Timofey.
_______________________________________________

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


  • Follow-Ups:
    • Re: It doesn't work without the NSLog()... Why?
      • From: Michael Ash <email@hidden>
    • Re: It doesn't work without the NSLog()... Why?
      • From: Graham Cox <email@hidden>
    • Re: It doesn't work without the NSLog()... Why?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: [OT] Re: C language in obj-c
  • Next by Date: Re: It doesn't work without the NSLog()... Why?
  • Previous by thread: Re: C language in obj-c
  • Next by thread: Re: It doesn't work without the NSLog()... Why?
  • Index(es):
    • Date
    • Thread