[Mono-osx] Scrolling NSTableView Corrupts Properties

Andrew Ayre andy at britishideas.com
Thu Oct 20 10:48:18 EDT 2011


Hi Dan,

That was it - thanks!! How stupid of me.

Andy

On 10/20/2011 3:13 PM, Dan Fry wrote:
> 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?
> 
> Dan
> 
> 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
>>>
> 
> 
> 

-- 
Andy
PGP Key ID: 0xDC1B5864


More information about the Mono-osx mailing list