Call a function whose name will not be known before run time

how can i make a call to a function whose name will not be known to me before run time.

how can i make a call to a function whose name will
not be known to me before run time.That smells like a design-flaw! Care to explain what it is you're trying to do exactly? Perhaps I, or someone else, can suggest another (maybe even better/easier) approach.

Similar Messages

  • How can i call a function whose name will be  known only at run time

    how can i make a call to a function whose name will be known only at run time

    Instead, have a function - we should say method -
    with a known name, taking a string as argument.Or, specified classes with known names and a no-arg
    c'tor that implement a mutual interface, so you can
    grab an instance using forName/newInstance, cast the
    reference and invoke the interface's doMagic() method.@OP: Best you describe your actual problem, then we could help you with a better solution maybe.
    -Puce

  • How can i invole a function whose name I don't know until excecution time

    Hello,
    I would like to invoke a function in my jsp file but I don't know the name until it gets executed (the user enters part of the function name).
    The name of the method is made of "proc_" + something specified during the excecution.
    Now, I need to call this function (defined in a JavaBean).... but I don't have a clue of how doing it.
    All the functions proc_..... are defined the same way:
    public String proc_...... (String params)
    Could you tell me how I could do it?

    THank you to everybody for your help. I had a look at the tutorial but I must admit it was not that clear to me... I am afraid I did not seem to find something close to what I needed.... I need more help from the experts.
    Let me give you more details.
    I have some stored procedures called update_<table_name> and create_<table_name>. All those procedures will return a string and will have a string as parameter.
    I have a java class called for instance myProc.java. Inside this class, I would like to have something like:
    public String[] update(String tableName, String params)
    ..... call to the stored procedure update_<tableName> with the parameters.
    .... get the String as return.
    public String[] create(String tableName, String params)
    ..... call to the stored procedure create_<tableName> with the parameters.
    .... get the String as return.
    Now, I have a jsp file that will call the class using something like:
    String[] res= conn.create(<table_name>, <params>);
    COuld you help me on this?
    THanks
    Elisabeth

  • How do I permanently set the zoom-function, so I will not have to zoom every time I open a new tab/page?

    I have recently installed Firefox on my one month old laptop which has a 17" screen. Every time I open Firefox I have to use the zoom-function (ctr +) four times to be able to read comfortably. Every time when I next open a website, or tab, or window I have to use the zoom-function again. This is kind of getting old, fast.
    Is there any way I can set the zoom to a higher/closer setting permanently, so I do not have to use the zoom-function about 50 times everytime I use the internet?
    If you could help me that would be lovely!
    Thanks,
    Kikki

    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Can I Execute a function whose name is stored in a string variable?

    Can I execute a function whose name is stored in a string variable?
    Like
    Depending on the condition I will stroed the name of the function in a string variable. Then using that string variable i want to execute the function.
    String str=��
    iVal an int can take ne value
    Switch(iVal)
    Case 1:
    str=�test1()�;
    Case 2:
    str=�test2()�;
    I want whatever function name is in str to be executed.
    ----------------------------------------------------------------------------------

    For just executing a method or two, reflection might be easier than beanshell (or it might not). For executing entire scripts, beanshell will be preferable over reflection.
    (I assume beanshell uses reflection under the hood, but I've never bothered to peek.)

  • Call a function, which name is in an Array of Strings...

    hey all
    i have a simple Temp class (made to check things) in a file called Temp.java with the following definition :
    public class Temp {
         int data1;
         int data2;
         public Temp (){
              data1=0;
              data2=0;
         (here i have get and set functions for both data1 and data 2, and i have the two following functions)
         public void printAdd(){
              System.out.println("Result : "+(data1+data2));
         public void printSubtract(){
              System.out.println("Result : "+(data1-data2));
    }i have another class called Server who has the following simple code :
    public class Server {
          public static void main( String args[] )
               String[] table={"printAdd","printSubtract"};
               Temp game=new Temp();
               game.setdata1(8);
               game.setdata2(4);
              //the following two calls work perfectly
               game.printAdd();
               game.printSubtract();
                   System.out.println(table[0]);
    //but the following does not...
               game.(table[0]);
    }as probably you have understood i am trying to call a function to the object game which name is in the String table... how can i actually made a call game.(THE_VALUE_OF_STRING_IN_AN_ARRAY) ...?

    i want to call the function printAdd() to the game object..
    but i want the program to find out the name of the function to call.. i want to execute the function whose name is at the array in position 0 -> table[0]
    so i want the program to resolve the table[0] to printAdd and the use it and call it on object game...

  • My contact names will not be displayed!

    Hi I live in Iran when my contacts call me Their Number with country code is displayed, But their names will not be displayed! in cheap phones,this problem does not exist! This problem is very weird! Check out this very big problem to fix before release 10.3 update Thanks Good Luck

    When I save nimber with country code contact name will be displayed,
    and if I store the number without the country code and I get a call it does not show the contact name!!
    This problem exists for all Iranians!

  • Contact names will not populate

    Since installing the latest iOS update on my iPhone 5, my contact names will not populate to Phone or Messages. Only the numbers are listed. All my contacts are still available in Contacts and Mail. I tried Reset All Settings as well as closing everything down in Task Manager. It hasn't helped. Since I've gathered this is a more common problem on Verizon, I should also note that I'm a Verizon customer. Anything else I can do to fix this? Thanks.

    When I save nimber with country code contact name will be displayed,
    and if I store the number without the country code and I get a call it does not show the contact name!!
    This problem exists for all Iranians!

  • MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not an object

    My Safari browser on my iPhone4s reads the following error when I visit my site www.premiercreativegroup.com:                   MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not an object (evaluating 'this.elem.get(0).currentStyle').
    Not sure where to start on fixing this. Any ideas?

    You might to start by going to the Muse forum
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use

  • My old itunes id was an email that no longer can be used, therefore, I can not change the password for that account.  Everything that I purchased under that id name will not play.  How can I fix this?

    My old itunes id was an email that no longer can be used, therefore, I can not change the password for that account.  Everything that I purchased under that id name will not play.  How can I fix this?

    I no longer have an email address that was also my Apple ID. Can I still use the email address as my Apple ID?
    Apple recommends you change your Apple ID to your current, working email address. This will not create another Apple ID, it will only change it to your working email address. See Changing the name you use for your Apple ID if you'd like more information.
    Note: @mac.com and @me.com Apple IDs can not be renamed.  If you no longer use the .mac or .me email address be sure to add your valid email address as an additional email address.
    From here  >  http://support.apple.com/kb/HT5622?viewlocale=en_US
    If necessary...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • When I get a phone call or text message it will not make the sound. Just vibrate. But the switch is on normal. When I change it to vibrate the volume thing will not show. Nor will my up volume up key work. Is there any way to fix it?

    When I get a phone call or text message it will not make the sound. Just vibrate. But the switch is on normal. When I change it to vibrate the volume thing will not show. Nor will my up volume up key work. Is there any way to fix it?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • MuseJSAssert: Error calling selector function:ReferenceError: Spry is not defined.

    I launched Muse today and it said there was an updated available. I installed it and then made a few small changes to my 5 page website. Then i exported the HTML and uploaded it to my server.
    But now when i try browsing the site in Chrome, I get the following error message:
    MuseJSAssert: Error calling selector function:ReferenceError: Spry is not defined.
    The only changes I made were adding some text to a few pages and adding metadata info to each page and when viewing the exported HTML locally (prior to uploading) it all behaves as it should...no error messages.
    Any ideas why its doing this? or more importantly, any suggestions on how to stop it from doing this? It wasn't doing this yesterday prior to me making these small changes.
    Here's the URL: www.gardensbytheseaursery.com
    Thanks in advance.
    Jake

    This error would occur if not all the files for the site we're uploaded.
    The 2.0 update includes numerous improvements in the generated HTML, CSS and JavaScript, so while you may have directly changed only certain pages, if you're using an external FTP client all the exported files and folders need to be uploaded. (The new built-in FTP support automatically only generates and uploads files that have changed since the previous upload.)

  • IPad calling for iCloud backup but will not unlock so i can connect to wifi ... help

    iPad calling for iCloud backup but will not unlock so i can connect to wifi ... help

    thank you for replying:)
    but i tried all of the tips in the link and it still didn't work, does anyone else have any ideas?
    and just to add another issue, i went under General>About>WiFi Address and there is one and i still cannot access the internet.
    Message was edited by: kailey65

  • Adobe Muse error: "MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not a function"

    Very frustrated here. I'm getting the following error on the home page on my Muse site. Looks like it could be the banner slider: "MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not a function (evaluating 'a.watch("height",function(){b.height($(this).outerHeight())})')"
    When I click OK the error message goes away. Not a problem for me, but I can't have potential new customers seeing this when I show
    I see this error on Safari 6.1.2. I don't see the error on IE.
    I'm using the latest Muse CC 2014.
    Here's the site: www.optimumfitness.com
    Please help anyone. I've been building Muse sites for a long time and have never seen this problem.
    Thanks,
    Greg

    Hi,
    take a look to this thread, see if you get something usefil
    MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not a function (evaluating '

  • HT4528 My IPhone will not turn on, I charged it last night and during a phone call it shut off and will not come back on.

    My IPhone will not turn on, I charged it last night and it had a complete charge and during a phone call it just died and will not come back on.

    Connect iPhone to Wall Charger for 10 minutes, it may turn ON itself. If still nothing, keep on charger and Reset, hold both home and power buttons for about 20 seconds until the iPhone begins to respond.

Maybe you are looking for

  • My i phone is not working

    my i phone 5s said it needed an up date so i pressed install and since then my screen just keeps going bright blue then the white apple screen then just goes back to a black screen what is wrong please?

  • Cant print on Hp Pavillion DV 7- 3165 dx Entertainment Notebook PC

    Missing xml viewer file on my computer....need assistance to recover file.

  • What is this Project Builder For

    Hello Readers. i want to know why do we use project builder in short also is it used for creating a setup file for the project. Please mention some proper names for project builder books for oracle 8 available in the market. Thank you

  • Airplay unreliable

    Selecting my Airport Express as the output for Mac audio frequently results in error messages-"Can't connect to Airport-Express"-and lags behind streaming video by a few seconds when it does work. Also, selecting Airplay for just iTunes BLASTS music.

  • FDM 11.1.2.3  intersection validation error

    Hello All, we have migrated from EPM 11.1.1.3 to EPM 11.1.2.3. in EPM 11.1.2.3 FDM,  when we import any flat file delimited by comma and then tried to validate it we are getting Intersection validation error same flat file can be validated successful