• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Status item using custom view not responding to clicks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Help with Cocoa document app & controllers
  • Next by Date: Re: Help with Cocoa document app & controllers
  • Previous by thread: Re:Help with Cocoa document app & controllers
  • Next by thread: Custom view not responding to mouse clicks in certain areas
  • Index(es):
    • Date
    • Thread