-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning about block being passed to objective-c method incorrectly #13
Comments
Turns out this is an interesting bug. If you get a back trace at the point of warning (replace the warning in dispatcher.cpp with an exception), then you can see the problem is that If you fiddle with the block a bit you can also see that the block being passed to application name: 'App' do |app|
puts "I'm the culprit!"
end I'm not sure why that block is being passed to the method and so I don't know how to fix this... |
Not a proper fix, I'll have to get deeper into the guts of the layout manager first. I plan to do that when I start on an auto-layout backed manager for HotCocoa.
I've got a work around for the time being, I'll have to look into it more when I'm not tired... |
Actually, I think it is a proper fix. According to PragProg Programming Ruby 1.9 : "If no parameters (and no parentheses) are passed to super, the original method's parameters will be passed; otherwise, the parameters to super will be passed" Of course, finding this in the source is left as an exercise for the reader. |
I think perhaps I am confusing myself on what this issue really is. Technically this bug is about getting rid of the warning, which I have done, but I also want to understand why the block was getting passed to that method in the first place and fix that as well. |
I'm don't think there's a bug here. I start by assuming the behavior of super is consistent from Ruby to The full text is: "Within the body of a method, a call to super acts just like a call to that I follow that with your comment that what you see being passed to super Is it possible the app itself is the superclass of your object? Rick On Fri, Dec 30, 2011 at 9:38 PM, Mark Rada <
|
Yes, MacRuby's behaviour for As in my example, the specific block that is getting passed has been traced to be the block passed to the
|
You can trigger this by resizing a window.
Need to track this down and fix it...
The text was updated successfully, but these errors were encountered: