#6551 NORM Never A: Activities can't tell how they're being launched until too late

Zarro Boogs per Child bugtracker at laptop.org
Thu Mar 27 20:20:07 EDT 2008


#6551: Activities can't tell how they're being launched until too late
---------------------+------------------------------------------------------
  Reporter:  bemasc  |       Owner:  marco         
      Type:  defect  |      Status:  new           
  Priority:  normal  |   Milestone:  Never Assigned
 Component:  sugar   |     Version:                
Resolution:          |    Keywords:                
  Verified:  0       |    Blocking:                
 Blockedby:          |  
---------------------+------------------------------------------------------

Comment(by bemasc):

 After filing this bug, I've learned about Activity._shared_activity and
 handle.object_id.  These variables are not widely known or documented, but
 they can be used to achieve my desired behavior.  Unfortunately, none of
 the current shareable activities use this approach.

 It appears that an Activity stops pulsing, and is displayed, when
 Activity.show() is called.  Rainbow, in
 'create_activity_instance(constructor, handle)', calls the show() method
 as soon as Activity.__init__ returns.  Therefore, in order for an Activity
 to delay its appearance until it's ready, its __init__ method must not
 return until after sharing has succeeded, or the file has been loaded.
 This seems somewhat awkward, as it requires a multithreaded design where
 __init__ blocks, waiting for read_file() or a sharing callback to be
 called.

 I might prefer it if the launcher were not to call Activity.show(), and
 instead the Activity could declare that it were ready to be Active by
 calling its own show() method.

-- 
Ticket URL: <http://dev.laptop.org/ticket/6551#comment:2>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system



More information about the Bugs mailing list