Repository: beeware/toga

Issue:
Beeware application crashes when attempting to click and drag item out of toga.Table and toga.Tree 
After installing the toga demo file from the toga repository and playing around with it I noticed that when I attempted to click and drag an item in a Tree or Table the app would crash saying 'Python quit unexpectedly.'.

Steps to reproduce the behavior:
1. Install demo
2. Run > briefcase dev
3. Click on item in list or Tree and attempt to drag it out

Environment: 
- Operating System: MacOSX 10.15.7
- Python version: 3.8.6
- Software versions:
      - Briefcase: 0.3.3
      - Toga: Alpha




Discussion:
Thanks for the report! A hard segfault crash definitely isn't the desired behavior, so at the very least there's an error that needs to be caught. 
Some initial investigation work: I thought we might be able to work around this by defining [`canDragRowsWithIndexes:atPoint:` with a return value of False](https://developer.apple.com/documentation/appkit/nstableview/1524273-candragrowswithindexes?language=objc) - however, this turns the problem in to an immediate segfault on the first click in the table. 
@samschott Any chance you have some free time to take a look at this one? I'm not having much luck hunting it down - mostly because there's almost no breadcrumb trail indicating the *source* of the problem, just a hard segfault as soon as a drag action is detected.
@freakboy3742, I'll have a look.

Resolving patch:
diff --git a/cocoa/src/toga_cocoa/widgets/table.py b/cocoa/src/toga_cocoa/widgets/table.py
--- a/cocoa/src/toga_cocoa/widgets/table.py
+++ b/cocoa/src/toga_cocoa/widgets/table.py
@@ -1,4 +1,4 @@
-from rubicon.objc import SEL, at, objc_method, objc_property
+from rubicon.objc import SEL, NSPoint, at, objc_method, objc_property
 from travertino.size import at_least
 
 import toga
@@ -21,6 +21,16 @@ class TogaTable(NSTableView):
     interface = objc_property(object, weak=True)
     impl = objc_property(object, weak=True)
 
+    # NSTableView methods
+    @objc_method
+    def canDragRowsWithIndexes_atPoint_(
+        self,
+        rowIndexes,
+        mouseDownPoint: NSPoint,
+    ) -> bool:
+        # Disable all drags
+        return False
+
     # TableDataSource methods
     @objc_method
     def numberOfRowsInTableView_(self, table) -> int:
@@ -140,6 +150,7 @@ def create(self):
         )
         self.native_table.usesAlternatingRowBackgroundColors = True
         self.native_table.allowsMultipleSelection = self.interface.multiple_select
+        self.native_table.allowsColumnReordering = False
 
         # Create columns for the table
         self.columns = []
diff --git a/examples/table/table/app.py b/examples/table/table/app.py
--- a/examples/table/table/app.py
+++ b/examples/table/table/app.py
@@ -11,7 +11,7 @@ class ExampleTableApp(toga.App):
     lbl_fontsize = None
 
     def load_data(self):
-        yak = toga.Icon.TOGA_ICON
+        yak = toga.Icon.DEFAULT_ICON
         red = toga.Icon("icons/red")
         green = toga.Icon("icons/green")
 
diff --git a/examples/tutorial2/tutorial/app.py b/examples/tutorial2/tutorial/app.py
--- a/examples/tutorial2/tutorial/app.py
+++ b/examples/tutorial2/tutorial/app.py
@@ -92,7 +92,7 @@ def startup(self):
             action2,
             text="Action 2",
             tooltip="Perform action 2",
-            icon=toga.Icon.TOGA_ICON,
+            icon=toga.Icon.DEFAULT_ICON,
             group=things,
         )
 


Test patch: