Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m
branchadium-1.5.10.5
changeset 5999 91f7da2a2338
parent 4897 5ea3bd51010d
--- a/Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m	Thu Nov 14 16:23:07 2019 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m	Thu Nov 14 16:24:17 2019 -0500
@@ -76,6 +76,7 @@
 
 @implementation AITableView
 
+
 /* 
  * @brief Load
  *
@@ -104,7 +105,8 @@
 			[(id <AITableViewDelegate>)[self delegate] tableViewDeleteSelectedRows:self]; //Delete the selection
 	} else {
 		//Pass the key event on to the unswizzled impl
-		method_invoke(self, class_getInstanceMethod([AITableView class], @selector(keyDown:)), theEvent);
+        static void (*_key_down_method_invoke)(id, Method, NSEvent *) = (void (*)(id, Method, NSEvent *)) method_invoke;
+		_key_down_method_invoke(self, class_getInstanceMethod([AITableView class], @selector(keyDown:)), theEvent);
 	}
 }
 
@@ -113,8 +115,9 @@
 {
 	if ([[self delegate] respondsToSelector:@selector(tableView:menuForEvent:)])
 		return [(id<AITableViewDelegate>)[self delegate] tableView:self menuForEvent:theEvent];
-        
-	return method_invoke(self, class_getInstanceMethod([AITableView class], @selector(menuForEvent:)), theEvent);
+    
+    static NSMenu * (*_menu_for_event_method_invoke)(id, Method, NSEvent *) = (NSMenu * (*)(id, Method, NSEvent *)) method_invoke;
+	return _menu_for_event_method_invoke(self, class_getInstanceMethod([AITableView class], @selector(menuForEvent:)), theEvent);
 }
 
 @end