[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lost in gnustep first steps
From: |
Pascal Bourguignon |
Subject: |
lost in gnustep first steps |
Date: |
Wed, 4 Jun 2003 22:45:51 +0200 |
reuss writes:
> I am trying to use the gnustep classes for making a little, editable
> dictionary (to use my "|" delimited vocabulary (NSDictionary is not good
> for that purpose, because there are multiple records with same key)
So you want a NSMutableDictionary of NSMutableArray.
- addObject:(id)data toKey:(id)key
{
NSMutableArray* records=[myDict objectAtKey:key];
if(records==nil){
[myDict setObject:[NSMutableArray arrayWithObject:data] forKey:key];
}else{
[records addObject:data];
}
}
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.