Asking for user input in the middle of a function

Here's my issue.
I need to launch and input window in the middle of a function for user input.  Before I can continue through the function I need a response back from the user first.  Psuedo code below:
function
     function begins
     pop up window is launched to ask for user input
     function continues after users submits input
     user input from pop up window is used in function return value
Let me know if you need more clarification but this is essentially what I'm attempting to do.

The way actionScript works it isn’t really designed to work that way
Is there any reason why you have to only use one function as you have written
I think you really do need to split up your code into sections that a, set up the pop-up with  event listeners waiting for the input to be completed, trigger the pop up with user input, then have a handler function that then interprets the results of the user action.
Trying to force the system into a closed loop while waiting will be a bad idea.
By using a pop-up or an alert window that is set to be modal, you are effectively stopping your application doing anything else until the user input has been completed, but still not locking the app into a closed loop. Imagine what would happen if you did put the system into a closed loop, the mouse movement wouldn’t be updated, the screen wouldn’t refresh and the system wouldn’t be able to handle your user input. the reason for using async model is you are able to let the system still do all its background task (move the mouse, give inputs focus, keep the screen drawn etc) but still tell a part of your app to ‘wait for input’ before carrying on it execution of your logic
Do you come from another programming language? Maybe one that uses less of an OOP approach? I only ask, as the method you are describing is much more like how I had to program when  I worked on computers years ago as an assembly programmer.
In actionscript and most other modern languages and Oss you don’t have total control of the system and cant lock it into an action as you describe.
You need to have an asynchronous approach to situations like you describe and let the system run in the back ground while you are waiting for input (or date from a server for that matter)
Please excuse me if I am telling you things you already know.
What exactly is your use case for this? Maybe if we knew exactly what you are working on I might be able to offer a solution that would make sense for your particular situation.
Hope all is going well and please feel free to contact me if you are stuck

Similar Messages

  • User input in the middle of the loop

    How can I take user input in the middle of the loop and execute the rest of the loop?
    FOR .. LOOP
    User input…………;
    Update with User input;
    END LOOP;
    Thanks in advance.
    Edited by: Oracle_Power on Jul 29, 2009 11:36 AM

    Forms has no mechanism like that where you can prompt the user for input.
    An Alert is the closest thing, but alerts only accept three button pushes; no keyboard input is allowed.
    If you describe what you need, someone might help you redesign your code so it appears to act like a looping process.
    Edit: Thanks Andreas, your suggestion below is a good solution.

  • My AppStore id is my apple id n password which is good when purchasing. But when I am updating from update option it ask for a password. The user id I see there is not mine, it's different. How do I change that to my apple Id? Please help me resolve .....

    My AppStore id is my apple id n password which is good when purchasing. But when I am updating from update option it ask for a password. The user id I see there is not mine, it's different. How do I change that to my apple Id? Please help me resolve  this issue. I have tried resetting it but nothing... Either I'm doing something wrong or....

    I believe the issue is with the Apple ID that was used to purchase the App. If you download an App that was purchased under a different Appple ID then all updates will also be linked to the original purchaser's Apple ID. Your Apple ID is the the same ID as your iTunes, iCloud, etc. Some folks use different ID for the different Apple sites. No need for that One ID for all Apple Sites, and if someone else buys an App using their ID and they(you) download that App onto your device and that App requires an update it will ask for the purchasers Apple ID. This happens a lot when folks sell their iPad or give it to someone else and leave some purchased(free) Apps on the iOS device. You cannot change the original ID the App was purchased under. A suggestion would be if someone else has an App that you like but do not want to pay for use their ID or in the future have them gift the App to you.

  • I had a 'dead' iMac repaired and it needed a new HDD & graphics card, the repairer installed OSX 10.6.8 and i now need to install other software but I am being asked for 'User' password so I may do this, I've no idea what this will be.  Help please.

    I had a 'dead' iMac repaired and it needed a new HDD and graphics card, the repairer installed OSX 10.6.8 and i now need to install other software but I am being asked for 'User' password so I may do this, I have no idea what this will be.  can anybody help please?
    <Personal Information Edited by Host>

    On looking at the secure.log on the iMac with OSX10.6.8, I see these entries at each attempt to scp into the iMac:
    Dec 29 11:06:20 molika sshd[7248]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.
    Dec 29 11:06:26 molika sshd[7246]: Accepted keyboard-interactive/pam for prowat from 137.110.243.132 port 35571 ssh2
    Dec 29 11:06:26 molika com.apple.SecurityServer[26]: Session 0x236a14 created
    Dec 29 11:06:26 molika com.apple.SecurityServer[26]: Session 0x236a14 attributes 0x20
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Session 0x236a14 dead
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Killing auth hosts
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Session 0x236a14 destroyed
    I don't know what to make of this.
    Peter R

  • Firefox asks for user name and password even though the proxy auto detection

    After upgrading Firefox to ver. 6.01 and next to 6.02 Firefox asks for user name and password of proxy server even though proxy settings are set to Automatic detect proxy settings.

    Sorry can't do anything more than offer support. We have been having this problem for months and support is clueless. Do you also have the migrating homepage issue? We can have 3 or 4 different homepage set-ups throughout the day. Between Verizon and FIOS, there isn't an employee in the corporation who cares about customer service. Since the failed email migrations dating back to Spring of 2011, we have had this login situation constantly. Our normal login count for a day is 12. We figure they are regulating traffic by having customers constantly login.

  • How to make Flash to wait for user input

    Hi,
    I found this PHP script, then I made some changes to make it
    FEED the Flash user interface with online user input.
    The main concept of this script is WAITING for user input, so
    it shows the messages and then go to next line and so on.
    The user input go to directly to TEXT file which writes in
    lines, each line has a unique id = (mag_id).
    There "get_msge.php" which works as the middleware between
    FLASH and messages text file.
    The problem, its doesn’t show any data while there are
    data in the text file.
    Help here please, best regards.
    This is the link of
    problem illustartion
    AS is:
    // create an object to store the variables
    varReceiver = new LoadVars();
    // load the variables from the text file
    varReceiver.load("get_msg.php?file_id=1&msg_id=1",
    "POST");
    // trigger something - when the variables finish loading
    varReceiver.onLoad = function(){
    //the variables have finished loading
    if (this.msg_id == 1) {
    _root.xmsg1_swf.text = this.msg;
    _root.xmsg1_ch.text = this.msg;
    gotoAndPlay("line2");
    } else {WAIT }
    PHP is:
    <?php
    //get these values from the FLASH
    $file_id_swf = $_POST ['file_id'];
    $file_name = "messages/messages".$file_id_swf.".txt";
    $msg_id_swf = $_POST ['msg_id'];
    // [0] ."||".[1] ."||".[2] ."||". [3] ."||".[4]."||". [5].
    //$msg_id."||".date."||".time."||".$from."||".$to."||".$msg.
    $fp = fopen ($file_name, 'rb');
    while (!feof ($fp))
    $msg_txt = fgets ($fp, 1024);
    $line = explode ("||", $msg_txt);
    $msg_id = $line[0];
    $from = $line[3];
    $to = $line[4];
    $msg = utf8_encode ($line[5]);
    if ($msg_id == $msg_id_swf)
    echo
    "msg_id=".$msg_id."&from=".$from."&to=".$to."&msg=".$msg;
    }//while
    fclose ($fp);
    ?>

    Well, given the things that you've written, I don't think it
    could. There technically isn't any code in flash that lets it
    "wait." In order to "wait," you must run the script over again
    until some condition is met.
    However, your code does look accurate. Why do you need to
    wait? The onLoad function will be invoked WHEN something is loaded.
    So, I don't see the reason for the "waiting."
    In addition to that, I would like to say that using text
    files isn't that great with flash. I have done this before and
    noticed several problems with using text files. The biggest problem
    is that the text files are cached after being loaded. Every time
    you re-load it again, you will get what you got the first time
    until you reset your cache (ie. close your browser). I suggest
    using MySQL. (Just my thought.)

  • Unable to open a report and asking for user credentials

    Hi,
    when i am trying to open a crystal report, i am asking for user credentials and my URL is directed to the below URL
    http://hostname/PlatformServices/service/app/logon.do?appKind=InfoView&service=%2FOpenDocument%2FappService.do&backContext=%2FOpenDocument&backUrl=%2Fopendoc%2FopenDocument.jsp%3FSERVICE%3D%252FOpenDocument%252FappService.do%26OBJIDS%3D20016421%26backUrl%3D%252Fcontent%252Fview.do%26PREF%3DmaxOpageUt%253D200%253BmaxOpageC%253D10%253Btz%253DUS%252FPacific%253BmUnit%253Dinch%253BshowFilters%253Dtrue%253BsmtpFrom%253Dtrue%253BpromptForUnsavedData%253Dtrue%253B%26CONTAINERID%3D6424083%26backContext%3D%252FPlatformServices%26LOC%3Den%26APPKIND%3DInfoView%26PVL%3Den%26ACTID%3D280%26service%3Dtimeout&backUrlParents=1&appName=OpenDocument&prodName=BusinessObjects+Enterprise&cmsVisible=false&cms=servername%3A6600&authenticationVisible=false&authType=secEnterprise&sso=false&sm=true&smAuth=secLDAP&persistCookies=true&sessionCookie=true&useLogonToken=true
    Please help me on this

    Hi,
            This is happening to all of the users. And this kind of behaviour is happening frequently to most of the users but as for me and some of us this is not happening frequently.
    And we are using Crystal Reports 2008 ie. CR12.
    -VinodC

  • How do you stop BSPs on WebSEAL for asking for user-credentials?

    Hi
    We are currently having an issue with BSP Pages. When we test the BSP pages on the R/3 system they work OK. When we test them directly on the Portal then they too also work. The problem is that they are not working properly on our Intranet.
    The intranet that we use is an IBM Tivoli product (also known as WebSEAL). We currently have WebSEAL SSO to our SAP Portal. This is working OK. When we use WebSEAL to access the portal we are prompted to enter our user-id and password so that the BSP page can be displayed. This should not be happening and it defeats the purpose of SSO. I have attached a screen shot document to demonstate this.
    Some time ago we had a similar issue where the transactions on the portal (when executed from WebSEAL) were giving us a Webdynpro time-out error. I later determined that the cookie information was not being passed to WebSEAL. To fix this, I went to the Visual Administrator and went to server >> services >> web container and for the web container "sap.com/irj" I went to the cookie configuration to add a session cookie. By doing this I fixed my previous problem.
    Coming back to my problem, I had a junction created in WebSEAL to point to the bsp directory (sap/bc/sap/bsp/*) on the host concerned. I had both a SSL and TCP junction created both resulted in error messages - stating that the client (SAP) is asking for user credentials.
    Hoping that I have provided enough information above my question is as follows:
    (1) How can I get the BSP messages to work on WebSEAL such that it will not ask for user credentials to be entered? Would this involve making a further change to a Web Container? If so - which container also needs a session cookie to be generated?
    Thanks
    Kind Regards
    Rajdeep Kumar

    Hi Peter
    I am having an issue with the re-direct and am hoping you might be able to provide a little assistance. If not then not to worry.
    My security department have logged a call with IBM 2 days ago yet have not received any response.
    In your document you mention that you need to have a junction to AS-JAVA and a junction to AS-ABAP.
    We have created the junctions "/sapep" (for AS-JAVA) and "saphr1" (for AS-ABAP).
    The junction /sapep" also contains the junction mapping entries "/irj/" and "/SSOTicket/".
    The direct URL to the hidden image is : https://uadsfi01.auiag.corp:53001/SSOTicket/1x1.gif. I have tested this (using my user id and password) and it works OK.
    When testing the image through TAM (https://test.insideiaghome.iaglimited.net/sapep/SSOTicket/1x1.gif) we get an "unexpected authentication challenge"
    I have reviewed the log below and it seems that we are having an authentication issue with the image:
    ==(START OF LOG)==
    2008-06-16-19:59:58.365+10:00I----- thread(136) trace.pdweb.debug:2 /sand/cholt/laura_amweb510_11LA/src/pdweb/wand/wand/log.c:309: -
    PD ===> BackEnd -
    Thread_ID:52943
    GET /SSOTicket/1x1.gif HTTP/1.1
    via: HTTP/1.1 uattam01:443
    host: uadsfi01.auiag.corp:53001
    user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MS-RTC LM 8; .NET CLR 2.0.50727)
    iv_server_name: uatin1-webseald-uattam01
    accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, /
    iagsapid: 52975
    accept-language: en-au
    referer: https://test.insideiaghome.iaglimited.net/sapabap.html
    connection: close
    iv-user: s52975
    2008-06-16-19:59:58.373+10:00I----- thread(136) trace.pdweb.debug:2 /sand/cholt/laura_amweb510_11LA/src/pdweb/wand/wand/log.c:309: -
    PD <=== BackEnd -
    Thread_ID:52943
    HTTP/1.1 401 Unauthorized
    content-type: text/html
    date: Mon, 16 Jun 2008 09:59:58 GMT
    cache-control: no-cache
    content-length: 1787
    www-authenticate: Basic realm="Upload Protected Area"
    server: SAP J2EE Engine/7.00
    expires: 0
    pragma: no-cache
    connection: close
    ==(END OF LOG)==
    When logging into the SAP Portal directly general user ids have no problem accessing this (Non-Administrator portal users), however through Tivoli it is causing an issue.
    Do you know what may be causing this issue?
    Thanks in advance for any assistance you can offer.
    Kind Regards
    Rajdeep Kumar

  • PI 7.1 can not deploy! ask for user SID adm and password

    hi all:
        PI 7.1, NWDS 7.1 
        I create a ejb project amd import a WSDL and generate java bean skeleton. after implementation, I choose the EAR project and right click and choose run RUN AS-->Run on server, then choose the server, add project and finish
    then a popup window shows and tell me "Please enter the credentials of the SAP administrator <SID>adm", I use J2ee_admin but error occur:
    Error while disabling debugging of the server
      Error while disabling debugging of the server
      Incorrect login information provided
      I search the SDN and find no useful link. how to config <SID>adm ?
      how to deploy my java proxy? i think this process is so complex!
      thank you!

    hi Prateek:
        thanks for your information.
       only ask for user and password, no other pop up window.
       i am confused is there any configuration missing?

  • Create a screen for user input in BI

    Hi Experts,
    I want to know can i creat a screen for user input in BI with module pool programing
    and i want to store the data in ztable in SAP-BI.
    Moderator message: please search for available documentation, these forums are no substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 10, 2010 8:37 PM

    I'm afraid that I cannot get it. I had a look at the docs you suggested before posting, and still, no luck (...)
    JOptionPane.showMessageDialog(dialog, "Please input info");Can you please tell me what I'm doing wrong and I cannot add the JDialog to the JOptionPane?Re-read the API and tutorial. JOptionPane is meant specifically to spare you from instantiating manually a JDialog. The showXxxDialog(...) methods do create a JDialog of their own, based on the contents supplied as arguments.
    In particular, using the 2-arguments variation showMessageDialog(Component parentComponent, Object message):
    - The first argument parentComponent is not be the dialog you want to display, but the component over which you want the dialog to appear. The most typical value are this or null.
    - The second argument is the "message" to display, but as described in the API, it can be a JComponent, that is, even a JPanel with child widgets (in a word, a JPanel containing the specific form you'd display in the dialog if you were writing the dialog manually).
    Again, at the risk of insisting densely, I'm only quoting the API an tutorial, so please read them attentively.
    Edited by: jduprez on Nov 2, 2009 2:29 PM - Sorry Kevin, hadn't seen you latest reply. I completely subscribe to the thought process you recommend.
    Edited by: jduprez on Nov 2, 2009 2:32 PM
    Thinking about it further, I don't completely subscribe... Indeed it looks like a bad idea to make the OP wonder about dialog.setVisible() when JOptionPane enables him to forget about the hand-made dialog. I stand by my own advice ("JDialog" should not even appear in this code extract).

  • "catching" a prompt for user input and answering it through zenity?

    I'm trying to write a script (or multiple scripts) that will allow me to use command-line only applications via user defined actions in my file manager without having to open a terminal. Now I realize this basic functionality is already available, but as it stands I am unable to respond to command-line prompts for user input without opening a terminal. Is it possible to write a shell script that would act as a wrapper and allow me to use zenity (or another popup program) to respond to such queries?
    For example if I used a command-line program that prompted me for a password, could I "catch" that prompt with a shell script and answer it through another program, such as zenity?
    Last edited by falconheart (2011-01-16 22:37:25)

    The easier way to do this is to collect the info with zenity first, then pass it on the command line.  If the program insists on prompting, then you could try feeding it the info with redirection if it accepts it from stdin.  For example
    command < info.txt
    where info.txt is a temp file created by your script which contains whatever you want entered into the prompts.  This will work in some cases.

  • How to force sql developer to prompt for user input for every execution ?

    Hi Folks,
    Environment: Oracle 11g (on Windows 7)
    SQL Developer: *3.1.07*
    I am executing a PL/SQL code off Sql Developer. The code uses substitution variables to prompt user for input. However,I am only prompted for the user input for the very first run of the code. For the subsequent executions, the code simply picks up the user input from the very first run. This behavior persists for all subsequent runs of the code.
    I have executed the same piece of code from SQL*PLUS and the behavior seems normal (i.e. I am prompted for fresh input for every execution)
    How can flush out the old user input so I can be prompted for new user input for every run of the code in sql developer?
    Thanks in advance
    rogers42

    Hi Rogers42,
    1/try
    undefine
    undefine fred
    select '&&fred' from dual;
    [run this multiple times]
    [prompts gere]
    old:select '&&fred' from dual
    new:select 'a' from dual
    'A'
    a
    [prompts here]
    old:select '&&fred' from dual
    new:select 'b' from dual
    'B'
    b
    2/try
    exit (requires recent version of sql developer: tools->preferences->Database->worksheet->Re-initialize on script exit command)
    select '&&fred' from dual;
    exit
    run this multiple times
    [prompts here]
    old:select '&&fred' from dual
    new:select 'x' from dual
    'X'
    x
    Commit
    [prompts here]
    old:select '&&fred' from dual
    new:select 'y' from dual
    'Y'
    y
    Commit
    3/use &fred instead of &&fred
    For background see
    http://totierne.blogspot.co.uk/2010/04/substitution-and-bind-variables.html
    -Turloch
    SQLDeveloper team

  • How to prompt for user input in Forms

    How do I prompt for user input in Forms?
    I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
    If the user chooses to input the value I want to update a set of database fields with the value.
    I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?

    Desgordon,
    This can be accomplished by displaying your message to the user using an Alert. I use 3 different Alerts (Note, Caution and Stop) in my forms and they are inherited from a central source file (such as an Object Library or a Template Form) so they can be used by all of my Forms. You can set the text of the Alert using the SET_ALERT_PROPERTY() built-in and capture what button the user presses with the SHOW_ALERT() built-in. Additionally, if you need more than one button to be displayed in an alert, you use the SET_ALERT_BUTTON_PROPERTY() built-in to rename the default button or to add up to a total of three buttons in the alert. Here's an example:
    DECLARE
       Alert_ID       ALERT;
       v_AlertType    VARCHAR2(10) := 'CAUTION';
       v_AlertTitle     VARCHAR2(25);
       v_AlertText    VARCHAR2(150);
       n_AlertButton  NUMBER;
    BEGIN
       v_AlertTitle := 'Title of Alert';
       v_AlertText := 'This is message to the user.';
       /* Code leading up to the decision point. */
       alert_id := FIND_ALERT(v_AlertType);
       /* Note: I only set the Label of Button 2 because the default button 1 label is 'OK' */
       SET_ALERT_BUTTON_PROPERTY(v_AlertType, ALERT_BUTTON2, LABEL, 'Cancel');
       SET_ALERT_PROPERTY(Alert_ID, v_AlertTitle, v_AlertText);
       n_AlertButton := SHOW_ALERT(Alert_ID);
      /* Now I can test the value of n_AlertButton for 1 or 2 to find out what button the user selected. */
      IF ( n_AlertButton = 1 ) THEN
         /* Do something, because the user selected 'OK' */
      ELSE
         /* It is assumed at this point that the user selected 'CANCEL' */
         /* Stop processing any further. */
         RAISE form_trigger_error;
      END IF;
    END:Hope this helps.
    Craig...
    -- If my response or the response of another answers your question, please mark the response accordingly. Thanks!

  • How to prompt for user input in PL/SQL

    How do I prompt for user input in PL/SQL?
    I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
    If the user chooses to input the value I want to update a set of database fields with the value.
    I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?
    Edited by: desgordon on Sep 3, 2008 10:33 AM

    desgordon wrote:
    How do I prompt for user input in PL/SQL?
    I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?OK, you're doing that in Forms...
    >
    If the user chooses to input the value I want to update a set of database fields with the value.Write PL/SQL procedure for this purpose...
    >
    I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?Not clear what you mean with view?
    But if you call your procedure in that button then yes 'control will be passed back to the code'...
    Cheers!
    Edited by: Faust on Sep 3, 2008 7:57 PM
    Too slow...

  • Preview asking for user password on PDF file.  There is no password.  Anyone have any suggestions?

    Preview asking for user password on PDF file.  There is no password.  Anyone have any suggestions?

    OK. Open your PDF with Preview and at the top of the window (near the file's title) you will see Locked in grey.
    Click on it and in the menu that appears click Unlock.
    It looks like this in OS 10.7.3 :
    For information you can view the permissions of a PDF file in Preview by choosing in the menu bar Tools > Inspector, and then click Encryption (the lock).
    Hope this will help.

Maybe you are looking for

  • Can you permanently disable a device?

    I am a police officer and embarrassed to say that after leaving my iTouch in the patrol car a couple years ago it was taken by another employee and never returned.  Recently, I received a couple Email requests to obtain or change my password.  I logg

  • How to disable the geotag NAG screen.

    1. Is there a way to either to (ENABLE/DISABLE) geo-tagging permanently. 2. If YES, is there a way to disable the NAG question when taking pictures.

  • 10.10.10 kernal panic

    My MBP 17" 2.166 Core Duo had never yet rebooted normally from the time it rebooted with the "update." I get an ACPI kernel panic as soon as the grey screen tries to appear. It panics in safe mode, verbose, and single user. I can reset pram but I can

  • Bank Upload File

    Hi Guys I am trying to upload a bank statement after carrying out F110 and I keep getting the error: Recipient bank SWIFT code of payment medium in format MT101 is missing And the vendor has the bank details already maintained... Thank you Rukshana

  • How to convert inode number to path (for Eudora to Mail conversion)

    I've seen a header line in my Eudora client that has what I believe to be an inode number in it that represents a path: X-Attachments: :Server:622049:style.css: Server is the volume name and the 622049 appears to be the inode file system path to the