NSWindow in main nib.
NSWindow in main nib.
- Subject: NSWindow in main nib.
- From: email@hidden
- Date: Thu, 22 May 2008 06:05:55 -0400 (EDT)
- Importance: Normal
i'm usinf leopard machine.I've found a prooblem in my application,I
clicked on the zoom button of the window in interface builder3.0,Now i
couldn;t open that window and couldn't load at run time.
i've set the bold menu item by setting the action addFontTrait in
fontmanager.Now it is working i can give the data's as bold italic etc in
textView.
I tried to convert it to HTML form by using the code.
NSString * aTitle = @"Sample";
NSArray* excluded = [NSArray arrayWithObjects:
@"doctype",@"p",@"meta",@"xml",@"span", nil];
NSDictionary* attr = [NSDictionary dictionaryWithObjectsAndKeys:
NSHTMLTextDocumentType,
NSDocumentTypeDocumentAttribute,
aTitle, NSTitleDocumentAttribute,excluded,
NSExcludedElementsDocumentAttribute,
[NSNumber numberWithInt: NSASCIIStringEncoding],
NSCharacterEncodingDocumentAttribute,nil];
NSData* tData = [str dataFromRange: NSMakeRange(0, [str length])
documentAttributes: attr error: nil];
It giving html code, but it doesn;t giving <B>,<I>,<U> and colour tags
corresponding to the texts in textview.
Another qustion is how can i display this html code in my textview,I've tried
NSDictionary ** dict = &attr;
NSData* tData = [str dataFromRange: NSMakeRange(0, [str length])
documentAttributes: attr error: nil];
NSAttributedString *attrString = [[NSAttributedString alloc]initWithHTML:
tData
documentAttributes: dict];
[[htmlView textStorage] setAttributedString: attrString];
But it also displays the same string not html code.
More speccific
My first question is how can i get underlinetext or italictext to
<u>unerlinetext</u> or <i> italictext </i> etc...
SEcond question is How can write html code to textView?if NSData gives
html code.
Expecting reply.
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden