some newbie questions
some newbie questions
- Subject: some newbie questions
- From: "Paul S. Linsay" <email@hidden>
- Date: Fri, 5 Apr 2002 16:09:11 -0500
Why does
NSMutableAttributedString *string;
...
string = [NSMutableAttributedString alloc];
[string initWithString:@" " attributes:attributes];
correctly allocate and initialize string but
string = [[NSMutableAttributedString alloc] initWithString:@"
" attributes:attributes];
fails to allocate memory for the pointer?
Another problem:
The statements
NSRange charRange = NSMakeRange(0, 1);
...
[string applyFontTraits:NSItalicFontMask range:charRange];
and
[string applyFontTraits:NSUnitalicFontMask range:charRange];
let me switch between italicized and unitalicized characters, but the
statements
[string applyFontTraits:NSBoldFontMask range:charRange];
and
[string applyFontTraits:NSUnboldFontMask range:charRange];
don't switch between bold and unbold, they also switch text between
italicized and unitalicized characters.
All help and explanations are appreciated,
Thanks,
Paul--
_______________________________________________
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.