🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.tcl
Article #314

Re: dziwne zachowanie undo / entry

#314
From: Artur
Date: Wed, 18 Jan 2006 16:10
52 lines
3404 bytes
Tu prawdobodobnie chodzi o "separator"
Z Dokumentacji widget text

THE UNDO MECHANISM
The text widget has an unlimited undo and redo mechanism (when the
-undo widget option is true) which records every insert and delete
action on a stack.
Boundaries (called "separators") are inserted between edit actions. The
purpose of these separators is to group inserts, deletes and replaces
into one compound edit action. When undoing a change everything between
two separators will be undone. The undone changes are then moved to the
redo stack, so that an undone edit can be redone again. The redo stack
is cleared whenever new edit actions are recorded on the undo stack.
The undo and redo stacks can be cleared to keep their depth under
control.

Separators are inserted automatically when the -autoseparators widget
option is true. You can insert separators programmatically as well. If
a separator is already present at the top of the undo stack no other
will be inserted. That means that two separators on the undo stack are
always separated by at least one insert or delete action.

The undo mechanism is also linked to the modified flag. This means that
undoing or redoing changes can take a modified text widget back to the
unmodified state or vice versa. The modified flag will be set
automatically to the appropriate state. This automatic coupling does
not work when the modified flag has been set by the user, until the
flag has been reset again.

See below for the edit widget command that controls the undo mechanism.

Zobacz takze
$window undo seperator
i opcja
-autoseparators


> Witajcie,
>
> Mam problem z prostym skryptem Tcl/Tk. Zaimplementowałem w nim
> mechanizm obsługujący polecenia Edit->Copy, Edit->Paste, Edit->Undo.
>
> Po wykonaniu poleceń Edit->Copy, Edit->Paste, Edit->Undo w polu entry
> pojawia się nie tylko poprzednia zawartość, ale i dane położone
> wcześniej do schowka.
>
> Czy spotkaliście się z takim problemem?  Nie jest to wina błędnego
> kopiowana danych lub ściągania danych ze schowka przez mój skrypt.
> 
> System operacyjny: Windows XP Home PL
> 
> Jacek
Technical Details
Message-ID: <1137600639.582244.118600@z14g2000cwz.googlegroups.com>
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!news.glorb.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail
References: <1137591670.663556.267880@g44g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!news.glorb.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail
From: "Artur" <mail@xdobry.de>
Newsgroups: pl.comp.lang.tcl
Subject: Re: dziwne zachowanie undo / entry
Date: 18 Jan 2006 08:10:39 -0800
Organization: http://groups.google.com
Lines: 53
Message-ID: <1137600639.582244.118600@z14g2000cwz.googlegroups.com>
References: <1137591670.663556.267880@g44g2000cwa.googlegroups.com>
NNTP-Posting-Host: 62.225.37.69
Mime-Version: 1.0
X-Trace: posting.google.com 1137600644 3043 127.0.0.1 (18 Jan 2006 16:10:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 18 Jan 2006 16:10:44 +0000 (UTC)
In-Reply-To: <1137591670.663556.267880@g44g2000cwa.googlegroups.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051111 Firefox/1.5,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 G8SLV (NetCache NetApp/5.6.2R1)
Complaints-To: groups-abuse@google.com
Injection-Info: z14g2000cwz.googlegroups.com; posting-host=62.225.37.69; posting-account=LCgZWAwAAABJR_8tjAef_hUAajXeKdEF
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit