Re: NSTimer & NSInternalInconsistencyException
Re: NSTimer & NSInternalInconsistencyException
- Subject: Re: NSTimer & NSInternalInconsistencyException
- From: Roarke Lynch <email@hidden>
- Date: Mon, 11 Nov 2002 10:22:03 -0500
Well, both addEntriesFromDictionary: and setDictionary: would probably
use setObject:forKey: to mutate the receiver internally. Maybe you
called of of these? Beyond that I wouldn't know what else to look for
w/o more of a context.
On Sunday, November 10, 2002, at 10:29 PM, Terence _ wrote:
Hi,
You know, that's what I would have thought, too, but.. I can't find
any place in the traversePorts method (or anything it relies upon)
where that would be the case.
The only things I could find that even came close were a few lines
like this:
[retDict setObject:[NSDictionary dictionaryWithObjects: ....
where an NSMutableDictionary contained an NSDictionary, and one place
where:
[mainDict setObject:[devDict copy] ....
where mainDict and devDict are both NSMutableDictionary objects. (The
only reason I mention it is that we're doing a "copy" instead of a
"mutableCopy".)
Do either of those cases seem like possible problems? I am, of course,
still puzzled as to why it would occur only on some machines and not
all if it were something this basic.
Thanks again,
Terence
From: Roarke Lynch <email@hidden>
To: "Terence _" <email@hidden>
Subject: Re: NSTimer & NSInternalInconsistencyException
Date: Sun, 10 Nov 2002 21:59:16 -0500
*** NSTimer ignoring exception 'NSInternalInconsistencyException'
(reason '*** -[NSCFDictionary setObject:forKey:]: mutating method
sent to immutable object') that raised during posting of timer with
target bc0e0 and selector 'traversePorts'
This means that you are calling the setObject: forKey: method to a
NSDictionary _not_ a NSMutableDictionary object. Such things have
arisen in my code from using copy instead of mutableCopy. The rest of
the error message is just telling you where this is occuring. i.e
during the execution of bc0e0's tranversePorts method.
Roarke Lynch
-------------------------------
email@hidden
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.