• 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
Strange problem of first access to variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange problem of first access to variable


  • Subject: Strange problem of first access to variable
  • From: Vera Tkachenko <email@hidden>
  • Date: Wed, 7 Jan 2009 14:58:32 +0200

Hello to everyone )
Don't even know how to explain correctly problem I have. I was using "Debug" mode for developing/testing but before release switched to "Release" mode to test it.
The problem is that in release mode the following code doesn't work - files "seems" to be null.


- (void) processFiles: (NSArray *) files
{
	NSLog(@"hideFiles - filesToHide %@ count %i", files, [files count]);
	NSEnumerator * enumerator = [files objectEnumerator];
	<skipped>
}

It happens so because all NSLog turned off in release (have special macro for this) and "files" isn't accessed (as done in debug mode) in NSLog call before enumerator attempts.

Could you point me where to find the answer - smth with incorrect "files" variable initialization/declaration? Have no idea what's wrong.

I'm sure, that the answer should be very simple... cause the defect is very strange :)

-- With regards, Vera Tkachenko
[email@hidden]
[ICQ#230923300]
[web http://vera.org.ua]





_______________________________________________

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: Strange problem of first access to variable
      • From: Vera Tkachenko <email@hidden>
    • Re: Strange problem of first access to variable
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Cocoa Client/Server App
  • Next by Date: Re: Strange problem of first access to variable
  • Previous by thread: Re: Parsing XML from a Https URL using NSXMLParser?
  • Next by thread: Re: Strange problem of first access to variable
  • Index(es):
    • Date
    • Thread