Re: Look at NSData
Re: Look at NSData
- Subject: Re: Look at NSData
- From: "Peter Karlsson" <email@hidden>
- Date: Sat, 12 Apr 2003 11:10:53 +0000
myData is declared like this:
NSData *myData = [NSData dataWithContentsOfFile:thePath];
myData2 is declared like this:
NSData *myData2;
When trying this code I get a error message saying:
*** -[NSConcreteData getBytes:range:]: location 1 exceeds data length 1
// check to see if myData2 holds the right values
for (i = 0; i < 4080; i++)
{
myRange.location = i;
[myData2 getBytes:&buffer1 range:myRange];
NSLog(@"X", buffer1);
}
But looking at myData works. What's the problem here?
Peter
From: "Peter Karlsson" <email@hidden>
To: email@hidden
Subject: Look at NSData
Date: Sat, 12 Apr 2003 06:36:14 +0000
Dear list!
I have a NSData object and wonder how I can look at all the bytes inside it
with the help of NSLog?
Example: Lets say I have 1000 bytes in the NSData object and I want to look
at all the bytes in a loop, how?
Peter
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.