EXERCISE 8.7 [extra - not in book]
(continues the scenario from question 8.5)
The designer in question 8.5 is testing one of the programs. She types in the file name "fred", presses the 'save' button and gets the confirmation dialog box. At this point she wonders whether she might be overwriting an existing file so she presses the 'list' button. She sees an existing file called "fred" and so changes the filename to "freda", but then realises that the confirmation box is still there.
Based on this information alone:
(a) do you think the program is likely to be that of programmer A (event-loop style) or programmer B (notifier)?
(b) justify your reasoning
(c) suggest a way to correct the fault
answer available for tutors only
(a) Programmer B (notifier)
(b) Because the callbacks for the main screen are still active when the dialog box is showing.
(c) Various answers possible, especially as students may have used systems of different kinds. Alternatives: