Ok, this is one of those mistakes. I simply forgot to connect the
mainTable outlet from my ApplicationController to the NSTableView.
On Dec 9, 2008, at 9:42 PM, Nick Ifloat wrote:
I was able to get data loaded to the NSTableView from its
DataSource. Now after adding some data when I call the following two
lines of code my application quits.
//note - mainTable is the NSTableView, mds is the datasource to be set
mainTable.DataSource = mds;
mainTable.ReloadData();
After the application quits, it then shows the following exception -
Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object
at FirebirdTestGUIController.actEdit (Monobjc.Id sender) [0x00000]
at
Monobjc.Dynamic.Proxies.FirebirdTestGUIController.actEdit_Monobjc_Id
(IntPtr receiver, IntPtr selector, IntPtr ) [0x00000]
at (wrapper native-to-managed)
Monobjc.Dynamic.Proxies.FirebirdTestGUIController:actEdit_Monobjc_Id
(intptr,intptr,intptr)
at (wrapper managed-to-native) 4FBC37BB:pinvoke (intptr,intptr)
at 4FBC37BB.objc_msgSend (IntPtr receiver, IntPtr selector,
System.Object[] parameters) [0x00000]
at Monobjc.Generation.DynamicMessagingGenerator.SendMessage
(System.String message, IntPtr receiver, IntPtr selector,
System.Object[] parameters) [0x00000]
at Monobjc.ObjectiveCRuntime.SendMessage (IManagedWrapper receiver,
System.String selector, System.Object[] parameters) [0x00000]
at Monobjc.Cocoa.NSApplication.Run () [0x00000]
at Monobjc.Cocoa.NSApplication.RunApplication () [0x00000]
at Program.Main (System.String[] args) [0x00000]