[Sugar-devel] [Dextrose] [PATCH sugar-toolkit] Cursor moves to beginning while trying to edit activity instance name #2608

Bernie Innocenti bernie at codewiz.org
Tue Feb 15 16:04:33 EST 2011


On Tue, 2011-02-15 at 21:34 +0100, Sascha Silbe wrote: 
> Excerpts from Bernie Innocenti's message of Tue Feb 15 21:19:57 +0100 2011:
> 
> > The above patch isn't sufficient in this race-condition between the user
> > typing and the metadata update: even if we reset the cursor position to
> > the right place, the text that we set back into the widget is likely to
> > miss one or two keystrokes from the user.
> 
> How is that possible? We don't use threads or multiple processes, so
> X events don't get processed while this code runs.

IIRC, we tell the datastore to update the metadata, then after a while
we get an asynchronous notification from the datastore with the new
name... which is sometimes 1 or 2 characters behind what the user was
typing :-)

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/




More information about the Sugar-devel mailing list