This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87256

Summary: getMenuPresenters called after menu is closed
Product: platform Reporter: Jesse Glick <jglick>
Component: Window SystemAssignee: Milos Kleint <mkleint>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: dsimonek
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 50683    

Description Jesse Glick 2006-10-17 05:19:49 UTC
Dev build, JDK 5. I have been seeing some weird behavior in a custom submenu
using DynamicMenuContent. It dynamically computes some information whenever
gMP() is called and adjusts its display accordingly. But the information is
stale when the menu is first posted; it is correct after the menu is posted for
a second time. Inserting debug printlns, I can see that gMP is not called when
the menu is posted; it is called after the menu is closed. Obviously that is too
late to update the menu's appearance. Am I missing something?
Comment 1 David Simonek 2006-10-17 15:22:30 UTC
Passing to Milos...
Comment 2 Milos Kleint 2006-10-20 09:02:53 UTC
jesse, not sure I understand the issue here.. I put a thread dump in the
GroupMenu class and the menu creation/update method seems to get called whenever
the File menu is clicked. The content of the submenu seems fine to me as well..

Mandriva Linux+KDE, jdk1.5_06
Macosx 10.4 + jdk 1.5
Comment 3 Jesse Glick 2006-10-20 20:53:43 UTC
Well today it works fine for me... AFAIK using the exact same NB & JDK. Who knows.