Provide an empty implementation for the required method.
Compilation at this point fails with:
"Internal Error: Operation is not valid due to the current state of the object"
Help ?!!?
Supplementary information:
Before I whittled my problems down to this simple test case I previously found that I was unable to form a case statement involving MessageComposeResult enum members. Attempting to do so resulted in compilation errors:
'Type mismatch, cannot find operator to evaluate "void" = "Void"'
It didn’t make any difference which of the two forms I used:
MessageComposeResult.MessageComposeResultCancelled: ;
// or
MessageComposeResult.Cancelled: ;
This issue may be related, but also occurs in isolation. i.e. remove the class attempting to implement the interface as described above, then simply add the following to iOS project Program.Main() method:
var r: MessageComposeResult;
case r of
MessageComposeResult.Cancelled: ;
end;
Out of curiosity I just updated to the latest beta (1603) to see if that helped. I didn’t think it would as the change log didn’t suggest anything changed that might have had a bearing on this. And it hasn’t. Both problems remains.
One further piece of information…
Whatever the problem is, I don’t think it is the delegate interface itself - if I remove that from the class declaration and simply leave the method implemented without that corresponding interface, I still get the same problem.
And some more information… I think the issue lies with the MessageComposeResult type somehow since simply adding this to a class (with a corresponding empty method body) is enough to trigger the problem:
method foo(bar: MessageComposeResult);
The clincher is that in fact, just adding a member variable of this type is enough to trigger it !
The IDE “type insight” might provide some clue as to what is going on:
Surely an enum should ‘extend’ integer or some ordinal type (other enums appear to) ? This might also explain why the case statement threw up such strange “void” related errors when involving this type.
It’s looking like an importer bug. Investigating now.
Update: Yes, it’s a bug in the header importer, fixed internally & for next build. LEt me know if this is blocking you, if so we can give you a new build.
I had two choices… write a simple test using this controller view and then build the UI of my app around it. But since it was such a straightforward controller I decided to build my UI first and then just plug this in at the end, so this is the only thing now preventing me from completing my app.
( Not having a go, just having a bit of a laugh at myself )
here’s a new messageui (ios8); I think you can safely replce this even for ios7 but I haven’t tried (I don’t have the old xcode handy) MessageUI.zip (9.7 KB)
Unfortunately I didn’t get very far at all… I perhaps should have mentioned that I am currently having to develop against the simulator and the fx file you provided appears to be only for actual device hardware.
Also fyi 7.1 is the SDK I am using (if that is at all helpful).