Development Team/Almanac/sugar.activity.activity: Difference between revisions

No edit summary
 
Line 142: Line 142:
         return data
         return data
</pre>
</pre>
=== How do I run a specific block of code (eg. for cleanup) when my activity is closed? ===
The activity.Activity class has a can_close() method that you should override in any of your own activities where you want to run some specific code related




Line 184: Line 188:
             self.invite(buddy_key)
             self.invite(buddy_key)
</pre>
</pre>


= Class: ActivityToolbox ([[Sugar.graphics.toolbox|Toolbox]])=
= Class: ActivityToolbox ([[Sugar.graphics.toolbox|Toolbox]])=