inserting graphics into NSString output
inserting graphics into NSString output
- Subject: inserting graphics into NSString output
- From: Nathan Lee <email@hidden>
- Date: Sat, 11 May 2002 19:51:56 -0700
Hello, I'm a newbie, and I'm trying to learn the NSString system. Could
someone help me out with inserting an image into a string?
My program has call that outputs to an NSTextView (called "textBox"
here):
int result;
[textBox insertText: [NSString stringWithFormat:@"The result is: %d\n",
result]];
and I need to insert an NSTextAttachment into the string, just like I'm
inserting an int. I imagine it would look something like this:
int result;
NSTextAttachment *pictureFile;
pictureFile = [[NSTextAttachment alloc] init];
// or this might need [[NSTextAttachment alloc]
initWithFileWrapper:<<something>>]; but I don't know file wrappers yet!
[textBox insertText: [NSString stringWithFormat:@"%a The result is:
%d\n", pictureFile result]];
So, any tips?
--
. ''~``
. ( o o )
+-oooO--(_)--Oooo-------------------------------------------+
| Nathan C. Lee |
| |
| email@hidden |
| (513) 706-5950 |
| oooO |
| ( ) Oooo "Life is short. Make fun of it." |
+--\ (-----( )--------------------------------------------+
. \_) ) /
. (_/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.