[Sugar-devel] How to get in-memory activity-instance?
ajay at activitycentral.com
Mon Apr 2 01:54:01 EDT 2012
I have been wanting to trying to navigate to custom URIs within
"Browse" activity, wherein the URIs are generated outside "Browse"
(i.e. the URI is neither typed in the address-bar, nor is one of the
bookmarks, nor is a "kept" link).
Now, if "Browse" is being launched for the first time, this is doable
- we just need to pass a "uri" parameter during the "launch" method
(by inspecting upon the "org.laptop.WebActivity" bundle_id on the
activity being launched).
For "resume" case, I SUPPOSE it refers to a case when there already is
a journal entry for "Browse", but there is no in-memory instance of
"WebActivity". Here too, we just pass "uri" as the parameter.
HOWEVER, the case that bothers me is the one when there is already a
"WebActivity" instance loaded into the memory.
Here, if i could get "<in-memory-WebActivity-instance>._browser", I
will be done.
I looked into "def _create_activity(self)" in "sugar/sugarfactory.py",
and there I saw a subprocess being launched for the activity. However,
I have been unable to stumble upon the code wherein the
launch-of-activity-instances are actually called?
So, currently, is there a way, wherein we can get handle of the
currently loaded "WebActivity" python object instance (or for that
matter, any currently loaded activity python instance) ?
Will be grateful for a reply.
More information about the Sugar-devel