Hello again, I try to make some generic actions to handle the application logic for dialog management. In order to know the last dialog shown, I added a postShown event, and in the action of this event I am using the api_application.getClientEvent() api call. I expected the calling object to be the dialog but using the t_event.objectName_tx I am getting the grid where the popup-menu is attached. Not event the popup menu-item, nor the popup-menu that are in between!

Using the api_application.getFocusedDialog returns the mainFrame of the application.

A working shortcut is to set a session variable in the action that displays the dialog to the dialog name, and use this session variable when needed. This works fine if the dialogs are modal.Is there another way to get t?

asked 06 Sep '12, 07:59

Vlisidis%20Akis's gravatar image

Vlisidis Akis
163119
accept rate: 5%


Hi,

You need to use API_APPLICATION.getEvent API to get current event details. The API_APPLICATION.getClientEvent API that you used returns the event which is triggered by user. For instance; you open the dialog by using menuitem in popup-menu. In postShow event of dialog; - API_APPLICATION.getClientEvent returns MenuItemClick event - API_APPLICATION.getEvent returns dialog PostShow event

By the way, API_APPLICATION.getFocusedDialog API should return current active window on screen. In your case, the dialog is not active yet in postShow event. So you get the mainFrame as focused window.

Regards

link

answered 06 Sep '12, 08:42

Samet%20Basaran's gravatar image

Samet Basaran
1372
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14

Asked: 06 Sep '12, 07:59

Seen: 1,199 times

Last updated: 06 Sep '12, 08:42


© Copyright Gerger 2017