Re: StringBuffer to NSData
Re: StringBuffer to NSData
- Subject: Re: StringBuffer to NSData
- From: Nathan Dumar <email@hidden>
- Date: Fri, 10 Sep 2004 13:00:53 -0400
Andy and Colin,
I knew something was wrong when two people were telling me to do
something that I *thought* I had tried and failed to do. When I went
back and looked again, I was doing:
page.takeValueForKey(sb.toString().getBytes(), "dataForFile"); //
dataForFile is an NSData
instead of
page.takeValueForKey(new NSData(sb.toString().getBytes()),
"dataForFile");
I knew better ... guess it's just a newbie blunder. Thank you both for
setting me straight.
Take care,
Nathan
On Sep 10, 2004, at 11:07 AM, Andy Beier wrote:
I believe it should go like this:
StringBuffer sb = new StringBuffer();
new NSData(sb.toString().getBytes());
Andy
and
On Sep 10, 2004, at 11:04 AM, Colin Clark wrote:
NSData myData = new NSData(myStringBuffer.toString().getBytes());
I hope that helps,
Colin
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.