Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use message box to fix #12 that was not solve in ctimer_db branch #16

Merged
merged 18 commits into from
Jul 9, 2020

Conversation

zztin
Copy link
Owner

@zztin zztin commented Jul 4, 2020

(Thanks for sending a pull request! Please fill in the following content to let us know better about this change.)

Types of changes

Please put an x in the box that applies

  • Bugfix
  • New feature
  • Refactoring
  • Breaking change (any change that would cause existing functionality to not work as expected)
  • Documentation Update
  • Other (please describe)

Description

The messages after a clock finishes are now prompt with tikinter default messagebox and simpledialog, solving the problem previously which the main window keep going while not waiting for response from subwindows.

Steps to Test This Pull Request

Steps to reproduce the behavior:

  1. in concentrationtimer.py: Disable line 30 and enable line 29 temporary for quickly checking results.
  2. launch ctimer in terminal (make sure it was installed with developer mode)
  3. Start the clock and enters a goal
  4. finish the clock
  5. Answers the prompt windows by clicking "no"
  6. Enter a reason in the next window.
  7. Repeat 2-4 and answer yes in the second clock.
  8. terminate ctimer app.
  9. Check stored database at path: ctimer/data/ctimer.db --> drag and drop in https://inloop.github.io/sqlite-viewer/
  10. if the entries you typed are stored correctly, accept the pull request.

Expected behavior

  1. Database is updated as user input.
  2. No errors in command line.

Related Issue

#12 #6

@zztin zztin changed the base branch from ctimer_db to master July 9, 2020 13:41
@tai271828
Copy link
Collaborator

Right after complete step#6 I got

unable to open database file
Welcome                                                      
2020-07-09 21:56:14.019 GSSpeechServer[10597:10597] No handle for event rport on descriptor 13
2020-07-09 21:56:17.412 GSSpeechServer[10597:10597] No handle for event rport on descriptor 13
2020-07-09 21:56:49.704 GSSpeechServer[10597:10597] No handle for event rport on descriptor 13
unable to open database file                                    
Exception in Tkinter callback                                  
Traceback (most recent call last):                                                                                    
  File "/home/tai271828/.pyenv/versions/3.8.3/lib/python3.8/tkinter/__init__.py", line 1883, in __call__                
    return self.func(*args)                                            
  File "/home/tai271828/.pyenv/versions/3.8.3/lib/python3.8/tkinter/__init__.py", line 804, in callit
    func(*args)
  File "/home/tai271828/work-my-projects/ctimer/ctimer/concentratetimer/concentratetimer.py", line 117, in countdown
    db.db_add_clock_details(self.db_file, self.clock_details)                                 
  File "/home/tai271828/work-my-projects/ctimer/ctimer/concentratetimer/ctimer_db.py", line 24, in db_add_clock_details
    with conn:                                                                                
AttributeError: __enter__

By manually creating a folder data under the project root, we could workaround this issue.

@tai271828 tai271828 self-requested a review July 9, 2020 14:08
Copy link
Collaborator

@tai271828 tai271828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except #16 (comment) , the remaining of testing steps look good to me.

@zztin
Copy link
Owner Author

zztin commented Jul 9, 2020

Data path Issue fixed. Ready for pull review.

@tai271828
Copy link
Collaborator

Hi, you pushed your db binary to the repository.

@tai271828
Copy link
Collaborator

Testing looks good. Thanks for the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants