Problems
Problems
- Subject: Problems
- From: Luca Torella <email@hidden>
- Date: Mon, 08 Jul 2002 18:49:13 +0200
Hello,
I've some problems, and I need your help.
1)
My first app is an HTML Editor. I've created a palette to where there are
several buttons. For example clicking the "Bold" one the app should insert
<b> and </b>.
I've used this method:
- (void)tagBold:(id)sender
{
[VisoreTesto insertText:@"<b></b>"];
}
but first I want that the cursor go between the two tags. Second with this
method when I click a button of the palette then I must bring to front the
editor before typing again.
2)
I used this method to create a preview of the file. It's all right, but if
the file isn't saved yet it doesn't run properly. I want that, if the path
is empty, the app show a Message Box (better if it's a sheet) with only the
button "Ok" saying "Save file before making a preview".
- (void)preview:(id)sender
{
NSString *stream = [VisoreTesto string]; //VisoreTesto is the TextView
NSString *path = [self fileName];
BOOL b;
[stream writeToFile:path atomically:YES];
b = [[NSWorkspace sharedWorkspace] openFile:path];
}
Thanks, Luca.
_______________________________________________
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.