Since Tuesday, we've made some great progress. During class on Tuesday, we began following this guide that Alex pointed out -- a PyGTK to Sugar tutorial. This guide showed us an example set of code where someone converted a GTK-based python program into a "Sugarized" version that can be run within Sugar. This activity helped us figure out what was necessary to convert a GTK-based application into a "Sugarized" activity. Unfortunately, the guide didn't actually have the source code available for us to compare side by side with ours. They did, however, provide the .xo file (the Sugar Activity file that can be run within Sugar). After doing a little research, I realized that .xo files are simply just .zip files but renamed. So we can easily view the source code of the .xo file simply by saying:
unzip filename.xo
This gave me the contents of the activity for me to better compare our activity to the tutorial's activity. After comparing and making more changes to our code, I went ahead and tried running our activity in Sugar. Still no luck.
Making minor changes to the code without getting any feedback from Sugar was going to make it almost impossible for us to figure out what's going wrong, so I searched for a new way to go about "Sugarizing" our activity. In search of a way to debug our program (within Sugar), I found a very useful activity called Log. This guide pointed me in the direction of Log. Log is a Sugar Activity that will display a log file about any activity that is run within Sugar. So once our activity crashes, we can pull up the Log activity to see why the activity failed to run properly.
While we still haven't gotten the activity to actually run within Sugar yet, this is excellent progress. Now we actually have a way to figure out why our activity is crashing. It shouldn't be much longer now before our activity is working properly within Sugar.
No comments:
Post a Comment