gettingstarted
[Top] [All Lists]

Re: Method Name in a Variable

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: Method Name in a Variable
From: GAmoore at aol dot com
Date: Sat, 26 Feb 2005 12:48:09 EST
Delivered-to: gettingstarted at lists dot realsoftware dot com
> Is possible to have a method name stored in a variable and then call
> that variable and have the method executed?
> 

I think I have asked this question myself and the answer was no.
However, its easy enough to work around it. Instead of saving the 
name of the method give it an index number.

    errorCode = 3
    process_error( param1, param2, errorCode )

-------------------
    process_error
       case errorCode of 
        1 : handle_FileNotFoundError
        2 : handle_IncorrectDataError
        3 :   handle_wrongClickError
        ....
//note syntax is not correct
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>