This tutorial will guide you through the process of migrating from the Monobjc bridge 5.x series to Monobjc bridge 6.x series:

  • Block API
  • API Deprecation
  • API Changes

Block API

The block API has changed to be simpler.

In the Monobjc bridge 5.x series, calling a method with a block parameter was done like this:

this.saveCodeHandler.SafeDispose ();
Action<NSInteger > handler = delegate(NSInteger returnCode) {
    // ...
};
this.saveCodeHandler = Block.Create (handler);

// ...

panel.BeginSheetModalForWindowCompletionHandler (this.window, this.saveCodeHandler);

In the Monobjc bridge 6.x series, calling a method with a block parameter is now done like this:

NSSavePanel panel = NSSavePanel.SavePanel;

// ...

Action<NSInteger> handler = delegate(NSInteger returnCode) {
    // ...
};

panel.BeginSheetModalForWindowCompletionHandler(this.window, handler);

It is not required to do the memory-management of the block.

API Deprecation

In the Monobjc bridge 6.x series, Mac OS X 10.6 is no longer supported.

API Changes

In the Monobjc bridge 6.x series, Mac OS X 10.6 is no longer supported.