Please sign in to comment.
Fix #40: Editing titles on cell based source list causes exception.
The cause of this bug was returning YES in -[PXSourceListDelegateDataSourceProxy respondsToSelector:] for the NSControl delegate methods -controlTextDidEndEditing:, -controlTextDidBeginEditing: and -controlTextDidChange: when they were called on the proxy because NSOutlineView implements them internally. However we weren't returning a method signature for them in -methodSignatureForSelector: which was throwing an exception. This fix has two components: - We only allow forwarding of NSOutlineView(Delegate|DataSource) methods to the source list PXSourceListDelegateDataSourceProxy (which was the original intention). If PXSourceList returns YES for -respondsToSelector: we ignore it if the method is not from one of these two protocols. - The NSControl delegate methods have been added to the fast-path forwarding delegate methods array in PXSourceListDelegateDataSourceProxy (the array which contains method names which can be forwarded to the source list's delegate as-is, without modifying the selector or arguments). These fix the underlying cause of the exception and implement the missing behaviour of allowing invocation of these NSControl methods on the source list's delegate.
- Loading branch information...
Showing with 24 additions and 5 deletions.