That should work.
Where are you crashing - and what is your crash log?
My guess is that something else is not right (are you sure that
myNSTextField is a valid object)?
Jesper Storm Bache
On May 7, 2009, at 2:38 PM, Andrew Wood wrote:
Im using a library which requires arguments to be C++ std::strings,
but I need to take the value from an NSTextField.
I thought I could do it like this:
std::string mycppstring;
.
.
.
mycppstring = std::string([[myNSTextField stringValue] UTF8String]);
But it keeps crashing. What's the recommended way?
Thanks
Andrew
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/jsbache%40adobe.com
This email sent to jsba...@adobe.com
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com