omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Tutorial for Action.call method?

    Pythonista
    action scene
    2
    3
    2406
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bjucha
      Bjucha last edited by

      Hello Im having a hard time getting Action.call method to work. Is there a tutorial for Scene.Action methods (except for the help documentation) I want to call the function:

      def twin_action(self,twinboss):
      	
      		```
      
      Using this line of code:
      

      blasers.run_action(A.sequence(actions), A.call(self.twin_action())) ```

      But It seems that the Action.call function does not like that the twin_action takes both self and twinboss with it.

      I really dont know how to fix it, any ideas/solutions?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        You can use functions.partial, or a lambda to create a function that takes no arguments, which is what Action.call expects.

        1 Reply Last reply Reply Quote 0
        • Bjucha
          Bjucha last edited by

          Ok thanks. Will give it a try

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors