Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Ferry
On Mon, Mar 1, 2010 at 9:19 PM, Graham Cox wrote: > > On 02/03/2010, at 4:00 PM, Ken Ferry wrote: > > > When you use a symbol like NSForegroundColorAttributeName, a reference to > the symbol is embedded in your binary, not the value. So it could possibly > change. > > > > Barriers to this would b

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 4:00 PM, Ken Ferry wrote: > When you use a symbol like NSForegroundColorAttributeName, a reference to the > symbol is embedded in your binary, not the value. So it could possibly change. > > Barriers to this would be (1) people persisting attribute dictionaries,[...] > (1) mi

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Ferry
On Mon, Mar 1, 2010 at 7:51 PM, Graham Cox wrote: > > On 02/03/2010, at 2:39 PM, Steven Degutis wrote: > > > NSAttributedString is part of Foundation.framework and so are all > NSStrings > > (including literal constants like @"NSColor"). Thus, you can use that > safely > > without linking against

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 3:04 PM, Murat Konar wrote: > And what would you set the value of an NSColor attribute to? ;) Yes, fair comment :) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Murat Konar
On Mar 1, 2010, at 7:53 PM, Graham Cox wrote: On 02/03/2010, at 2:42 PM, Murat Konar wrote: Unfortunately it seems that using the @"NSColor" key as part of an NSAttributedString also requires AppKit. Well, that's because NSColor (the class) is part of AppKit. You can still create a lit

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 2:42 PM, Murat Konar wrote: >> Unfortunately it seems that using the @"NSColor" key as part of an >> NSAttributedString also requires AppKit. > > Well, that's because NSColor (the class) is part of AppKit. You can still create a literal string @"NSColor" without AppKit - it

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 2:39 PM, Steven Degutis wrote: > NSAttributedString is part of Foundation.framework and so are all NSStrings > (including literal constants like @"NSColor"). Thus, you can use that safely > without linking against AppKit.framework; however, I advise against using > string litera

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Sean McBride
BareFeet (list.develo...@tandb.com.au) on 2010-03-02 22:27 said: >>> I have some working code for adding attributes to a string. I'd like >to modify it so it will work without needing AppKit. I can get it all >going except the NSForegroundColorAttributeName constant which seems to >only exist in A

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Thomases
On Mar 1, 2010, at 9:27 PM, BareFeet wrote: >>> I have some working code for adding attributes to a string. I'd like to >>> modify it so it will work without needing AppKit. I can get it all going >>> except the NSForegroundColorAttributeName constant which seems to only >>> exist in AppKit. >>

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Murat Konar
On Mar 1, 2010, at 7:27 PM, BareFeet wrote: Unfortunately it seems that using the @"NSColor" key as part of an NSAttributedString also requires AppKit. Well, that's because NSColor (the class) is part of AppKit. _murat ___ Cocoa-dev mailing list

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Steven Degutis
NSAttributedString is part of Foundation.framework and so are all NSStrings (including literal constants like @"NSColor"). Thus, you can use that safely without linking against AppKit.framework; however, I advise against using string literals in place of Apple's constants, since they might change u

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread BareFeet
Thanks Graham for your reply: >> I have some working code for adding attributes to a string. I'd like to >> modify it so it will work without needing AppKit. I can get it all going >> except the NSForegroundColorAttributeName constant which seems to only exist >> in AppKit. > > If you log the

Re: NSForegroundColorAttributeName without AppKit

2010-02-19 Thread Graham Cox
On 19/02/2010, at 7:05 PM, BareFeet wrote: > I have some working code for adding attributes to a string. I'd like to > modify it so it will work without needing AppKit. I can get it all going > except the NSForegroundColorAttributeName constant which seems to only exist > in AppKit. If you l

NSForegroundColorAttributeName without AppKit

2010-02-19 Thread BareFeet
Hi all, I have some working code for adding attributes to a string. I'd like to modify it so it will work without needing AppKit. I can get it all going except the NSForegroundColorAttributeName constant which seems to only exist in AppKit. Here's an example: NSColor* tokenColor = [NSColor red