I'm trying to write code that will force an activity to close after catching an internal OS/Sugar exception. I tried using the close() method in Activity, but it's not qutting the activity as I expected. Log files show this after calling the method:<br>
<br>1227218257.734168 DEBUG ClassroomPresenter: write_file /home/olpc/isolation/1/uid_to_home_dir/10004/instance/deck.cpxo<br>1227218262.006954 DEBUG Shared: Activity is quitting. Making sure student navigation is unlocked.<br>
1227218262.009369 DEBUG root: Activity.save: dbus.UTF8String('5e6f0354-6715-4258-aeee-4e1296c04eb2')<br>1227218262.015844 DEBUG sugar.presence.presenceservice: Reused proxy <Buddy object at 0x9339cd4 (sugar+presence+buddy+Buddy at 0x93aa430)><br>
1227218262.672372 DEBUG ClassroomPresenter: write_file /home/olpc/isolation/1/uid_to_home_dir/10004/instance/1227218262<br>1227218264.057193 DEBUG root: datastore.write<br>1227218264.060659 DEBUG root: dbus_helpers.update: ... # lots of stuff here<br>
1227218264.100066 DEBUG root: Written object 5e6f0354-6715-4258-aeee-4e1296c04eb2 to the datastore.<br>1227218264.102794 DEBUG sugar.presence.activity: <proxy for /org/laptop/Sugar/Presence/Activities/2 at 9339cac>: leaving<br>
<br>Logs show this when quitting the activity using the close button:<br><br>1227218473.241763 DEBUG root: Activity.save: dbus.UTF8String('5e6f0354-6715-4258-aeee-4e1296c04eb2')<br>1227218473.901824 DEBUG ClassroomPresenter: write_file /home/olpc/isolation/1/uid_to_home_dir/10000/instance/1227218473<br>
1227218475.303038 DEBUG root: datastore.write<br>1227218475.305903 DEBUG root: dbus_helpers.update: ... # lots of stuff here<br>1227218475.329784 DEBUG root: Written object 5e6f0354-6715-4258-aeee-4e1296c04eb2 to the datastore.<br>
1227218475.717696 DEBUG root: Activity.__save_cb<br>1227218475.733691 WARNING root: No gtk.AccelGroup in the top level window.<br>1227218475.736404 WARNING root: No gtk.AccelGroup in the top level window.<br>1227218475.907734 DEBUG root: Quitting the activity process.<br>
<br>Is this the right way to close an activity from the code?<br><br>Thanks.<br><br>-Kris<br><br>