[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Trigger dwcontrol event from a popup menu

Asked by Lordain in PowerBuilder Programming Language

Tags: PowerBuilder

Greetings,

Background Info:
PB Version: 10.5
Platform: Windows Vista

I would like to be able to trigger an event inside a datawindow control from a popup menu.  The menu is separated from the dw control therefore the menu doesn't know the name of the dw control ahead of time but I can guarantee it will be a dw control and the event will be there at runtime.

I read something about the dynamic keyword which might be what I am looking for but not sure how to code the menu.

Currently my solution is this:
Menu object
menu item clicked event
parentwindow.triggerevent("we_create_pdf")

Effectively this is triggering a custom window event which in turns triggers:
dw.triggerevent("ue_create_pdf")

This works but was hoping I could directly trigger the dw event and not go through the parentwindow.

My challenge is to code the menu clicked event to trigger an event inside the dw control directly even though I won't know the name of the dw control at compile time but I will know the name of the event ahead of time.  Therefore I need to be able to tell the menu it will be there at run time but have it compile.
1:
2:
3:
4:
5:
dwcontrol event: rbuttondown
mymenu.popmenu(PointerX(), PointerY())
 
menu clicked event:
parentwindow.triggerevent("we_create_pdf")
[+][-]09/23/09 08:30 PM, ID: 25409902Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/24/09 06:19 AM, ID: 25413003Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/02/09 08:54 AM, ID: 25479099Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/02/09 09:05 AM, ID: 25479224Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625