Function name question

Hi
I have a text field called "Happy"
Whenever something gets typed in it, a function gets called.
This function contains errorHappy(evt); (I know it's a redundant function, but please bear with me).
This works fine.
Just wondering if instead of...
errorHappy(evt);
... it's possible to call with something like...
["error"+evt.target.name](evt);
I can't get it to work, even though trace("error"+evt.target.name); displays errorHappy.
Any ideas?
Thanks for your input.
Shaun

Assuming u use AS3:
import flash.events.Event;
Happy.addEventListener(Event.CHANGE, onChange);
function onChange(event:Event):void {
this['error' + event.target.name]('hi');
function errorHappy(msg:String):void {
trace(msg);
Tell me if u need it for AS2 or AS1.

Similar Messages

  • I'm getting a "The procedure entrypoint ssSr192x__​ssSr192drv​ssSrReset could no be located in the dynamic link library ssSR192x.d​ll" because the ActiveX instrument driver DLL doesn't have the function names in the export table.

    Is there a way for my CVI project to reference the functions in the ActiveX without including the instrument .fp in the project?
    Thanks much.
    I'm confused on how CVI uses ActiveX components and hope someone can help.
    I'm using an ActiveX driver from an instrument manufacturer and I use the .TLB to generate a .fp, .c, and .h file. If I register the .dll and load the .fp in my project, all is well. Unfortunately in my application the functions to control this instrument are in another DLL whose .lib I include in my CVI projec
    t. Running the CVI project this way gives me "The procedure entrypoint ssSr192x__ssSr192drvssSrReset could no be located in the dynamic link library ssSR192x.dll" because the instrument function names aren't in the export table in the instrument DLL. Non-ActiveX DLLs have the export tables so everything works for them.
    Program structure with non-ActiveX DLLs:
    CVI project (.exe with common.lib in project list)
    |
    V
    Common DLL (MeasDMM() with hp1234.lib in project list)
    |
    V
    Instrument DLL (hp1234_measure())
    Since I get a .c and .h file from the .TLB, I've tried recompiling the DLL (.dll and .lib produced) and the functions seem to work, but I get "Class not registered" errors unless I play games with the registry so I'm obviously violating numerous Microsoft rules!
    Is there a way for my CVI project to reference the functions in the ActiveX without including the instrument .fp in the project? Thanks much.
    Jeff Fish
    Advisory Test Engineer
    StorageTek

    Hello Jeff,
    Where were your getting the .lib file for the ActiveX DLL? Did you use the "hp1234"
    ActiveX driver generated by the "Create ActiveX Automation Controller" CVI Tool to build a static library? If you open an include file and choose Options >> Generate DLL..., it will generate source code or a static import library to load the specified DLL and load functions specified in the include file (this only works if the functions are exported from a DLL). However, in the case of our ActiveX Automation Controllers, ActiveX calls are used to access a DLL. This means that you do not need an import library. You should be able to open the "hp1234" source file and click Options >> Create Object File. Simply #include "hp1234.h" and add "hp1234.obj" to your Common DLL project;
    the .fp file is not necessary. If this does not answer your questions or if you experience further difficulty, please post further details on what you are doing and the errors that are being encountered ("play games with the registry" and "recompiling 'the' DLL" are a bit vague in this case).
    Jeremiah
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • How to get the function name/ID  of the current page

    HI,
    I searched the forum and google, but it is not clear on how to get the function name of the current page.
    I have 4 functions in my self service A ,B,C,D (seeded page links ) they all have to go to a page called hhhPG. Based on which function user is clicks I have to show the data in hhhPG.
    so my question is how to get the function name ? I mean I need to know if user click on link A , B, C or D link and came to this page.
    I found below in one forum and also there is getfunctionID in pageContext , but I do not know what to pass to getfunctionid("???") to get value.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    Or is there a better way of know where user is coming from ? like geturl....
    Please help, I need this ASAP.
    Thank you.

    Use below to find out how the user came into the page
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    boolean isFunc2 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME2"));
    boolean isFunc3 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME3"));
    boolean isFunc4 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME4"));
    So one of them will be true based on the function the user came in.
    Write your logic based on these flags.
    Regards,
    Peddi.

  • Pstack showing "??????" in place of function name

    I am using solaris 5.10 kernel patch Generic_127127-11
    When I do pstack on a core file it shows following output
    ----------------- lwp# 11 --------------------------------
    001b8d88 ???????? (14c0fb90, 14c50c70, 8, fe3fb9b4, 0, 0)
    00199964 ???????? (0, 148db224, 148db224, 0, c, 0)
    00196b30 ???????? (ffffffff, 449d3, 7a2dc2, 36, fe3fba9c, 0)
    00176eec ???????? (12a8b4a0, 1, 176e10, 0, 0, 0)
    001d7210 ???????? (0, 0, 1300678, 0, 0, 0)
    001da740 ???????? (12797c0, 899028, 897800, ffffc2f7, f423f, fff0bdc0)
    001a7ec0 ???????? (ffffffff, 0, 0, 0, 0, 0)
    001a7e20 ???????? (0, 0, 0, 0, 0, 0)
    000e3c68 ???????? (117d5c0, fe3fbdb8, 0, 117bea0, fe3fbd8c, 13880)
    000caab4 ???????? (117bd50, ca3a4, 471e2c, fe3fbd98, feef1818, 0)
    00471ed8 ???????? (117bd50, 471ea0, 6203b0, ff000000, fec64a00, 0)
    00485674 ???????? (117b0b0, 485624, 0, 89cc00, 0, fec64a00)
    004855e4 ???????? (117b0b0, 906d48, 0, 0, fec64a00, 1)
    Is there any specific reason for "??????" in place of function names ?
    Is is possible that core file is not written completely ?
    If yes, what can be done to make core file be written completely ?

    You are asking on a wrong forum: if you really hit pstack problem, there's no one here to help you, as pstack is Solaris utility. It does not belong to Sun Studio. It's better to post to one of OpenSolaris forums, for example, this one: http://www.opensolaris.org/jive/forum.jspa?forumID=9
    However, in this case I guess I can answer your question: ??? instead of function names appear when pstack can't map address of particular PC (0x001b8d88 for example) to a symbol.
    Symbols are located in two separate sections of executable/shared library: .symtab and .dynsym. The former is used to (this is very rough description) find names when linking object (*.o) files and is not needed at run time. .dynsym is used at run time to find symbols referenced by name, which are usually in the other library (like "printf" symbol, for example).
    pstack can use both .symtab and .dynsym, provided that they can be found. .symtab is not present in memory image of the process from which core file is generated, so pstack needs original executable file to be available to read .symtab (you can ask the system to pull symtab from files at the time core is generated using coreadm -I defaultsymtab+ command; see coreadm(1M)). Also, many build scripts remove symbol table from final executable (by using strip(1), for example).
    In terms of C++ (again, rough description), all functions end up in .symtab and only non-local functions are present both in .symtab and .dynsym. So there are fewer chances for a static function to have a name in a.out than for an extern function.
    To summarize, pstack can print ??? instead of symbol name because either (or combination) of
    - absence of original executable (NB: it should be at the same place; core file may contain relative path to executable!);
    - stripped executable and ??? symbols are all local (static) functions;
    - mismatch of some kind (core file refers to a.out, but a.out there is different so addresses does not make sense anymore);
    - missing information in core file (see coreadm(1M)),
    - corrupted core file (theoretically, if core was corrupted during write, it should have PF_SUNW_FAILURE flag in pflag core output, but I have no personal experience here).

  • Change User Function Name

    Hi all,
    I'm trying to create menus & responsibilities using data loader so that I don't need to recreate it manually but data loader crashed because some of the user function name are the same.
    For example, open Sysadmin -> Application -> Menu -> AP_PAYMENTS_ENTRY_GUI12 in Vision. In Seq. 3 we have Payments menu with AP_APXPAWKB_CHECK_MENU submenu and Payments functions. Tried to search in Functions LOV and we'll get some User Function Name equal to Payments but different Function Name.
    I'd tried to change some User Function Name and all the menus that directed to it changed too, the referential integrity worked I think :P but I want to ask whether it will caused any trouble if I changed it in Test & Production environment?
    Thx.

    I don't consider those to be "hacks" in my book
    They are just bad design approaches:
    In the first case, you will loose the audit trail to the caller.
    In the second case you will be forced to grant authority to the end user to open a step in another user's context. That will open another backdoor for them as well in SM37 etc...
    > PS: If the real problem is just that you cannot grant the authorization on a certain function module as it is used in different standard applications so the authorization for your program would result in to powerful authorizations in sap standard transactions, the I would copy the function module and use it. This Z fm could be authorized bypassing this problem.
    A better option with less coding involved, would be to use SU24. This way you keep the audit trail and isolate the transaction as being an exception to the standard checks for one specific object. An auditor might wonder why a user can release a PO when they don't have one of the required objects, but they will easily find it if they know where to look.
    It is also easy to do this in a secure way, such that you can document it for the auditor and give it to them upfront to understand. A good auditor should understand and appreciate that.
    If you achieve this programmatically with tricks, you will have a tough time... (as will the auditor).
    I have done many audits and also hunted down some dodgey coding in my time. The idea should not be to run away from the auditors, but rather expect that they know what they are talking about and make your design compliant with their and your client's control requirements.
    This should be the approach regardless of whether or not you can change sy-uname as a developer.
    The original question might also have been: "Can I pass a backdated authority-check against a user who once had the authorizations way back when?" Same thing... bad idea...
    Cheers,
    Julius

  • Build DLL Programmatically - Change Function Name

    I'm using the VIs in the AppBuilder\AB_API folder to create DLLs for VIs in a project. Everything is working, but I'd like to be able to change the function name in the VI Prototype dialog box. I can't find anything in the API to accomplish this.
    I found VIs in AppBuilder\AB_Classes\Source\ExportedVI that look like they can do what I want called Get_Source_ExportedVI_Data.vi and Set_Source_ExportedVI_Data.vi, but they're part of a different class and I can't seem to get the class object that they want as an input from the DLL API.
    Does anyone know how to do this? 

    Hi Marc,
    This is a really good question. Let me look into this a bit more and get back to you.
    I also suggest posting on this forum too:
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=475309&view=by_date_ascending&page=2
    FLash
    National Instruments
    Applications Engineer

  • User Function Name wrong resultset in Oracle Apps Query

    Hi,
    I am using the below query to extarct the user function names alonng with responsilibity .But doing so i am getting a User Function Name for eg 'Cross Validation Rules' under Order Management User.But thats wrong.Cross validation rules should exists in Receivables,GL and Payables.
    select distinct frv.menu_id, frv.responsibility_id, frv.responsibility_name, fff.function_name, ffft.user_function_name
    from
    fnd_responsibility_vl frv,
    fnd_responsibility frp,
    fnd_form_functions fff,
    fnd_form_functions_tl ffft,
    fnd_resp_functions resp,
    fnd_menu_entries mnu,
    fnd_menus fmn
    where
    fff.function_id = ffft.function_id
    and mnu.menu_id=frp.menu_id
    and mnu.menu_id=fmn.menu_id
    and frv.responsibility_id=resp.responsibility_id
    and mnu.function_id=ffft.function_id
    and resp.rule_type='M'
    and frv.menu_id in (select me.menu_id
    from fnd_menu_entries me
    start with me.function_id = fff.function_id
    connect by prior me.menu_id = me.sub_menu_id )
    and (frv.responsibility_name like '%Order%')
    order by 1
    Kindly any help will be helpful for me

    What is your application release?
    I am using the below query to extarct the user function names alonng with responsilibity .But doing so i am getting a User Function Name for eg 'Cross Validation Rules' under Order Management User.But thats wrong.Cross validation rules should exists in Receivables,GL and Payables.Please try the queries in these docs.
    Script To Extract Submenu And Function Information About A Menu [ID 458701.1]
    HOW TO GENERATE MENU TREE FOR A MENU ATTACHED TO A RESPONSIBILITY IN ORACLE APPLICATIONS 11i ? [ID 312014.1]
    Thanks,
    Hussein

  • Print message in function name not present

    I have to execute a function from a table . It is like
    cursor c1 is select fun_name from config_Table loop
    v_format_sql := 'select '||c1.fun_name|| ' from dual ';
    execute immediate v_format_sql into format_count;
    end loop;
    But if the function in the config_Table is not there or the function name is wrong it exits from the program
    Please help me to print the text "function name wrong" if the function name does not exists in the database.

    Hi,
    You can do it like this:
    SELECT COUNT(*) INTO v_func_count FROM user_objects
    WHERE OBJECT_TYPE='FUNCTION' AND STATUS='VALID'
    AND object_name = TO_UPPER(c1.fun_name);
    IF v_func_count = 0 THEN
    -- Function does not exist or not in valid state.
    END IF;
    Regards

  • What is the best method to parse a java file for function names

    st="class";
    while (StreamTokenizer.TT_EOF != tokenizer.nextToken ())
       if (StreamTokenizer.TT_WORD == tokenizer.ttype)
        if (tokenizer.sval.toLowerCase().equals(st.toLowerCase())){
        System.out.print (tokenizer.nextToken() + " "); //prints the class name on the console
        fileOut.print (tokenizer.sval + " "); //prints the class name to a file
    }The above program searches a .java file for classes. I want to modify it so that it searches for function names as well. After several hours of figuring out various ways to do it with StreamTokenizer, I still havnt found a way. There seems to be no way to go back, i.e. no previousToken method, in StreamTokenizer.
    Is it possible to do search for using StreamTokenizer, and are there easier ways of doing it?

    Simple string tokenizing isn't an effective way to do this. You probably want something like ANTLR.

  • SSMS 2012: Import XML File to SQL Table - 'value' is not a recognized built-in function name!!??

    Hi all,
    I have the following xml file (books1.xml):
    <bookstore>
    <book>
    <BookID>1</BookID>
    <title>Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book>
    <BookID>2<BookID>
    <title>Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book>
    <BookID>3<BookID>
    <title>XQuery Kick Start</title>
    <author>James McGovern</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book>
    <BookID>4<BookID>
    <title>Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>
    In my Microsoft SQL Server 2012 Management Studio, I executed the following SQL Query code:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---9 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.query('BookID'), value('.', 'INT'),
    x.book.query('title'), value('.', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',
    SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('W3Books/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I got the following error messages:
    Msg 195, Level 15, State 10, Line 7
    'value' is not a recognized built-in function name.
    Msg 156, Level 15, State 1, Line 16
    Incorrect syntax near the keyword 'AS'.
    I don't know why I got the error of 'value' is not a recognized built-in function name. Please kindly help and tell me what is wrong in my code and how to correct the error.
    Thanks, Scott Chang
    P. S.
    (1) I mimicked the xml file and SQL Qeury code of Import XML File to SQL Table in
    http://pratchev.blogspot.com/2008/11/import-xml-file-to-sql-table.html. The xml file and the code of this sample worked in my SSMS 2012 program.
    (2) I am learning the "CAST" and "CROSS APPLY" in the Create Instances of XML Data of Microsoft MSDN - it is very abstract to me.

    Hi Stan210, Thanks for your nice response.
    I corrected my xml file as you pointed out.
    I made some changes in some code statements of my SQLQueryW3BookTitle.sql as you instructed:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---10 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.value('/BookID[1]', 'INT'),
    x.book.value('/title[1]', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('bookstore/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I executed my revised sql and I got the following Message and Results:
    Msg 515, Level 16, State 2, Line 6
    Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    (0 row(s) affected)
    Results:
    BookID    Title
    I don't know why I just got the names of columns in Results and the "Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls, insert fails." in Messages.  Please kindly help, advise me
    how to correct the errors and respond again.
    Many Thanks again,
    Scott Chang

  • How to get the current function name in java

    How to get the current function name in java.
    In c it is done as
    printf("%s",__func__);
    Thanx in advance.

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • [JS CS3] Variable Function Name

    Hello everyone,
    Does anyone know if you can put a variable into a function name?
    Bellow is a function that I am working on to avoid using an if statement with 33 possiblilites. It does work but I get a "undefined is not an object error".
    function myFunction(){
    var myDoc = app.activeDocument;
    var myRootXMLElement = myDoc.xmlElements.item(0);
    var myData = myRootXMLElement.xmlElements.item("xyzTag");
    for (b = 2; b <= 34; b++){
    if(b = myData.contents){
    myNewFunction = "my"+b+"VariableFunction()";
    try{
    eval(myNewFunction);
    }catch(e){
    alert(e);
    Because this physically does what I intend it to do I believe this should work but I can't get past this error. Could someone please let me know if there is a way to make this error free?
    Regards,
    Brett

    Change this line:
    >if (b = myData.contents)
    to this:
    >if (b == myData.contents)
    and it probably works. It is possible to use variables and eval() to call functions. This script works ok:
    for (i = 0; i < 3; i++)
       f = 'my' + i + 'Func()'
       eval (f)
    function my0Func ()
       $.writeln ('this')
    function my1Func ()
       $.writeln ('that')
    function my2Func ()
       $.writeln ('and the other')
    Peter

  • CRM FUNCTIONAL interview questions and answers

    Dear Friends,
    Good Afternoon..!!!
    can you tell me the CRM FUNCTIONAL interview questions with answers if avialable.....
    Regards,
    Dhananjaya

    Dear friends,
    Can any body forward me interview questions and answers
    can any body tell me where can i get crm functional video tuter

  • Significance of function name property in the OAF Page

    Hello, I am trying to find out how the seeded LookupPG works as i need to use the same logic in my application. In the LookupPG page, in the function name property, it's specified as 'FND_LOOKUPS_SSWA'. I tried to open the function to see what is defined in that function and it's nothing but the path of the same page is defined in the function. I tried removing the function name from the page property and it gives me error. Can anyone tell me what's the significance of this function name property in oaf page? Appreciate your advice. Thanks KK

    HC,
    You can add a Region of type Header and set the Text for that and add your table under the Header region.
    Or you can Enter the Text attribute value for that table to get the header.
    Thanks,
    With regards,
    Kali.
    OSSI.

  • Variable Function Names

    What I'm trying to do is add event listeners for each position up to the total of compPositions. This way, each one will have a dymanic function name. Right now, they all launch function "clicked1" but I can't figure out how to make it add numbers to the function name dynamically. Is there a different method I should be using to accomplish this goal?
    Right now, compPosition = 5 so it should create 5 event listners, but I want them each to have their own function they exucute.
              var i;
              for (i = 1; i < compPositions +1; i++)
                        currentPos = "pos" + i;
                        this["pos" + i].addEventListener(MouseEvent.CLICK, clicked1)
    Edit:
    Actually, after thinking about it, I think this is a better approach, but I'm not sure how to pass over a variable using a click event.
                var i;
                for (i = 1; i < compPositions +1; i++)
                      var currentPos; //now it's private to this for loop
                      currentPos = "pos" + i;
                      this["pos" + i].addEventListener(MouseEvent.CLICK, posClicked)
    In this version, I just need to pass over the currentPos variable to the function, but I'm not sure if that's possible.
    Thanks,
    Corey

    Before solving, I would caution why you need them to have a unique function/unique function name. You should be able to have them all hit the same function and do different logic within depending on the target.
    That aside, you could do something like this:
    for (i = 1; i < compPositions +1; i++)
              currentPos = "pos" + i;
              this["pos" + i].addEventListener(MouseEvent.CLICK, this["clicked" + i])
    However, you would have to manually define each function. Alternatively, you can use closures:
    for (i = 1; i < compPositions +1; i++)
      currentPos = "pos" + i;
      this["pos" + i].addEventListener(MouseEvent.CLICK, getFunction(i))
    function getFunction(i:int):Function
              return function(e:MouseEvent):void { trace("Clicked " + i); };
    EDIT:
    Using the closure method you could also pass the current pos if you needed to:
    for (i = 1; i < compPositions +1; i++)
      currentPos = "pos" + i;
      this["pos" + i].addEventListener(MouseEvent.CLICK, getFunction(i, currentPos))
    function getFunction(i:int, currentPos:String):Function
              return function(e:MouseEvent):void { trace("Clicked " + i + " currentPos = " + currentPos); };

Maybe you are looking for

  • How to create a back-up version of your helpsystem

    My institution is going through a conversion of our core systems in September of this year and I need to develop a process for updating the 700 helpfiles I have within my helpsystem.  Is there a way to create a mirror image of my helpsystem so that I

  • 64-bit Instant Client for Oracle 9i

    Based on what I've read here, it looks like there are no Instant Clients for prior to 10.1. - Is this correct? - Does a 10.1 Instant Client work for accessing 9i databases? Thanks

  • EIM Page error

    Hi, i have installed EIM and WIM in my Lab. EIM ver is 9.0.1.  Deployment Model --- Co-Deployment. i.e. App, file,DB,messag and services Server on one server and one separate Web server. i have deployed the License. setup the java and browser setting

  • New to printing designs

    Hi all I'm a fairly new to setting up documents in illustrator according to print specifications so I was wondering if you could clear this up for me. I know the bleed should be included in the set up when mentioned and all artwork should be extended

  • Exchange Rate Rounding

    Hi, This is regarding the sr 3-3800355471 The issue is: ======== Few Expense reports are being error out in the system due to Exchange Rate Rounding Thanks, Sruthi