IrvKalb / pygwidgets

A collection of user interface widgets in Python for use in programs using Pygame.
BSD 2-Clause "Simplified" License
11 stars 5 forks source link

InputText does not accept user input #3

Closed mwcole1954 closed 1 year ago

IrvKalb commented 1 year ago

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):
    # User pressed submit or pressed enter
    user_input = ip.getText()
    print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):
    # User presses 'submit'
    user_input = ip.getText()
    print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4. You are receiving this because you are subscribed to this thread.Message ID: @.***>

mwcole1954 commented 1 year ago

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4. You are receiving this because you commented.Message ID: @.***>

mwcole1954 commented 1 year ago

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

mwcole1954 commented 1 year ago

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

Hi Michael,

Thank you very much for your comments. I truly appreciate you taking the time to let me know that the book has helped to give you a better understanding of the theory behind the OOP concepts.

I have written two other books. My earlier Python book is "Learn to Program with Python 3" which is essentially the coursework that I teach in my introductory Python courses. But if you are reading and following the OOP book, then you probably don't need that one.

Way before that, I wrote the first book on the sport of Ultimate Frisbee, "Ultimate: Fundamentals of the Sport"! (I was highly involved in the development of the sport in my earlier years.)

I have thought about writing another book, but I'm not sure it I have the energy for it. The OOP book took me about four years. So, I'm taking some time off writing for now.

By the way, I'm curious about your email address. What's the significance of 1954. The reason I ask is that I was born in 1954.

I hope you don't mind if I ask a favor of you. I don't know where you bought the book, but I would greatly appreciate it if you would consider writing a short review on Amazon.com. I know that people read those reviews before purchasing technical books, and every little bit helps.

Thanks again.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 9:11 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368254061, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSQJVLQOLPAWWGDVUEDWQBSN7ANCNFSM6AAAAAATMMO6E4. You are receiving this because you commented.Message ID: @.***>

mwcole1954 commented 1 year ago

I was born in 1954. I learned some programming in college and graduate school way back then, but was not able to really pursue that interest because I decided to go to medical school. But since I have retired I have been studying Python. It is a slow slog because I do not have anyone to bounce ideas off of and discuss code. But as my wife tells me, I am very persistent and have progressed. All of my learning is reading followed by trial and error. Your book and it's code is the first book that I have read where the code worked and I didn't have to know what they were not telling me. I am looking at two such books as I am writing this. I will be happy to write a review of your book on Amazon. I hope that it will help. I will ask you for permission to contact you for your insight when I run into a snag. I have a better understanding of OOP thanks to you and have begun to see what can really be done. However, please feel free to decline, I will still write the same review. Sincerely, Michael

On Sat, Dec 31, 2022 at 1:16 PM Irv Kalb @.***> wrote:

Hi Michael,

Thank you very much for your comments. I truly appreciate you taking the time to let me know that the book has helped to give you a better understanding of the theory behind the OOP concepts.

I have written two other books. My earlier Python book is "Learn to Program with Python 3" which is essentially the coursework that I teach in my introductory Python courses. But if you are reading and following the OOP book, then you probably don't need that one.

Way before that, I wrote the first book on the sport of Ultimate Frisbee, "Ultimate: Fundamentals of the Sport"! (I was highly involved in the development of the sport in my earlier years.)

I have thought about writing another book, but I'm not sure it I have the energy for it. The OOP book took me about four years. So, I'm taking some time off writing for now.

By the way, I'm curious about your email address. What's the significance of 1954. The reason I ask is that I was born in 1954.

I hope you don't mind if I ask a favor of you. I don't know where you bought the book, but I would greatly appreciate it if you would consider writing a short review on Amazon.com. I know that people read those reviews before purchasing technical books, and every little bit helps.

Thanks again.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 9:11 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770 , or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368254061>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSQJVLQOLPAWWGDVUEDWQBSN7ANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368261303, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK57DZCTBY2TCICKFNTWQB2AHANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

mwcole1954 commented 1 year ago

The review is done. I hope that it helps you. Michael

On Sat, Dec 31, 2022 at 1:46 PM Michael Cole @.***> wrote:

I was born in 1954. I learned some programming in college and graduate school way back then, but was not able to really pursue that interest because I decided to go to medical school. But since I have retired I have been studying Python. It is a slow slog because I do not have anyone to bounce ideas off of and discuss code. But as my wife tells me, I am very persistent and have progressed. All of my learning is reading followed by trial and error. Your book and it's code is the first book that I have read where the code worked and I didn't have to know what they were not telling me. I am looking at two such books as I am writing this. I will be happy to write a review of your book on Amazon. I hope that it will help. I will ask you for permission to contact you for your insight when I run into a snag. I have a better understanding of OOP thanks to you and have begun to see what can really be done. However, please feel free to decline, I will still write the same review. Sincerely, Michael

On Sat, Dec 31, 2022 at 1:16 PM Irv Kalb @.***> wrote:

Hi Michael,

Thank you very much for your comments. I truly appreciate you taking the time to let me know that the book has helped to give you a better understanding of the theory behind the OOP concepts.

I have written two other books. My earlier Python book is "Learn to Program with Python 3" which is essentially the coursework that I teach in my introductory Python courses. But if you are reading and following the OOP book, then you probably don't need that one.

Way before that, I wrote the first book on the sport of Ultimate Frisbee, "Ultimate: Fundamentals of the Sport"! (I was highly involved in the development of the sport in my earlier years.)

I have thought about writing another book, but I'm not sure it I have the energy for it. The OOP book took me about four years. So, I'm taking some time off writing for now.

By the way, I'm curious about your email address. What's the significance of 1954. The reason I ask is that I was born in 1954.

I hope you don't mind if I ask a favor of you. I don't know where you bought the book, but I would greatly appreciate it if you would consider writing a short review on Amazon.com. I know that people read those reviews before purchasing technical books, and every little bit helps.

Thanks again.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 9:11 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770 , or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368254061>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSQJVLQOLPAWWGDVUEDWQBSN7ANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368261303, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK57DZCTBY2TCICKFNTWQB2AHANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

Wow, what a fantastic review. Thank you very much!

I was fortunate enough to go to a high school that had an early IBM computer (late 60's early 70's). I was able to teach myself the Fortran programming language and really enjoyed it. I went to Rutgers University and got on a committee to form the Computer Science degree, and graduated in the first year that a BS in CS was given out. Moved to California, worked for companies in L.A. and got a master's degree in CS at night. Eventually moved up to the Bay Area and have lived here ever since. I've worked for companies as a programmer, then worked as a software contractor, then moved into teaching software. My wife and I even created and shipped a number of kid's software "titles" on CD-ROMs.

I got into OOP a long time ago working for a while at Apple. I've been using this style for about 30 years. I thought about building a course on it, and looked for a good book to use. And as you found, none of them really clicked with me. So ... I decided to build my own curriculum and write the book. Using the pygame approach allowed me to show a highly visible way of showing how OOP operates.

I'm also semi-retired, although I still teach night classes at University of California Santa Cruz. Since the pandemic, I've been teaching all my courses over Zoom.

Anyway, I'd be happy to help you out if you get stuck with OOP stuff. Easiest thing to do is send me an email and attach a zip file so I can just open your code and run it.

Thanks again for the review. I hope you and your family have a great New Year.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 11:10 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

The review is done. I hope that it helps you. Michael

On Sat, Dec 31, 2022 at 1:46 PM Michael Cole @.***> wrote:

I was born in 1954. I learned some programming in college and graduate school way back then, but was not able to really pursue that interest because I decided to go to medical school. But since I have retired I have been studying Python. It is a slow slog because I do not have anyone to bounce ideas off of and discuss code. But as my wife tells me, I am very persistent and have progressed. All of my learning is reading followed by trial and error. Your book and it's code is the first book that I have read where the code worked and I didn't have to know what they were not telling me. I am looking at two such books as I am writing this. I will be happy to write a review of your book on Amazon. I hope that it will help. I will ask you for permission to contact you for your insight when I run into a snag. I have a better understanding of OOP thanks to you and have begun to see what can really be done. However, please feel free to decline, I will still write the same review. Sincerely, Michael

On Sat, Dec 31, 2022 at 1:16 PM Irv Kalb @.***> wrote:

Hi Michael,

Thank you very much for your comments. I truly appreciate you taking the time to let me know that the book has helped to give you a better understanding of the theory behind the OOP concepts.

I have written two other books. My earlier Python book is "Learn to Program with Python 3" which is essentially the coursework that I teach in my introductory Python courses. But if you are reading and following the OOP book, then you probably don't need that one.

Way before that, I wrote the first book on the sport of Ultimate Frisbee, "Ultimate: Fundamentals of the Sport"! (I was highly involved in the development of the sport in my earlier years.)

I have thought about writing another book, but I'm not sure it I have the energy for it. The OOP book took me about four years. So, I'm taking some time off writing for now.

By the way, I'm curious about your email address. What's the significance of 1954. The reason I ask is that I was born in 1954.

I hope you don't mind if I ask a favor of you. I don't know where you bought the book, but I would greatly appreciate it if you would consider writing a short review on Amazon.com. I know that people read those reviews before purchasing technical books, and every little bit helps.

Thanks again.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 9:11 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770 , or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368254061>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSQJVLQOLPAWWGDVUEDWQBSN7ANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368261303, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK57DZCTBY2TCICKFNTWQB2AHANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368266986, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSQMDE23WSGFGA2CINDWQCALPANCNFSM6AAAAAATMMO6E4. You are receiving this because you commented.Message ID: @.***>

mwcole1954 commented 1 year ago

You have had quite a career. Yes I remember Fortran. I went to a small college in Virginia and was able to work through graduate school in the computer center. Anyway that was a lifetime ago. Thank you for the opportunity to bounce my problems off of you. I usually spend a good bit of time trying to figure things out and many times I do. Your recommendation for submitting questions is perfect. My best to you and your family for the new year. Michael

On Sat, Dec 31, 2022, 4:42 PM Irv Kalb @.***> wrote:

Wow, what a fantastic review. Thank you very much!

I was fortunate enough to go to a high school that had an early IBM computer (late 60's early 70's). I was able to teach myself the Fortran programming language and really enjoyed it. I went to Rutgers University and got on a committee to form the Computer Science degree, and graduated in the first year that a BS in CS was given out. Moved to California, worked for companies in L.A. and got a master's degree in CS at night. Eventually moved up to the Bay Area and have lived here ever since. I've worked for companies as a programmer, then worked as a software contractor, then moved into teaching software. My wife and I even created and shipped a number of kid's software "titles" on CD-ROMs.

I got into OOP a long time ago working for a while at Apple. I've been using this style for about 30 years. I thought about building a course on it, and looked for a good book to use. And as you found, none of them really clicked with me. So ... I decided to build my own curriculum and write the book. Using the pygame approach allowed me to show a highly visible way of showing how OOP operates.

I'm also semi-retired, although I still teach night classes at University of California Santa Cruz. Since the pandemic, I've been teaching all my courses over Zoom.

Anyway, I'd be happy to help you out if you get stuck with OOP stuff. Easiest thing to do is send me an email and attach a zip file so I can just open your code and run it.

Thanks again for the review. I hope you and your family have a great New Year.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 11:10 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

The review is done. I hope that it helps you. Michael

On Sat, Dec 31, 2022 at 1:46 PM Michael Cole @.***> wrote:

I was born in 1954. I learned some programming in college and graduate school way back then, but was not able to really pursue that interest because I decided to go to medical school. But since I have retired I have been studying Python. It is a slow slog because I do not have anyone to bounce ideas off of and discuss code. But as my wife tells me, I am very persistent and have progressed. All of my learning is reading followed by trial and error. Your book and it's code is the first book that I have read where the code worked and I didn't have to know what they were not telling me. I am looking at two such books as I am writing this. I will be happy to write a review of your book on Amazon. I hope that it will help. I will ask you for permission to contact you for your insight when I run into a snag. I have a better understanding of OOP thanks to you and have begun to see what can really be done. However, please feel free to decline, I will still write the same review. Sincerely, Michael

On Sat, Dec 31, 2022 at 1:16 PM Irv Kalb @.***> wrote:

Hi Michael,

Thank you very much for your comments. I truly appreciate you taking the time to let me know that the book has helped to give you a better understanding of the theory behind the OOP concepts.

I have written two other books. My earlier Python book is "Learn to Program with Python 3" which is essentially the coursework that I teach in my introductory Python courses. But if you are reading and following the OOP book, then you probably don't need that one.

Way before that, I wrote the first book on the sport of Ultimate Frisbee, "Ultimate: Fundamentals of the Sport"! (I was highly involved in the development of the sport in my earlier years.)

I have thought about writing another book, but I'm not sure it I have the energy for it. The OOP book took me about four years. So, I'm taking some time off writing for now.

By the way, I'm curious about your email address. What's the significance of 1954. The reason I ask is that I was born in 1954.

I hope you don't mind if I ask a favor of you. I don't know where you bought the book, but I would greatly appreciate it if you would consider writing a short review on Amazon.com. I know that people read those reviews before purchasing technical books, and every little bit helps.

Thanks again.

Irv


From: mwcole1954 @.> Sent: Saturday, December 31, 2022 9:11 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you for writing a book on OOP that actually explains the why with the what. It really helps when you can reason why you are writing the code in a certain way. Do you have any other similar books like using algorithms, etc where you also explain what the concepts are? Take care. Michael

On Thu, Dec 29, 2022 at 10:01 PM Michael Cole @.***> wrote:

Happy New Year to you too. Wishing you the best for the coming year.

On Thu, Dec 29, 2022 at 6:33 PM Irv Kalb @.***> wrote:

You're very welcome.

Have a Happy New Year!

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 3:22 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Thank you very much. Michael

On Thu, Dec 29, 2022, 6:14 PM Irv Kalb @.***> wrote:

Hi,

I got your message, but my email reader messed up the indenting.

From what you wrote, it sounds like you have the indenting all working fine.

You only missed one line. Right after the line that contains sys.exit(), you need to allow the input field (ip) to handle the event. Therefore all you need is to add this line after that one:

ip.handleEvent(event)

Adding that line will allow you to type into the field and have the characters show up.

As an alternative, you could allow the user to press Enter/Return or press the button. To do that you can have this code inside the "for" loop:

if ip,handleEvent(event) or but.handleEvent):

User pressed submit or pressed enter

user_input = ip.getText() print(user_input)

Hope that helps.

Irv


From: mwcole1954 @.> Sent: Thursday, December 29, 2022 1:04 PM To: IrvKalb/pygwidgets @.> Cc: Subscribed @.***> Subject: [IrvKalb/pygwidgets] InputText does not accept user input (Issue

3)

Below is the code that I used. After reading your doc, I created this little trial. Each pygwidget appears, the focus is given to the InputText pygwidget. The cursor is seen blinking in the box but typing does not enter any characters. Tried ip.enable() without any . change. I haven't found anything about whether this still works or not. What am I doing wrong? Thank you Michael

import sys import pygame import pygwidgets

FPS = 30

clock = pygame.time.Clock()

pygame.init() window = pygame.display.set_mode((300, 200))

label = pygwidgets.DisplayText(window, (25, 25), value="Name:") ip = pygwidgets.InputText(window, (25, 50), initialFocus=True) but = pygwidgets.TextButton(window, (90, 150), text="Submit")

while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()

if but.handleEvent(event):

User presses 'submit'

user_input = ip.getText() print(user_input)

window.fill(pygwidgets.PYGWIDGETS_GRAY) label.draw() ip.draw() but.draw()

pygame.display.update() clock.tick(FPS)

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3>, or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV7UC5RUSQEOZO2SK3WPX4GNANCNFSM6AAAAAATMMO6E4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367630753 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK74W5BPP3WBDTIEIJLWPYLOFANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub<

https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367632770 , or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSV2Y4F7MIIVOKBRZR3WPYMKDANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1367637648 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK2ZHOTV77EFN3HSLADWPYNVXANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368254061 , or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSQJVLQOLPAWWGDVUEDWQBSN7ANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368261303 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK57DZCTBY2TCICKFNTWQB2AHANCNFSM6AAAAAATMMO6E4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368266986>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSQMDE23WSGFGA2CINDWQCALPANCNFSM6AAAAAATMMO6E4

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1368283415, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK5WLKTXG23KFIEJLF3WQCSCZANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

mwcole1954 commented 1 year ago

Mr Kalb, I have been trying to find something that explains the magic of modal dialogs. Do you know of any sources that I might read? From looking around the internet, stackoverflow, etc. I have made several attempts. The dialog box works well by itself. But when I try to incorporate it into a program that uses its own GUI, I am not able to get focus on the dialog without clicking on it and the data entered does not seem to exist. I have attached the code. main_for_dialog_1.py seems to run the way I would like. At least I can open the dialog, it gets the focus and I can get the results. However, main_for_dialog_2.py opens, but does not get the focus and does not seem to get any of the input. I am looking to develop an understanding of what I need to understand to try to make this work. I appreciate your willingness to help me. Thank you. Sincerely, Michael

IrvKalb commented 1 year ago

Hi,

I got your message, but I've been having trouble with my mail program. (Actually I've given all the details to Apple, and they call me once a week with updates.)

Bottom line, I did not get the attachment(s). I can't tell if this was a mail problem or if they were just not included. Either way, would you please re-send your message with the attachment(s) to a different email address: @.***

I'll take look at what you have and try to help you out.

But .. I have a set of utilities in my second package called pyghelpers that are designed to let you build a modal dialog box easily. You can build a "default" one with workable but ugly graphics, or build a more custom one with your own graphics.

Irv


From: mwcole1954 @.> Sent: Wednesday, January 4, 2023 6:03 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; Comment @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Mr Kalb, I have been trying to find something that explains the magic of modal dialogs. Do you know of any sources that I might read? From looking around the internet, stackoverflow, etc. I have made several attempts. The dialog box works well by itself. But when I try to incorporate it into a program that uses its own GUI, I am not able to get focus on the dialog without clicking on it and the data entered does not seem to exist. I have attached the code. main_for_dialog_1.py seems to run the way I would like. At least I can open the dialog, it gets the focus and I can get the results. However, main_for_dialog_2.py opens, but does not get the focus and does not seem to get any of the input. I am looking to develop an understanding of what I need to understand to try to make this work. I appreciate your willingness to help me. Thank you. Sincerely, Michael

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1370967309, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSW65FMZMA6VD73KE4DWQV7K7ANCNFSM6AAAAAATMMO6E4. You are receiving this because you commented.Message ID: @.***>

IrvKalb commented 1 year ago

I believe that this issue has been resolved.

mwcole1954 commented 1 year ago

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

Hi Michael,

I finally got a chance to take a look at your code.

I assume that main_copy.py is the main program. But when I tried to run it, I ran into problems right away. The problems stem from the fact that your requires a great many "tk" packages that I did not have and am not familiar with. I started importing the packages that it was asking for. But after about 5 or 6 (and it still wasn't satisfied) I stopped and started to look at your code.

Unfortunately, a very basic problem is that I am not at all familiar with the way tkinter works. And it looks like your code is heavily built on the style of interface. So, I probably won't be able to give you any real feedback because I don't understand this style at all.

If there is a particular piece of the code that you would like me to look at that deals with object orientation, I'd be happy to look at that. But as for overall comments, I'm sorry but I just have no idea.

Sorry,

Irv


From: mwcole1954 @.> Sent: Monday, March 6, 2023 1:41 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1457043277, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSUDYW3PQQHZOYUK4CTW2ZKXXANCNFSM6AAAAAATMMO6E4. You are receiving this because you modified the open/close state.Message ID: @.***>

mwcole1954 commented 1 year ago

Irv, My apologies. My intent was to ask you to look at the OOP concepts for feedback. Since you had said that you don't know tkinter GUI, I had no expectation for feedback there but since tkinter is only the GUI, I didn't expect it to interfere so much. I guess that I don't really understand OOP and I think that you have confirmed the reason for my confusion. I was not sure how to 'build up' classes that could be reused in this project. It would seem that I did indeed fall back to an Interface style by using an abstract baseclass in order to make sure that all the behaviors were covered in each panel class. OOP is more than just defining a class apparently. I will continue to explore things and thank you very much for looking at it for me. I have included a link to an executable (via pyInstaller) of the code that I sent you so that you can see what the program does, if you are interested. The name of the zip file is Reci.pe_Builder_2.5.zip. Thank you for your time and congenial responses. Michael https://drive.google.com/file/d/1M7_U9JFtrdWY_cAoUFcs__Upi1d_1fv8/view?usp=sharing

On Wed, Mar 8, 2023 at 12:28 AM Irv Kalb @.***> wrote:

Hi Michael,

I finally got a chance to take a look at your code.

I assume that main_copy.py is the main program. But when I tried to run it, I ran into problems right away. The problems stem from the fact that your requires a great many "tk" packages that I did not have and am not familiar with. I started importing the packages that it was asking for. But after about 5 or 6 (and it still wasn't satisfied) I stopped and started to look at your code.

Unfortunately, a very basic problem is that I am not at all familiar with the way tkinter works. And it looks like your code is heavily built on the style of interface. So, I probably won't be able to give you any real feedback because I don't understand this style at all.

If there is a particular piece of the code that you would like me to look at that deals with object orientation, I'd be happy to look at that. But as for overall comments, I'm sorry but I just have no idea.

Sorry,

Irv


From: mwcole1954 @.> Sent: Monday, March 6, 2023 1:41 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1457043277>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSUDYW3PQQHZOYUK4CTW2ZKXXANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1459539813, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK44AYNUM3ENYXQIGXDW3AKGVANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

Hi Michael,

I got your message, but this past week was very hectic for me and I haven't had time to take a good look at your code. I hope to get some time this week to do that.

Irv


From: mwcole1954 @.> Sent: Wednesday, March 8, 2023 4:05 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, My apologies. My intent was to ask you to look at the OOP concepts for feedback. Since you had said that you don't know tkinter GUI, I had no expectation for feedback there but since tkinter is only the GUI, I didn't expect it to interfere so much. I guess that I don't really understand OOP and I think that you have confirmed the reason for my confusion. I was not sure how to 'build up' classes that could be reused in this project. It would seem that I did indeed fall back to an Interface style by using an abstract baseclass in order to make sure that all the behaviors were covered in each panel class. OOP is more than just defining a class apparently. I will continue to explore things and thank you very much for looking at it for me. I have included a link to an executable (via pyInstaller) of the code that I sent you so that you can see what the program does, if you are interested. The name of the zip file is Reci.pe_Builder_2.5.zip. Thank you for your time and congenial responses. Michael https://drive.google.com/file/d/1M7_U9JFtrdWY_cAoUFcs__Upi1d_1fv8/view?usp=sharing

On Wed, Mar 8, 2023 at 12:28 AM Irv Kalb @.***> wrote:

Hi Michael,

I finally got a chance to take a look at your code.

I assume that main_copy.py is the main program. But when I tried to run it, I ran into problems right away. The problems stem from the fact that your requires a great many "tk" packages that I did not have and am not familiar with. I started importing the packages that it was asking for. But after about 5 or 6 (and it still wasn't satisfied) I stopped and started to look at your code.

Unfortunately, a very basic problem is that I am not at all familiar with the way tkinter works. And it looks like your code is heavily built on the style of interface. So, I probably won't be able to give you any real feedback because I don't understand this style at all.

If there is a particular piece of the code that you would like me to look at that deals with object orientation, I'd be happy to look at that. But as for overall comments, I'm sorry but I just have no idea.

Sorry,

Irv


From: mwcole1954 @.> Sent: Monday, March 6, 2023 1:41 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1457043277>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSUDYW3PQQHZOYUK4CTW2ZKXXANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1459539813, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAK44AYNUM3ENYXQIGXDW3AKGVANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1460056949, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSXXHCCTMKEVBAVMVQDW3BYYBANCNFSM6AAAAAATMMO6E4. You are receiving this because you modified the open/close state.Message ID: @.***>

mwcole1954 commented 1 year ago

Irv, Please don't burden yourself. I was just taking advantage of your offer, but life happens. I appreciate your help. I only sent the executable so that you could see what the program was doing since there were too many imports and downloads for you to run the source modules. So please don't feel obligated. Hope that you are doing well. We have been reading about the strange weather in California. Hope that you are not in the areas involved and are safe. Michael

On Mon, Mar 13, 2023 at 1:32 AM Irv Kalb @.***> wrote:

Hi Michael,

I got your message, but this past week was very hectic for me and I haven't had time to take a good look at your code. I hope to get some time this week to do that.

Irv


From: mwcole1954 @.> Sent: Wednesday, March 8, 2023 4:05 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, My apologies. My intent was to ask you to look at the OOP concepts for feedback. Since you had said that you don't know tkinter GUI, I had no expectation for feedback there but since tkinter is only the GUI, I didn't expect it to interfere so much. I guess that I don't really understand OOP and I think that you have confirmed the reason for my confusion. I was not sure how to 'build up' classes that could be reused in this project. It would seem that I did indeed fall back to an Interface style by using an abstract baseclass in order to make sure that all the behaviors were covered in each panel class. OOP is more than just defining a class apparently. I will continue to explore things and thank you very much for looking at it for me. I have included a link to an executable (via pyInstaller) of the code that I sent you so that you can see what the program does, if you are interested. The name of the zip file is Reci.pe_Builder_2.5.zip. Thank you for your time and congenial responses. Michael

https://drive.google.com/file/d/1M7_U9JFtrdWY_cAoUFcs__Upi1d_1fv8/view?usp=sharing

On Wed, Mar 8, 2023 at 12:28 AM Irv Kalb @.***> wrote:

Hi Michael,

I finally got a chance to take a look at your code.

I assume that main_copy.py is the main program. But when I tried to run it, I ran into problems right away. The problems stem from the fact that your requires a great many "tk" packages that I did not have and am not familiar with. I started importing the packages that it was asking for. But after about 5 or 6 (and it still wasn't satisfied) I stopped and started to look at your code.

Unfortunately, a very basic problem is that I am not at all familiar with the way tkinter works. And it looks like your code is heavily built on the style of interface. So, I probably won't be able to give you any real feedback because I don't understand this style at all.

If there is a particular piece of the code that you would like me to look at that deals with object orientation, I'd be happy to look at that. But as for overall comments, I'm sorry but I just have no idea.

Sorry,

Irv


From: mwcole1954 @.> Sent: Monday, March 6, 2023 1:41 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1457043277>,

or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSUDYW3PQQHZOYUK4CTW2ZKXXANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1459539813,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK44AYNUM3ENYXQIGXDW3AKGVANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1460056949>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSXXHCCTMKEVBAVMVQDW3BYYBANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1465540536, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAKZO3OMUSOLMS2I7UHDW32WPDANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

IrvKalb commented 1 year ago

Hi Michael,

I have a few comments for you, but rather than post everything through GitHub issues, can you please write me directly at Irv at furrypants dot com?

Irv


From: mwcole1954 @.> Sent: Monday, March 13, 2023 4:05 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, Please don't burden yourself. I was just taking advantage of your offer, but life happens. I appreciate your help. I only sent the executable so that you could see what the program was doing since there were too many imports and downloads for you to run the source modules. So please don't feel obligated. Hope that you are doing well. We have been reading about the strange weather in California. Hope that you are not in the areas involved and are safe. Michael

On Mon, Mar 13, 2023 at 1:32 AM Irv Kalb @.***> wrote:

Hi Michael,

I got your message, but this past week was very hectic for me and I haven't had time to take a good look at your code. I hope to get some time this week to do that.

Irv


From: mwcole1954 @.> Sent: Wednesday, March 8, 2023 4:05 AM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, My apologies. My intent was to ask you to look at the OOP concepts for feedback. Since you had said that you don't know tkinter GUI, I had no expectation for feedback there but since tkinter is only the GUI, I didn't expect it to interfere so much. I guess that I don't really understand OOP and I think that you have confirmed the reason for my confusion. I was not sure how to 'build up' classes that could be reused in this project. It would seem that I did indeed fall back to an Interface style by using an abstract baseclass in order to make sure that all the behaviors were covered in each panel class. OOP is more than just defining a class apparently. I will continue to explore things and thank you very much for looking at it for me. I have included a link to an executable (via pyInstaller) of the code that I sent you so that you can see what the program does, if you are interested. The name of the zip file is Reci.pe_Builder_2.5.zip. Thank you for your time and congenial responses. Michael

https://drive.google.com/file/d/1M7_U9JFtrdWY_cAoUFcs__Upi1d_1fv8/view?usp=sharing

On Wed, Mar 8, 2023 at 12:28 AM Irv Kalb @.***> wrote:

Hi Michael,

I finally got a chance to take a look at your code.

I assume that main_copy.py is the main program. But when I tried to run it, I ran into problems right away. The problems stem from the fact that your requires a great many "tk" packages that I did not have and am not familiar with. I started importing the packages that it was asking for. But after about 5 or 6 (and it still wasn't satisfied) I stopped and started to look at your code.

Unfortunately, a very basic problem is that I am not at all familiar with the way tkinter works. And it looks like your code is heavily built on the style of interface. So, I probably won't be able to give you any real feedback because I don't understand this style at all.

If there is a particular piece of the code that you would like me to look at that deals with object orientation, I'd be happy to look at that. But as for overall comments, I'm sorry but I just have no idea.

Sorry,

Irv


From: mwcole1954 @.> Sent: Monday, March 6, 2023 1:41 PM To: IrvKalb/pygwidgets @.> Cc: irv furrypants.com @.>; State change @.> Subject: Re: [IrvKalb/pygwidgets] InputText does not accept user input (Issue #3)

Irv, I apologize if the code is a bit haphazard and not as well documented as it could be. Michael

On Sun, Mar 5, 2023 at 9:01 PM Irv Kalb @.***> wrote:

Closed #3 https://github.com/IrvKalb/pygwidgets/issues/3 as completed.

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#event-8669299559, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/A3ZQAK4HC2V7OKJCOFZEAQ3W2VARJANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1457043277>,

or unsubscribe<

https://github.com/notifications/unsubscribe-auth/ABXUYSUDYW3PQQHZOYUK4CTW2ZKXXANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1459539813,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/A3ZQAK44AYNUM3ENYXQIGXDW3AKGVANCNFSM6AAAAAATMMO6E4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1460056949>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABXUYSXXHCCTMKEVBAVMVQDW3BYYBANCNFSM6AAAAAATMMO6E4>.

You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1465540536, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZQAKZO3OMUSOLMS2I7UHDW32WPDANCNFSM6AAAAAATMMO6E4 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/IrvKalb/pygwidgets/issues/3#issuecomment-1465934997, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXUYSRESYNVRE77SJP5OVLW335RNANCNFSM6AAAAAATMMO6E4. You are receiving this because you modified the open/close state.Message ID: @.***>