It the copy failing because these are read-only properties? -Michael
On Feb 11, 2010, at 11:29 AM, Michael A. Crawford wrote: > Here is the code (pertinent snippets) > > @interface BlueSLRGPS () > @property (copy) CLHeading* currentHeading; > @property (copy) CLLocation* currentLocation; > @property (retain) CLLocation* previousLocation; > > - (NSString*)compassPointForHeading:(double)heading; > > - (void)locationManager:(CLLocationManager*)manager > didUpdateHeading:(CLHeading*)newHeading; > > - (void)locationManager:(CLLocationManager*)manager > didUpdateToLocation:(CLLocation*)newLocation > fromLocation:(CLLocation*)oldLocation; > > - (void)locationManager:(CLLocationManager*)manager > didFailWithError:(NSError*)error; > @end > > @synthesize currentHeading; > > - (void)locationManager:(CLLocationManager*)manager > didUpdateHeading:(CLHeading*)newHeading > { > MCLog(@"heading update isMainThread = %d", [NSThread isMainThread]); > MCLog(@"Heading: %f", newHeading.magneticHeading); > self.currentHeading = newHeading; > [self.delegate headingUpdated]; > } > > Here is the result. > > (gdb) p newHeading > $1 = (CLHeading *) 0x481ef50 > (gdb) p currentHeading > $2 = (CLHeading *) 0x3c193c0 > (gdb) po (CLHeading*)0x481ef50 > magneticHeading 211.00 trueHeading 205.17 accuracy 35.00 x 2.625 y -6.875 z > -18.250 @ 2010-02-11 11:18:29 AM > (gdb) po (CLHeading*)0x3c193c0 > magneticHeading 0.00 trueHeading 0.00 accuracy 0.00 x 0.000 y 0.000 z 0.000 @ > (null) > > I didn't see anything in the docs about CLHeading objects not being copyable. > Any ideas as to why the copy did not duplicate the current values? > > -Michael > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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/michaelacrawford%40me.com > > This email sent to michaelacrawf...@me.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/archive%40mail-archive.com This email sent to arch...@mail-archive.com