FROM : Cameron Hayne
DATE : Sat Jun 24 22:12:12 2006
On 24-Jun-06, at 3:20 PM, Alan Smith wrote:
> Each entry of dict1 has a dict2 in it.
> [...]
> [dict2 setObject: @"some object" forKey: @"object"];
> [dict1 setObject: dict2 forKey: @"firstEntry"];
>
> [dict2 setObject: @"another object" forKey: @"object"];
> [dict1 setObject: dict2 forKey: @"secondEntry"];
As Ashley Clark has already pointed out, according to your code,
there is only one dict2 object and it is referred to in all dict1
entries.
So instead of "Each entry of dict1 has a dict2 in it", the situation
is really "Each entry of dict1 has the dict2 in it."
--
Cameron Hayne
<email_removed>
DATE : Sat Jun 24 22:12:12 2006
On 24-Jun-06, at 3:20 PM, Alan Smith wrote:
> Each entry of dict1 has a dict2 in it.
> [...]
> [dict2 setObject: @"some object" forKey: @"object"];
> [dict1 setObject: dict2 forKey: @"firstEntry"];
>
> [dict2 setObject: @"another object" forKey: @"object"];
> [dict1 setObject: dict2 forKey: @"secondEntry"];
As Ashley Clark has already pointed out, according to your code,
there is only one dict2 object and it is referred to in all dict1
entries.
So instead of "Each entry of dict1 has a dict2 in it", the situation
is really "Each entry of dict1 has the dict2 in it."
--
Cameron Hayne
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Alan Smith | Jun 24, 21:20 | |
| Ashley Clark | Jun 24, 21:34 | |
| Cameron Hayne | Jun 24, 22:12 | |
| Alan Smith | Jun 25, 00:46 |






Cocoa mail archive

