string help
string help
- Subject: string help
- From: Bob Sabiston <email@hidden>
- Date: Wed, 7 Sep 2005 17:55:18 -0500
Hello,
Well, I finally got my table of data to display! It's great.
Now I am trying to make it a little fancier, and I am running into
trouble with strings.
From my Carbon app, I am calling a function in the Cocoa bundle,
trying to set a string value:
OSStatus setCommandString(CFStringRef message) {
NSAutoreleasePool *localPool;
localPool = [[NSAutoreleasePool alloc] init];
[[Controller sharedController] setCommandString:(NSString *)
message];
[localPool release];
return noErr;
}
Within my Controller object, I have commandString defined like this:
@interface Controller : NSObject {
...
NSMutableString *commandString;
...
}
and here is the function I use to change the value.
- (void)setCommandString:(NSString *)text {
if (text)
[commandString setString:text];
else [commandString setString:@"unknown"];
}
Somewhere along the line, it is crashing. I believe that it's
happening with the call to setCommandString, though I can't see
what's wrong. Should the code above work, assuming the initial
message is a valid string?
Thanks
Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden