Status item using custom view not responding to clicks

  • (I posted this just before XMas, but received no replies. I expect
    many may not have seen it. I'm trying again, just in case there may be
    an answer out there)

    I have a status item which uses a custom view. Initially, the custom
    view only contains an image. I animate the view using NSAnimation (not
    CoreAnimation), fading out and then back in. The image in the custom
    view changes between animations and also adds an attributed string .
    Before fading back in, I resize the frame to accommodate the width of
    the string. Its here that I see a 'flicker' before the fade in begins.
    This 'fade out/change image/ add string/resize/fade in' cycle happens
    regularly during the run of the program, but I only see the flicker on
    the first cycle. This occurs under both 10.4 and 10.5. Anyone know how
    I can fix this? Here is the code I use to resize the frame:

    - (void) resizeFrame{
    [self setFrame:NSMakeRect(0.0, 0.0, [[self image] size].width +
    [[self attrString] size].width + 2, [[NSStatusBar
    If I comment out the resizeFrame, I don't get the flicker, but of
    course, the frame is not wide enough to accommodate both the image and


    "By the time a man realizes that maybe his father was right, he
    usually has a son who thinks he's wrong."

    --Charles Wadsworth

    Lorenzo Thurman
previous month december 2007 next month
          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
Go to today