1. Explain the difference between modal and nonmodal user interfaces. 2. Is a co
ID: 3537259 • Letter: 1
Question
1. Explain the difference between modal and nonmodal user interfaces.
2. Is a command-line interface modal or nonmodal?
3. why is event handling necessary when one begins to write programs that have nonmodal interfaces?
4. What does it mean to "register" an event-handler?
5. Why are interfaces so useful as the type of objects supplied when registering a handler?
6. How does the control flow of program that responses to events differ from a more
traditional program that uses a comand-line input?
Explanation / Answer
modal -> can't do anything else untill its complete.
non modal -> can do anything else untill its complete.
command line interface is non modal.
in non modal interfaces many events can occur in parallel so event handling is necessary
by registering we mean to link event with the event listner.
In JavaScript, you give up control of the main loop. The browser runs the main loop and calls back down into your code when an event or timeout/interval occurs. You have to handle the event and then return so that the browser can get on with doing other things, firing events, and so on.
So when the event occurse then flow goes to the program. and in normal flow remains with the program.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.