Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find color's change in a NSString (attributed)



Hi to all,

I already find the way to parse correctly the attributed string, and I can read the dictionary with NSColor key....
But the problem is the following:


My function returns me this line string: NSCalibratedRGBColorSpace 0.531465 1 0.821694 1
I need only the rgb value to convert it a a websafe color (or an html version of this color)....
I cannot use the method [myAttributesDictionary valueForKey:@"NSColor"]; because the string is filled with not only the rgb values....


How can I do?
Thank you all for support
Andrea


Il giorno 21/feb/06, alle ore 01:49, Uli Kusterer ha scritto:


Am 20.02.2006 um 17:18 schrieb Andrea Salomoni:


ps: Already read the NSAttributedString doc....



Well, these docs mention the NSForegroundColorAttributeName attribute, that it is an NSColor object, and they also mention you can query attributes using -attribute:atIndex:effectiveRange:. Since you probably know how to get the length of a string and loop over it, I'm befuddled what else you are having a problem with.


Could you perhaps tell us what you have tried so far and what your exact problem is?

Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/tech% 40metagraphics.it


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.