colinta / teacup

This project has been sunset in favor of MotionKit
github.com/motion-kit/motion-kit
Other
602 stars 85 forks source link

OSX samples won't run #105

Closed JonasNielsen closed 11 years ago

JonasNielsen commented 11 years ago

I was experimenting with teacup but couldn't make anything work. So I decided to go back to basics and work with the samples, but none of the osx samples will run. iOS samples builds just fine.

Both osx samples crash at:

[...]
       Run ./build/MacOSX-10.8-Development/teacup-osx.app/Contents/MacOS/teacup-osx
2013-07-23 22:21:27.440 teacup-osx[51469:707] handler.rb:60:in `block in apply:': uninitialized constant NSRect (NameError)
    from handler.rb:54:in `apply:'
    from handler.rb:35:in `block in apply_hash:'
    from handler.rb:34:in `apply_hash:'
    from ns_view.rb:25:in `apply_style_properties:'
    from teacup_view.rb:304:in `style:'
    from ns_view.rb:29:in `style:'
    from layout.rb:161:in `layout:'
    from layout.rb:235:in `subview:'
    from layout.rb:175:in `layout:'
    from teacup_controller.rb:101:in `teacupDidLoad'
    from ns_view_controller.rb:14:in `loadView'
    from layout.rb:175:in `layout:'
    from teacup_controller.rb:101:in `teacupDidLoad'
    from ns_window_controller.rb:6:in `windowDidLoad'
    from app_delegate.rb:10:in `buildWindow'
    from app_delegate.rb:5:in `applicationDidFinishLaunching:'

Have I messed up my system somehow? And on a general note, how mature is teacup for osx purposes? I'm having serious issues getting my views in order.

teacup 2.1.1 rubymotion 2.4 teacup sample latest commit c9ea6958200cc6718b458031f2ce64d36362de8e

colinta commented 11 years ago

I'll take a look now, but I know that at least a few people have used it in OS X apps, so that's strange.

JonasNielsen commented 11 years ago

Ok, thanks. Teacup really seems interesting and a refreshing approach.

JonasNielsen commented 11 years ago

Did the samples run for you, @colinta?

colinta commented 11 years ago

no, actually this appears to be a regression in rubymotion 2.5

JonasNielsen commented 11 years ago

Ok. Do you have any idea what might be wrong? I'd love to help out, but I'm pretty lost on where to begin.

colinta commented 11 years ago

The quick fix would be to replace "NSRect" with "CGRect" in the source code. I'm discussing with Laurent whether this regression should be fixed or worked around for now...

JonasNielsen commented 11 years ago

Thanks, colinta. That did the trick :thumbsup:

colinta commented 11 years ago

I updated the source to use CGRect instead.