Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

tween.delay is nil [WORKAROUNDED]

edited July 2013 in Bugs Posts: 2,820

Hello,
"tween.delay" is listed in the Codea docs, but it shows up as nil in the runtime. That means I have to use "tween.delay(time,parent,sameValues as before)". If this could be fixed, that'd be great.
Thanks!

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,708

    That's odd, tween.delay seems to be working as expected here:

    print( tween.delay )
    => function: 0x1812f630

    tween.delay( 3.0, function() print("Test") end )
    -- prints "Test" after three seconds

  • Posts: 2,820

    @Simeon - I'm using the exported version of my app on 1.5.3, if that makes a difference.
    Thanks!

  • SimeonSimeon Admin Mod
    edited July 2013 Posts: 5,708

    @Zoyt ah I see. Thanks for the report — that's definitely a bug. I'll fix it for 1.5.4.

    Note: Workaround for now is to implement tween.delay in your project, here's the code:

    function tween.delay(duration, callback, ...)
        local t = {}
        return tween(duration, t, {}, tween.easing.linear, callback, ...)
    end
  • edited July 2013 Posts: 2,820

    Thanks.

Sign In or Register to comment.