Tk Source Code

View Ticket
Login
Ticket UUID: 3166688
Title: Cocoa: using pack/forget to switch pages doesnt refresh
Type: Bug Version: current: 8.6.0
Submitter: zoro2 Created on: 2011-01-27 18:56:19
Subsystem: 66. Aqua Window Operations Assigned To: kevin_walzer
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2013-08-25 02:51:38
Resolution: Wont Fix Closed By: kevin_walzer
    Closed on: 2013-08-25 02:51:38
Description:
Using Cocoa on OSX and grid or pack and grid/pack forget to switch between pages (similar to notebook widget) causes switching between pages not to refresh correctly.

Refresh happens partially and rest occurs after some time.

Noticed on Wish 8.5.7 Cocoa from OSX 10.6.2, ActiveTcl 8.6 beta 3 (beta 4 is compiled against Carbon) and Tcl/Tk Head.
User Comments: arobert3434 added on 2012-01-27 08:56:52:
I've observed a related behavior -- if I delete objects from a canvas while it is offscreen, then send it back on (deiconify), the old objects are still shown for a very noticeable half-second or so.  This does not happen on the Carbon version nor on Windows or Linux.  My suspicion is that some optimization code somewhere in Tk-Cocoa is incorrectly skipping over a draw request.

zoro2 added on 2011-02-23 15:38:16:

File Added - 402460: gui-frames-noupdate.tcl

zoro2 added on 2011-02-23 15:37:50:
The problem is that it gets worse with the depth of layout.
Please try the attached file (gui-frames-noupdate.tcl) - after switching to Page 2 and not moving the mouse at all, it takes a few minutes to refresh. When moving the mouse, it gets much faster.
This works in around 1-2 seconds on Carbon.

The issue is that GUIs with a lot of hierarchy are much slower in Cocoa especially when using approach to hide/show frames to mimic page/wizard behavior.

I have also noticed that putting update ; update idletasks does refresh a lot of cases better (but fails with larger hierarchies as well - "loopign" updates using after idle helps in some cases), so it might be something related to Tcl event queueing.

wordtech added on 2011-02-07 22:00:49:
I don't actually see a bug here, just a slight performance difference. It's possible that the slight difference is attributable to the message-dispatching mechanism of Cocoa; if so, there is nothing to do here. In any event, both pages do display and refresh correctly, just not as fast as they would under Carbon.

zoro2 added on 2011-01-28 01:56:20:

File Added - 399987: snippet.tcl

Attachments: