Call the function with the arguments in AS3

Hello!
I am a new in Flex development and cannot understand same code convention, im Java programmer.
How I can write correct function in ActionScript, my call call: var goodsWnd:CreateGoodsWindow = PopUpManager.createPopUp (this, CreateGoodsWindow, true) as CreateGoodsWindow;
I want call above function with argument, how do?
Where my class: public class CreateGoodsWindow extends extends TitleWindow
{
public CreateGoodsWindow(data:Object)
{....}
}

Using PopUpManager.addPopUp () instead of of createPopUp(). addPopUp takes an object that has already been instantiated:

var createGoodsWindow:CreateGoodsWindow = new CreateGoodsWindow (data);
PopUpManager.addPopUp (createGoodsWindow);

Tags: Flex

Similar Questions

  • How can I call a function with parameter out of sql

    Hello world
    I'm calling a Sql statement function and I get this error ORA-06572: XX function has arguments.

    can you offer any solution on this workaround.

    Thank you

    Hello

    Sorry, you cannot call functions with OUT arguments (or arguments, but I'll just say in the future) SQL statements.
    This is one of the reasons why many people avoid having arguments in functions.
    THE arguments are never optional. If the function expected of them, you must pass to them.

    Depending on your needs, you can write a Wrapper function that has no arguments.
    For example, if you want to call this function:

    fun1 ( in_out_str      IN OUT  VARCHAR2
         , in_num          IN      NUMBER
         )
    RETURN  NUMBER ...
    

    you don't need really the value changed to in_out_str, then you can write a function like this:

    fun1_wrapper ( in_str          IN      VARCHAR2
                   , in_num          IN      NUMBER
                   )
    RETURN  NUMBER
    IS
        in_str2     VARCHAR2 (32767)  := in_str;
    BEGIN
        RETURN  fun1 ( in_str2
                       , in_num
               );
    END  fun1_wrapper;
    

    You can use fun1_wrapper in a SQL statement, even if you cannot use fun1 in the same statement.

    Published by: Frank Kulash on February 27, 2013 09:42

  • Can I call a function with the argument % ROWTYPE directly from SQL?

    I have the following function in a 10g DB:

    FUNCTION to CREATE or REPLACE f_is_eligible2 (in_dm_row IN amplify_dm % ROWTYPE)
    RETURN NUMBER
    IS
    ....

    I know that I can call this function to another function from pl/sql, but I wonder if I can call this function directly from an SQL statement, something like this:

    SELECT f_is_eligible2 (dm.*)
    Of amplify_dm dm

    or

    SELECT f_is_eligible2 (dm % rowtype)
    Of amplify_dm dm

    None of those who have worked so I think it is not possible, but I thought I'd ask anyway.

    Thanks in advance!

    You are correct, it is not possible.

    SY.

  • How to call a procedure with two arguments.

    Hello
    I have a procedure with two arguments, IE. MyProcedure (p1 in numbers, p2 in number) to display an image blob.
    How can I call this image blob in the url.
    I tried http://127.0.0.1:7777/pls/apex/SCHEMA.myprocedure?p1=1 & p2 = 2, but it does not work...
    Thank you
    Vincent

    Vincent,

    As long as you've got the possibility to execute the procedure and there is no space in the url and you have not misspelled the names of parameters then it looks right.

    Here is a link to a procedure to download a file that takes two parameters.

    http://mywebsite.com/pls/htmldev/schema.package.function.download_file?p_session_id=1221970786026206&p_seq_id=724

    See you soon,.

    Janet Tyson

  • How can I call a function with a parameter?

    Hey guys, I am trying to perform a function within a loop function and I am running into a problem. Whenever I run the program it gives me this error: 1136: Incorrect number of arguments.  1 expected.    However, I can't add the parameter because the function that I'm running is an event. Here is the code:

    package

    {

    import flash.display.Stage;

    import flash.events.Event;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 3;

    public var leftPressed:Boolean = false;

    public var rightPressed:Boolean = false;

    public var upPressed:Boolean = false;

    public var downPressed:Boolean = false;

    public void Hero()

    {

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyPressed);

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    }

    public void loop(E:Event):void

    {

    keyPressed();

    {if (leftPressed)}

    x = speed;

    } else {if (rightPressed)

    Speed x +=;

    }

    {if (upPressed)}

    y = speed;

    } else {if (downPressed)

    y += speed;

    }

    }

    public void keyPressed(event:KeyboardEvent)

    {

    If (event.keyCode is Keyboard.LEFT)

    {

    leftPressed = true;

    } else {}

    leftPressed = false;

    }

    If (event.keyCode is Keyboard.RIGHT)

    {

    upPressed = true;

    } else {}

    upPressed = false;

    }

    If (event.keyCode is Keyboard.UP)

    {

    rightPressed = true;

    } else {}

    rightPressed = false;

    }

    If (event.keyCode is Keyboard.DOWN)

    {

    downPressed = true;

    } else {}

    downPressed = false;

    }

    }

    }

    }

    The function definition using what follows, and it should work with and without passing the argument

    public void loop(E:Event=null):void

  • How to call a function with parameters in jsf managed Bean

    Hello

    1. I created a Bean managed to manage chains of jsf to 11.1.1.7 WebCenter spaces:

    public class ManageStrings {}

    / * Converts all characters in a string to uppercase. */

    public String getToUpperCase (String str) {}

    Dim retVal = str.toUpperCase ();

    Return retVal;

    }

    }

    2. I registered managed Bean:

    " < managed-bean id ="swc_3"xmlns =" http://xmlns.Oracle.com/ADF/controller "> "

    < id managed-bean-name = "swc_2" > tools < / managed-bean-name >

    < managed-bean-class id = "swc_1" > cat.badalona.webcenter.utilities.ManageStrings < / managed-bean-class >

    < managed-bean-scope id = "swc_4" > backingBean < / managed-bean-scope >

    < / managed-bean >

    3 to code jsf, I tried different options, but they do not work

    " < = xmlns:af af:outputText ' http://xmlns.Oracle.com/ADF/faces/rich "value="#{backingBeanScope.utilities.getToUpperCase['hello']}"/ > "

    ...

    " < = xmlns:af af:outputText ' http://xmlns.Oracle.com/ADF/faces/rich "value="#{backingBeanScope.utilities.toUpperCase['hello']}"/ > "

    ..

    " < = xmlns:af af:outputText ' http://xmlns.Oracle.com/ADF/faces/rich "value =" #{backingBeanScope.utilities.getToUpperCase ('hello')} "" / >


    What I am doing wrong?


    Thaks in advance


    Hello Carles,

    I did it with the content presenter where I need to pass the ID of the component selected in backing bean. Please try below option

    Now add following code in your binding

    Private RichOutputText outputText1;

    then the getter for this outputtext set.

    and in your action method to read the value of the output text.

    Hope this helps with your problem.

    Thank you

    Amey

  • CSXSInterface: Call to jsx-function with a string xml as parameter?

    Hello

    for me CSXSInterface worked very well so far with all the settings and the SyncResults.

    Now, I do a few operations xml with actionscript 3 and photoshop scripts. I am able to return an XML from a function javascript to actionscript3 and do all kinds of operations with it. Somehow, I can't call a function with the string xml as parameter jsx? Does anyone have a solution for this?

    Here is what I tried:

    var xmlStr:String = _myXml.toXMLString(); // I tried _myXml.toString() too but it didnt work either ;-(
    CSXSInterface.instance.evalScript("xmlFunction", xmlStr);
    
    

    Thanks in advance!

    Not for me it isn't...

    I use Flash Builder (with Extension Builder added on) too, and I don't remember having seen a mistake HostObject of any kind. Import you the classes necessary?

    Substances

  • External function with a pointer to a callback within a DLL function

    Hello.

    I am loading a DLL and try to call a function with the following prototype:

    Func1(HANDLE, hHandle, LPVOID (*pCallback)(UINT, UINT LPVOID), CHAR* sPath)
    

    Now, I have no problem with the types of variables, because CVI 9.0.1 recognizes each of them and I have no problem with LoadLibrary() and GetProcAddress().

    But, how to pass a pointer to a callback function that is inside the DLL, I am trying to use.

    I tried to declare the callback like this:

    LPVOID (CALLBACK Callback)(UINT iDevNo, UINT evEvent, LPVOID pData);
    

    and call the Func1 function like this:

    (Func1)(hHandle, &Callback, NULL);
    

    but it irritates me:

    Symbol not defined "_Callback@12" referenced in "source.c.

    Hopefully I can help.

    I appreciate your time on this issue.

    Kind regards.

    Hi Daniel,.

    He must first make sure that the callback function is exported by the DLL, so the program that uses the DLL can access the identifier of the function name. Then you must make sure that you call GetProcAddress not only on Func1, but also on the exported callback function. You must store the two address function values in their respective function pointers. You can then pass the pointer to callback in the form of argument to the call to Func1.

    It's probably cleaner if you set of typedefs for all your function pointers, in the calling program:

    typedef LPVOID (__stdcall * CallbackType) (UINT, UINT, LPVOID);
    typedef? (__stdcall * Func1Type) (HANDLE, hHandle CallbackType, CHAR *);

    ...

    CallbackType CallbackPtr;
    Func1Type Func1Ptr;

    ...

    dllHandle = LoadLibrary ("... ») ;
    CallbackPtr = (CallbackType) GetProcAddress (dllHandle, 'Callback');
    Func1Ptr = (Func1Type) GetProcAddress (dllHandle, "Func1");

    ...

    Func1Ptr (..., hHandle, CallbackPtr, NULL);

    Boa kind!

    Luis

  • How to call external functions without one. DLL (just using a.) H and. LIB file)?

    Hi all

    in fact, I am facing difficulties on how to get an external function is called in CVI (Version 2009).

    I was delivered with a. H file and a. LIB file to call an external function of my project CVI. The. H file looks like this:

    void exportedFunction(double *parameter);
    

    As far as I know, the external function was written with MS Visual C++ 6.

    So, I tried to link statically to the al extern like this function:

    -Add the. H file and the. LIB file to the CVI project

    -#include the. Folder H when I needed to call the external function

    -do the external function call

    During construction I get unresolved CVI external function call error, so this seems not work.

    I did some research autour and stood up with two possible problems. Maybe one of you can help me get a bit further and do work things out.

    (1) of the code of the 'real' function inside the DLL file that was not delivered to me. Or y at - it a way to get concrete results (calling external functions) with just one. H and a. LIB file (with none. Included DLL file)?

    (2) the external function does not export according to the rules of Style 'C '. The signature of the function in the. H file shows some things don't like

    extern "C" __declspec(dllexport) void __stdcall ...
    

    Or maybe it's a combination of these two issues (missing. DLL + bad export style function)?

    I guess I could get around the incorrect service export style when I managed to write a wrapper around the original function that actually uses Style C exporters. But I guess I need to the. DLL file for this test as well.

    Thank you very much for your answers.

    Best regards

    Bernd

    There is no need for the stuff of dllexport. There is also the option of a static library without any DLL.  But the "extern"C"' is essential, because it forces the C++ compiler, which was probably used to compile the library to use the C calling convention.

    If you are unable to ask the library vendor to provide a version that was compiled using C calling convention is the way to write a wrapper with VC ++ 6 around this library that functions using C calling convertion reexports. Something like

    extern 'C' myfunc1 type0 (type1 arg1,...) {

    Back to func1 (arg1,...);

    }

    for each function, you must use.

    BTW. "unresolved symbol" is the error message from the linker, you can expect if you try to bind the C code against a generation of library with the C++ calling convention.

  • a reminder of the user interface will have a function with arguments?

    some ScriptUI quirks... I have a function (cut in this example) that I can call very well by itself of the extendScript window or if I set directly to the onClick callback, but when I try and call the function from a reminder and analyze arguments, the onClick is not working and the service runs once when the script runs first? what I am doing wrong?

    It works using the extend script window

    Nudge (23,77)


    function nudge (offset, distance) {}

    var L = app.project.activeItem.selectedLayers [0];

    L.startTime = (shift * distance);

    Alert ("Done")

    }

    This works when the button is clicked in the user interface


    myButton.onClick = function() {

    var L = app.project.activeItem.selectedLayers [0];

    L.startTime = (23 * 77);

    alert("done")

    }

    This also works when the button is clicked in the user interface


    myButton.onClick = boost


    function nudge() {

    var L = app.project.activeItem.selectedLayers [0];

    L.startTime = (23 * 77);

    alert("done")

    }

    but when I try and pass arguments (kind of functions) that does not


    myButton.onClick = nudge (23,77)


    function nudge (offset, distance) {}

    var L = app.project.activeItem.selectedLayers [0];

    L.startTime = (shift * distance);

    Alert ("Done")

    }

    OK, in the case where someone is interested... the solution with the permission of Mr. Lloyd Alvarez is to nest the function in another function call, why, I have no idea, but it works a treat...

    myButton.onClick = function() {nudge (23,77)}

    function nudge (offset, distance) {}

    var L = app.project.activeItem.selectedLayers [0];

    L.startTime = (shift * distance);

    Alert ("Done")

    }

  • Call the DLL function with a pointer to a complex structure

    Hello

    I try to call a function by using COLD LAKE. My problem is the function parameters that I'm trying to access.

    Here is the function and its parameters:

    typedef struct _BAR_INFO
    {
    ULONG dwSize;
    ULONG dwFlag.
    } BAR_INFO, PBAR_INFO;

    typedef struct _DEVICE_INFO
    {
    ULONG dwBarNum;
    BAR_INFO BarInfo [6];
    } DEVICE_INFO, * PDEVICE_INFO;

    Int GetDeviceInfo DLLIMPORT)
    unsigned int CIH.
    PDEVICE_INFO pdevinfo
    )
    {
    ULONG i;

    If (DFR > = DevNum)
    Return PCICORE_DEVICE_NO_FOUND;

    If (DevTable [JC]. DevHandle is NOTHING)
    Return PCICORE_DEVICE_NO_INITIALIZE;

    if(pdevinfo == null)
    Return PCICORE_INVALID_PARAMETER;

    pdevinfo-> dwBarNum = DevTable [JC]. DevInfo.dwBarNum;
    < pdevinfo-="">dwBarNum; i ++)
    {
    pdevinfo-> .dwFlag BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwFlag;
    pdevinfo-> .dwSize BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwSize;
    }

    Return PCICORE_SUCCESS;
    }

    As an attachment, there is the Info.vi device Get trying to access this feature. The code crashes when the function is called.

    I have probably not pass parameters of data properly to COLD LAKE.

    Thank you for your lights.

    An array of fixed size in C is equivalent to a cluster of LabVIEW that contains the same number of identical items, replace the table with a cluster. In addition, structs are always passed by reference and the C function expects a pointer to a structure, you don't need to unbundle. Skip the cluster to function as a single parameter. Try the attached revised version of your VI.

  • How to call the java function with javascript setting in mobile adf?

    How to call the java function with javascript setting in mobile adf?

    The ADF Mobile utility container API can be used from JavaScript or Java.

    Application container API - 11 g Release 2 (11.1.2.4.0)

  • I have the following error on my phone design-MuseJSAssert: error calling the function switch: Error: Invalid argument

    I tried to insert the third party html code 'a noaa weather map' in the design of my phone yesterday. It did not work well. So I deleted this return. Afterwords, I get the following:

    (Message on the Web page "MuseJSAssert: error by calling the function selection: error: invalid argument.")

    I already have all the design is complete and ready to publish. The desktop version works fine. But the design of the phone does not work. For the most part, I noticed that the menu master accordion does not work now.

    Help! I really want to redo the whole phone design. Thanks, H

    I have already found and corrected the error. Apparently, when you bind a phone

    Number of muse, he is not obliged to put a colon: in the figures. I have

    have removed the colon and handed over running the program and the error is cleared

    upward. A clear tutorial on the 'phone links' would be useful.

    Thank you. H

  • I exported a must of the site in HTML format and get the following error - MuseJSAssert: error calling the function switch: SecurityError: cannot read property 'documentLes' of 'HTMLIFrameElement': blocked a frame with original 'null '.

    I exported a must of the site in HTML format and get the following error - MuseJSAssert: error calling the function switch: SecurityError: cannot read property 'documentLes' of 'HTMLIFrameElement': blocked a frame with original 'null '.

    Does Anyon know what to do - how to fix this?

    Hello

    could you please take a look at this and see if that helps

    Java Script alert: MuseJSAssert: error calling the function switch: security error?

  • That is producing this error: MuseJSAssert: error calling the function switch: Error: Invalid argument

    Website: http://lovehopemercy.org/

    In my navigation header by clicking on the option "VISIT US", that is to say generates this error: MuseJSAssert: error calling the function switch: error: invalid argument

    The other options do not work correctly. I get an error on export as HTML of MUSE, but the link works fine in other browsers. I download using Dreamweaver CC 2014. Reversal function works fine; it's the direct click of the menu item at the top that causes the problem.

    Did I miss a bad link or something that I can fix?

    Thanks in advance.

    Hello

    Could you please try some suggestions given here and see if it works for you.

    Error after update today: MuseJSAssert:Error call function argument: Error: Invalid selector

    Let me know if you have any question.

    Concerning

    Vivek

Maybe you are looking for

  • Laptop

    I should not be used my laptop for a while, don't want to leave it plugged. What should I do?  Thank you. Joyce

  • Any knows Aspire 1430-6436. Model no is ms2296 can improve the memory from 4G to 8G or more?

    Hi, I have an Aspire 1430-6436. Model no is MS2296. I want to improve the memory, but failled to a kingston DDR3 laptop memory. Someone told me this model can only support 4G memory to the maximum, but I try the command "wmic ComputerSystem get Total

  • How do you rename your computer when you buy it second part?

    I just bought my computer from a friend and I want to remove his name off computer.  I tried to do it by changing its name in user accounts, but his name remains.  How can I put my name as the original owner?

  • Windows mail Inbox messages began diappearing

    I have windows vista comes with windows mail...  My Inbox messages began to disappear and do not appear in the deleted items, or any where.where they go and how do I get this to stop.  Also, someone said that windows mail updated to windows live mail

  • How do you map a network drive?

    OK I have a belkin F5d8235-4 v2 router and you can put the USB and USB HDD so I installed the software for him and when I did the flash player never rises once and a while how to map the network drive I can see now and it sayes "USB" on Belkin N + (z