[Sugar-devel] GSoC Update: SharedTextDemo-3
Tomeu Vizoso
tomeu at sugarlabs.org
Tue Jun 23 05:22:44 EDT 2009
On Tue, Jun 23, 2009 at 04:56, Benjamin M.
Schwartz<bmschwar at fas.harvard.edu> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> SharedTextDemo-3 is available at
> http://dev.laptop.org/~bemasc/SharedTextDemo-3.xo
Congrats, I'm wondering if any of the games being developed for 4th
Grade Math would be easily modified to use GroupThink?
Or is already any real activity in the works?
Regards,
Tomeu
> This version introduces saving to and loading from the Journal. The
> contents of the textbox are saved to the Journal, and loaded back in when
> you relaunch the program. This may not sound like a very impressive
> feature, but consider the source code of the activity (in its entirety):
>
> """
> from groupthink import sugar_tools, gtk_tools
> import sugar
>
> class SharedTextDemoActivity(sugar_tools.GroupActivity):
> def initialize_display(self):
> self.cloud.textview = gtk_tools.SharedTextView()
> return self.cloud.textview
> """
>
> The self.cloud object takes care not only of sharing the TextView over the
> network, live, but also of serializing it to disk on save, and
> deserializing it on load. At 6 lines of code, this system is finally
> approaching a level of boilerplate I would consider acceptable for users
> to build their own activities.*
>
> In addition to working Journal persistence, this version also adds (very
> simple) wait screens. With wait screens, the user is not left at the
> pulsing activity icon during slow actions, like loading a large journal
> entry or joining a shared session. Instead, the activity displays a
> message informing the user of its current status as soon as possible after
> launch. Naturally, both automatic load/save and wait screens are
> available to any activity using Groupthink, not just SharedTextDemo.
>
> - --Ben
>
> *: There is admittedly a tradeoff here between flexibility and magic.
> self.cloud, providing magic load/save and sharing, will only accept
> objects of appropriate type, drawn from the groupthink library. This
> means that users must code with an understanding of the types of the
> objects they are using.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.11 (GNU/Linux)
>
> iEYEARECAAYFAkpARGYACgkQUJT6e6HFtqQI9ACeNunokI+4g8V6cT8crPpLi6lf
> BYsAn35d5fFxGfVfifzpjQQQbTB154aI
> =OnVL
> -----END PGP SIGNATURE-----
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list