Re: NSWindow in main nib.
Re: NSWindow in main nib.
- Subject: Re: NSWindow in main nib.
- From: Philip Aker <email@hidden>
- Date: Thu, 22 May 2008 05:26:55 -0700
On 08-05-22, at 03:05, email@hidden wrote:
Hi, this is the Xcode list. Your question sounds like it is more
suitable to the Cocoa list: <http://lists.apple.com/mailman/listinfo/cocoa-dev
>.
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
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Sent from my SE/30
_______________________________________________
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