# HG changeset patch -- Bitbucket.org
# Project PyGUI
# URL http://bitbucket.org/danchr/pygui/overview/
# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
# Date 1262017331 -3600
# Node ID 76daab77c864986c9e44a19d983b26939423c84b
# Parent 03e3fd41e79731484fa5fcf7e780c3420a611acb
Fix Snow Leopard compatibility.

--- a/GUI/Cocoa/Applications.py
+++ b/GUI/Cocoa/Applications.py
@@ -300,39 +300,34 @@ class _PyGui_NSApplication(NSApplication
         command = ns_menu_item.representedObject()
         index = ns_menu_item.tag()
         if index >= 0:
-            self.dispatch_to_app(command, index)
+            self.pygui_app.dispatch(command, index)
         else:
-            self.dispatch_to_app(command)
-    
-    def dispatch_to_app(self, *args):
-        app = self.pygui_app
-        if app:
-            app.dispatch(*args)
+            self.pygui_app.dispatch(command)
     
     def validateMenuItem_(self, item):
         return False
     
     def undo_(self, sender):
         print "_PyGui_NSApplication.undo_" ###
-        self.dispatch_to_app('undo_cmd')
+        self.pygui_app.dispatch('undo_cmd')
 
     def redo_(self, sender):
-        self.dispatch_to_app('redo_cmd')
+        self.pygui_app.dispatch('redo_cmd')
 
     def cut_(self, sender):
-        self.dispatch_to_app('cut_cmd')
+        self.pygui_app.dispatch('cut_cmd')
 
     def copy_(self, sender):
-        self.dispatch_to_app('copy_cmd')
+        self.pygui_app.dispatch('copy_cmd')
 
     def paste_(self, sender):
-        self.dispatch_to_app('paste_cmd')
+        self.pygui_app.dispatch('paste_cmd')
 
     def clear_(self, sender):
-        self.dispatch_to_app('clear_cmd')
+        self.pygui_app.dispatch('clear_cmd')
 
-    def select_all_(self, sender):
-        self.dispatch_to_app('select_all_cmd')
+    def selectAll_(self, sender):
+        self.pygui_app.dispatch('select_all_cmd')
 
     def init_application_name(self):
         #  Arrange for the application name to be used as the title
