Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

executing functions stored in a array ?

Status
Not open for further replies.

theogary

Programmer
Mar 3, 2003
99
US
is is possible to put user object function in a array
and the loop through the array and call each function.
similar to this

ls_functions[1] = 'uf_prog_enroll_pending'
ls_functions[2] = 'uf_prog_wait'
ls_functions[3] = 'uf_prog_reserv'

for i = 1 to upperbound(ls_functions[1])
call ls_functions
next
 
Hi,
I don't know/think if it is possible for functions,
but it is possible with events.

See TriggerEvent or PostEvent functions

ls_events[1] = 'ue_prog_enroll_pending'
ls_events[2] = 'ue_prog_wait'
ls_events[3] = 'ue_prog_reserv'

for i = 1 to upperbound(ls_events)
This.TriggerEvent( ls_events)
next

Hope it will help

Thierry
 
We used to have pointers in C and Code-Blocks in CA-Clipper to do such processing but it is not possible to do it in PowerBuilder. A rough equivalent would be to use the DYNAMIC or POST keywords.

---
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top