SlideShare a Scribd company logo
1 of 21
Event-Driven Programming
Event-Driven Programming Most modern computer programs that people use have  Graphical User Interfaces  (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer . An Introduction to Programming Using Alice
Event-Driven Programming Most modern computer programs that people use have  Graphical User Interfaces  (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer . An Introduction to Programming Using Alice
Event-Driven Programming An Introduction to Programming Using Alice Most modern computer programs that people use have  Graphical User Interfaces  (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer .
An Introduction to Programming Using Alice
[object Object]
[object Object],[object Object]
[object Object]
[object Object],[object Object]
[object Object]
[object Object],[object Object]
Events in Alice ,[object Object],events area
Events in Alice ,[object Object],events area
Events in Alice ,[object Object],[object Object]
Events in Alice ,[object Object],create new event  button
Events in Alice ,[object Object]
Events in Alice ,[object Object]
Events in Alice ,[object Object],Some event types also have built-in event handlers…
Events in Alice ,[object Object],Some event types also have built-in event handlers…   In other cases, programmers must specify the handler.
Event handlers are specified by dragging method tiles from the details area and dropping them into the event tile.
Event-Drive Programming ,[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramKumar
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture AqsaHayat3
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptKunal Kishor Nirala
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.netMUKALU STEVEN
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menukuldeep94
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresWayne Jones Jnr
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Exception Handling in VB.Net
Exception Handling in VB.NetException Handling in VB.Net
Exception Handling in VB.Netrishisingh190
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagramRamakant Soni
 
Event+driven+programming key+features
Event+driven+programming key+featuresEvent+driven+programming key+features
Event+driven+programming key+featuresFaisal Aziz
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)Prakhar Maurya
 
Event Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfEvent Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfAliEndris3
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 
Layouts in android
Layouts in androidLayouts in android
Layouts in androidDurai S
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9myrajendra
 

What's hot (20)

Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle ppt
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menu
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Exception Handling in VB.Net
Exception Handling in VB.NetException Handling in VB.Net
Exception Handling in VB.Net
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagram
 
Event+driven+programming key+features
Event+driven+programming key+featuresEvent+driven+programming key+features
Event+driven+programming key+features
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Event Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfEvent Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdf
 
C++ chapter 1
C++ chapter 1C++ chapter 1
C++ chapter 1
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
android layouts
android layoutsandroid layouts
android layouts
 
Action Bar in Android
Action Bar in AndroidAction Bar in Android
Action Bar in Android
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9
 

Viewers also liked

Event driven theory
Event driven theoryEvent driven theory
Event driven theorynickywalters
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven ProgrammingAmazon Web Services
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in aliceChaffey College
 
Synapseindia dotnet development chapter 14 event-driven programming
Synapseindia dotnet development  chapter 14 event-driven programmingSynapseindia dotnet development  chapter 14 event-driven programming
Synapseindia dotnet development chapter 14 event-driven programmingSynapseindiappsdevelopment
 
Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecyclenicky_walters
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof languagenicky_walters
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven ProgrammingLin Jen-Shin
 
Design documentation
Design documentationDesign documentation
Design documentationnicky_walters
 
Event oriented programming
Event oriented programmingEvent oriented programming
Event oriented programmingAshwini Awatare
 

Viewers also liked (20)

Event driven theory
Event driven theoryEvent driven theory
Event driven theory
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
 
Ch 5 boolean logical in alice
Ch 5  boolean logical in aliceCh 5  boolean logical in alice
Ch 5 boolean logical in alice
 
Synapseindia dotnet development chapter 14 event-driven programming
Synapseindia dotnet development  chapter 14 event-driven programmingSynapseindia dotnet development  chapter 14 event-driven programming
Synapseindia dotnet development chapter 14 event-driven programming
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
 
Decisions
DecisionsDecisions
Decisions
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
 
Design for edp
Design for edpDesign for edp
Design for edp
 
Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecycle
 
Data structures vb
Data structures vbData structures vb
Data structures vb
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof language
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming
 
Decisions
DecisionsDecisions
Decisions
 
Design documentation
Design documentationDesign documentation
Design documentation
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Controls
ControlsControls
Controls
 
Event oriented programming
Event oriented programmingEvent oriented programming
Event oriented programming
 
Using loops
Using loopsUsing loops
Using loops
 

Similar to Ch 3 event driven programming

Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1Rachel Phillips
 
The Pc And Its Operating Systems
The Pc And Its Operating SystemsThe Pc And Its Operating Systems
The Pc And Its Operating SystemsAmber Wheeler
 
03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppttadudemise
 
03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppttadudemise
 
ANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docPalakjaiswal43
 
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTION
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTIONA SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTION
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTIONijcsit
 
Advance ui development and design
Advance ui  development and design Advance ui  development and design
Advance ui development and design Rakesh Jha
 
Android 101 Session @thejunction32
Android 101 Session @thejunction32Android 101 Session @thejunction32
Android 101 Session @thejunction32Eden Shochat
 
SWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface DesignSWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface Designghayour abbas
 
Ch12. graphical user interfaces
Ch12. graphical user interfacesCh12. graphical user interfaces
Ch12. graphical user interfacesArslan Karamat
 
Introduction to GUIs with guizero
Introduction to GUIs with guizeroIntroduction to GUIs with guizero
Introduction to GUIs with guizeroprimeteacher32
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0DivyaR219113
 
Synapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netSynapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netsaritasingh19866
 

Similar to Ch 3 event driven programming (20)

Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1
 
Event handling in Java(part 1)
Event handling in Java(part 1)Event handling in Java(part 1)
Event handling in Java(part 1)
 
The Pc And Its Operating Systems
The Pc And Its Operating SystemsThe Pc And Its Operating Systems
The Pc And Its Operating Systems
 
03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt
 
03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt
 
ANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.doc
 
Gu iintro(java)
Gu iintro(java)Gu iintro(java)
Gu iintro(java)
 
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTION
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTIONA SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTION
A SOFTWARE TOOL FOR EXPERIMENTAL STUDY LEAP MOTION
 
Advance ui development and design
Advance ui  development and design Advance ui  development and design
Advance ui development and design
 
Android 101 Session @thejunction32
Android 101 Session @thejunction32Android 101 Session @thejunction32
Android 101 Session @thejunction32
 
SWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface DesignSWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface Design
 
Ch12. graphical user interfaces
Ch12. graphical user interfacesCh12. graphical user interfaces
Ch12. graphical user interfaces
 
Introduction to GUIs with guizero
Introduction to GUIs with guizeroIntroduction to GUIs with guizero
Introduction to GUIs with guizero
 
Unit 6 Java
Unit 6 JavaUnit 6 Java
Unit 6 Java
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 
What is Event
What is EventWhat is Event
What is Event
 
Synapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .netSynapse india reviews on gui programming in .net
Synapse india reviews on gui programming in .net
 

More from Chaffey College (20)

Strings Objects Variables
Strings Objects VariablesStrings Objects Variables
Strings Objects Variables
 
Ruby Chapter 2
Ruby Chapter 2Ruby Chapter 2
Ruby Chapter 2
 
Social networks and games
Social networks and gamesSocial networks and games
Social networks and games
 
Serious games
Serious gamesSerious games
Serious games
 
Chapter 05
Chapter 05Chapter 05
Chapter 05
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien wars
 
Target markets
Target marketsTarget markets
Target markets
 
Ch 8 introduction to data structures
Ch 8 introduction to data structuresCh 8 introduction to data structures
Ch 8 introduction to data structures
 
Ch 8 data structures in alice
Ch 8  data structures in aliceCh 8  data structures in alice
Ch 8 data structures in alice
 
Ch 7 recursion
Ch 7 recursionCh 7 recursion
Ch 7 recursion
 
Intro to gml
Intro to gmlIntro to gml
Intro to gml
 
Power point unit d
Power point unit dPower point unit d
Power point unit d
 
Power point unit c
Power point unit cPower point unit c
Power point unit c
 
Power point unit b
Power point unit bPower point unit b
Power point unit b
 
Power point unit a
Power point unit aPower point unit a
Power point unit a
 
Gamegraphics
GamegraphicsGamegraphics
Gamegraphics
 
Gamesound
GamesoundGamesound
Gamesound
 
Ch 6 text and sound in alice
Ch 6 text and sound in aliceCh 6 text and sound in alice
Ch 6 text and sound in alice
 

Ch 3 event driven programming

  • 2. Event-Driven Programming Most modern computer programs that people use have Graphical User Interfaces (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer . An Introduction to Programming Using Alice
  • 3. Event-Driven Programming Most modern computer programs that people use have Graphical User Interfaces (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer . An Introduction to Programming Using Alice
  • 4. Event-Driven Programming An Introduction to Programming Using Alice Most modern computer programs that people use have Graphical User Interfaces (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer .
  • 5. An Introduction to Programming Using Alice
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Event handlers are specified by dragging method tiles from the details area and dropping them into the event tile.
  • 21.

Editor's Notes

  1. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  2. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  3. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  4. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  5. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  6. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  7. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  8. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  9. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.
  10. The Events area shows existing events and is used to create new events. An event consists of a condition, called an event trigger , and the name of a method, called an event handler . Whenever the event trigger occurs, the event handler is called into action. For example, you might want the sound of a splash to occur if an ice skater falls through the ice. Some events, such as causing a method to run when a key is pressed, provide user interaction for an Alice world. Events are covered in detail in Chapter 3.