On Dec 13, 2012, at 4:28 PM, Kevin Perry <kpe...@apple.com> wrote:

> 
> On Dec 13, 2012, at 4:24 PM, Greg Parker <gpar...@apple.com> wrote:
> 
>> On Dec 13, 2012, at 4:13 PM, Robert Monaghan <b...@gluetools.com> wrote:
>>> I went ahead and created a really crude subclass of NSMutableData. It seems 
>>> to work for my situation.
>>> Attached is the code, for posterity. (I am sure I won't be the only one 
>>> working around this.)
>>> 
>>> Any suggestions to make this a bit more "Proper" are welcome.
>> 
>> If that's all you need then you should wrap the buffer in an immutable 
>> NSData. NSData won't mind if you poke directly at the contents of the buffer.
> 
> Except that he's probably expecting to be able to invoke -mutableBytes and 
> modify the buffer's contents without changing the length. Immutable NSData 
> objects don't respond to -mutableBytes.

There's no reason he needs to invoke -mutableBytes. For his purposes, -bytes 
would do just as well, since the length won't be changing.

+Melissa



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to