Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - Trouble capturing events in a popup menu
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedTrouble capturing events in a popup menu

 Post Reply Post Reply
Author
Message
lucasn View Drop Down
Newbie
Newbie


Joined: September 02 2016
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote lucasn Quote  Post ReplyReply Direct Link To This Post Topic: Trouble capturing events in a popup menu
    Posted: October 07 2016 at 12:54pm
I have a general-purpose popup menu for grid controls that is part of the form template.
It has 3 items Add, Edit, and Delete, and these are all Enabled and Visible in the form template.
When it works, it does exactly what I want it to do.

The problem is that is doesn't always work: it appears to get "stuck" and any events I try to apply to it get queued up as though they belong to the grid control underneath.

During debugging I notice that the call to ATGUISHOW for the popup happens, but the subsequent PRINT statement isn't executed until after I click elsewhere (or when the popup menu responds to the event).

Can anybody help?  Has anyone run into anything like this?

This is the routine I'm using to invoke the popup menu - several of my grid GECONTEXT event handlers simply do a GOTO here:
<------------------------------>
GRID.CONTEXT:
  ROW = GUIARGS<1,2>
  CALL ATGUISETPROP(GUIAPP,GUIFRM,GUICTL,GPROW,0,0,ROW,GUIERRORS,GUISTATE)
  IF ROW NE 0 THEN
    ACTIVE.GRID = GUICTL
    CTL = "menuGrids"
    IF ROW EQ -1 THEN
      SHOW.ADD = "ATGUISHOW"
      SHOW.CHG = "ATGUIHIDE"
      SHOW.DEL = "ATGUIHIDE"
    END ELSE
      SHOW.ADD = "ATGUIHIDE"
      SHOW.CHG = "ATGUISHOW"
      SHOW.DEL = "ATGUISHOW"
    END
    CALL @SHOW.ADD(GUIAPP,GUIFRM,CTL,"ADD",GUIERRORS,GUISTATE)
    CALL @SHOW.CHG(GUIAPP,GUIFRM,CTL,"EDIT",GUIERRORS,GUISTATE)
    CALL @SHOW.DEL(GUIAPP,GUIFRM,CTL,"DELETE",GUIERRORS,GUISTATE)
    CALL ATGUISHOW(GUIAPP,GUIFRM,CTL,'',GUIERRORS,GUISTATE)
    PRINT ACTIVE.GRID
  END
  RETURN


Back to Top
lucasn View Drop Down
Newbie
Newbie


Joined: September 02 2016
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote lucasn Quote  Post ReplyReply Direct Link To This Post Posted: October 13 2016 at 4:35pm
UPDATE:
I also have a continuous timer at 1-second intervals enabled on this form.
I don't know why, but if I disable this timer, the issue with popup menus goes away.
When I re-enable the timer, the issue returns.

Thanks,
Lucas

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.