Yeah.  I was way wrapped around the axle.

This works just fine:


NSMutableParagraphStyle *pStyle = [[NSMutableParagraphStyle new] autorelease];
[pStyle setAlignment:NSRightTextAlignment];
m_textRightAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSFont systemFontOfSize:12.0], NSFontAttributeName, pStyle, NSParagraphStyleAttributeName, nil];
[m_textRightAttributes retain];

On Oct 9, 2010, at 1:49 PM, Quincey Morris wrote:

On Oct 9, 2010, at 12:30, [email protected] wrote:

                m_textAttributes = [NSDictionary dictionary];
[m_textAttributes setObject:[NSFont systemFontOfSize:12.0] forKey:NSFontAttributeName]; NSMutableParagraphStyle *pStyle = [[NSMutableParagraphStyle new] autorelease];
                [pStyle setAlignment:NSRightTextAlignment];
[m_textAttributes setObject:pStyle forKey:NSParagraphStyleAttributeName];

Is that really your code? You're invoking 'setObject:forKey:' on an immutable NSDictionary.

Either you're ignoring a compiler warning, or you have compiler warnings turned off. Neither seems like a very good idea.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net

This email sent to [email protected]


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to