Status item using custom view not responding to clicks
Status item using custom view not responding to clicks
- Subject: Status item using custom view not responding to clicks
- From: Lorenzo Thurman <email@hidden>
- Date: Wed, 26 Dec 2007 19:21:07 -0600
(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
systemStatusBar]thickness])];
}
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
string.
TIA
"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
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden