Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8045995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:41:11+00:00 2026-06-05T05:41:11+00:00

Back after another 30 minute search and either failure to comprehend results or unable

  • 0

Back after another 30 minute search and either failure to comprehend results or unable to find results…

I want to force my application to wait for a button click before continuing, and have the following code snippet as my example:

... 

def crack(self, Filenamelist, forceclick):

        forceclick += 1

        self.crackButton.configure(state='active')

        if forceclick != 2:

            self.crackButton.bind('<ButtonRelease-1>', self.crack(Filenamelist, forceclick))

        self.outputBox.insert(END, '\n' + 'Parsing answer numerator...' + '\n')

...

I basically want it to load the function crack(), increment 1 to forceclick (which was set to 0 beforehand), change the ‘crack button’ to an active state, and then bind the button while waiting for the user to provoke the bind. After the bind is provoked, the function reloads, increments one to forceclick, and then skips the if statement.

However, when I run the program through, it just binds the key to the crack button and automatically reloads the function to bypass the if statement… I tried a while loop before, but that did not end well…

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:41:12+00:00Added an answer on June 5, 2026 at 5:41 am

    You need to make the bound function a lambda:

    self.crackButton.bind('<ButtonRelease-1>', lambda e: self.crack(Filenamelist, forceclick))
    

    Currently it is calling the function.

    Although there are probably better ways to do what you are trying to accomplish, this should fix your immediate issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am starting another activity by calling startActivityForResult() and after pressing back button my
In our iOS application with three UIViewController s one after another, we would like
How do I retain the values after switching to another view and returning back
how can i activate the readonly back after finishing the edit of the input
Is there a way to disable the browser's back button after loggin out? I've
I have rotating back ground image after 20 seconds with the fadeIn and fadeOut.
I can't believe I'm back to this after working with WPF for 3 months
I am trying to receive a json object back from php after sending data
I'm working with someone who's looking to get back into programming after several years
G'day, I'm wanting to go back to Python after not using it for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.