[Bugs] #1742 UNSP: after adding a friend the palette doesn't change

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Sep 21 01:25:16 EDT 2010


#1742: after adding a friend the palette doesn't change
------------------------------------------+---------------------------------
    Reporter:  sascha_silbe               |          Owner:  tomeu            
        Type:  defect                     |         Status:  new              
    Priority:  Unspecified by Maintainer  |      Milestone:  0.88             
   Component:  sugar                      |        Version:  Git as of bugdate
    Severity:  Minor                      |       Keywords:  sugar-love       
Distribution:                             |   Status_field:  New              
------------------------------------------+---------------------------------

Comment(by bernie):

 Replying to [comment:4 timclicks]:
 > If this check isn't working, it could mean that
 `jarabe.model.friends.get_model` isn't working properly... I don't see a
 `__call__()` method in `jarabe.model.friends.Friends`, but I don't know
 enough about `gobject.GObject` to know if this is a problem.
 >
 > {{{
 > #!python
 > _model =  None
 >
 > def get_model():
 >     global _model
 >     if _model is None:
 >         _model = Friends()
 >     return _model
 > }}}

 get_model() implements a Singleton pattern. The first time you invoke it,
 it builds a Friends object through the constructor and stores a reference
 to it in the global variable _model, which is used in future calls.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1742#comment:5>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list