[Sugar-devel] automatically naming incremental sugar activity instances

Aleksey Lim alsroot at member.fsf.org
Mon Nov 29 07:34:58 EST 2010


On Sun, Nov 28, 2010 at 06:38:58PM -0500, Erik Blankinship wrote:
> If you wanted to [attempt to] automatically name new sugar activity
> instances incrementally, what is the best technique to do this?
> 
> The solution I've come up with (not implemented, and not sure it can be
> implemented): scan the journal, look at all of the existing filenames, and
> then rename the new instance after some analysis?

It might be too expensive...

Personally I'm not sure that it is the right way for common usage.
More over we already have such identifier:

* object_id, for internal usage
* date, for user friendly usage.

But you can experiment with setting incremental names on your activity
side, i.e., just keep current seqno in activity persistent storage and
increment it every time your create new object.

-- 
Aleksey


More information about the Sugar-devel mailing list