#2875 Cocoa: using pack/forget to switch pages doesnt refresh

obsolete: 8.6b1.1

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.


  • Wojciech Kocjan

    Wojciech Kocjan - 2011-01-27


  • Kevin Walzer

    Kevin Walzer - 2011-02-07
    • assigned_to: das --> wordtech
    • status: open --> open-wont-fix
  • Kevin Walzer

    Kevin Walzer - 2011-02-07

    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.

  • Wojciech Kocjan

    Wojciech Kocjan - 2011-02-23

    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.

  • Wojciech Kocjan

    Wojciech Kocjan - 2011-02-23

    Snippet that shows even worse behavior on OSX

  • Adrian Robert

    Adrian Robert - 2012-01-27

    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.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks