Closed sxross closed 11 years ago
I did get the warning, but I also got the completion called:
(main)> picker = UIImagePickerController.new
=> #<UIImagePickerController:0x152396e0>
(main)> picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary
=> 0
(main)> picker.mediaTypes = [KUTTypeImage]
=> ["public.image"]
(main)> picker.allowsEditing = false
=> false
(main)> SugarCube::Modal.present_modal(picker) { puts "hi!" }
unknown: warning: passing a block to an Objective-C method - will be ignored
=> #<MainScreenController:0x1493f9a0>
hi!
(main)>
:frowning:
This is a RubyMotion warning. https://groups.google.com/forum/?fromgroups=#!topic/rubymotion/MQYGkb6TdLY
When I ran colinta's above code I didn't even get the warning, it worked fine. Soooo no clue how to help beyond that.
$motion -v
1.34
If everyone's comfortable that the block is being run but the results are ignored, then fine. If the block is being ignored and there's some other implication in this message, perhaps it bears more investigation. This issue is a couple of RM releases old, so the warning might have been removed or refined. What's the consensus?
I'll check one more time on a fresh dummy project.
successful, so closing this one.
Code like this:
generates the "passing a block to an Objective-C method - will be ignored warning. However,
does not generate the warning. It's not clear whether this is a Sugarcube, iOS or RM issue. It's just new and potentially bothersome. The completion is never called.
$ motion -v 1.32 Xcode: Version 4.6 Simulator: Version 6.0 (369.2)