[Mono-osx] How to export an array

Andrew Ayre andy at britishideas.com
Wed Sep 14 08:47:20 EDT 2011


Hi, Here is my simple test code, which is on MainWindowController.cs:

private int[] _MyValues = { 1, 2, 3 };

[Export ("myValues")]
public int[] MyValues
{
  get { return _MyValues; }
  set { _MyValues = value; }
}

I haven't tried to bind the array to anything and it's not used anywhere
in the code. When I start my application it crashes immediately and
every time with SIGABRT in native code:

*Assertion: should not be reached at marshal.c:7600

object.__icall_wrapper_mono_delegate_to_ftnptr(object) <IL 0x00021,
0xffffffff>

I am using the current MonoMac and MonoDevelop on SnowLeopard. I'm sure
I am misunderstanding how to use it - can anyone please give me some
hints? Thanks.

regards, Andy

-- 
Andy
PGP Key ID: 0xDC1B5864



More information about the Mono-osx mailing list