Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Hello World example
  • Loading branch information
prologic committed Aug 3, 2016
1 parent e328ed4 commit 566eab6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/hello.py
Expand Up @@ -10,18 +10,21 @@


class hello(Event):

"""hello Event"""


class terminate(Event):
"""terminate Event"""


class App(Component):

def hello(self):
"""Hello Event Handler"""

print("Hello World!")

def started(self, component):
def started(self, *args):
"""Started Event Handler
This is fired internally when your application starts up
Expand All @@ -30,7 +33,9 @@ def started(self, component):
"""

self.fire(hello()) # Fire hello Event
self.fire(terminate())

def terminate(self):
raise SystemExit(0) # Terminate the Application


Expand Down

0 comments on commit 566eab6

Please sign in to comment.