• 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
Re: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?


  • Subject: Re: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
  • From: "John C. Warner" <email@hidden>
  • Date: Tue, 05 Apr 2005 12:36:52 -0400


On 5 Apr, 2005, at 12:26 PM, Tom Hancocks wrote:
Here are the declares of the NSString's in the header file:

NSString * cLastTrack;
NSString * cTrackTitle;

And here's the code where the error is being caused:

- (void)poll
{
iTunesOpen = [self isiTunesOpen];
if (!iTunesOpen) return;
playerState = [self PlayerState];
[self Volume];
if (playerState == 0) return;
[self TrackTitle];
if (![cTrackTitle isEqualToString:cLastTrack]) { // <<-- This line here is causing it
[self TrackArtist];
//[cLastTrack release];
cLastTrack = cTrackTitle;
}
}

Where are you actually initializing and assigning anything to the strings? You should probably change the string comparison to something like

if (![[self trackTitle] isEqualToString:[self lastTrack]]) {...

-John

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
      • From: Frederick Cheung <email@hidden>
References: 
 >Signal 10 and 11, keep popping up when i try and compare 2 NSStrings? (From: Tom Hancocks <email@hidden>)

  • Prev by Date: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
  • Next by Date: NSKeyed archiver archive format in human readable format ?
  • Previous by thread: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
  • Next by thread: Re: Signal 10 and 11, keep popping up when i try and compare 2 NSStrings?
  • Index(es):
    • Date
    • Thread