Re: "edit separator" in text widget undo/redo mecanism
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: "edit separator" in text widget undo/redo mecanism

From: Jeff Hobbs <jeffh@activestate.com>
Date: Fri Mar 03 2006 - 06:44:18 CET

moumou@igbmc.u-strasbg.fr wrote:
> I'm writing an app with two text widgets, linked to each other, i.e.
> what happened in one widget has an influence in the other widget. I
> create a "undo/redo" mecanism acting simultaneously on the two widgets.
> So, after user operations (cut, paste, edition), I insert an "edit
> separator" in both widget (I disabled the "autoseparator option). In
> some cases, I can act only on one widget, without affecting the other.
> In order to get "synchronized" in the undo/redo mecanism, I'm then
> obliged to generate dummy action in the other widget, as the "edit
> separator" are not able to stack on each other.
>
> The solution consisting of creating two separated "redo/undo" mecanisms
> is not relevant, as the two widgets are for too connected to each
> other.
>
> I'm then wondering if a flag allowing the stacking of separators could
> be done

You might first want to look at Tk 8.5, which adds the ability
to peer (mirror) text widgets.

-- 
   Jeff Hobbs, The Tcl Guy
   http://www.ActiveState.com/, a division of Sophos
Received on Sun Apr 30 02:22:09 2006