[Sugar-devel] Some questions concerning saving methods on sugar

Walter Bender walter.bender at gmail.com
Fri Sep 24 10:04:44 EDT 2010


On Fri, Sep 24, 2010 at 9:40 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
> On Fri, Sep 24, 2010 at 15:25, Walter Bender <walter.bender at gmail.com> wrote:
>> On Fri, Sep 24, 2010 at 9:10 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>>> On Fri, Sep 24, 2010 at 14:41, Walter Bender <walter.bender at gmail.com> wrote:
>>>> On Fri, Sep 24, 2010 at 4:02 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>>>>> On Thu, Sep 23, 2010 at 00:58, Alberto Arruda de Oliveira
>>>>> <alberto.a.oliv at gmail.com> wrote:
>>>>>> Hello,
>>>>>>
>>>>>> First of all, thanks for all the answers!
>>>>>>
>>>>>> I decided to follow your advices and implement the saving feature of my
>>>>>> activity through the journal.
>>>>>>
>>>>>> Although it's not working perfectly yet, I hope it will be soon. I'm just
>>>>>> having a little problem with the keep button. My activity creates the
>>>>>> journal entry like it should when I exit through the close button, but when
>>>>>> I press the keep button, it doesn't create the entry. Is there any big
>>>>>> differences in how the keep and close button access the journal to save the
>>>>>> state of the activity?
>>>>>>
>>>>>> Also, related to the sugar-emulator, sometimes, when I close it, all the
>>>>>> journal entries are wiped. I suspect this is an emulator problem ( because
>>>>>> not only it happened with my activity, but also with other activities ), but
>>>>>> I'd like to be sure I'm not doing anything wrong!
>>>>
>>>> It could be that the Journal is reindexing. (For a large Journal, this
>>>> sometimes has the appearance of an empty or nearly empty Journal.) If
>>>> you wait for the indexing to complete, everything reappears as normal.
>>>
>>> But why would it be reindexing? Are people getting their journals
>>> reindexed from time to time?
>>
>> Not sure why, but in sugar-jhbuild, where I do most of my work, it
>> seems to reindex fairly often (~1 out of every 30-40 sessions
>> launched). one trigger *seems to be* changing the display size, e.g.,
>> if I use 1200x900 sessions for a while and then switch to 800x600, it
>> will often reindex. (Likely nothing causal there.)
>
> It could be very interesting to look at the logs of the session when
> reindexing starts and also of the session just before that.

I'll try to save them next time it happens.

-walter

> Regards,
>
> Tomeu
>
>> -walter
>>>
>>> Regards,
>>>
>>> Tomeu
>>>
>>>> -walter
>>>>>
>>>>> Haven't seen it happening myself. Can you tell us specific versions of
>>>>> Sugar and any tips for reproducing it?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Tomeu
>>>>>
>>>>>> Thanks again,
>>>>>>
>>>>>> Alberto Arruda de Oliveira
>>>>>>
>>>>>> 2010/9/20 Alberto Arruda de Oliveira <alberto.a.oliv at gmail.com>
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I've been adapting an application to use as an activity, and I have some
>>>>>>> questions about the way to save on sugar.
>>>>>>>
>>>>>>> At first, I tried to just create a directory inside my Activity folder
>>>>>>> especially made for saving files, but it did not work, because of the access
>>>>>>> permissions to it, and, although we could simply manually change the folder
>>>>>>> permission for writing on that folder, we would have to do it for every
>>>>>>> single OLPC we installed our activity into and we didn't want that.
>>>>>>>
>>>>>>> Then, we started trying with the journal. Everything was going fine, until
>>>>>>> we discovered that another sugar activity, Scratch, implemented saving and
>>>>>>> loading on a similar fashion we previously wanted. It has a folder inside
>>>>>>> it's Activity directory with subdirectories related to each kind of Scratch
>>>>>>> project. Also, Scratch's Activity directory has the same access permission
>>>>>>> as any other sugar Activity installed.
>>>>>>>
>>>>>>> So, my question is, does anyone knows how Scratch implements it's save /
>>>>>>> loading method? is there any guide explaining how to do it without using the
>>>>>>> journal? Keep in mind that we do know that there are other directories we
>>>>>>> could use to save our files, but we would like to use our Activity directory
>>>>>>> if possible.
>>>>>>>
>>>>>>> Thanks in advance ( and sorry for any english mistakes :] ),
>>>>>>>
>>>>>>> Alberto Arruda de Oliveira
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Sugar-devel mailing list
>>>>>> Sugar-devel at lists.sugarlabs.org
>>>>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>
>>
>>
>>
>> --
>> Walter Bender
>> Sugar Labs
>> http://www.sugarlabs.org
>>
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list