Status item using custom view not responding to clicks (Follow up)

  • I did not receive any replies to my original message which can be found
    here:
    http://www.cocoabuilder.com/archive/message/cocoa/2007/12/27/195494
    But, I kept working through the problem and found that the flicker only
    occurs on the portion of the frame that is added if the frame needs to
    be made larger. Although the added width may vary for me, there is a
    maximum width. So I tried just setting my frame to that maximum width
    when its initially created and not call my resizeFrame method. I see no
    flicker, but since the maximum width is an exceptional case, I'm left
    with a lot of empty space than in the more typical cases. Not a good
    idea, since a status item should use as little space as necessary.
    So again, does anyone have any idea how I can fix this?
    TIA
  • On Dec 28, 2007, at 8:53 AM, Lorenzo Thurman wrote:

    > I did not receive any replies to my original message which can be
    > found here:
    > http://www.cocoabuilder.com/archive/message/cocoa/2007/12/27/195494
    > But, I kept working through the problem and found that the flicker
    > only occurs on the portion of the frame that is added if the frame
    > needs to be made larger. Although the added width may vary for me,
    > there is a maximum width. So I tried just setting my frame to that
    > maximum width when its initially created and not call my
    > resizeFrame method. I see no flicker, but since the maximum width
    > is an exceptional case, I'm left with a lot of empty space than in
    > the more typical cases. Not a good idea, since a status item should
    > use as little space as necessary.
    > So again, does anyone have any idea how I can fix this?

    The flicker is a known bug. You can work around it by disabling
    screen updates via NSDisableScreenUpdates(), resizing your view,
    sending it the display message, and then reenabling screen updates.

    - Peter
  • On Jan 2, 2008, at 3:36 p, Peter Ammon wrote:

    >
    > On Dec 28, 2007, at 8:53 AM, Lorenzo Thurman wrote:
    >
    >> I did not receive any replies to my original message which can be
    >> found here:
    >> http://www.cocoabuilder.com/archive/message/cocoa/2007/12/27/195494
    >> But, I kept working through the problem and found that the flicker
    >> only occurs on the portion of the frame that is added if the frame
    >> needs to be made larger. Although the added width may vary for me,
    >> there is a maximum width. So I tried just setting my frame to that
    >> maximum width when its initially created and not call my
    >> resizeFrame method. I see no flicker, but since the maximum width
    >> is an exceptional case, I'm left with a lot of empty space than in
    >> the more typical cases. Not a good idea, since a status item should
    >> use as little space as necessary.
    >> So again, does anyone have any idea how I can fix this?
    >
    > The flicker is a known bug. You can work around it by disabling
    > screen updates via NSDisableScreenUpdates(), resizing your view,
    > sending it the display message, and then reenabling screen updates.
    >
    > - Peter
    >
    That did the trick! Thanks for the reply.
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today