Difference between revisions of "Development Team/Almanac/sugar.activity.activity"

From Sugar Labs
Jump to navigation Jump to search
(New page: The sugar.activity.activity package includes several important classes that are needed to run a basic activity. <h1>Class: Activity</h1> <h3> How do I create a new activity that is deriv...)
 
Line 3: Line 3:
 
<h1>Class: Activity</h1>
 
<h1>Class: Activity</h1>
 
<h3> How do I create a new activity that is derived from the base Activity class?</h3>
 
<h3> How do I create a new activity that is derived from the base Activity class?</h3>
<code>
 
 
from sugar.activity import activity
 
from sugar.activity import activity
 
...
 
...
Line 10: Line 9:
 
     def __init__(self, handle):
 
     def __init__(self, handle):
 
         activity.Activity.__init__(self, handle)
 
         activity.Activity.__init__(self, handle)
</code>
 

Revision as of 10:36, 29 May 2008

The sugar.activity.activity package includes several important classes that are needed to run a basic activity.

Class: Activity

How do I create a new activity that is derived from the base Activity class?

from sugar.activity import activity ... class ToolbarExample(activity.Activity):

   def __init__(self, handle):
       activity.Activity.__init__(self, handle)