Page 341 -
P. 341

mixed messages



                                                                          SOlUTion
                              These are the message boxes available in tkinter. You were to think
                              carefully about each of the following examples, then indicate which
                              type of box on the left you would choose for each of the messages on
                              the right. You were to connect the messages to the boxes with lines.
                                                                          Are you REALLY sure you want to
                                                                           continue and do this thing? It's your
                                                                           last chance to change your mind.
                showinfo                               “OK to fire boosters?”
                                                                          This is pure information. Nothing
                                                                          to worry about. Except the risk of
                                                                          clashing with your velvet pixie hood.

                showwarning                            “Your tartan clogs have arrived.”

                                                           It didn't work last time, but if you like, you can try again.


                showerror                              “Seriously, I think he’s just ignoring the phone.”




                                                                              OK, so there's nothing actually
                                                       “Danger, Will Robinson!” broken YET, but BE CAREFUL
                askquestion

                                                                          You are going to continue, but
                                                                          do you want this extra option?


                askokcancel                            “Do you want fries with that?”


                                                                          Stuff's broken. You need to know.

                askyesnocancel                         “Dude, the printer’s busted.”

                                                                  Do you want this additional option, or would
                                                                  you like to forget about the whole thing?


                askretrycancel                         “So, you want Nutella on your bacon and jelly sandwich?”

                      Did your answers match ours? They might not. Selecting which type of message box to use
                       depends a lot upon the particular program you're writing and how serious you think a decision is.




           306    Chapter 8 ½
   336   337   338   339   340   341   342   343   344   345   346