FROM : Tom Hancocks
DATE : Tue Apr 05 18:26:49 2005
Sorry for the long subject line, but i couldn't think of how else to
put it.
Anyways, i'm writing a program, which as i have said before am porting
from REALbasic to Cocoa and i have run straight in to a brick wall
here, with out warning, and now i keep getting Signal 10 and 11 being
returned with in 3 seconds of loading my app. I have traced the problem
to the root of its cause, but the only i have found of getting rid of
the problem is to completely remove the thing that causes it. The
problem is caused by simply comparing 2 NSString Objects.
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;
}
}
Sorry if my code is a little messy, but I am still fairly new to Cocoa.
Tom Hancocks
DATE : Tue Apr 05 18:26:49 2005
Sorry for the long subject line, but i couldn't think of how else to
put it.
Anyways, i'm writing a program, which as i have said before am porting
from REALbasic to Cocoa and i have run straight in to a brick wall
here, with out warning, and now i keep getting Signal 10 and 11 being
returned with in 3 seconds of loading my app. I have traced the problem
to the root of its cause, but the only i have found of getting rid of
the problem is to completely remove the thing that causes it. The
problem is caused by simply comparing 2 NSString Objects.
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;
}
}
Sorry if my code is a little messy, but I am still fairly new to Cocoa.
Tom Hancocks
| Related mails | Author | Date |
|---|---|---|
| Tom Hancocks | Apr 5, 18:26 | |
| John C. Warner | Apr 5, 18:36 | |
| Frederick Cheung | Apr 5, 19:28 |






Cocoa mail archive

