Hi Davide,
- wipe out the SetUp() function: initialization (selectors, inlets,
outlets) will be done in the class constructor
about the last point: I know that in "real" externals selectors declaration is done in setup() and inlet/outlet creation in new() but here we only have what corresponds to new(), I mean we can't register methods before actually initializing the object. So I think the best thing to do is what Mathieu calls "following C# conventions" and use the class constructor: this is what C# developers are used to.
that's not completely correct: the PD-like style would be to register the class (that's the actual CLR assembly) when loading it the first time. There, a static Main function could be called registering the methods. When creating the CLR object, the constructor is called, registering inlets and outlets. This has the advantage that the objects would be more lightweight (method table is needed only once per class, not per instance) and that loading is faster.
But, Thomas, feel free to change anything needed to make it work with your loader patch (hadn't tried it yet..)
I've just created an xcode project where i'll track down the crashes and restructure the code. I'll propose the changes to you before comitting them.
best greetings, Thomas