Kbase P93619: Custom popup menu on smartDataBrowser is ignored in OpenEdge 10
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/07/2009 |
|
Status: Verified
SYMPTOM(s):
ADM2
SmartDataBrowser has custom popup menu
Popup menu is defined on browse widget of SmartDataBrowser via AppBuilder property sheet
Standard popup menu appears instead of custom one on right mouse click of browse
FACT(s) (Environment):
OpenEdge 10.0A
OpenEdge 10.0B
CAUSE:
Bug# 20040908-008
CAUSE:
In OpenEdge 10 a standard popup menu was introduced for SmartDataBrowsers to provide easier control over column positions and sizes and sorting column. However, this feature does not properly take into account any popup that may already exist on the browse.
FIX:
Upgrade to OpenEdge 10.0B03 or later
Upgrade to OpenEdge 10.1A or later
Workaround:
Implement the fix in the ADM2 code manually. The fix will check if a popup menu already exists, and in that case adding the new menu items to that instead of replacing it with a standard menu.
This can be done by making the following changes to browser.p:
1. In the createPopupMenu procedure,
change:CREATE MENU hPopupMenu
ASSIGN
POPUP-ONLY = TRUE
TITLE = 'Browser Menu'.
to:IF VALID-HANDLE(hBrowse:POPUP-MENU) THEN DO:
hPopupMenu = hBrowse:POPUP-MENU.
CREATE MENU-ITEM hRuleItem
ASSIGN
SUBTYPE = 'RULE':U
PARENT = hPopupMenu.
END.
ELSE
CREATE MENU hPopupMenu
ASSIGN
POPUP-ONLY = TRUE
TITLE = 'Browser Menu'.
to ensure an existing popup is reused, or a new one is created as required.
2. In the createPopupMenu and createPopupItem procedures, the CREATE MENU-ITEM and CREATE SUB-MENU statements should have the PARENT attribute as the very last in the ASSIGN (in order to prevent errors).
3. In the destroyObject procedure,
change:
/* Destroy the browser's Popup Menu */
IF VALID-HANDLE(hPopupMenu) THEN
DELETE OBJECT hPopupMenu.
to:
/* Destroy the browser's Popup Menu */
IF VALID-HANDLE(hPopupMenu) AND hPopupMenu:DYNAMIC = YES THEN
DELETE OBJECT hPopupMenu.
To ensure there are no attempts to delete a static popup - which can happen if an existing static popup is appended to, due to the modifications in step 1.