Mikus Grinbergs
2008-10-09 11:48:17 UTC
One of the principles of Sugar is "Activities are isolated from each
other". Based on that, the launching of an Activity by another
Activity is prohibited. From the viewpoint of an user, I would like
to explore this prohibition.
--------
When an Activity is launched, Rainbow first creates an execution
environment by performing certain actions and passing certain
parameters, then lets the Activity run. As far as the Activity is
concerned, it has received all of its "dynamic input" thru Rainbow.
The launching process is typically triggered by the user clicking on
an icon - one place where this is allowed is in Journal. Even
though Journal itself is sometimes handled by Sugar the same way as
an Activity would be (e.g., where Journal currently gets shown is in
Activity View), Rainbow isolates the Activity (which runs after the
'launch') from Journal (which ran before the 'launch').
It seems to me that this same "separation" (between the before and
the after) ought to be possible if the trigger for the launch came
from an Activity. Activity-1 would cause Rainbow to run, and
Rainbow would set up Activity-2 the same way as it would for a
launch from click-on-icon.
The only difficulty I see with this is if Activity-1 is accessing a
resource that is needed by Activity-2 (Activity-1 may have to "give
up" that resource). If the resource was "dynamic output" from
Activity-1, it would have to be placed where both Activities have
permission to access (e.g., in /tmp), and its location would have to
be passed by Rainbow to Activity-2 (presumably by a mechanism
similar to the way information from a Journal entry is passed to an
Activity launched from that entry).
Please, do comment on how feasible this would be.
Thanks in advance, mikus
other". Based on that, the launching of an Activity by another
Activity is prohibited. From the viewpoint of an user, I would like
to explore this prohibition.
--------
When an Activity is launched, Rainbow first creates an execution
environment by performing certain actions and passing certain
parameters, then lets the Activity run. As far as the Activity is
concerned, it has received all of its "dynamic input" thru Rainbow.
The launching process is typically triggered by the user clicking on
an icon - one place where this is allowed is in Journal. Even
though Journal itself is sometimes handled by Sugar the same way as
an Activity would be (e.g., where Journal currently gets shown is in
Activity View), Rainbow isolates the Activity (which runs after the
'launch') from Journal (which ran before the 'launch').
It seems to me that this same "separation" (between the before and
the after) ought to be possible if the trigger for the launch came
from an Activity. Activity-1 would cause Rainbow to run, and
Rainbow would set up Activity-2 the same way as it would for a
launch from click-on-icon.
The only difficulty I see with this is if Activity-1 is accessing a
resource that is needed by Activity-2 (Activity-1 may have to "give
up" that resource). If the resource was "dynamic output" from
Activity-1, it would have to be placed where both Activities have
permission to access (e.g., in /tmp), and its location would have to
be passed by Rainbow to Activity-2 (presumably by a mechanism
similar to the way information from a Journal entry is passed to an
Activity launched from that entry).
Please, do comment on how feasible this would be.
Thanks in advance, mikus