Thank you for the clarification.<div><br></div><div>An idea to make my gimp example "work" with sugar:</div><div><br></div><div>If an image file is used to start the activity, I could disable the option to open other files, effectively making that activity session a "one off".  </div>
<div><br></div><div>That said, it would probably be confusing.  The activity would look  the same except for the missing option to open new files.</div><div><br></div><div><br><div class="gmail_quote">On Thu, Dec 2, 2010 at 12:31 AM, James Simmons <span dir="ltr"><<a href="mailto:nicestep@gmail.com">nicestep@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Erik,<br>
<br>
I believe that the write_file() is always to the Journal entry you<br>
resumed from.  You can certainly read and write to any number of other<br>
Journal entries, but the write_file() only writes to the resumed<br>
entry.  It is possible to avoid creating a Journal entry.  For<br>
instance, Get Internet Archive Books downloads e-books from the IA<br>
website and puts them in Journal entries, but it does not create its<br>
own Journal entry and cannot be resumed from a Journal entry.  There<br>
are a few Activities that could benefit from that approach.  For<br>
instance, both Terminal and Log create Journal entries that do nothing<br>
useful.  (resuming from one of these entries does nothing that<br>
starting the Activity from the ring does not do).<br>
<br>
In my opinion you should stick to flows that the user expects instead<br>
of inventing new ones.<br>
<br>
James Simmons<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Dec 1, 2010 at 7:55 PM, Erik Blankinship <<a href="mailto:erikb@mediamods.com">erikb@mediamods.com</a>> wrote:<br>
> Let's say I have a gimp-like activity.<br>
> I launch the activity and it is "empty".  I open an image file via object<br>
> chooser, save the file back to the datastore.  I do this a few times.  When<br>
> I close my activity, I keep a reference to the datastore-id of the last<br>
> photo I edited so that it will resume with that photo.<br>
> When I reopen that activity-instance, I look up the last edited photo by its<br>
> saved datastore id and can resume work on it.  I close the activity again<br>
> and the datastore-id of the image is preserved.<br>
> Now, I go to the journal and open the gimp-line activity via an image file<br>
> (A.png) in the journal with a supported mime-type.<br>
> My activity's read_file figures out we are opening an image, and handles it<br>
> accordingly (it also keeps a reference to the open file).<br>
> The child makes some edits and saves their changes to the image.   I write<br>
> the changes to A.png in the datastore via the file handle I kept open.<br>
> In the same activity instance, I close A.png and open another image (B.png)<br>
> via an object chooser.  I work on that file and then quit the activity (with<br>
> an intention to save changes to B.png).<br>
> At this point, I am  prompted with a dialog box asking me to add metadata to<br>
> A.png  ... (i guess because that is the file used to open the activity?).<br>
> Is there a way to end this activity session with the final write_file being<br>
> to an activity instance -- not to the file used to open the instance?<br>
</div></div>> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
><br>
</blockquote></div><br></div>