[Mono-osx] Scrolling NSTableView Corrupts Properties

Dan Fry dan at sonocent.com
Thu Oct 20 10:13:11 EDT 2011

Hello Andy,

Is it possible that there are no references to the form controller 
anywhere in your C# code, but the native Objective-C object has been 
retained somewhere, causing the managed object to be garbage collected 
then recreated later by MonoMac when it is passed as an argument to a 
method? (All the instance variables would be reset to their defaults in 
this case).

If so, could you perhaps try keeping a reference to the form controller 
in a static variable to test this theory?


On 20/10/2011 14:46, Andrew Ayre wrote:
> Happens with MonoMac built from current git source. :(
> On 10/20/2011 12:43 PM, Andrew Ayre wrote:
>> So... I have an NSTableView on my form, bound to a NSArrayController in
>> exactly the same way as the MonoMac table binding example. My form
>> controller also has three properties.
>> I set a breakpoint in awakeFromNib and I check that all three properties
>> contain references to objects in my application. None of these
>> properties or objects have anything to do with the table.
>> I then click on a button on the form to add some data to the
>> NSArrayController and it appears on the form.
>> If I then scroll the form up and down repeatedly after a few times ALL
>> of the properties on my form controller are set to null!
>> Any ideas???
>> Andy

More information about the Mono-osx mailing list