Presentation is loading. Please wait.

Presentation is loading. Please wait.

As you arrive… Get you laptop out and get ready to program some python Go to the course website and load all the example programs that are posted there.

Similar presentations


Presentation on theme: "As you arrive… Get you laptop out and get ready to program some python Go to the course website and load all the example programs that are posted there."— Presentation transcript:

1 As you arrive… Get you laptop out and get ready to program some python Go to the course website and load all the example programs that are posted there for the day If you haven’t done it already, attempt to fix my broken code from last week

2 What I wanted you to do last Thursday: 1.Write some GUI callbacks (review from last time, but still useful) 2.Explain how callbacks are actually Asynchronous Programming 3.Explain what a “thread” is 4.Write code that uses a thread you’ve built yourself

3 Question What is a thread? 1.It’s a part of a GUI window. In Jython, each window you display has one and it deals with user input. 2.It’s a path of execution in your program. If you use threads, multiple parts of your program can execute at the same time. 3.It’s a principle of design. You want each “thread” of your program to be a separate class 4.All of the above

4 Today in Class You’ll write a bit more GUI code You should be able to articulate why using globals in GUI code can be problematic You’ll modify some code to separate a GUI into several classes that encapsulate data If we have time, we’ll look at how GUIs respond to external events

5 Modify LineExample1 so that when you click you get a continuous line starting at 0,0 If you finish early, go ahead and uncomment the lines at the bottom and try to figure out the bug. And fix it, if you know how.

6 Modify SportsTrackerExample so it works correctly You’ll want to create two classes: one for the main window and one for the tracker windows There should be no globals your final solution


Download ppt "As you arrive… Get you laptop out and get ready to program some python Go to the course website and load all the example programs that are posted there."

Similar presentations


Ads by Google