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

motion-layout exception #140

Open
fearoffish opened this issue Nov 11, 2013 · 2 comments
Open

motion-layout exception #140

fearoffish opened this issue Nov 11, 2013 · 2 comments

Comments

@fearoffish
Copy link

When I add motion-layout and a simple auto block, teacup gives me an exception. Do I need specific versions?

  * motion-layout (0.0.1)
  * sugarcube (1.3.5)
  * teacup (2.1.13)

My simple controller is:

  layout do
    subview(UIImageView, :felt)

    auto do
      horizontal "|-[felt]-]"
    end
  end

The exception:

(main)> 2013-11-11 12:10:45.885 pokal[31689:80b] Exception executing layout(UIView(#938d9d0, [[0.0, 0.0], [320.0, 568.0]])) in #<HomeController:0x938cdf0> (stylesheet=#<Teacup::Stylesheet:0x908dd70>)
2013-11-11 12:10:46.189 pokal[31689:80b] layout.rb:178:in `layout:': exception class/object expected (TypeError)
    from teacup_controller.rb:101:in `teacupDidLoad'
    from ui_view_controller.rb:6:in `viewDidLoad'
    from app_delegate.rb:6:in `application:didFinishLaunchingWithOptions:'
2013-11-11 12:10:46.190 pokal[31689:80b] layout.rb:178:in `layout:': exception class/object expected (TypeError)
    from teacup_controller.rb:101:in `teacupDidLoad'
    from ui_view_controller.rb:6:in `viewDidLoad'
    from app_delegate.rb:6:in `application:didFinishLaunchingWithOptions:'
2013-11-11 12:10:46.193 pokal[31689:80b] *** Terminating app due to uncaught exception 'TypeError', reason: 'layout.rb:178:in `layout:': exception class/object expected (TypeError)
    from teacup_controller.rb:101:in `teacupDidLoad'
    from ui_view_controller.rb:6:in `viewDidLoad'
    from app_delegate.rb:6:in `application:didFinishLaunchingWithOptions:'

If I remove the auto block the exception goes away.

@colinta
Copy link
Owner

colinta commented Mar 19, 2014

Hey Jamie sorry I never got back to you on this - code looks right, and I can't reproduce. The specs test the Motion::Layout integration, and look very similar (add a subview, add constraints using auto).

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