[Sugar-devel] automatically naming incremental sugar activity instances
Walter Bender
walter.bender at gmail.com
Tue Nov 30 01:04:30 EST 2010
On Tue, Nov 30, 2010 at 12:21 AM, Erik Blankinship <erikb at mediamods.com> wrote:
> Thank you for the thoughtful response. Could you please remind me where my
> activity's persistant storage can be accessed?
os.path.join(activity.get_activity_root(), 'data')
-walter
>
> On Mon, Nov 29, 2010 at 7:34 AM, Aleksey Lim <alsroot at member.fsf.org> wrote:
>>
>> 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
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
More information about the Sugar-devel
mailing list