Closed mlohr closed 11 years ago
Can you confirm if motion/reactor/eventable.rb
shows up somewhere in the build output? (after a rake clean
build)
Confirmative:
Compile /Users/michel/.rvm/gems/ruby-1.9.3-p362/gems/bubble-wrap-1.3.0/motion/reactor/eventable.rb
If you immediately run @timer.cancel
, do you get the same error?
When using EM.cancel_timer(@timer)
then I am getting the same error.
After further investigation when I include the trigger method into PeriodicTimer:
def trigger(event, *args)
into def trigger(event)
Interesting, I have replayed the behavior (from my last comment) with irb and REPL:
class A
def trigger event, *args
p "hi"
end
end
a = A.new
a.trigger :hi
With irb, I get no error
With REPL I get the error: undefined method
trigger' for #
Could this be a bug in Rubymotion? I just upgraded to motion 2.3 and this error persists...
actually #trigger is defined in Eventable module, we may have an issue loading this module. it works when running from command line :-/
@seanlilmateus: doesn't seem so, see my last comment pls 4 mins ago
Please try replicate it yourself in REPL
Creating a new vanilla project with only the timer does not result into issues...
The question remains how to fix my current project?
Got it! some cocoapod I use has a category on NSObject which uses #trigger as well : (
I will close this issue now, thanks to @seanlilmateus and @clayallsopp for your help.
Cheers, Michel
When using BW 1.3.0 and a simple periodic timer:
My app crashes with the undefined method 'trigger' error.
In my Rakefile I have:
When I uncomment line 25 (
trigger(:fired)
) fromperiodic_timer.rb
the code works as expected.I am using motion 2.2