Get popupscreen user input and store it in the variable

Hello world. I have a screen that is pushed to start the application

pushScreen (new SPScreen());

In the constructor of the form, I push an extension of popupscreen in the stack to get an int from the user through TextField amount.

UiApplication.getUiApplication () .pushGlobalScreen (new SplashScreen(), 1, UiEngine.GLOBAL_SHOW_LOWER);

In the popuupscreen, I store the entry under int amount;

public void fieldChanged (field field, int context) {}

name = nameTxt.getText ();

quantity = Integer.parseInt (amountTxt.getText ());

Close();

}

};

Now I want int amount; in my screen to shoot the user supplied value and whenever you click on a button Add the amount in total, each time increasing the total amount.

 

public static int amount;

total int = 0;

...

amount

= OptionScreen.amount;

Total = total + amount;

No matter how many times you press the Add button it only changes the total amount. For example, if I enter 6 as the quantity and press the button 3 times I want the total 18 years, but the total is still only 6.

I'm sure there's probably a way to pass a reference to the variable, but I have a similar situation where I have a variable which is accessible by a certain screens and can be changed in multiple screens as well.  I delcare a class called globalVars and put the variable.

public class globalVars {

    public static int total;

}

Do only access you anywhere with globalVars.total.

Kind regards

Scott

Tags: BlackBerry Developers

Similar Questions

  • Collection of user input and store it

    Could someone help me with detailed instructions on how to do it. I have internet search and my huge Director books for hours for a kind of pre-packaged instructions on obtaining the user text entry, but no luck. I have my set interface in place and these are the pieces of info I want:

    Username (limited to 30 characters)
    Connection (between 6 and 15 characters)
    Password (between 6 and 15 characters)
    Password2 (must match the password)
    Correo electronico (must contain a sign @)

    I don't know if I'm supposed to use text field, or component of flashTextInput. And how can I make the character limiting and looking for a character? I know it must be editable. How can I then collect this information with a "submit" button and save it in a file encrypted with the buddyAPI? And then how to get some of these data items and use them in this film or another in the program?

    Thanks in advance.

    There are many ways to go about this, but I would like this:

    Use all members of #text. They are, for me, the simplest
    with the most options.

    Text sprites need not all all scripts. Do just a "submit."
    a button that performs the audit. Something like that, you should get
    on the road:

    on mouseUp me
    If member("username").text.char.count > 30 then
    alert "user name must be 30 characters or less.
    Pass
    end if

    If member("login").text.char.count > 15 may
    alert "Login must be 15 characters or less.
    Pass
    end if

    If member("login").text.char.count<6>
    Alerts "Login must be at least 6 characters.
    Pass
    end if

    If member("password").text.char.count > 15 may
    alert ' password must be 15 characters or less.
    Pass
    end if

    If member("password").text.char.count<6>
    alert ' password must be 6 characters or more.
    Pass
    end if

    If member("password").text<>member("password2").text then
    alert "the password fields do not match"
    Pass
    end if

    in the opposite case (contains the member("email").text '@') then
    alert "Email field must contain a sign @.
    Pass
    end if

    baWriteIni ("info", "username", member("username").text, la)
    moviePath & "settings.ini") "
    baWriteIni ("info", "login", member("login").text, la)
    moviePath & "settings.ini") "
    baWriteIni ("info", "password", member("password").text, la)
    moviePath & "settings.ini") "
    baWriteIni ("info", "email", member("email").text, la)
    moviePath & "settings.ini") "

    baEncryptFile (the moviePath & "settings.ini", "SuperSecretKey).

    Go "frameThatYouGoToIfEverythingIsGood".
    end

    That's all. It will throw an error if something went wrong and if
    It's everything is correct it will write in the settings.ini file and encrypt
    He read these settings, you must decipher using the same
    BaReadIni SuperSecretKey and the use of out the setting. Then you'll
    You probably want to re-encrypt as soon as you have finished reading.

  • I'm unable to access my skydrive account, I get my user id and password but when I try to access the skydrive page it just flickers and flashes a canned red shield in the address bar.

    I'm unable to access my skydrive account, I get my user id and password but when I try to access the skydrive page it just flickers and flashes a canned red shield in the address bar. I managed to go into the live account and change the password, so I know that the connection details are correct. I can access my hotmail account.

    I signed up for skydrive two days ago and have loaded the documents that I cannot now reach!

    original title: skydrive connection problem

    Forum on SkyDrive here:

    http://windowslivehelp.com/product.aspx?ProductID=6

  • Analytics of obiee connection cannot get invalid user name and password

    Hi people,

    I am unable Loing analytical Obiee, get the valid user name and password when check the server log file do the sub questions.

    Authentication failed: invalid user/password.

    [2015 02-03 T 12: 13:52.000 - 05:00] [OracleBIServerComponent] [ERROR] [] [] [host: biapps.anblicks.com] [nwaddr: 192.168.100.112] [tid: dd8d8700] [ecid: 0053YdzsPuVEkJWzLwVK8A0006cE000000, 0:7210:6] PolicySet invalid: WSM-06102 PolicyReference reference URI "oracle/no_authentication_service_policy" is not valid.

    I am able to login on console and em with the same user name and password.

    Could any advice how to solve this problem.

    The problem is solved by rebooting my server linux...

  • IBM think centre @ request for initialization of the system user password and a genius set the bios to lock keyboard can it is bypassed and how?

    Original title: IBM think centre @ start request.

    IBM think centre @ request for initialization of the system user password and a genius set the bios to lock keyboard can it is bypassed and how?

    Hi brandon1980,

    I recommend you contact your computer manufacturer for assistance. The manufacturer would be able to give details about the BIOS (Basic Input Output System) and find out if this feature can be disabled.

    Hope the helps of information.

  • Download the file and store it in the path to the SD

    Hi all

    In my application, I want to download the mp3 files and store it in the SDCard desird.

    How to get there.

    Any help.

    Thank you

    Stephenson

    You might find this code useful:

    http://supportforums.BlackBerry.com/T5/Java-development/download-large-files-using-the-BlackBerry-mo...

  • 0 x 80240036 get this error code and don't do the update.

    0 x 80240036 get this error code and don't do the update. Message says "the website has encountered a problem and cannot display the page you are trying to view. The options provided below may help you solve the problem. Ive tried for three days to do the update and I tried at home and at the office, but I get this message.

    I have updated to internet explorer 8, and then it worked.

  • Received an email asking for user information and password because of the DGTFX virus

    Original title: DGTFX Virus

    I received an email to this address * address email is removed from the privacy * asking for user information and password because of the virus of the DGTFX if I'm not so-called miscrosoft will terminate my account.  Is it a scam? or legit?

    Thank you

    Eric Schnepf

    It's a scam.  Happy that you didn't fall for it.

    http://www.Hoax-Slayer.com/dgtfx-virus-phishing-scam.shtml

    http://www.Microsoft.com/security/online-privacy/phishing-scams.aspx

  • How to capture user input and display it in another text field

    Hey there,

    I create a simple screen that allows a user to enter text and I want to take what they get and appear in other fields of text on the same screen, so they do not have to retype. I'm using AS3. I read an article that gave me a few tips, but the code I use is not doing the job. I'm pretty new to Flash, so any help would be appreciated.

    Here is what I use:

    var Description: String;


    myText_txt.addEventListener (Event.ENTER_FRAME, assignText);


    function assignText(myevent:Event):void {}
    Description = myText_txt.text;
    }

    textResults_txt.text = Description;

    My thoughts after reading the article (I think it's from Ned) should follow the first text field, myText_txt and assign this text to the variable Description. Then I tried to assign the variable Description to another field of text called textResults_txt. However, when I type in the first text field, nothing appears in the second.

    Any ideas? Am I using the wrong method to monitor the text box?

    Thank you for your time.

    Stephen

    You don't want to lose an ENTER_FRAME for this.  You must assign an event listener for the input textfield that listens to a CHANGE event.  The event handler for this listener function will simply match the textfield in the first second.

    myText_txt.addEventListener (Event.CHANGE, assignText);

    function assignText(evt:Event):void {}
    textResults_txt.text = myText_txt.text;
    }

  • Precise triggering voltage input and output generation in the DAQ Assistant

    Hello

    I wonder if anyone has come across a simular problem with the synchronization of input and output voltage. I use a box 11 LabView and NI USB-6259. I have been using the DAQ Assistant to configure the input and output channel. In particular, my task is to generate a single rectangular "pulse" as the output voltage to drive a coil and once the pulse went to get a signal from a sensor of magnetic field and get a power spectrum. This means that the order and the time during which the DAQ Assistant is used is extremely important. For example, the output voltage channel must be opened first for 2 seconds. Subsequently, the channel of input voltage must be open for 1 second, in which the sensor signal is obtained and post-processed. Only after these tasks are performed in this order he can can be repeated in a loop until the experiment is over. I don't know how to trigger data acquisition assistants (one for entry) and the other for the voltage output correctly. Y at - it a trick?

    See you soon

    Michael

    Hi Dave,.

    Thank you that I wired the error strings but the timing issue was unrelated to it. In the DAQ assistant, I simply had to choose the continuous aquistion of the 'samples' methods 'N-switch' for input and output voltage and all works fine now.

    Thanks again

    Michael

  • XDB user name and password to access the page configuration EPG on a pluggable database APEX

    Hello

    I have a base shared of the Oracle (12.1.0.2) 12.

    I have an APEX PDB 5.0 file. There is no APEX installed on the CDB (root).

    Connected to the PDB, the registry says:

    Name of the ID Version State

    ------------ ----------------------------------- ------------ ----------

    APEX Oracle Application Express 5.0.0.00.31 VALID

    I want to configure the EPG for this PDB.

    I did the following (in this order):

    (1) race: apex_epg_config.sql

    (2) race: exec dbms_xdb.sethttpport (8080) - the firewall is open for this port

    (3) race: change the anonymous user account unlock;

    (4) run:

    Start

    () DBMS_NETWORK_ACL_ADMIN.append_host_ace

    Home = > ' *',

    As = > xs$ ace_type (privilege_list = > xs$ name_list ('connect'),)

    principal_name = > "APEX_050000"

    principal_type = > xs_acl.ptype_db));

    end;

    /

    I find myself with the APEX-based users:

    Account

    Status of user name

    ------------------------- -------------------------

    FLOWS_FILES EXPIRED & LOCKED

    APEX_050000 EXPIRED & LOCKED

    OPEN APEX_REST_PUBLIC_USER

    OPEN ORDS_PUBLIC_USER

    OPEN APEX_PUBLIC_USER

    OPEN APEX_LISTENER

    ORDPLUGINS EXPIRED & LOCKED

    ORDDATA EXPIRED & LOCKED

    ORDSYS EXPIRED & LOCKED

    ANONYMOUS HAS EXPIRED

    ORDS_METADATA EXPIRED & LOCKED

    I used the documentation:

    https://docs.Oracle.com/CD/E59726_01/install.50/e39144/EPG.htm#HTMIG386

    When I run from the browser:

    http:// < IP address of the server >: 8080/apex

    I get the messge:

    "APEX request a user name and password XDB"

    Does someone has encountered this situation in a PDB file?

    Thanks in advance for any information.

    Thanks and greetings

    Hi Patrick,

    Laury wrote:

    I have a base shared of the Oracle (12.1.0.2) 12.

    I have an APEX PDB 5.0 file. There is no APEX installed on the CDB (root).

    I want to configure the EPG for this PDB.

    I find myself with the APEX-based users:

    Account

    Status of user name

    ------------------------- -------------------------

    ANONYMOUS HAS EXPIRED

    The problem is the ANONYMOUS account has expired.

    Reference: Re: XDB username and password

    I think that this issue is addressed in your previous thread so: Oracle APEX server requires a user name and password of the server said XDB?

    And here's the thread where Jason explained the reasons: Re: installation of the Apex (4.2.2 on 12 c)

    Kind regards

    Kiran

  • When I try to get into google I get a certificate error and do not trust the site

    When I try to enter in google site I get a certificate error and a message not to trust site and put / add www in the address bar, but it does not work either thank you for anyone who can help

    Please start with the basics:

    http://www.elephantboycomputers.com/page2.html#Removing_Malware

    Report with the results if you need assistance. MS - MVP - Elephant Boy computers - don't panic!

  • Acer asl3600 will not start only get option is F12 and no data on the recovery drive.

    Hi guys have Acer asl3600 will not start only option get is F12 and no data on the recovery as disc was in vista family 32-bit premium version devastated as being disabled and need for my community work & charity, thought best option would be a recovery disk.

    Concerning

    Dennis

    Hello

    Manufacturers recovery disks normally do not have Service Options; they are normally a relocation to the factory only settings option.

    Acer definiterly only reinstall to factory settings, new condition.

    Here is the guide to repair Options using a Vista DVD from Microsoft.

    If a friend or a work acquantance of yours has one, you can borrow and use it for repairs.

    http://www.bleepingcomputer.com/tutorials/repair-Windows-with-Windows-Startup-Repair/

    Table of contents

    1. Overview of Windows Vista repair options
    2. How to perform an automatic repair of Windows Vista using Startup Repair
    3. Advanced Tools Overview
    4. Conclusion

    If you do not or can not borrow a Microsoft DVD there is a download of a file ISO of Vista Startup Repair available that you can put on a Bootable floppy to make the above startup repair and that the method is recommended by a large number of posters in these Forums.

    Unfortunately, you have to buy it.

    Here is a link to it:

    http://NeoSmart.net/blog/2011/Windows-Recovery-discs-updated-reinstated/

    See you soon.

  • Machine Vista "frequently", but not always, ask user name and password to access the public folders on the XP machine.

    Location:

    4 x Vista computers
    1 x XP computer acting as a server file, all the data in the "shared folders".

    All 4 Vista computers were to access shared data on the XP machine for two years without problem. All of a sudden this week one of the Vista computers "Frequently" but not always ask for a username and password to access the machine XP - not only shared folders, but still a list of shared resources on the machine XP via my network places is the result in the box of "connect to" request credentials to appear. All 3 other Vista machines have no problem to access the XP machine, so the problem must be with the a Vista machine.

    To put a spanner in the works as I have said in this case "Frequently" and by that I mean probably 9 of the 10 connection attempts. Let's say, you can see the name of the computer in my network places, you double click it and have asked for credentials, cancel the attempt and to repeat 4 or 5 times and then you could get display shared resources without going into the details of connection. For a few minutes, you might be able to access all the shared data and to navigate through the folders, but then all of a sudden have asked you credentials and can not access to anything, even the files accessed you seconds before.

    Lets say you are able to access the shared folders, you navigate to the Parent folder, then under A folder, then a subfolder B, go back to A notebook, then try to access folder B even once and you get guest credentials, quit out of the network completely locations, navigate back to the XP via Network Places and this machine you not even be able to display all the shared resources on the XP machine.

    I've also set up a shared folder on a Vista machine with matching username and password on the machines and the Vista machine with the get the problem exactly the same problem so this definatley Vista machine with the question and not sharing files on the XP machine.

    Someone at - he met before or have any suggestions?

    Hi MikeBarnes,

    You can check in the Analyzer for performance and reliability.

    Step 1:

    To start reliability monitor and performance monitor

    a. Click Start, right-click computer and click on manage.

    b. in the Microsoft Management Console navigation tree, click on performance and reliability.

    Step 2:

    You can also try a system restore to a point before the problem started.

    Note: When you perform the system restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To run the system restore, you can consult the following link:

    System restore

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-system-restore

    System Restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • HP 8600 will not update for web solutions connected, just gets to half way and goes back to the House

    Then click the icon for web services enabled that it says it needs an update, I try this and it never ends. Goes back to the home screen and I can't access it from any computer on the network that I have the software installed on.

    Windows 7 64 bit on a computer and windows vista home basic svc pak 2 other.

    I just tried again, reset the values by default, restored the wireless connection to the router Linksys, click on icon for web services, put on day of technology required, clicked on OK, started download again, got 57% and are returned to the home screen!

    When I tried again... he hung up on the screen asking me if I want to activate the automatic update. Had to turn on the printer works to clear the screen. I think I got a LEMON! If I don't get any help or solution to that soon he'll be back!

    Hi Jasonlq,

    This error sometimes occurs when the network connection is slow. The upgrade file can not be downloaded correctly and it times out.

    Recommend that you restart the printer, and then try again. Also try and see if other devices in the same network are hogging the bandwidth of the internet connection to the downturn.

    Let me know how it goes.

Maybe you are looking for

  • Pavilion TX n004 15: mother of replacement for Council

    My laptop motherboard is damaged and I need to replace it. How can I find the model number of the motherboard used in my laptop. Can I get online? What are the different motherboards that can suit the configuration of my laptop? Thank you

  • Use of VxWorks memory - cRIO-9014

    Suggestions how to monitor the memory usage in the RT on the cRIO itself?

  • How to export address book in outlook express 6 for window live mail?

    I can't find a compatible format of address book for outlook window live mail express 6

  • D110 printer

    My printer is connected to my wireless network and I can print.  However, I can't scan.  When I try to run the diagnostics, the printer is not detected (although I can print).

  • AnyConnect &amp; FIPS

    We test using Anyconnect for our VPN needs and I have a question or a concern about FIPS. Our ASA test is a 5510 with 8.2 and using the Anyconnect client version 3.1 and tests on Windows 7 Pro (32 bit). The VPN works very well, but we noticed that wh