NSData object trouble with <16KB
NSData object trouble with <16KB
- Subject: NSData object trouble with <16KB
- From: "David Piasecki" <email@hidden>
- Date: Thu, 22 Apr 2004 13:47:04 -0700
To pass data into an NSImage object, I first pass data into an NSData
object by calling the initWithBytes:length method. This works fine for
data lengths larger than 16KB. I specify the size of the data because I
ran into a problem today where any time I try to pass an NSData object
less than 16KB (say, 13,700 bytes), after the method call...
NSData *data = [NSData alloc];
[data initWithBytes:getData() length:getDataLength()];
getData() returns a char *
getDataLength() returns an int
The "data" ends up being of size 0 bytes. If the size of the data I
pass in is greater than 16KB, there is no problem. Unfortunately, I may
have data sizes smaller than 16KB. Has anyone ran into this problem,
and do you know of some way around it, or perhaps I'm doing something
wrong?
Thanks,
David
_______________________________________________
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.