The BlockPointer aspect can be attached to a C#, Swift or Java delegate type declaration in order to indicate that the type represents a true block/delegate, not a function pointer. Since this is the default behavior of the delegate syntax, this aspect is not really needed, and is provided mainly for symmetry with the related FunctionPointer aspect.

In Oxygene, this distinction is made based on the keyword used to declare the type – the block and (deprecated) delegate keywords declare a block, while the method and (also deprecated) function and procedure keywords declare a function pointer.

  SomeBlock = public block(aString: String): Integer;
public delegate int SomeBlock(string aString);
@BlockPointer public SomeBlock = (String) -> (Int);
// delegates are not supported in Java (yet)

Cocoa and Island Only

The BlockPointer aspect is available on the Cocoa and Island platforms only.

Defined by the core compiler.

See Also