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

What's hot (20)

MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
PYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.pptPYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.ppt
 
VB.net
VB.netVB.net
VB.net
 
Threads in python
Threads in pythonThreads in python
Threads in python
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
 
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
Regular expressions in Python
Regular expressions in PythonRegular expressions in Python
Regular expressions in Python
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
 
Applets
AppletsApplets
Applets
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Event handling
Event handlingEvent handling
Event handling
 
System calls
System callsSystem calls
System calls
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Android Fragment
Android FragmentAndroid Fragment
Android Fragment
 
Control structure C++
Control structure C++Control structure C++
Control structure C++
 

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 driven programming amazeballs
Event driven programming amazeballsEvent driven programming amazeballs
Event driven programming amazeballsMsWillcox
 
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
 
Event driven programming amazeballs
Event driven programming amazeballsEvent driven programming amazeballs
Event driven programming amazeballs
 
Controls
ControlsControls
Controls
 
Event oriented programming
Event oriented programmingEvent oriented programming
Event oriented programming
 

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.