STARTED IT, BUT STILL NEED HELP -- INPUTTTING CHARACTERS FROM LOADED FILE INTO TABLE, SELECTING STRINGS FROM TABLE AND PLACING IN NEW TABLE, SAVING NEW TABLE TO SPREADSHEET FILE

I AM TRYING TO IMPORT CHARACTERS FROM A TAB DELIMITED FILE INTO A TABLE ON LABVIEW.  ONCE THE DATA IS IN THE TABLE I WANT TO BE ABLE TO SELECT INDIVIDUAL STRINGS FROM THE TABLE AND PLACE IT IN A NEW TABLE.  WHEN I CLICK ON A STRING I WOULD LIKE THE SELECTED STRING TO SHOW IN A TEXT BOX LABELED 'SELECTED STEP'  AFTER ALL THE SELECTED STRINGS IS IN THE TABLE I WOULD LIKE TO SAVE THE NEW TABLE AS ANOTHER SPREADSHEET -- TAB DELIMITED -- FILE, MAKING IT ACCESSIBLE TO OPEN.  HERE IS WHAT I HAVE SO FAR.  I CAN INPUT DATA INTO THE TABLE, BUT I CAN ONLY TRANSFER ONE STRING INTO THE TABLE I WOULD LIKE TO BE TO INPUT MULTIPLE STRINGS.    ALSO WHENEVER I TRY SAVING THE FILE, IT ALWAYS SAVES A UNKNOWN FILE, HOW CAN I GET IT TO SAVE AS A SPREADSHEET FILE.  THANKING ALL OF YOU IN ADVANCE FOR YOUR HELP!!!!!!
Attachments:
Selector.zip ‏30 KB

Pondered,
   The question you are asking is the same one that you asked in: http://forums.ni.com/ni/board/message?board.id=170&message.id=132508#M132508, to which I supplied a revised version of the original vi you used (which was modified from the original one I supplied to an earlier thread). A couple of questions: 1) What does my latest not do that is in your question, 2) Why are you starting yet another thread about the same problem?  We are here trying to help, it makes it a lot easier if you keep the same problem in the same thread, it reduces duplication of effort from those that might not have been following the previous thread(s).  Those of us that don't have our "names in blue" are just doing this "for fun" (the blue names are NI employees, who may still be doing it "for fun"), and it makes it more fun if it doesn't seem (correctly or not) that our attempts are ignored.  If an answer doesn't help, or seems incomplete, post a little more detail to the same thread so that the original respondent, or someone new, can provide more information, or understand your problem better.
P.M.
Message Edited by LV_Pro on 07-20-2005 01:20 PM
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • I had to remove Mavericks and do a reinstall on 10.8.5 but still need help...

    I have been trying to undo my Mavericks upgrade in October and after considerable effort I am mostly got back to 10.8.5 OS but still need a bit of help. I just want the previous OS back in place then I'll try Mavericks soon....
    1)               I never seem to pay attention so is 10.8.5 the last OSX prior?  As long as it isn't Mavericks, I want to get it installed.
    2)               I had to reformat my iMac so I have a residual elements from 10.9 and one issue that I had before was permissions. Every number of files either on other hard drives or sometimes in my same user folder was asking for permission and authentication to simply move a file.. A popular one you'll see at the bottom the person/whatever/ problem known as fetching.  Could someone just give me the general reason of this fetching and permissions problem that I ran into?  Better yet since I just want to avoid it altogether into the future tell me what's the best way to assure it disappears forever.
    3)          Another, which is kind of a big ticket item for me is the backup/restore/cover your (!!!) system. I was a good little iMac User and had Time Machine backed up for a period prior to the Mavericks install. I'm a little bit upset that TM isn't 100%....but what is...?  I need another backup/restore system in place and that's what I am looking for recommendations on.  An item that saved me a bit was that I had OS 10.8.3 on an external hard drive.  The problem with that one was it was on a partition, on one of the drives requiring to be reformatted.  It worked as a bridge consolidating files and all but was a big headache as a partition on the external. Recovery Disk did it's part but wasn't enough as well.   Is there a simple/easy idea...clone, disk images, boot from an external drive… ?
    4)          iPhoto (9.4.3) currently will not open the libraries which iPhoto (9.5) converted. Is there way to go back?  Seems the App Store and Software update don't like something. I'm getting into a loop with App Store, iPhoto and the OS. Either the software needs operating system ... then the App Store says it's incompatible or some other complaint.  Right now I have 9.4.3 iPhoto installed for OSX 10.8.5 and was only able to create a new library and the converted ones currently do not open.
    Thanks to your help

    10.8.5 is the lates ML edition.  I use TM and also carbon copy cloner as my second backup.  If I were you and you have a TM backup prior to Mavericks I would try another restore at bootup.  You should erase your drive first in that process using disk utitlites and then use TM to put back you apps and files.  The other choice is to do an internet recovery and then use TM to restore your apps and files.  That should fix the permissions issue.  I did the same thing and all was OK including getting my original iPhoto progam (9.4.3), iphoto11 and photos back.

  • I've searched and read 4gb vs 8gb discussions, but still need help.

    Hi again,
    I've done my due dilligance by searching and reading all discussions related to this matter- but I still have a question.
    I've decided on the 13" Air, 15, 256gb.  My last decision is the ever so debated 4gb vs 8gb.
    From ALL of the discussions I've read (here and elsewhere online) 4gb seems to be enough for the average person, and some have even tested the capacity by opening 16 applications and programs.  Most of the responders are also saying 4gb is enough "if you want to keep the computer 2-3 years".  Well- what if I'd like mine to last 5-7 years?  (I'm working on a 2006 dying MacBook Pro currently with 2gb memory and a 100gb harddrive). 
    This is a HUGE purchase for me, as I do not have money to spend often on replacing big ticket items.  I'd like to NOT spend the extra $136 unless I need to, to make this machine last longer than 3 years. 
    Thank you!  This community has been a great help to me today

    Since cost seems to be an issue for you, between the 128 and the 256,....go with the 128 and the 8 GIG of memory,.....such as you have detailed, it would be a better choice given what you have well explained what you want out of you computer. Just pack around a super slim HD 500GB drive in the laptop bag with your air,..they’re only 7mm thick HD, much thinner than the AIR.
    I have an 13” I5 128 gig, and have nearly ever APP imaginable installed, and still have 82 Gig of wiggle room for editing, and other space needed for work.
    IF ASKED which is the better upgrade choice for the money,….256 upgrade, or the 8GIG of memory, most here will agree that it’s the 8gig of memory.
    HD space is extremely cheap (except inside the AIR, its SSD). If you don’t mind packing around a tiny HD, 65$ will get you 1TB, or 500GB in a superslim HD

  • Half-way there, but still need help with synching individual libraries

    Okay, I got my music xferred to new computer, but I'm still having problems synching individual libraries. When I did my daughter's library, I xferred purchased songs, then did the synch, so it wiped everything else out and just left me with the purchased songs (yeah, I know, big duh on my part). That's not such a big deal on her ipod because she only had about 350 songs, so I've replaced the majority of them already. However, my son and I have about 1000 songs each and I don't want to wipe out our libraries.
    So, when I plug in my ipod and pull up my library, what do I need to do to keep the songs already on my ipod and synch it?
    TIA

    Katrina you've been very helpful, I'm just having a hard time explaining myself, I guess.
    I now have all of my backed up music on my current computer, so that's all good. And I've set up individual libraries for each of us with ipods. Now I'm trying to figure out how to synch (for instance) my ipod with nearly 1000 songs with my own personal library on itunes (which is currently empty) w/o losing the songs currently on my ipod and having to drag them to my itunes library from scratch. The same applies for my son's ipod and itunes library.
    My daughter's ipod only had about 350 songs, which I wound up wiping out, so I had to start from scratch putting songs in her (itunes) library, which I can now synch with her ipod. However, that would be really time consuming to do with mine and my son's ipods, so I'm hoping to figure out a way to get the songs already on our ipods into our individual itunes libraries now.

  • Same problem with payment but still need help to s...

    Hello,
    Could one of the mods. please respond to this?
    Still have a problem with paying bill/dd's. As my next bill is due by the end of the week (23/9/11) I will be billed for the whole amount. Due to current circumstances I need to be able to have a monthly budget. This is something I tried to do but without going over old ground this is currently not working. As setting up a DD requires payment of outstanding amounts I am looking for now is options which BT can offer to be able to pay my bill in regular monthly payments. I also have been charged for late payments which is not helping the issue. Could you please clarify what options are available for me to do this? I believe that I have shown 'goodwill' on my behalf to make payments but to stop this from remianing an ongoing problem I would like to resolve this ASAP. Thanks.
    Gary Pocklington

    Hi oldgreygary
    If you drop me in an email I'll have a look over your account and see what we can do for you. 
    You could also give the billing live chat a try as well, you can get a link for it at the top of this board.
    If you would prefer, drop me in an email.  Use the 'contact us' form in my forum profile under the 'about me' section. You can find it by clicking on my username.
    Thx
    Craig
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)”
    td-p/30">Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Password and Blowfish? (Much closer but still need help)

    I'm still trying to decrypt a file encoded with a password-based (PBKDF2) Blowfish cipher. I'm bit further now but starting to run out of ideas. Here is what I have so far:
    // 1. Given a password, build a password-based key and from that build a Blowfish key
    PBEKeySpec kspec = new PBEKeySpec( pwd.toCharArray(), salt, iterationCount, keySize );
    SecretKeyFactory kfact = SecretKeyFactory.getInstance( "PBKDF2WithHmacSHA1" );
    SecretKey sKey = kfact.generateSecret( kspec );
    byte[] keyBytes = sKey.getEncoded(); // Is this right?
    Key bfKey = new SecretKeySpec( keyBytes, "Blowfish" );
    // 2. Given Blowfish key and initialization vector, decrypt the cipherText into plainText
    Cipher cipher = Cipher.getInstance("Blowfish/CFB/NoPadding");
    IvParameterSpec iv = new IvParameterSpec( initVector );
    cipher.init( Cipher.DECRYPT_MODE, bfKey, iv );
    byte[] plainText = cipher.doFinal( cipherText );In a full test bed, this compiles and runs just fine, except that it doesn't appear to decrypt the data as expected.
    More specifically, when I use Cipher.ENCRYPT_MODE to encrypt something like "This-is-a-test" and then decrypt the result with the code above only the first 8 bytes of the result return to plain text, the rest are garbage ("This-is-XXXX...").
    The simple test case, at least, should work perfectly but I'm still missing something crucial. The fact that the first 8 bytes decode fine but not the rest feels like a hint to me, but I'm just not getting what the issue might be as I used the same password, initialization vector, key-, and cipher-types in both directions (encode/decode).
    Help?

    Umm, mea culpa on the encrypt/decrypt test; that part works now (yay!) My core issue remains, however, and that involves getting the OOo document component (content.xml) to decrypt:
    The document meta-data definitely indicates "Blowfish CFB" which I take to mean "Blowfish/CFB/NoPadding".
    What would help me greatly is if someone (perhaps even you, Sabre) could take a look at the following code fragment and tell me if I'm (a) doing something fundamentally wrong here (specifically with the key conversion from PBKDF2 to Blowfish), or (b) if there is an alternative way of doing what I think(hope) I'm doing, which may have different/better results. My trouble is that the decrypt step on the document produces merely binary data (not compressed data which was to come out of the decryption):
    // 1. Create a password-based ("PBKDF2") key, then build a "Blowfish" key from that
        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance( "PBKDF2WithHmacSHA1" );
        PBEKeySpec pbKeySpec = new PBEKeySpec( password.toCharArray(), salt, 1024, 128 );
        SecretKey pbKey = keyFactory.generateSecret( pbKeySpec );
        byte[] encoded = pbKey.getEncoded();
        Key bfKey = new SecretKeySpec( encoded, "Blowfish" );
    // 2. Initialize a specific cipher with the key, and initialization vector
        Cipher bfCipher = Cipher.getInstance( "Blowfish/CFB/NoPadding" );
        IvParameterSpec iv = new IvParameterSpec( initVector );
        bfCipher.init( Cipher.DECRYPT_MODE, bfKey, iv );
    // 3. Decrypt it
        byte[] plainText = bfCipher.doFinal( cipherText );If full code would help, I'll gladly post it, but the above is the distilled core of the thing and probably easier to grok. Thanks!

  • 10.6.4 Woes - Read many threads but still need help!

    Howdy all!
    Here's the deal, I'm having problems which I can only trace back to the upgrade to 10.6.4. Everything seemed to be fine for a couple of weeks but something happened when I set-up my new office in my house (external monitor, hard drives etc) I've read so many threads and have tried different things but now am at a loss. I'm way out of warranty so I can even go to the Genius bar or will they charge me? Here's the gist.
    Symptoms:
    A) Long boot on gray screen, once finder is open the system is frozen for like 10 minutes, dock won't pop up etc. Mouse can move but won't click anything. After 10 minutes things seem to be fine.
    B) Computer won't wake up from sleep mode (like if I close the laptop cover) but it will wake-up if the display has gone off
    C) Firewire seems to no longer work
    Here's what I have tried already:
    1) Installed the combo update (fresh download)
    2) Repaired permissions (several times and it keeps finding them)
    3) Trashed my firewire port (no change)
    4) Disable airport (and basically what happens when I do this is that instead of waiting 10 minutes with just a mouse arrow, I have a beachball (non-spinning) for 10 minutes which then disappears when the machine decides to work) At one point I had a hazy blue screen over my desktop and that disappeared after 10 minutes but I've only had that happen one time
    5) My disk is OK per Disk Utility, and it says its S.M.A.R.T. status is enabled (or whatever it is supposed to say I forget at the moment but I checked it as one thread suggested and it was as it is supposed to be)
    6) The machine boots fine in safe mode - though it is still a long boot but you can use it as soon as the finder loads.
    7) The only thing I haven't done is zap my pram (will this help?) and how do you do it?
    Thoughts? I can roll back to 10.6.3 which I know has pros and cons but at least it works.
    My Applecare ran out and I'm pretty broke at the moment so I don't want to pay for support if I don't have to (although it's more than I don't want to spend a lot of time at the Apple Store to find out something I already know - that 10.6.4 is buggy!(
    Help please and thanks so much! Sorry for the long post but I thought I would try to save some questions. I've read so many threads it was all running together.

    Oh and yet a new symptom - I can't seem to sync my iPhone 3G. I could sync the photos to iPhoto, but not iTunes, it keeps timing out!

  • New to Numbers, tried the guides...but still need help

    Hi Folks,
    I have a fairly simple project; but I am new to Numbers and haven't found my answer after rooting through the guides and forums. So here goes...
    I have a few categories (red, green, blue, black, and yellow). Of these categories, there are different styles to choose from (pants, shorts, t-shirts, sweaters, jackets, and hats). What I'd like to be able to do is have a simple table, with dropdown menus (I believe these are called pop-up menus in Numbers). The first pop-up menu would be for the item color. When the color is chosen, I want the second pop-up menu to list the styles available to that color. When the user then chooses a style from the pop-up menu, I want the cell to the right to display the price. It would look something like this:
    Cell A1 (pop-up menu); Cell B1 (pop-up menu); Cell C1 = corresponding value for parameters chosen in A1 and B1.
    It's a simple pricing/order sheet that will have the same functionality for every row; that way users can have multiple rows if they need to buy multiple items, but the sheet is minimalistic in appearance.
    Any idea how I can do this in Numbers? I hope I explained myself clearly enough...
    Thanks!
    -Michael-

    knowledg333 wrote:
    In that case, the pop-up menus can be fixed (it just means the list might be longer than necessary - as some colors are not available for certain styles). Alternatively, the categories can be fixed in individual cells, and the style can be the only popup menu that needs to be chosen. For example:
    A1=Red; B1= (popup menu with all styles listed); C1= price for Red with the parameter in B1
    A2=Black; B2= (popup menu with all styles listed); C2= price for Black with the parameter in B1
    A3=Yellow; B3= (popup menu with all styles listed); C3= price for Yellow with the parameter in B1
    etc...
    Does that format eliminate the serious problem??
    Yes it does and in this case, you may use a popup specific to the color.
    To get the price of a given item, use VLOOKUP which will require a table storing the name and the price of the items.
    In the look_up table you may see the name of the items and the prices of existing ones.
    In cell B2 of Tableau 1, the popup menu offers the items : item1, item2, item3
    In cell B3 of Tableau 1, the popup menu offers the items : item1, item2, item4
    In cell B4 of Tableau 1, the popup menu offers the items : item1, item2, item3, item4
    In cell C2 of Tableau 1, the formula is : =VLOOKUP(B2,look_up :: A:D,2)
    In cell C3 of Tableau 1, the formula is : =VLOOKUP(B3,look_up :: A:D,3)
    In cell C4 of Tableau 1, the formula is : =VLOOKUP(B4,look_up :: A:D,4)
    Details about the used functions are available in *-iWork Formulas and Functions User Guide_*
    Yvan KOENIG (VALLAURIS, France) lundi 11 octobre 2010 23:32:43

  • Easy questions, but still need help!

    The first question is how do I change a ring tone? I have been able to change the ring tone before, but sometimes the ring tone doesn't even play. Instead of a ring tone playing, I get the phone vibrating. Is there something I must disable for the ring tone to play? Also, is there a way to change text messages alert as well? I also get vibrate on that one.
    The 2nd question is about the camera. When I take a photo on the camera, the image comes out distorted. Not the real image, but the preview of it. It seems stretched out. I think that's actually how it's suppose to be, but is there a way to change that?
    3rd question: is there a way I can add an e-mail to the address book? To text images to my e-mail mostly. If so, would they charge me for that (am thinking if texting to your e-mail is considered using internet or something like that).

    1st question, go to "profiles" it should look like a speaker.  Select which one you want.  If you choose loud it will vibrate for a second and then ring.
    2nd question, my camera sucks so I have never even really used it.  As much as I love my phone, the camera is the worst.  Sorry, can't help you there.
    3rd question, click on the contact you want to add the additional email to, select menu, edit, then menu again, choose "add email address" and type it in.
    I hope this helps. 

  • Warning this is very long code but i need help to see if I am on right trac

    I have done all the following code myself and it is the buisiness layer for my application. I have tried to follow recommendations on previous posts and I would like to be told where I can clean up my code and how? This is not complete and it looks very long to me but I need help in order to be better. There are 4 button vlivks and I have not completed them all. The criteria for application is that phonebook will accept new entries if they have names surnames and phone numbers that are not longer than 10 characters for display purposes but can change this. No duplicates are allowed. No editing of a existing entry must lead to a duplicate entry either. No new entry or edit may result in a new contact having no phone numbers.
    Many thanks for your time in advance,.....
    import javax.swing.JOptionPane;
    import java.util.ArrayList;
    public class Contact
    {// Start of the Contact class
         ArrayList<ContactDetails> phoneList = new ArrayList<ContactDetails>();          // To hold all the contacts
         ArrayList<ContactDetails> searchList = new ArrayList<ContactDetails>();          // To hold all contacts that return true on search
         ArrayList<ContactDetails> list = new ArrayList<ContactDetails>();
         String newName;                                                                                // To hold the new name
         String newSurname;                                                                           // to hold the new surname
         String newHome;                                                                                // To hold the new home number if any
         String newWork;                                                                                // To hold the new work number
         String newCell;                                                                                // To hold the new cell number
         final int MAX_LENGTH = 10;
         public boolean addToPhoneList;                                                            // Sets to false if there is an invalid entry
         public boolean addToSearchList;                                                            // Sets to false if there is an invlid search
         public boolean modifyContact;                                                            // Sets to false if there is an invalid modification
         // Method to create a new contact
         public void createNew()
         {// Start of create new()
              addToPhoneList = true;                                                                 // Set boolean to true each time the method is executed
              getNewContactsName();                                                                 // Get new name
              if(addToPhoneList == false)
                   createNew();
                   return;
              getNewContactsSurname();                                                            //Get new surname
              if(addToPhoneList == false)
                   createNew();
                   return;
              String checkName = newName;                                                            //Creates copies to be used in the checkIfDuplicate method
              String checkSurname = newSurname;
              addToPhoneList = checkIfDuplicate(checkName, checkSurname);                    //Check if the entries are duplicate
              if(addToPhoneList == false)
                   createNew();
                   return;
              getNewContactsHomeNum();                                                            // Get new home number
              if(addToPhoneList == false)
                   createNew();
                   return;
              getNewContactsWorkNum();                                                            // Get new work number
              if(addToPhoneList == false)
                   createNew();
                   return;
              getNewContactsCellNum();                                                            // Get new cell number
              if(addToPhoneList == false)
                   createNew();
                   return;
              checkAtLeastOneNumEntered();                                                       // Check that at least one phone number was entered
              if(addToPhoneList == true)
                   updateListWithNew();
         }// End of createNew()
         // Method to search for an existing contact
         public void searchExisting()
         {// Start of searchExisting()
              addToSearchList = true;                                                                 // Set the boolean true
              searchList.clear();                                                                      // Clear list from any previous searches
              if(phoneList.size() > 0)                                                            // Check if any contacts are in the list
                   getExistingDetailsAndSearch();                                                  // If there are entries then continue to search
              else
                   JOptionPane.showMessageDialog(null,"There are no contacts to search for. Please use this option when you have added a contact to the list.","Error",JOptionPane.ERROR_MESSAGE);
         }// End of searchExisting()
         // Method to modify an existing contact
         public void modifyExisting()
         {// Start of modifyExisting()
              modifyContact = true;                                                                 // Set the boolean to true
              if(phoneList.size() <= 0)                                                            // Check if the phonelist is not empty
                   JOptionPane.showMessageDialog(null,"There are no contacts to modify. Please use this option when there have been contacts added to the list.","Error",JOptionPane.ERROR_MESSAGE);
              else
                   getExistingDetailsAndModify();                                                  // If phonelist not emty continue to modify method
         }// End of modifyExisting()
         //Method to delete a contact from the list
         public void deleteExisting()
         //Method to get new contacts name
         public void getNewContactsName()
              newName = JOptionPane.showInputDialog("Please enter the new contacts name or press cancel to exit without saving.");
              if(newName == null)
                   finish();
              if(newName.trim().length()<=0)
                   JOptionPane.showMessageDialog(null,"You have not entered a name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                   addToPhoneList = false;
                   return;
              addToPhoneList = checkLengthValid(newName, "name");
         //Method to get a new contacts surname
         public void getNewContactsSurname()
              newSurname = JOptionPane.showInputDialog("Please enter the new contacts surnname or press cancel to exit without saving.");
              if(newSurname == null)
                   finish();
              addToPhoneList = checkLengthValid(newSurname, "surname");
         //Method to get a new contacts home number
         public void getNewContactsHomeNum()
              newHome = JOptionPane.showInputDialog("Please enter the new contacts home number or press cancel to exit without saving.");
              if(newHome == null)
                   finish();
              if(newHome.trim().length() > 0)
                   try
                        Long homeNum = Long.parseLong(newHome);
                   catch(Exception e)
                        JOptionPane.showMessageDialog(null,"You may only use numbers for a valid phone number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                        addToPhoneList = false;
                        return;
              addToPhoneList = checkLengthValid(newHome, "home number");
         //Method to get a new contacst work number
         public void getNewContactsWorkNum()
              newWork = JOptionPane.showInputDialog("Please enter the new contacts work number or press cancel to exit without saving");
              if(newWork == null)
                   finish();
              if(newWork.trim().length()> 0)
                   try
                        Long workNum = Long.parseLong(newWork);
                   catch(Exception e)
                        JOptionPane.showMessageDialog(null,"You may only use numbers for a valid number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                        addToPhoneList = false;
                        return;
              addToPhoneList = checkLengthValid(newWork, "work number");
         //Method to get a new contacts cell number
         public void getNewContactsCellNum()
              newCell = JOptionPane.showInputDialog("Please enter the new contacts cell number or press cancel to exit without saving");
              if(newCell == null)
                   finish();
              if(newCell.trim().length() > 0)
                   try
                        Long cellNum = Long.parseLong(newCell);
                   catch(Exception e)
                        JOptionPane.showMessageDialog(null,"You may only use numbers for a valid number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                        addToPhoneList = false;
                        return;
              addToPhoneList = checkLengthValid(newCell, "cell number");
         //Method to get the details for an existing contact
         public void getExistingDetailsAndSearch()
              String existingName = getExistingName("search for");
              if(existingName == null)
                   addToSearchList = false;
                   return;
              if(existingName.length()<=0)
                   JOptionPane.showMessageDialog(null,"You have not entered a name please try again","Error",JOptionPane.ERROR_MESSAGE);
                   addToSearchList = false;
                   searchExisting();
              String existingSurname = getExistingSurname();
                   if(existingSurname == null)
                        return;
              if(addToSearchList == true)
                   searchAndAddIfFound(existingName, existingSurname);
         //Method to get existing details and modify contact
         public void getExistingDetailsAndModify()
              String existingName = getExistingName("modify");
              if(existingName == null)
                   modifyContact = false;
                   return;
              if(existingName.length()<=0)
                   JOptionPane.showMessageDialog(null,"You have not entered a name please try again","Error",JOptionPane.ERROR_MESSAGE);
                   modifyContact = false;
                   modifyExisting();
              String existingSurname = getExistingSurname();
                   if(existingSurname == null)
                        return;
              if(modifyContact == true)
                   getContactBySearch(existingName.trim().toUpperCase(), existingSurname.trim().toUpperCase());
         //Method to get the contact from list and modify details
         public void getContactBySearch(String currentName, String currentSurname)
              int count = 0;
              int numFound = 0;
              for(ContactDetails cd: phoneList)
                   cd = phoneList.get(count);
                   if((cd.name.equals(currentName))&&(cd.surname.equals(currentSurname)))
                        numFound ++;
                        changeDetails(cd);
                   count ++;
              if(numFound <= 0)
                   JOptionPane.showMessageDialog(null,"No contacts matching the name and surname you entered found. Press the modify button to try again.","Information",JOptionPane.INFORMATION_MESSAGE);
         //Method to get existing contacts name
         public String getExistingName(String whatWasClicked)
              String name = JOptionPane.showInputDialog("Please enter the contacts name that you wish to "+whatWasClicked);
              return name;
         //Method to get an existing contacts surname
         public String getExistingSurname()
              String surname = JOptionPane.showInputDialog("Please enter the contacts surname.");
              return surname;
         //Method to change the details of contact
         public void changeDetails(ContactDetails conToChange)
              String currentName = conToChange.name;
              String currentSurname = conToChange.surname;
              String currentHome = conToChange.home;
              String currentWork = conToChange.work;
              String currentCell = conToChange.cell;
              String newNameForContact = getNewModName(currentName);
              if(modifyContact == false)
                   modifyExisting();
                   return;
              String newSurnameForContact = getNewModSurname(currentSurname);
              if(modifyContact == false)
                   modifyExisting();
                   return;
              String newHomeForContact = getNewModHome(currentHome);
              if(modifyContact == false)
                   modifyExisting();
                   return;
              String newWorkForContact = getNewModWork(currentWork);
              if(modifyContact == false)
                   modifyExisting();
                   return;
              String newCellForContact = getNewModCell(currentCell);
              if(modifyContact == false)
                   modifyExisting();
                   return;
              if(modifyContact == true)
                   conToChange.name = newNameForContact;
         //Method to get the modified name
         public String getNewModName(String currentName)
              String newModifiedName = JOptionPane.showInputDialog("Please enter the new name for contact or press cancel to keep it as is.");
              if(newModifiedName == null)
                   return currentName;
              if(newModifiedName.trim().length() <= 0)
                   JOptionPane.showMessageDialog(null,"You may not replace the existing name with a blank name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                   modifyContact = false;
                   return currentName;
              modifyContact = checkLengthValid(newModifiedName, "modified name");
              return newModifiedName;
         //Method to get the modified surname
         public String getNewModSurname(String currentSurname)
              String newModifiedSurname = JOptionPane.showInputDialog("Please enter the new surname for the contact or press cancel to keep it as is.");
              if(newModifiedSurname == null)
                   return currentSurname;
              modifyContact = checkLengthValid(newModifiedSurname, "modified surname");
              if(modifyContact == false)
                   JOptionPane.showMessageDialog(null,"Surname not changed.","Information",JOptionPane.INFORMATION_MESSAGE);
                   return currentSurname;
              modifyContact = checkLengthValid(newModifiedSurname, "modified surname");
              return newModifiedSurname;
         //Method to search and update the list with a succesfull search
         private void searchAndAddIfFound(String name, String surname)
              int count = 0;
              int numFound = 0;
              for(ContactDetails cd: phoneList)
                   cd = phoneList.get(count);
                   if(cd.name.equals(name.trim().toUpperCase()))
                        numFound ++;
                        searchList.add(cd);
                   count ++;
              if(numFound <= 0)
                   JOptionPane.showMessageDialog(null,"No contacts were found matching the dat you entered.","Information",JOptionPane.INFORMATION_MESSAGE);
              else
                   list.clear();
                   list.addAll(searchList);
         //Method that check all entries are a valid logical length
         //Method is based on assumption that a normal name, surname, and phone numbers are not longer than 10 characters long.
         //IF This method is changed please change the layout in the GUI as this is also set to fit with the layout that gives a neat //apperance
         private boolean checkLengthValid(String detailEntered, String whatWasEntered)
              boolean validLength = true;
              if(detailEntered.trim().length() >= MAX_LENGTH)
                   JOptionPane.showMessageDialog(null,"The " +whatWasEntered+" you entered is too long. Please try again and use a "+whatWasEntered+" that is less than "+MAX_LENGTH+" characters long.","Error",JOptionPane.ERROR_MESSAGE);
                   validLength = false;
              return validLength;
         private void finish()
              System.exit(0);
         //Method to update the list with a new entry
         private void updateListWithNew()
              try
                   ContactDetails cd = new ContactDetails();
                   cd.name = newName.trim().toUpperCase();
                   cd.surname = newSurname.trim().toUpperCase();
                   cd.home = newHome.trim();
                   cd.work = newWork.trim();
                   cd.cell = newCell.trim();
                   phoneList.add(cd);
                   JOptionPane.showMessageDialog(null,"Contact succesfully entered. To save this change press exit to save or use the save option in the toolbar menu.","Information",JOptionPane.INFORMATION_MESSAGE);
              catch(Exception e)
                   JOptionPane.showMessageDialog(null,"Failed to add contact to list. If problem persists please contact the software developer.","Error",JOptionPane.ERROR_MESSAGE);
              list.clear();
              list.addAll(phoneList);
         //Method to check for duplicate
         public boolean  checkIfDuplicate(String nameToCheck, String surnameToCheck)
              int count = 0;
              boolean valid = true;
              for(ContactDetails cd : phoneList)
                   cd = phoneList.get(count);
                   if(((nameToCheck.trim().toUpperCase()).equals(cd.name))&&((surnameToCheck.trim().toUpperCase()).equals(cd.surname)))
                        JOptionPane.showMessageDialog(null,"You may not enter a duplicate contact. Please try again and change the name and surname.","Error",JOptionPane.ERROR_MESSAGE);
                        valid = false;
                        break;
                   count ++;
              return valid;
         //Method to check that at least one phone number exists for contact
         public void checkAtLeastOneNumEntered()
              if((newHome.trim().length()<=0)&&(newWork.trim().length()<=0)&&(newCell.trim().length()<=0))
                   JOptionPane.showMessageDialog(null,"You have not entered any phone number at all. You must enter at least one phone number for a new contact.","Error",JOptionPane.ERROR_MESSAGE);
                   addToPhoneList = false;
         //Method that returns the list to the GUI
         public ArrayList<ContactDetails> getList()
              return list;
    }

    Should I start over from scratch? Can I get help with links to tutorials on following? How to create a java CRUD application (google not useful) and how to layer in java(google not useful)
    This is my pres layer as is is this wrong too?
         Filename:     ContactsListInterface.java
         Date:           16 March 2008
         Programmer:     Yucca Nel
         Purpose:     Provides a GUI for entering names and contact numbers into a telephone directory.
                        Also allows options for searching for a specific name and deleting of data from the record
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Phonebook1 extends JFrame implements ActionListener
    { //start of class
         // construct fields, buttons, labels,text boxes, ArrayLists etc
         JTextPane displayPane = new JTextPane();
         JLabel listOfContacts = new JLabel("List Of Contacts");               // creates a label for the scrollpane
         JButton createButton = new JButton("Create");
         JButton searchButton = new JButton("Search");
         JButton modifyButton = new JButton("Modify");
         JButton deleteButton = new JButton("Delete");
         Contact c = new Contact();
         ArrayList<ContactDetails> contactList = c.getList();
         // create an instance of the ContactsListInterface
         public Phonebook1()
         { // start of cli()
              super("Phonebook Interface");
         } // end of cli()
         public JMenuBar createMenuBar()
         { // start of the createMenuBar()
              // construct and populate a menu bar
              JMenuBar mnuBar = new JMenuBar();                              // creates a menu bar
              setJMenuBar(mnuBar);
              JMenu mnuFile = new JMenu("File",true);                         // creates a file menu in the menu bar which is visible
                   mnuFile.setMnemonic(KeyEvent.VK_F);
                   mnuFile.setDisplayedMnemonicIndex(0);
                   mnuFile.setToolTipText("File Options");
                   mnuBar.add(mnuFile);
              JMenuItem mnuFileExit = new JMenuItem("Save And Exit");     // creates an exit option in the file menu
                   mnuFileExit.setMnemonic(KeyEvent.VK_X);
                   mnuFileExit.setDisplayedMnemonicIndex(1);
                   mnuFileExit.setToolTipText("Close Application");
                   mnuFile.add(mnuFileExit);
                   mnuFileExit.setActionCommand("Exit");
                   mnuFileExit.addActionListener(this);
              JMenu mnuEdit = new JMenu("Edit",true);                         // creates a menu for editing options
                   mnuEdit.setMnemonic(KeyEvent.VK_E);
                   mnuEdit.setDisplayedMnemonicIndex(0);
                   mnuEdit.setToolTipText("Edit Options");
                   mnuBar.add(mnuEdit);
              JMenu mnuEditSort = new JMenu("Sort",true);                    // creates an option for sorting entries
                   mnuEditSort.setMnemonic(KeyEvent.VK_S);
                   mnuEditSort.setDisplayedMnemonicIndex(0);
                   mnuEdit.add(mnuEditSort);
              JMenuItem mnuEditSortByName = new JMenuItem("Sort By Name");          // to sort entries by name
                   mnuEditSortByName.setMnemonic(KeyEvent.VK_N);
                   mnuEditSortByName.setDisplayedMnemonicIndex(8);
                   mnuEditSortByName.setToolTipText("Sort entries by first name");
                   mnuEditSortByName.setActionCommand("Name");
                   mnuEditSortByName.addActionListener(this);
                   mnuEditSort.add(mnuEditSortByName);
              JMenuItem mnuEditSortBySurname = new JMenuItem("Sort By Surname");     // to sort entries by surname
                   mnuEditSortBySurname.setMnemonic(KeyEvent.VK_R);
                   mnuEditSortBySurname.setDisplayedMnemonicIndex(10);
                   mnuEditSortBySurname.setToolTipText("Sort entries by surname");
                   mnuEditSortBySurname.setActionCommand("Surname");
                   mnuEditSortBySurname.addActionListener(this);
                   mnuEditSort.add(mnuEditSortBySurname);
              JMenu mnuHelp = new JMenu("Help",true);                                        // creates a menu for help options
                   mnuHelp.setMnemonic(KeyEvent.VK_H);
                   mnuHelp.setDisplayedMnemonicIndex(0);
                   mnuHelp.setToolTipText("Help options");
                   mnuBar.add(mnuHelp);
              JMenuItem mnuHelpHelp = new JMenuItem("Help");                              // creates a help option for help topic
                   mnuHelpHelp.setMnemonic(KeyEvent.VK_P);
                   mnuHelpHelp.setDisplayedMnemonicIndex(3);
                   mnuHelpHelp.setToolTipText("Help Topic");
                   mnuHelpHelp.setActionCommand("Help");
                   mnuHelpHelp.addActionListener(this);
                   mnuHelp.add(mnuHelpHelp);
              JMenuItem mnuHelpAbout = new JMenuItem("About");                         // creates a about option for info about api
                   mnuHelpAbout.setMnemonic(KeyEvent.VK_T);
                   mnuHelpAbout.setDisplayedMnemonicIndex(4);
                   mnuHelpAbout.setToolTipText("About this program");
                   mnuHelpAbout.setActionCommand("About");
                   mnuHelpAbout.addActionListener(this);
                   mnuHelp.add(mnuHelpAbout);
              return mnuBar;
         } // end of the createMenuBar()
         // create the content pane
         public Container createContentPane()
         { // start of createContentPane()
              //construct and populate panels and content pane
              JPanel labelPanel = new JPanel(); // panel is only used to put the label for the textpane in
                   labelPanel.setLayout(new FlowLayout());
                   labelPanel.add(listOfContacts);
              JPanel displayPanel = new JPanel();// panel is used to display all the contacts and thier numbers
                   setTabsAndStyles(displayPane);
                   displayPane = addTextToTextPane();
                   displayPane.setEditable(false);
              JScrollPane scrollPane = new JScrollPane(displayPane);
                   scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // pane is scrollable vertically
                   scrollPane.setWheelScrollingEnabled(true);// pane is scrollable by use of the mouse wheel
                   scrollPane.setPreferredSize(new Dimension(400,320));
              displayPanel.add(scrollPane);
              JPanel workPanel = new JPanel();// panel is used to enter, edit and delete data
                   workPanel.setLayout(new FlowLayout());
                   workPanel.add(createButton);
                        createButton.setToolTipText("Create a new entry");
                        createButton.addActionListener(this);
                   workPanel.add(searchButton);
                        searchButton.setToolTipText("Search for an entry by name number or surname");
                        searchButton.addActionListener(this);
                   workPanel.add(modifyButton);
                        modifyButton.setToolTipText("Modify an existing entry");
                        modifyButton.addActionListener(this);
                   workPanel.add(deleteButton);
                        deleteButton.setToolTipText("Delete an existing entry");
                        deleteButton.addActionListener(this);
              labelPanel.setBackground(Color.red);
              displayPanel.setBackground(Color.red);
              workPanel.setBackground(Color.red);
              // create container and set attributes
              Container c = getContentPane();
                   c.setLayout(new BorderLayout(30,30));
                   c.add(labelPanel,BorderLayout.NORTH);
                   c.add(displayPanel,BorderLayout.CENTER);
                   c.add(workPanel,BorderLayout.SOUTH);
                   c.setBackground(Color.red);
              // add a listener for the window closing and save
              addWindowListener(
                   new WindowAdapter()
                        public void windowClosing(WindowEvent e)
                             int answer = JOptionPane.showConfirmDialog(null,"Are you sure you would like to save all changes and exit?","File submission",JOptionPane.YES_NO_OPTION);
                             if(answer == JOptionPane.YES_OPTION)
                                  System.exit(0);
              return c;
         } // end of createContentPane()
         protected void setTabsAndStyles(JTextPane displayPane)
         { // Start of setTabsAndStyles()
              // set Font style
              Style fontStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
              Style regular = displayPane.addStyle("regular", fontStyle);
              StyleConstants.setFontFamily(fontStyle, "SansSerif");
              Style s = displayPane.addStyle("bold", regular);
              StyleConstants.setBold(s,true);
         } // End of setTabsAndStyles()
         public JTextPane addTextToTextPane()
         { // start of addTextToTextPane()
              int numberOfEntries = contactList.size();
              int count = 0;
              Document doc = displayPane.getDocument();
              try
              { // start of tryblock
                   // clear previous text
                   doc.remove(0,doc.getLength());
                   // insert titles of columns
                   doc.insertString(0,"NAME\tSURNAME\tHOME NO\tWORK NO\tCELL NO\n",displayPane.getStyle("bold"));
                   for(ContactDetails cd : contactList)
                        cd = contactList.get(count);
                        doc.insertString(doc.getLength(),cd.name+"\t"+cd.surname+"\t"+cd.home+"\t"+cd.work+"\t"+cd.cell+"\n",displayPane.getStyle("regular"));
                        count ++;
              } // end of try block
              catch(BadLocationException ble)
              { // start of ble exception handler
                   System.err.println("Could not insert text.");
              } // end of ble exception handler
              return displayPane;
         } // end of addTextToTextPane()
         // code to process user clicks
         public void actionPerformed(ActionEvent e)
         { // start of actionPerformed()
              String arg = e.getActionCommand();
              // user clicks create button
              if(arg.equals("Create"))
                   c.createNew();                                                  // method to create a new Contact
                   addTextToTextPane();
              if(arg.equals("Search"))
                   c.searchExisting();                                             // method to search for an existing entry
                   addTextToTextPane();
              if(arg.equals("Modify"))
                   c.modifyExisting();                                             // method to modify contact
                   addTextToTextPane();
              if(arg.equals("Delete"))
                   c.deleteExisting();
                   addTextToTextPane();
              if(arg.equals("Exit"))
         } // end of actionPerformed()
         // method to create a new contact
         public static void main(String[] args)
         { // start of main()
              // Set look and feel of interface
              try
              { // start of try block
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              } // end of try block
              catch(Exception e)
              { // start of catch block
                   JOptionPane.showMessageDialog(null,"There was an error in setting the look and feel of this application","Error",JOptionPane.INFORMATION_MESSAGE);
              } // end  of catch block
              Phonebook1 pb = new Phonebook1();
              pb.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              pb.setJMenuBar(pb.createMenuBar());
              pb.setContentPane(pb.createContentPane());
              pb.setSize(520,500);
              pb.setVisible(true);
              pb.setResizable(false);
         } // end of main()
    } //end of class

  • Need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    A flashing question mark or globe appears when you start your Mac

  • Still need help with case sensitive strings

    Hello guy! Sorry to trouble you with the same problem again,
    but i still need help!
    "I am trying to create a scrypt that will compare a String
    with an editable text that the user should type to match that
    String. I was able to do that, but the problem is that is not case
    sensitive, even with the adobe help telling me that strings are
    case sensitive. Do you guys know how to make that comparison match
    only if all the field has the right upper and lower case letters?
    on exitframe
    if field "t:texto1" = "Residencial Serra Verde"then
    go to next
    end if
    end
    |----> thats the one Im using!"
    There were 2 replys but both of them didnt work, and the
    second one even made the director crash, corrupting even previously
    files that had nothing to do with the initial problem..
    first solution given --
    If you put each item that you are comparing into a list, it
    magically
    makes it case sensitive. Just put list brackets around each
    item.
    on exitframe
    if [field "t:texto1"] = ["Residencial Serra Verde"] then
    go to next
    end if
    end
    Second solution given--
    The = operator is not case-sensitive when used on strings,
    but the < and > operators are case-sensitive.
    So another way to do this is to check if the string is
    neither greater than nor less than the target string:
    vExpected = "Residencial Serra Verde"
    vInput = field "t:texto 1"
    if vExpected < vInput then
    -- ignore
    else if vExpected > vInput then
    -- ignore
    else
    -- vExpected is a case-sensitive match for vInput
    go next
    end if
    So any new solutions??
    Thanks in advance!!
    joao rsm

    The first solution does in fact work and is probably the most
    efficient way
    of doing it. You can verify that it works by starting with a
    new director
    movie and adding a field named "t:texto1" into the cast with
    the text
    "Residencial Serra Verde" in the field. Next type the
    following command in
    the message window and press Enter
    put [field "t:texto1"] = ["Residencial Serra Verde"]
    You will see it return 1 which means True. Next, make the R
    in the field
    lower case and execute the command in the message window, it
    will return 0
    (true).
    Now that you know this works, you need to dig deeper in your
    code to find
    what the problem is. Any more info you can supply?

  • So I'm trying to get a window to fit my mac. Its a window on pokerstars if that helps, so no minimize/maximize. The window is actually too long vertical ways to fit the screen so the bottom is cut off? I hid bottom toolbar but still no help :-/ any help?

    So I'm trying to get a window to fit my mac. Its a window on pokerstars if that helps, so no minimize/maximize. The window is actually too long vertical ways to fit the screen so the bottom is cut off? I hid bottom toolbar but still no help :-/ any help? Yeah i have no fit screen button, the top toolbar doesnt have zoom/minimize available... any help???

    Hi RobSten1306
    Send us an email if you need help on this case and we can help look into this for you.
    You can email us using the contact the mods link in my profile under the section 'About Me'.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Hi everybody.. i have a problem nad i need help a.s.a.p ... i forgut my ipad passcode and tryed to remember it tell it locked and i cant get open .. it says connect to itunes .. i did that and its still not opening? what can i do? thanks

    hi everybody.. i have a problem nad i need help a.s.a.p ... i forgut my ipad passcode and tryed to remember it tell it locked and i cant get open .. it says connect to itunes .. i did that and its still not opening? what can i do? thanks

    http://support.apple.com/kb/HT1808
    Regards.

  • Hi all, I'm trying to download a film from iTunes onto my iPad but downloaded the HD version instead of SD and don't have the room to download it. Have removed everything I can to make space but still need another 1.2 GB. How can I delete it??

    Hi all, I'm trying to download a film from iTunes onto my iPad but downloaded the HD version instead of SD and don't have the room to download it. Have removed everything I can to make space but still need another 1.2 GB. Is there any way I can delete it so I can delete the version I wanted, or even better change to the SD version? The film is still queuing in the downloads list. I've tried edit and delete but that doesn't work. I also can't re-download the film from iTunes.
    Any suggestions very welcome!

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore
    Before that, back up your device, explained here:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    How to back up your data and set up as a new device
    You can check your warranty status here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

Maybe you are looking for

  • Error during release of costing run

    Dear All ,           While I am trying to release a costing run in CK24 for a material the system is giving error "Use Price Change in Material Ledger for material " , message No : M8 313.           Can anybody tell how to overcome this situation .

  • Two External Displays

    I have two 20" Dell 2005 FPW displays. Both with DVI and VGA, SVideo connections. How can I hook up my macbook pro to use both as an extended desktop?

  • What's the maximum output voltage of labview

    hi i want to give 0 to 10v to the oscillator circuit so for that i would like to know that maximum output voltage of labview because i want to oprate my oscillator using labview program

  • Zen Micro - Can it be used in the ca

    Hello, I have a Zen Micro and wondered if there is any way that it can be used through a conventional car cd player (as the Ipod can). Any ideas ? Cheers.

  • Elements 9 "Gathering Info"

    I reloaded Elements 9, "GATHERING INFO BAR" continues to run and will not Sinc to my online Account Catalog. Frustrated ! (thread title edited by forum host)