rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

UIViewWrapper#when_pressed: should use #handle_gesture: like all the other #when_XXX: methods and not check for UIGestureRecognizerStateBegan. #440

Closed hboon closed 9 years ago

hboon commented 9 years ago

UIViewWrapper#when_pressed: should use #handle_gesture: like all the other #when_XXX: methods and not check for UIGestureRecognizerStateBegan. The check should be left to the caller.

Both for consistency of API and support for this use case:

(1) long press - do something (2) release long press - do another thing.

This was how it worked until it was changed in e66dc51a790c8470ba8f748291c69dd0bcb2745.

hboon commented 9 years ago

Test passed locally. No idea why Travis is failing. Someone help? @markrickert or @clayallsopp ?

with invalid version
  - should raise an exception
Bacon::Error: UIWindow.==(UIView) failed
    spec.rb:745:in `satisfy:': .window - returns UIApplication.sharedApplication.keyWindow
    spec.rb:759:in `method_missing:'
    spec.rb:316:in `block in run_spec_block'
    spec.rb:459:in `execute_block'
    spec.rb:316:in `run_spec_block'
    spec.rb:331:in `run'
818 specifications (1041 requirements), 1 failures, 0 errors
markrickert commented 9 years ago

I reinitialized the build... travis can be temperamental sometimes. If it doesn't pass this time, we'll dig deeper.

hboon commented 9 years ago

Seems to be failing, still. Help :)

markrickert commented 9 years ago

I'm going to merge this since the failing test has nothing to do with this feature. Sorry it took so long!