×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Calling functions by name (dynamically)

Calling functions by name (dynamically)

Calling functions by name (dynamically)

(OP)
I was thinking of creating dynamic menus.

In my scenario, there a table where each record is a menu entry. It has a parent (to create a hierarchy) and an action.
The action may be:
- display a sub-menu (implemented using the table itself)
- run an external command (RUN a string)
- run an internal function (i.e. open a form to updete a customer)

The last one is a problem. Even assuming that all the functions that can be called by a menu item use the same calling convention (i.e. no parameters). I do not know how to call them. The menu table will probably contain the function's name, but I can't use

CODE

CALL <variablename>
I thought of writing a "dispatcher" function, but this would be long an would require update with each new form/report I create.
I was hoping there was a way I could dynamically call the function using its name. I am open to any ideas of how to do this more efficiently than by writing the "dispatcher"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close