Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Menu Bars




Uli Kusterer wrote:
On 10.08.2007, at 10:00, Andre wrote:
2) Alternatively, I started modifying menu bar items in-place, preserving the first one (which I am unable to create from scratch). This however causes hefty flicker and sometimes the menu bar even doesn't show any item at all (blank!). The items however, are still there and working. Hu? Looks like the drawing of the menu sometimes happens while modification is still in process. Pushing the setMainMenu: call to the main thread didn't help. Also tried itemChanged: and update messages, but with limited success. Is there a recommended solution to avoid this "hidden menu" artefact?

This should work, but not from a non-main thread. The kind of artefacts you mention are exactly the glitches one gets when doing GUI stuff from a secondary thread. Are you sure you've moved all of your menu code into the main thread? What about other GUI code?



Ah, thanks Uli.

Hm, I only pushed the #setMainMenu: message to the main thread. The modification of the menu "in-place" however happens on another thread. I see that this may disrupt a redisplay issued by Aqua.

Anyway, the problem seems so be somewhere else: I just checked an alternative solution that assembles a new menu from scratch ("offline") and issues a #setMainMenu: only once. Still the same artefact every now and then. Although less frequently.

I'd rather prefer the "offline" construction, because it doesn't cause any flicker, but still have no clue how to make the first item *bold* ... argh. BTW making a copy of the original menu item loaded from the NIB also removes the bold item plus its name (replaced by "Apple"). This is really weird ...

Andre

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Dynamic Menu Bars (From: Andre Schnoor <email@hidden>)
 >Re: Dynamic Menu Bars (From: Uli Kusterer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.