Sugar Components: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==Sugar Components==
==Sugar Components==


This is a continuation of [[Understanding sugar code]]. Here, we are in the middle of walking through a sugar shell initialization to see all of the packages and utilities used in the sugar environment. Previously, we saw how Fedora is set up to launch sugar within a python context. Sugar had python launch Matchbox as an X windows environment, and DBUS as an interprocess messaging bus. After importing serveral python libraries (sys, os, gtk, & gobject), and some sugar python libraries (env, logger, profile, & TracebackUtils), sugar is now going to continue setting up by importing special core python libraries and instantiating various classes and routines... Let's see what happens:
This is a continuation of [[Understanding sugar code]]. Here, we are in the middle of walking through a sugar shell initialization to see all of the packages and utilities used in the sugar environment. Previously, we saw how Fedora is set up to launch sugar within a python context. Sugar had python launch Matchbox as an X windows environment, and DBUS as an interprocess messaging bus. After importing serveral python libraries (sys, os, gtk, & gobject), and some sugar environemnt libraries (env, logger, profile, & TracebackUtils), sugar is now going to continue setting up by importing special core python libraries and instantiating various classes and routines... Let's see what happens:


==Sugar's View Module==
==Sugar Module Imports==
The sugar-shell has already imported python and sugar environment modules, but now, sugar starts to import Component Modules:


>>> from view.FirstTimeDialog import FirstTimeDialog
>>> from view.FirstTimeDialog import FirstTimeDialog
>>> from view.Shell import Shell
>>> from view.Shell import Shell
>>> from model.ShellModel import ShellModel
>>> from model.ShellModel import ShellModel

==Sugar's View Module==


==Sugar's Shell Module==
==Sugar's Shell Module==

Revision as of 16:10, 26 February 2007

Sugar Components

This is a continuation of Understanding sugar code. Here, we are in the middle of walking through a sugar shell initialization to see all of the packages and utilities used in the sugar environment. Previously, we saw how Fedora is set up to launch sugar within a python context. Sugar had python launch Matchbox as an X windows environment, and DBUS as an interprocess messaging bus. After importing serveral python libraries (sys, os, gtk, & gobject), and some sugar environemnt libraries (env, logger, profile, & TracebackUtils), sugar is now going to continue setting up by importing special core python libraries and instantiating various classes and routines... Let's see what happens:

Sugar Module Imports

The sugar-shell has already imported python and sugar environment modules, but now, sugar starts to import Component Modules:

>>> from view.FirstTimeDialog import FirstTimeDialog
>>> from view.Shell import Shell
>>> from model.ShellModel import ShellModel

Sugar's View Module

Sugar's Shell Module

Sugar's Model Module