Skip to content
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

Issues with rmq.log :tree/Live code reload #240

Closed
DiogoAndre opened this issue Apr 16, 2015 · 4 comments
Closed

Issues with rmq.log :tree/Live code reload #240

DiogoAndre opened this issue Apr 16, 2015 · 4 comments

Comments

@DiogoAndre
Copy link
Contributor

Hi!

I bumped into this issue when playing with the new live code reload feature. My app has a PM::MapScreen, and when live reload is on and I try to open the screen, the app crashes:

2015-04-16 14:19:55.765 show_me[24791:2470631] app.rb:133:in `current_view_controller:': undefined method `childViewControllers' for #<CLLocationCoordinate2D:0x11949ef10> (NoMethodError)

I get a similar erro if I try to rmq.log :tree on the REPL, minus the app crash.

I'm guessing they booth run the same piece of code on app.rb:L133-L134

Tried a couple of simple fixes but no luck. Any idea on how to fix, or a workaround?

Thanks!

@DiogoAndre
Copy link
Contributor Author

Haven't been able to fix the crash yet, I what did was to add a check just to avoid crashing the app.. but it also makes the live reloading not work for the PM:MapScreen

Here's what I did:

elsif  root_view_controller.respond_to?(:childViewControllers)  && root_view_controller.childViewControllers.count > 0
  current_view_controller(root_view_controller.childViewControllers.first)
else
  if root_view_controller.respond_to?(:childViewControllers) 
    root_view_controller
else
  nil
end

@twerth
Copy link
Member

twerth commented Apr 19, 2015

Did you mean to have 2 elses there?

@twerth
Copy link
Member

twerth commented Apr 20, 2015

So there is a few problems with this I've found. I'm fixing it right now. Fix will be in 1.3.4

@twerth twerth closed this as completed Apr 20, 2015
@DiogoAndre
Copy link
Contributor Author

Thanks!! And just to clarify.. the two elses are due to poor indenting and partial code 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants