• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
dictionaryWithObjectsAndKeys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dictionaryWithObjectsAndKeys


  • Subject: dictionaryWithObjectsAndKeys
  • From: email@hidden
  • Date: Sat, 9 Oct 2010 13:05:22 -0600

I want to make a NSDictionary of text attributes to apply to text being drawn in a NSTextFieldCell.

This

m_textAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSFont systemFontOfSize:12.0], NSFontAttributeName, NSRightTextAlignment, NSTextAlignment, nil];

gives this error:

error: syntax error before 'NSTextAlignment'

I want to use m_textAttributes to draw text right aligned eith the specified font.


[m_obstacleName drawInRect:cellFrame withAttributes:m_textAttributes];


So two questions:

1. What is the syntax error, as the docs show a similar example
2. is there a better way to right align text

-koko

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: dictionaryWithObjectsAndKeys
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: confused about floats
  • Next by Date: Re: main window disappears on resize
  • Previous by thread: Re: clarifications about coredata sub to-many entities fetching
  • Next by thread: Re: dictionaryWithObjectsAndKeys
  • Index(es):
    • Date
    • Thread