Re: Class gets EXC_BAD_ACCESS only as NSOperation
Re: Class gets EXC_BAD_ACCESS only as NSOperation
- Subject: Re: Class gets EXC_BAD_ACCESS only as NSOperation
- From: "Sean McBride" <email@hidden>
- Date: Tue, 24 Mar 2009 12:39:59 -0400
- Organization: Rogue Research Inc.
On 3/24/09 8:22 AM, James Maxwell said:
> NSArray *pitchSlices = [[self MIDITrainingData] objectAtIndex:0];
> NSArray *rhythmSlices = [[self MIDITrainingData] objectAtIndex:1];
> int sliceCount = [pitchSlices count];
>
> float midiEventsToHTM[sliceCount][20];
> float rhythmEventsToHTM[sliceCount][20];
> int i,j,k;
> for(i=0;i < sliceCount;i++)
> {
> for(j=0;j < 10;j++)
> {
Another minor comment: you should probably use 'unsigned int' (or
NSUInteger) not 'int' for values like that that are never negative.
Note for example that 'count' returns an unsigned value, and
'objectAtIndex:' expects an unsigned value.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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