Another question...how do i test an alphabetical input?

When a user enters letters instead of numbers the program should output a message saying "You can't type a letter". This is not working.
Anybody know what i might of done wrong in my code?
                   if (amount < 0) {
                       theOutput.setText("Try again");
                    else {
                        theStock.addStock(pn, amount);
                        Product pr = theStock.getDetails( pn );
                        theAction.setText(               
                        pr.getDescription() + " : " + 
                        theMoney.format(pr.getPrice()) +
                        " (" + pr.getQuantity() + ")" );
                catch (NumberFormatException e) {
                    theOutput.setText("You can't type a letter");Edited by: LevelSix on 17-Feb-2010 04:19

LevelSix wrote:
flounder wrote:
Of course you get an error. What heck is "([a-zA-Z])" supposed to do?Sorry, can you tell me how to write it properly.Difficult to say since the above ([a-zA-Z])" is nonsense.
If you have a compound boolean in the if statement, each boolean should stand be able to stand on it's own. All the statements should be bound within a parenthesis. Again, read the tutorials on if statements for more.
It's supposed to see if an alphabetical, of any case, letter has been entered.
Please don't get angry at me, i'm not trying cause any trouble.No one's mad at you, but you are somewhat reluctant to provide the details that have been requested above.

Similar Messages

  • Another question:how to hide my toolbar

    My plugin will create a toolbar when the program startup.
    I want to read registry to decide whether to show my toolbar.
    How to do this?
    I do not found a method to hide toolbar.
    Thanks.

    AtinWadehra wrote:
    You'll have to remove each button everytime.
    To hide all the toolbars automatically, you need to open the document in Reading mode with the registry key HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\RIF\bOpenNextInReadingMode having the value 1.
    I can not find the item "RIF" in my registry.
    BTW,what's meaning of key bOpenNextInReadingMode?
    Thanks.

  • How can i test my vpn connection?

    so recently i decided to test if ver 1.3.0.3 of the quickvpn client would work better with the 1.3.0.5 rvs4000 firmware. i loaded quickvpn to an xp pro computer (freshly built, i might add) and got to work. in order to test the connection, i attempted to piggy back off an unsecured wireless network. this network is on the same ISP network as i am.
    i use dynamic DNS, and the unsecured wireless network could resolve my IP correctly, but for some reason i couldnt connect to my home network from the unsecured network. my router is set to respond to lan requests, but i couldnt ping it. my router passes HTTP traffic to a computer in my network, but i couldnt bring up the webpage. finally, my router responds with the router config page over port 443, and i couldnt bring that up.
    so i used my ISP's dialup service to test. initially, as always, i had a million problems with the vpn client. systematically, i tried to resolve the issues. i installed the patch in the readme for quickvpn. i checked log files to see where stuff was failing. eventually, i could connect to the VPN, but would get that "remote gateway is not responding" crap. i know of a (poor) workaround for this which allows you to "finalize" the connection, but that workaround doesnt allow you to ping around in your network. sometime later, after randomly messing with settings, the tunnel would connect without the workaround. i have no idea what "fixed" this.
    despite all this, my 28.8Kbps connection wouldnt allow me to do anything meaningful on my network. i couldnt connect to the router or to a server of mine (http or fileshare). the only thing i could do was ping internal devices. other requests seemed to "hang" rather than timeout or do anything more concrete. basically, i gave up on testing using dialup, even though my router and the client software confirm a good connection. but i still wasnt convinced.
    next, i figured i could create some type of "DMZ" on my network by placing a switch between my ISP's modem and my router. im not a cisco network professional by any means, but im pretty familiar with networking on a above-average level. that said, despite my best, i couldnt get my quickvpn computer to see my router from the "DMZ".
    finally, i figured i could just test the tunnel while directly connected to my network's lan. bad idea. everything seems to go okay until it locks up on "activating policy". rebooting or otherwise ending the negotiation ends in the computer being unable to do anything anymore. when i try to ping anything, i get "negotiating ip security" ad infinitum. the only way i could fix this was by doing a system restore.
    so here's the question: how can i test my quickvpn connection?why can't i just tunnel through my network? and before you scream that you can't, thegreenbow vpn client has NO PROBLEM connecting to my rvs4000 while connected to my own network.

    Hi Aaron,
    I am going exactly the same thing as you however, I had my cousin buy and install a RVS4000 at his house in Australia.
    I access it from the USA so that I can help manage his Local Area Network, he is just not technical..
    I setup a DDNS client on his RVS4000 so that I can always get to his Router via a domain name rather than a IP address.
    I noticed that you didn't mention anything regarding importing client certificate into the directory of the VPN client on your PC.
    I also noticed I disabled IPSec passthrough on the router in Australia, see the pictures below, not sure why, but the VPN client is working.
    I also did not setup any gateway to gateway VPN tunnels, Only added a client , exported certificate as per the manual, See the last screen capture below.
    You will also note if you view the screen captures that my cousins RVS4000 has not been upgraded to the new code.Is there a reason for that...not really...he's just a user, not really technical.  Also note I have not added any VPN tunnels on my RVS4000.
    I have a reasonably reliable connection between the USA and Australia. I didn;t have to play with any other options, just add users to the VPN client database.
    Your description of the working environment of your PC is missing details on the version of XP, so i will mention the following taken from the software release notes of the RVS4000 ;
    There is a known issue with Windows XP SP2 Firewall.
    ICMP packets are always dropped by the firewall when the firewall is enabled.
    This issue causes the QuickVPN client to be unable to establish a tunnel with the remote QuickVPN server successfully.
    Microsoft has released a patch to fix this issue, which you can get from:
    http://support.microsoft.com/kb/889527/en-us
    After you install the patch, the issue should be resolved. You can also fix this issue by upgrading Windows XP to SP3.
    You cannot plug a PC on the same network as the router for testing, they must be on dissimilar WAN  networks for testing purposes.
    Your remote  PC VPN client will not be allocated a IP address in the RVS4000's network, hosts behind the RVS4000 will still respond to pings, as they direct the responses to their default gateway, the RVS4000.
    The thegreenbow VPN client is a distracter at this point costing 50 something EURO  for a license, lets try to get the quickVPN client working !
    So, if you still wish try the following, firstly make sure your XP has been upgraded to  SP3;
    1.  If you upgraded your router to the new version of code, then reset your router to factory defaults to re-initialize your router, yes start again.
    2.  Export the VPN client certificate to the directory that contains the VPN client.  In my case it is;
               "C:\Program Files\Cisco Small Business\QuickVPN Client"
    3.  add a VPN client account to the router
    4.  Use port 60443 from the quickVPN client. and try  VPNing to the router.
    5  hmmm, if the client still fails try disabling IPSec Passthrough on the router for grins and giggles.
    If this fails, call the SBSC at the following location for resolution;
    http://www.cisco.com/en/US/support/tsd_cisco_small_business_support_center_contacts.html
    good luck ...regards Dave

  • How do you test your new laptops?

    To the gurus or people who have researched this question:  How do you test your new laptops?
    When you get a new laptop, what do you do to test it?
    My X1Carbon might arrive in a couple weeks, and reading about all the failures and DOAs is scary. So assuming mine is not simply DOA, how do you shake out the less obvious or more obscure problems?
    I did search for this info before posting. One other person asked the question, 
    >> Would appreciate advice re optimal set-up and what testing/diagnostics to do to determine if ther...
    but no one answered.

    With testing I start with the basics and work my way to the harder stuff.
    Inspect the external condition of the machine.
    Boot and enter the BIOS before Windows. Review settings then power off.
    Boot from Acronis True Image Home backup/recovery DVD and clone HDD or SSD and thus the factory image before it's ever booted to Windows.
    Boot to Windows and look carefully at the Lenovo factory image and try to get an understanding for the Lenovo software and why it is there.  This does not include the other software from Microsoft, Google, etc.
    Create Lenovo Factory Image DVD set with Rescue and Recovery.  Throw disk set in the box or put on the shelf in case the machine is ever re-sold.
    Test all of the ports - I test every port on the machine for my expected usage.  For instance, in the case of the X1 Carbon I would confirm the mini DisplayPort connection works correctly with an external LCD panel.  If the machine had a IEEE firewire port or something, test that.  Test the USB 3.0 ports with a known working external external enclosure and verify transfer speeds.
    Test the SSD speed with CrystalDiskMark, ATTO and AS Disk Benchmark software to get a good overview of the performance.
    Install HWiNFO and look carefully at the components.  Observe turbo boosting, thermals and fan RPM over the course of a few days for battery and AC power.
    Do at least one full battery discharge and recharge.  Observe the cycle and details are being properly displayed and recorded in Lenovo Power Manager.
    Download all software and drivers from support.lenovo.com for the model being tested.  Confirm visually you have all the core components needed.  Core includes the drivers, power management driver, Power Manager, hotkeys, etc.
    Flatten the machine and install Windows or Linux from scratch.  Install drivers and software.
    Re-test ports and confirm the machine is working properly.
    Benchmark the SSD again.  Confirm no change.
    Install HWiNFO and confirm turbo, thermals and fan speeds are still proper.
    Install core applications and test them.  There may be core features in Windows that also need to be installed and tested.  For instance, Windows 8 Hyper-V for virtualization. 
    Connect any external devices you expect to use and test them.  For instance, video cameras, smartphones, mp3 players, digital cameras, printers, USB docks, etc.
    Do several battery tests with your typical applications and behavior.  The goal here is to simulate how the machine will be used in your day-to-day setting or travel scenarios.  I usually do at least three tests.  This can be rather time consuming with long battery life machines so I get a lot of other testing out of the way first.
    By the time you get to this point, if you haven't hit any major roadblocks you'll start to have a good feel for the machine, and if it is going to be a keeper or not.  The assumption here is that during this timeframe you have been observing the screen, keyboard, and trackpad performance to see if it's to your liking.  The other assumption is that you are using the machine and applications in the scenarios you are purchasing it for.
    I don't run synthetic benchmarks.  I prefer to test a machine against the scenarios I expect to use it with.  I spend most of the first week making this assessment.  If any major hardware defects are present, the machine is automatically returned.  I do not repair machines just received.  No exceptions.
    Week 2 is for ironing out any minor issues and assessing if the machine meets the requirements for the scenarios it will support.  If it does, it is kept.  If it does not, it is returned.  This week includes subjective and objective input.  You have to weigh the pros and cons for a machine against your priorities. It is rare that a machine is perfect so you have to decide the ROI for the machine.  Service and Support must be considered so week two might include a call to support for any unresolved issues.  Don't discount the service you receive during this period.
    After week two, you are likely right on top of the last day to return a Lenovo machine.  The return period is 21 days from the invoice date (I believe), not the day the machine is received so make sure you are well aware of it.  After 21 days, the machine is yours for good unless you sell it.  Decision time.
    Good luck.

  • TS4124 Hi, do you know how can I upload inelegible songs from itunes to Icloud. They are songs added from original CDs. Another question would be how can I transfer all the music I have in my Ipod Classic to my Itunes or ICloud as I want to back it up.

    Hi, do you know how can I upload inelegible songs from itunes to Icloud. They are songs added from original CDs. Another question would be how can I transfer all the music I have in my Ipod Classic to my Itunes or ICloud as I want to back it up.

    Depends on why it's ineligible.  If it's under 96 Kpbs, try right-clicking on the file and choosing Create AAC Version.  (If you don't see this option, go to iTunes>Preferences, click "Import Settings..." then choose "Import Using: AAC Encoder" and "Setting: iTunes Plus".)  Then rescan your library to see if this version will add to iTunes Match.  Or, after changing your import setting, just re-import the song to your iTunes library.
    If the song is over 200 MB you would have to reduce it's size to make it eligible.

  • Hi my question is how can I sort and delete photo files which I have had backed up multiple times? Another way how can I get rid of from the duplicate?

    Hi my question is how can I sort and delete photo files which I have had backed up multiple times? Another way how can I get rid of from the duplicate?

    Provide the name of the program you are using so a Moderator may move this message to the correct program forum
    The Cloud is not a program, it is a delivery process... a program would be Photoshop or InDesign or Muse or ???

  • Hi ya'll! I'm still learning how to navigate my way with Lightroom. (Last time I wrote, I did get some responses that work. Thanks so much!) Now, I have another question. When I try to copy pics from my external drive to a CD/DVD, no matter if do it from

    Hi ya'll! I'm still learning how to navigate my way with Lightroom. (Last time I wrote, I did get some responses that work. Thanks so much!) Now, I have another question. When I try to copy pics from my external drive to a CD/DVD, no matter if do it from LR or my drive, I keep getting the message; "Disk burning is not supported by LR on this computer." I've tried everything I can think of, so, I thought I'd see if anyone may know if there's anything I can do. Or could it be that my computer just can't handle it? Help!!! So frustrating!!  I have a PC Lenovo computer, I don't know if this makes any difference. Any ideas? Thanks so much for your help!!!

    Have you burned Discs with other programs using this computer? Are you certain that you have a drive that will burn discs?

  • Hello I told you before that my ipad stolen and i dont have icloud , now i pay another ipad and i'm surprise becouse i found my notes that in my stolen ipad in my new one but i don't find anything else no bookmarkets no photos .. My question how did this

    Hello
    I told you before that my ipad stolen and i dont have icloud , now i pay another ipad and i'm surprise becouse i found my notes that in my stolen ipad in my new one but i don't find anything else no bookmarkets no photos .. My question how did this happen ??

    Your documents were synched with iCloud when you logged in with your AppleID.   If you had a photostream before, you could access some photos using the stream.

  • How do I test a Java card applet with different AIDs on the fly?

    ... Like sweeping cards from employees in a queue of people lining up in the morning?
    When I created my applet, the aid is a fixed value inside the class.
    Whenever I wanted to test it with another value, I changed that AID and rerun the applet.
    I find it very cumbersome that needs to be rerun and rerun, over and over again.
    How do I test the applet easily with any values of AIDs that I'd like to put in, on the fly.
    I know I can't simulate the sweeps of card in the applet because I can't have a main method with a signature
    of Strings[] args or String[] args. I can only have JUnit to help me out, but still java card doesn't allow either
    main(Strings[] args) or TestCase to inherit from.
    Thanks
    Jack

    your question is hard to understand but:
    an applet always has one definite AID and you cant change it after install as far as i know
    a) you want to test many cards with diffrent AIDs?
    ->send a list of select commands and check the return values
    b)you want one card with the same applet to be available for many AIDs?
    ->install many dummy applets forwarding the commands to one core applet
    c)i think i didnt get your point :/

  • I have a question takig the CLAD test wed

    A Waveform Cluseter contains each of the following elements.  A.  t0, dt, Y  B. X, Y, dt  C. X, Y, t0, D. none of the above.  Chose A, B , C, or D please

    Thanks people for your help.  I do not how tgo use labview help, b ut not to answer these sorts of questions. Also, the test does not have questions on how to use labviuew help, from the examples i have seen.
    So here is another, if someone could tell me how to use help top actaully find these answers that would be great.  I do not think help is setup to answer test questions
    here is anotrher
    All of the following statements regarding SubVIs are true except.
    A.  They require less memory
    B.  They allow for easier debugging
    C   They allow yopu to use the same code for many future applications
    D.  All of the above are true.
    I say answer is B  makes debugging more difficult?

  • Another question re:daisychaining lacie, canon, g5

    I read the post from a few days ago about problems capturing while a lacie is plugged in at the same time that a Canon camcorder is plugged in and I have encountered the same problem (I am using FCE). I also read how someone said they have dealt with it, i.e., capturing to the internal, restarting, then moving the clips to the LaCie. I have done this (prior to reading this, not as a result of reading it), but encountered a problem. I lost everything.
    I moved the captured clips to my LaCie--or actually, a copy of the clips was made when I dragged and dropped. I then went back and moved the "original" clips to the trash and emptied the trash. When I went to use the copied clips on the LaCie, they appeared to be there, but all the data was gone. In other words, I couldn't use them in the sequence I had begun. I had to go back and 'capture project' to get them all back. Major bummer.
    So here's my question. When "moving" captured clips, render files, etc. from the internal drive to my LaCie, they don't appear to be truly moving, just copying. Is there a way to move the original files so that I'm not having to move anything into the trash? I've been working on an opera on the internal drive and now have run out of space halfway thru rendering (I so knew this was coming!). I've "moved" (copied) all the captured clips and render files to my LaCie and subsequently dragged the "originals" to the trash in an effort to free up space. I am now petrified to empty my trash. I'm scared that my two-hour opera that took six hours to capture and another week to put together will be lost completely. Can anybody help???
    Another question: is there another brand of external hard drive that is compatible with my Canon GL2? I'd so love to just be able to capture right to the external...
    Thanks!!!
    Heather
    iMac G5   Mac OS X (10.4.2)  

    Hi Heather.
    I don't know what happened to your clips but it is certainly not normal!
    When you drag and drop to your LaCie you are making a perfect byte for byte copy of your originals. They are identical.
    There is no way you can "move" your originals to another HD and have nothing left to trash.
    What I suggest is do a little test - capture five minutes of video and copy it across. Delete the original files and try a few minutes of editing - a few cuts, several transitions and effects to check that everything is OK.
    Ian.

  • How can I test SSL communication

    I have successfully imported a SSL certificate to d:\JRE\Sun\1.4.2\lib\security\cacerts in Windows 2003 server. How can I test this SSL communication between my server and the other SSL Windows server?

    michaelfromchattanooga wrote:
    There is a card plugged into the reader, and it has good data on it as I have just used the printers card reader to copy the pictures off of it. But the wireless printer is very slow.
    I contacted Sonnos (manufacturer of the expresscard/34) and Eric from their support department was kind of smart-mouthed about it. He assured me with 100% certainty that I had inserted the card reader backwards. I replied to him that the card will NOT allow you to insert it backwards, by design. This was yesterday and he has yet to reply.
    My main question is if the card reader  is defective, or is the slot on my Macbook Pro defective? I only have one MBP so I can't test the card reader in another machine.
    Anyone?
    Is the slot being recognized in your system profiler?  >(option key)About this Mac>Hardware.
    You can also run the Apple Hardware test by booting with the D key held down.
    You can try put the card in before you boot or reboot with it in. It may only recognize if  present at boot.
    MacBook Pro, Mac OS X (10.6.7), 2.4GHz IntelCore i5 320 HD 8GB RAM

  • How do I sort instances alphabetical?

    Hi!
    In a crew list I make, I have to sort all the crew members alphabetical on surname, or more precisely: the XML output has to be sorted this way. Of course it would be neat if the sort function, sorts the instances in the pdf form on the screen, but it is not necessary.
    So far I have had success in making the form by using instance manager to add and remove crew members, but I don't have a clue what methods could be used to move records. I have tried different approaches to the
    xfa.dataWindow.moveCurrentRecord(1)
    but all I understand is that I do not really have any idea of how the it works.
    Another question comes along when/if I manage to move a record; does Acrobat understand the alphabet as a sorting index, or would I have to make it understand?
    Best regards
    Håkon Helliesen

    Yoy can read the contents to an array and then sort the array and put the contents back
    function sort( {
    namn=new Array(19);
    namn[0]="[email protected]";
    namn[1]="[email protected]";
    sortednamn=namn.sort();
    alert(sortednamn[0]+" "+sortednamn[1]);
    I dont know what will happend with the national character i Norway
    if it is a Jet db you also can use a index that is sorting the contents.
    /Ulf

  • How can I test my thunderbolt port? It's not working after the update to 10.10.1

    I have been using my computer with the Thunderbolt Port for a while and after updating to 10.10.1 and after I while of using my computer I tried to use the thunderbolt port with my external monitor.. and it doesn't work at all.. video doesn't come out.. I tried a different screen with the mini adapter from thunderbolt to HDMI and another with thunderbolt to VGA and in both adapters I don't get video from my mac.
    Any idea how can I test my Thunder bolt port?
    This is what I have done:
    1 cable adapter thunder bolt to mini HDMI to an LCD screen with HDMI : No video, but my computer detects that there is something connected
    2 cable adapter thunder bolt to VGA to an LCD screen with VGA : No video, but my computer detects that there is something connected
    3 cable adapter thunder bolt to mini HDMI to an 40' TV with HDMI : No video, but my computer detects that there is something connected
    All the test pass from the Hardware test at the startup (press D at boot time).
    Any ideas? my guarantee it's expired and no coverage. Due the nature of where the port it's installed, if this is a hardware problem seems that I will (may be) have to buy the Logic Board.. no good. No bueno!!
    Thanks!!!

    restore iPhone

  • How can I test a RTP(send&receive) application on the same computer?

    I an writing an application that lets one computer (A) sends a media file to another computer (B) and B receives it and play it.
    But how can I test this application on the same computer
    Eg.Transmitter: localhost 43000
    Receiver: localhost 43000
    It will retuen an error since the port number is alreeady used by another program.
    I know if I test it on different computers, it should be fine, but how can I test it on the same computer?

    JMStudio sends RTP packets from the same UDP port as the specified in the destination port, so you can't try it in the same computer. The examples provided in http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html follow this rule aswell, but it's easy to modify it:
    rtpMgrs[streamid]=RTPManager.newInstance();
    localAddr = new SessionAddress( InetAddress.getLocalHost(),localDataPort);
    //By deafault, in the examples, they use  remote DataPort instead of localDataPort.
    //You can specify localDataPort to any different free port number, or to
    //SessionAddress.ANY_PORT if you don't mind the port number
    remoteAddr  = new SessionAddress(destIpAddr,remoteDataPort);
    rtpMgrs[streamid].initialize(localAddr);
    rtpMgrs[streamid].addTarget(remoteAddr);

Maybe you are looking for

  • K8t neo2-FIR lock ups

    hey i'm posting for my friend who recently got a new setup for his computer antec 400W power supply 3200+ k8t neo2-FIR sapphire radeon 9600XT 512 meg major brand ram 2 80 gig harddrives onboard sound/lan i'm not too sure of the psu specs the computer

  • Any way to apply ActiveSync Policies by device?

    Trying to find a conclusive answer to where this is possible or not... Essentially, we have some users who wish to access email from Surface Pro tablets using activesync. Our existing policies that we enforce would require them to encrypt both the de

  • Check the BER using TCP/IP

    Hi I work on a laser communication link. We want to make it more efficient, so this link has one computer connected to each side of the laser. I use LabView TPC connection to transfer a file from on side of the link to another side. However, when I c

  • 30" Monitor Display... Tiny View of Applications and Windows

    Hello! My 30" was is set at 2560 x 1600 and was in the wrong port... the images were blurry. I switched over to the proper port and everything is very crisp. However, I am working on a 30" screen and all of my programs and windows are very small in c

  • Tween Class Tuturial (k)

    I am brand new to the Tween class. Would like to use it to animate some text. Don't know where to start. Is there a good tuturial somewhere? The one on Adobe is complicated. Need a no-brainer version. -Kirk