Revision: 7544
http://skim-app.svn.sourceforge.net/skim-app/?rev=7544&view=rev
Author: hofman
Date: 2011-11-22 18:18:26 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
pass registered editor as argument of commit callback
Modified Paths:
--------------
trunk/SKNoteWindowController.m
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2011-11-19 19:03:32 UTC (rev 7543)
+++ trunk/SKNoteWindowController.m 2011-11-22 18:18:26 UTC (rev 7544)
@@ -305,7 +305,23 @@
return [noteController commitEditing];
}
+- (void)editor:(id)editor didCommit:(BOOL)didCommit contextInfo:(void
*)contextInfo {
+ NSInvocation *invocation = [(NSInvocation *)contextInfo autorelease];
+ if (invocation) {
+ [invocation setArgument:&didCommit atIndex:3];
+ [invocation invoke];
+ }
+}
+
- (void)commitEditingWithDelegate:(id)delegate
didCommitSelector:(SEL)didCommitSelector contextInfo:(void *)contextInfo {
+ if (delegate && didCommitSelector) {
+ NSInvocation *invocation = [[NSInvocation
invocationWithMethodSignature:[delegate
methodSignatureForSelector:didCommitSelector]] retain];
+ [invocation setTarget:delegate];
+ [invocation setSelector:didCommitSelector];
+ [invocation setArgument:&self atIndex:2];
+ [invocation setArgument:&contextInfo atIndex:4];
+ return [noteController commitEditingWithDelegate:self
didCommitSelector:@selector(editor:didCommit:contextInfo:)
contextInfo:invocation];
+ }
return [noteController commitEditingWithDelegate:delegate
didCommitSelector:didCommitSelector contextInfo:contextInfo];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit