Hi Leslie,
The issue is that you cannot init an object more than once.
See if [[NSMutableDictionary alloc] initWithContentsOfFile:] behaves
as it ought.
-Ken
On Wed, May 28, 2008 at 12:58 AM, Leslie Smith [EMAIL PROTECTED] wrote:
I very recently upgraded from 10.4.11 Xcode 2.5 to 10.5.2 and
You can't init an object more than once (well not an intended use).
You do:
SimParamnames = [NSMutableDictionary dictionary];
and later:
[SimParamnames initWithContentsOfFile: aFile];
which are both initializing the object. The second init is either
being ignored or perhaps corrupting
Hi:
I found out what I was doing wrong: rather than
[SimParamnames initWithContentsOfFile: aFile];
I should have had
SimParamnames = [SimParamnames initWithContentsOfFile: aFile];
because within the documentation for initWithContentsOfFile it says
Return Value: An initialized object—which
Leslie Smith wrote:
Hi:
I found out what I was doing wrong: rather than
[SimParamnames initWithContentsOfFile: aFile];
I should have had
SimParamnames = [SimParamnames initWithContentsOfFile: aFile];
A more normal way of doing the above is
NSMutableDictionary *SimParamnames;
On May 29, 2008, at 9:41 AM, Leslie Smith wrote:
because within the documentation for initWithContentsOfFile it says
Return Value: An initialized object—which might be different than
the original receiver ...
and my original code assumes that the return value is the same object.
This is
On 29 May '08, at 6:41 AM, Leslie Smith wrote:
I found out what I was doing wrong: rather than
[SimParamnames initWithContentsOfFile: aFile];
I should have had
SimParamnames = [SimParamnames initWithContentsOfFile: aFile];
No. As two people have said already, *you can't initialize an