Re: [Pyobjc-dev] NSUndoManager.prepareWithInvocationTarget_
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2002-12-30 20:53:12
|
On Monday, Dec 30, 2002, at 15:06 US/Eastern, Ronald Oussoren wrote: > I expected that this would work, but it clearly doesn't. This seems to > be caused by a misunderstanding on my part of the semantics of > 'NSObject.respondsToSelector:'. I expected that this returns true > whenever 'NSObject.methodSignatureForSelector:' returns a non-nil > value, but it doesn't. This is frequently not the case in the context of forwarded invocations and other proxy-like behavior. A class may return true to respondsToSelector: but not actually provide a signature for the selector. NSUndoManager is just a big proxy that keeps invocations in a stack-- it isn't surprising that the behavior of respondsToSelector: in the context of undo is a bit odd. |