• 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
Accessor works intermittently
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessor works intermittently


  • Subject: Accessor works intermittently
  • From: David Hirsch <email@hidden>
  • Date: Wed, 30 Sep 2009 16:41:33 -0700

I cannot figure out why this does not work:

		Phase *thisPhase = [phases objectAtIndex:i];
		float testmode = [thisPhase mode];
		float testmode2 = [[phases objectAtIndex:i] mode];

Following along with the code execution in the debugger, testmode gets the correct value, but testmode2 gets an erroneous value. Note that phases is an NSMutableArray of Phase* and mode is a trivial accessor for a float stored inside Phase:

		- (float) mode {return mode;}

I'm running XCode 3.1.2 in OSX 10.5.8.
-Dave
============================
Dave Hirsch
Associate Professor
Department of Geology
Western Washington University
persistent email: email@hidden
http://www.davehirsch.com
voice: (360) 389-3583
aim: email@hidden
vCard: http://almandine.geol.wwu.edu/~dave/personal/DaveHirsch.vcf
============================



_______________________________________________

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: Accessor works intermittently
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: Releasing NSSearchPathForDirectoriesInDomain causes crash
  • Next by Date: error with movie player, iSightAudio.plugin
  • Previous by thread: Re: Releasing NSSearchPathForDirectoriesInDomain causes crash
  • Next by thread: Re: Accessor works intermittently
  • Index(es):
    • Date
    • Thread