FROM : Nick Toumpelis
DATE : Fri Feb 15 22:23:52 2008
On 15 Φεβ 2008, at 5:52 ΜΜ, John Dann wrote:
> If I want to change the name of the NSOutlineView column to which
> the #define statement referrs at some time in the future, I'll have
> to change both, and likely forget one. Is there any way around this
> without placing the #define in my NSDocument subclass's .h file?
You could define a constant method (like in SmallTalk) in your main
class, that your categories can call e.g.:
- (NSString *) sourceListColumnID {
return @"sourceListColumn";
}
This can be called from your categories and you won't have to
duplicate your constants.
Nick
DATE : Fri Feb 15 22:23:52 2008
On 15 Φεβ 2008, at 5:52 ΜΜ, John Dann wrote:
> If I want to change the name of the NSOutlineView column to which
> the #define statement referrs at some time in the future, I'll have
> to change both, and likely forget one. Is there any way around this
> without placing the #define in my NSDocument subclass's .h file?
You could define a constant method (like in SmallTalk) in your main
class, that your categories can call e.g.:
- (NSString *) sourceListColumnID {
return @"sourceListColumn";
}
This can be called from your categories and you won't have to
duplicate your constants.
Nick
| Related mails | Author | Date |
|---|---|---|
| Hans van der Meer | Feb 12, 21:32 | |
| Hans van der Meer | Feb 12, 23:07 | |
| Adam P Jenkins | Feb 12, 23:09 | |
| mmalc crawford | Feb 13, 14:00 | |
| Adam P Jenkins | Feb 13, 15:37 | |
| mmalc crawford | Feb 13, 16:34 | |
| Adam P Jenkins | Feb 13, 17:51 | |
| Jens Alfke | Feb 13, 18:08 | |
| Adam P Jenkins | Feb 13, 20:24 | |
| mmalc crawford | Feb 13, 22:21 | |
| mmalc crawford | Feb 13, 22:30 | |
| Kyle Sluder | Feb 13, 22:30 | |
| Adam P Jenkins | Feb 13, 22:57 | |
| Ken Thomases | Feb 13, 23:05 | |
| Jens Alfke | Feb 14, 00:33 | |
| Adam P Jenkins | Feb 14, 07:47 | |
| John Dann | Feb 14, 15:05 | |
| Nick Toumpelis | Feb 15, 10:54 | |
| John Dann | Feb 15, 11:27 | |
| Nick Toumpelis | Feb 15, 13:20 | |
| Hans van der Meer | Feb 15, 14:44 | |
| John Dann | Feb 15, 15:10 | |
| Stephen Hoffman | Feb 15, 16:18 | |
| John Dann | Feb 15, 16:52 | |
| Kyle Sluder | Feb 15, 18:43 | |
| Nick Toumpelis | Feb 15, 22:23 | |
| Jonathan Dann | Feb 16, 17:21 |






Cocoa mail archive

