[Sugar-devel] prevent simultaneous activity instances?

Gary Martin garycmartin at googlemail.com
Thu Dec 9 12:14:29 EST 2010

On 9 Dec 2010, at 14:49, Erik Blankinship <erikb at mediamods.com> wrote:

> Is there a way to prevent two instances of an activity from running at the same time?

Sure, with some gruesome lock hack in you activity code checking for a lock file in your activities persistent data directory. But I thoroughly discourage you from this path, as it completely disregards the Sugar UI design where having several activity instances open is how you work on several documents at the same time. The only exception I can think of is Browse, where the first instance sets up the main browser process, and subsequent Browse activity instances just talk to the existing background browser process to get new web capable canvas views (the user is unaware as each is presented as a consistent activity UI instance).


> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel

More information about the Sugar-devel mailing list