May 2009, at 13:34, Andrew Wood wrote:
Investigated it a bit further. It works if I declare the string in
the method where Im doing the assignment, but what I was trying to
do, and really need to do, is decalre the std::string in the app
controllers header file, so that its visible to all
Investigated it a bit further. It works if I declare the string in
the method where Im doing the assignment, but what I was trying to do,
and really need to do, is decalre the std::string in the app
controllers header file, so that its visible to all methods in the
controller, then do the
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 rec