Re: OK, but what do 'attributes' look like?
Re: OK, but what do 'attributes' look like?
- Subject: Re: OK, but what do 'attributes' look like?
- From: Gregory Weston <email@hidden>
- Date: Tue, 9 Mar 2004 07:47:10 -0500
On Mar 9, 2004, at 4:26, Denis Stanton wrote:
It allows for flexibility -- suppose you wanted to mark up text with
special attributes for class names. Apple hasn't provided an
attribute for that, but you can create, and assign, your own...
Being allowed to make up my one language would be great - if I only
wanted to talk to myself. It surprised me here, because I actually
want to communicate something to the compiler, and it seems only
logical that I should use a terms that it will recognise. I understand
that the flexibility is providing for more complex needs, where I might
be handing the output myself.
Nit: You're not trying to communicate with the compiler here. You're
trying to communicate with the class library.
Clarification: The library will, as seems sensible, only recognize the
things it recognizes. But you can put anything you want in there as
long as it doesn't look like something the library recognizes without
acting like it.
Yes, I went there. I found:
Attribute Identifier NSFontAttributeName
Default Value Helvetica 12-point
I'm not sure why you skipped the Value Class -- NSFont?
Because I didn't understand what this column was for. I'm looking for
a way to do something to an NSString, but the only line that deals with
NSString is for tool tips. I discarded the central column because it
didn't match the pattern I was looking for.
For clarification and future reference: Recall that the attributes are
passed as a dictionary. A dictionary is a data structure that consists
of paired elements known as "keys" and "values." It's _sort_of_ like an
array where the indices are objects instead of numbers. "Value Class"
in that table is telling you what class of object is expected for the
value associated with the specified key.
G
_______________________________________________
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.