Page 1 of 1

Signal from a Prim_Tree.iTreeDesign RP

Posted: Fri Nov 15, 2024 5:57 am
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

Re: Signal from a Prim_Tree.iTreeDesign RP

Posted: Mon Jan 13, 2025 10:53 am
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