Tk Source Code

View Ticket
Login
Ticket UUID: fd3a4dc11127c695b10d2a30d60461531dfbd586
Title: <<Modified>> event is not always sent to peers
Type: Bug Version: trunk
Submitter: fvogel Created on: 2016-04-05 15:52:57
Subsystem: 18. [text] Assigned To: fvogel
Priority: 6 Severity: Minor
Status: Closed Last Modified: 2016-04-29 09:47:12
Resolution: Fixed Closed By: fvogel
    Closed on: 2016-04-29 09:47:12
Description:
The <<Modified>> event is not propagated to peer text widgets when this event is generated by running [.text edit modified ...].

It is however correctly sent to all peers when modifying the text widget.


Sample session:

    package require Tk
    
    text .t
    .t peer create .tt
    
    pack .t .tt
    
    bind .t  <<Modified>> {puts "%W received <<Modified>>"}
    bind .tt <<Modified>> {puts "%W received <<Modified>>"}
    
    .t  edit modified ; # 0 - correct!
    .tt edit modified ; # also 0 (isDirty flag is shared)
    
    .t insert end "This triggers <<Modified>> in both .t and .tt - Correct."
    
    .t  edit modified ; # 1 - correct!
    
    .t edit modified 0  ; # should trigger <<Modified>> IN ALL PEERS, not just .t
    
    .t  edit modified ; # 0 - correct!
User Comments: fvogel added on 2016-04-29 09:47:12:
Fix merged in core-8-6-branch and trunk.

fvogel added on 2016-04-05 16:09:56:

Fix proposed: [b34f15b4], with new test case.