Signal from a Prim_Tree.iTreeDesign RP

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
kno_dk
Posts: 219
Joined: Tue Feb 23, 2016 12:00 am

Signal from a Prim_Tree.iTreeDesign RP

Post by kno_dk »

HI.

I have a Dialog where i setup a list using a PRIM_tree RP.
how do I signal from the RP to the dialog to do something like update the list?

/klaus
Tim McEntee
Posts: 57
Joined: Thu May 26, 2016 8:46 am

Re: Signal from a Prim_Tree.iTreeDesign RP

Post by Tim McEntee »

Hi Klaus

In your tree design RP define your event as normal - and fire it when needed.

DEFINE_EVT Name(DropDownSelected)
DEFINE_MAP For(*INPUT) Class(#PRIM_BOLN) Name(#selected)

SIGNAL Event(DropDownSelected) Selected(#BPEIsDropDownSwitch.Checked)

In your dialog it gets a bit tricky

define a collection of designs
DEFINE_COM Class(#PRIM_LCOL<#BPEHeaderFieldListDesign>) Name(#FieldListEntries)

When you add an entry to your list
ADD_ENTRY To_List(#FieldList)

#FieldListEntries.Insert( (#FieldList.CurrentItem.Design *As #BPEHeaderFieldListDesign) )

Then listen for the event - #Sender will be the design object that initiated the event
EVTROUTINE Handling(#FieldListEntries<>.DropDownSelected) Selected(#selected) Com_Sender(#Sender)

IF (#selected)
ELSE

ENDIF
ENDROUTINE

Tim
Post Reply