gettingstarted
[Top] [All Lists]

Re: Method Name in a Variable

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Method Name in a Variable
From: Chuck Pelto <cbpelto at pcisys dot net>
Date: Sat, 26 Feb 2005 11:11:27 -0700
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <ce dot 632865ba dot 2f521059 at aol dot com>
The approach I was contemplating would have been much easier, I think.

Regards,

Chuck

On Feb 26, 2005, at 10:48 AM, GAmoore at aol dot com wrote:

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>


_______________________________________________
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>