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.


    Creating functions that work with my scene class

    Pythonista
    action.call functions scene
    2
    3
    1354
    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.
    • resserone13
      resserone13 last edited by ccc

      I’m trying to creat a function to use with my Scene class and it is either saying that the variables used in the function or the fiction it’s self is not defined. I’m trying to use the function with Action.call() from scene. Should the function be within the scene class? I have self on all the instances.?? Sometime it says “self not defined”. Thank you for any help.

      
      	def update_br(self):
      		self.bankroll_amount += self.stake_amount * 2
      						
      		self.bankroll_amount_label.text = f'{self.dollar_sign}{self.bankroll_amount:,}'			
      
      
      1 Reply Last reply Reply Quote 0
      • resserone13
        resserone13 last edited by

        Found a vid on YouTube that helped me out. I had self in the wrong place and was using the brackets inside of action.call()

        https://youtu.be/IoaD8XYd3jI

        FarmerPaco 1 Reply Last reply Reply Quote 2
        • FarmerPaco
          FarmerPaco @resserone13 last edited by

          @resserone13 This was helpful. Was having difficulty with creating delays and this cleared it up. Thanks for the pointer. Cheers.

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