IPhoto is no longer responding to user input

whenever i start iPhoto, it says that it will update the thumbnails, shows a progress bar with no progress and a button with the option to "finish later".
neither the "finish later" nor the menus are responding to any input.
it will stay in that state for ever as far as i can tell. I left it overnight and there was still zero progress on the progress bar and it was still not taking any inputs from me.
as far as i can tell, this all started after the update to 9.3
starting iPhoto with the option+command yields the same results: i get the "iPhoto First Aid" dialog with the 4 options, but nothing is selectable and the button is not responding.
looking in the Library/Preferences, there is no com.apple.iPhoto.plist ( i did not remove it myself)
any suggestions?

6/18/12 1:50:50.890 PM [0x0-0x2e52e5].com.apple.iPhoto: ImageIO: <ERROR>  JPEG JPEG datastream contains no image
i had tried this before and there was no message then. I think this one started when i renamed my library to take the library out of the equation.
instrument shows:
Running Time
Self
Symbol Name
69.0ms    0.7%
0.0
-[NSUIHeartBeat _heartBeatThread:]
47.0ms    0.5%
0.0
_dispatch_mgr_thread
42.0ms    0.4%
0.0
Main Thread
20.0ms    0.2%
0.0
_dispatch_worker_thread2
3.0ms    0.0%
0.0
-[XTThread run:]
it's responding according to activity monitor.
just not to any user input when i try to do anything.

Similar Messages

  • After a recent software update my iphoto program no longer responds and freezes  the my imac

    After a recent software update I opened iphoto and was asked if I would like my photos geographic location used for mapping where photos were taken, I answered no and now Iphoto no longer responds and freezes all computer functions. Unable to force quite application. What can I do?

    This is iPhoto for iOS, not OSX.  Despite having the same name, they are completely different programs.  You should repost your question in the iLife/iPhoto area.

  • Trouble reading user input in Mac OSX

    Hi, I am writing a program in Java (1.5) for Mac OSX that requires the user to setup files and settings, then a new frame opens with a blank screen and waits for user input (a key press) to begin. I have a setup screen that works fine (seperate frame) and triggers the blank screen and the rest of the program fine as well. The problem is when I try to have the program pause for user input. For some reason, this thread is no longer responding to user input at all. I have tried with a KeyListener Interface and with System.in.read() as well as BufferedReaders, etc and there are no keypresses registered at all.
    Another object does create a seperate thread to deal with closing down Quicktime elements, but the keypresses are not registering even when that thread has not been called.
    Can anyone tell me what might be the problem? Is there an issue with multiple frames interfering with the KeyListener? I can post the code, if you'd like, but it's pretty involved.
    Any help greatly appreciated!
    Heidi

    Actually, this still isn't working. I'm posting the program class (there are several supporting classes that are not in this post - SetUp opens a SetUp frame and gathers information, then calls MTSNewSwing. Start movie places a Quicktime Component into a Panel, and QTSessionCheck starts a thread that check to make sure that QT sessions are closed when neccessary). KeyPresses are stll not being registered at all.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import quicktime.*;
    import quicktime.std.*;
    import quicktime.app.view.*;
    import quicktime.std.movies.*;
    public class MTSNewSwing extends JFrame{
         public Insets getInsets() {
              Insets rm = new Insets (20, 20, 20, 20);
              return rm;
    char key = 'q';
    int correct = 0;
    boolean kp = false;
    int numberOfMovies;
    ArrayList<File> moviesList = new ArrayList();
    ArrayList<File> altList = new ArrayList();
         public MTSNewSwing() {
              super("Matching to Sample");
              setSize(1024, 768);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setBackground(Color.black);
              getRootPane().registerKeyboardAction(new ActionListener(){
                   public void actionPerformed(ActionEvent e) {
                   System.out.println("keystroke"); }
              },KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),JComponent.WHEN_IN_FOCUSED_WINDOW);
              moviesList = SetUp.movieList;
              numberOfMovies = moviesList.size();
              int randomSampleIndex;
              int randomAlternativeIndex;
              boolean corrAltAdded = false;
              //run new trial through numOfTrials
              for (int t = 0; t < SetUp.numOfTrials; t++) {
                   //clear screen
                   BlankScreen bs = new BlankScreen();
                   getContentPane().add(bs);
                   setVisible(true);
                   //put random alternatives into array list
                   randomSampleIndex = (int) (Math.random() * SetUp.numOfMovies);
                   File sample = (File) moviesList.get(randomSampleIndex);
                   altList.add(sample);
                   int correctAlternativePosition = (int) (Math.random() * SetUp.numOfAlternatives);
                   for (int altPosition = 1; altPosition <= SetUp.numOfAlternatives; altPosition++) {
                        if (altPosition == correctAlternativePosition) {
                             altList.add(sample);
                             corrAltAdded = true;
                             System.out.println("correct alternative added");
                        } else if (altPosition == SetUp.numOfAlternatives && corrAltAdded == false) altList.add(sample);
                        else {
                             do {
                                  randomAlternativeIndex = (int) (Math.random() *
    SetUp.numOfMovies);
                             } while (randomAlternativeIndex == randomSampleIndex);      
                             File nextAlt = (File) moviesList.get(randomAlternativeIndex);
                             altList.add(nextAlt);
                             System.out.println("alternative added");
                   corrAltAdded = false;
                   //wait for keypress to start trial
              //this is the part that still doesn't work
                   //add movies to screen
                   for (int i=0; i<= SetUp.numOfAlternatives; i++) {
                        File file = (File) altList.get(i);
                        StartMovie sm = new StartMovie();
                        try {
                             sm.go(file);
                        } catch (Exception e) {
                             e.printStackTrace();
                        if (SetUp.numOfAlternatives < 4) {
                             BorderLayout bdr = new BorderLayout();
                             this.setLayout(bdr);
                             JPanel samp = new JPanel();
                             JPanel alts = new JPanel();
                             BorderLayout altbdr = new BorderLayout();
                             alts.setLayout(altbdr);
                             if (i ==0) {
                                  samp.add(sm);
                                  this.getContentPane().add(samp, BorderLayout.NORTH);
                                  setVisible(true);
                                  System.out.println("sample added");
                             } else if (i == 1) {
                                  alts.add(sm, BorderLayout.WEST);
                                  System.out.println("alt1 added");
                             } else if (i == 2) {
                                  alts.add(sm, BorderLayout.EAST);
                                  System.out.println("alt2 added");
                             } else if (i == 3) {
                                  alts.add(sm, BorderLayout.CENTER);
                                  System.out.println("alt3 added");
                             this.getContentPane().add(alts, BorderLayout.SOUTH);
                             setVisible(true);
                             try {
                                  Thread.sleep(10000);
                             } catch (InterruptedException ex) {
                                  ex.printStackTrace();
                             continue;
         public static void main(String args[]) {
                   SetUp setup = new SetUp();
    }

  • Firefox not responding to keyboard input

    I'm having issues with Firefox temporarily no longer responding to keyboard input.
    I have two machines, both running Windows 7. On my laptop, I never have any issues but on my desktop, I find that Firefox sometimes blocks keyboard input. It will allow me to enter one character in any text field, and no more. Any further input is ignored. This applies to the address bar, the search box and any text fields in the displayed web page, in any tab. All keyboard navigation seems to also be ignored.
    I've tried Reset Firefox and Safe Mode, they don't appear to change anything. I've also tried uninstalling Synergy and changing from my regular English-International keyboard layout to US English, but this still seems to occur. I am also running Workrave which can interrupt keyboard input, but since I can add 1 character, I suspect that Workrave is not the problem.
    Sometimes it can seemingly be unblocked by pressing Start+F9, CTRL+SHIFT+ESC, restarting firefox or opening a new tab, but this seems to only be a temporary solution, the problem soon reoccurs. This bug has been present for some time, I first noticed it in v28 (although it may be even older), I am currently using v31.
    One thing I've noticed is that it never occurs until after my screen has been locked at least once.
    The trouble-shooting information attached will not be entirely accurate because I'm using my laptop to type this - Firefox is not accepting keyboard input right now on my desktop! However, the two environments are similar.
    Thanks, Tadhg

    Some have reported that pressing F9 and the Windows key simultaneously one or more times has worked to fix issues with the keyboard not working.

  • User inputs and simple anim.

    I know this is a bit basic, but I'm having trouble getting this animation to respond to user inputs. I want the circle to start near the centre of the screen and move up until it hits Y less than 10. Here, I've started the animation thread as a response to the user input, I know this probably isn't the best way to do it.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.*;
    import java.awt.event.*;
    public class basicAnimation extends Applet implements Runnable, KeyListener
    {Thread aThread;
            public int Y;
         public void start()
              if (aThread == null)
              {aThread = new Thread(this);
                   aThread.start();}
         public void stop()
              if (aThread != null)
              {aThread = null;}
         public void run()
              while (true)
                   for(Y=350; Y<10; Y--)
                   {repaint();
                        try { Thread.sleep(100); }
                        catch (InterruptedException e) { }}
         public void init()
         {Y=350;}
         public void paint(Graphics g)
         {g.fillOval (415, Y, 10, 10);}
       public void keyPressed(KeyEvent e)
           int keyCode = e.getKeyCode();
           switch(keyCode)
           {case KeyEvent.VK_SPACE:
                   aThread.start();
                 break;}
       public void keyTyped(KeyEvent e){}
       public void keyReleased(KeyEvent e){}
    }

    Sorry, now that I have gotten a better look at your run() method. You need to replace what you have with the code that I gave you in the previous post. If you run a for loop that is inside the thread, you will change Y from being at the center to Y == 10 in one thread iteration. This is much too fast for what you want to do.
    Don't forget that the thread is executing something like 1000 times every second (depending on how you set it up and the speed of your machine). So if you put a for loop inside the thread you are running the for loop about 1000 times a second when all you meant to do is run through one time.

  • Is it possible to not respond to a request based on user input

    I have client side validation in place that 100% guarantees that so long as the user uses the page appropriately, a request will not be sent unless it is valid.
    On the server side i am validating the parameters passed in. If the validation fails I would like to send no HTTP response to the user, as I can assume the request is "hostile".
    Is it possible to do this? Thanks for your help

    hi :-)
    if there is a request ;-) there is a response :-)
    if you will not response to user's request what will be the output for the user?
    i think you can do that but you can prefer a better response for an 'hostile' request, like sending a user to a custom page that send a warning that might lead to ip blocking or displaying an info that net activities are monitored or logged ;-)
    regards,

  • Slow - Editing in iPhoto is no longer fun!

    MB 1.8 C2D with 2GB of RAM with 20+GB free on the HD
    Whenever I edit photos in iPhoto it seems to be very sluggish... I may click the sharpness button 5 times, but it only adjusts 3 times... It just seems to be behind a bit... I checked my memory, and everything seems fine... what is pegged out is my CPU...
    Also, when just browsing my library it does not advance the photos as quickly as it did in 06... you click the next button, but it responds very sluggishly...
    It is really annoying and I don't know what to do...
    Please pass along your advice...
    Thanks

    Launch Activity monitor and position it so you can see what's taking up the cpu while working in iPhoto. Additionally, go into your User/Library/Caches folder and delete any folders with iPhoto in the file name.
    Have you run the maintenance scripts lately? Launch OnyX and run the three maintenance scripts. Also do a complete optimization while in OnyX.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Safari no longer responding because of script message on the webpage

    This just started this morning but I'm getting this message on every site, including apple.com, that I go to.  Is anyone aware of a fix?  Im running safari 5.0.6 and osx 10.5.8.
    Safari is no longer responding because of a script on the webpage “Start New Discussion : Apple Support Communities” (https://discussions.apple.com/community/mac_os/question-post!input.jspa?containe rType=14&container=2131&fromWidget=true&question=Safari%20no%20longer%20respondi ng%20because%20of%20script%20message%20on%20the%20webpage). Do you want to stop running the script, or let it continue?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • My iphone 4 is no longer responding to swipes

    My iphone 4 is no longer responding to swipes, but it also won't receive calls or receives pings from Icloud. However it is recognized and can be synced to Itunes. I just can't access my phone anyone have any idea what the problem is? I restored it with a fresh restore, can't get it to swipe. I call it, it is unreachable. I thought it was the digitizer, but i feel like the digitizer wouldn't disable it from receiving calls. Any help would be appreciated it, was trying to hold out on this phone before i got a new phone.

    You clearly did not notice that you have joined a USER TO USER COMMUNITY FORUM
    This is NOT Apple ,Apple do not read nor do they  therefore respond
    So if you would like to wind your neck in ........................
    try a reset of iPhone and then a restore,best, as new and if it then functions correctly try restoring with your backup

  • Screen Sharing No Longer Responds from Master Machine

    For a long time, I have used screen sharing from my iMac to control my Mac Mini on the TV. Now, I can connect to screen sharing but the Mac Mini no longer responds to any commands from the iMac.
    Another factor that may have contributed to this:
    I use Hippo Remote to control the Mac Mini as my home theatre PC. This also has worked fine for a long time. Now, however, it can hardly get a connection anymore and when it does, I have no control over the Mac Mini any more. I've emailed their tech support but with little result.
    The only other thing I know of is that I'm running two video server clients on my iMac to provide remote access to video files via my iPhone or iPad. I don't think those should interfere with the Mac Mini though.
    Has anyone else run into this? Know of any solutions?
    I've tried reboots, turning off the Hippo Remote VNC server on the Mac Mini, and other servers but nothing is getting me what I used to have.

    Apple Tech guys and girls do not post in these User-to-User forums.
    On a Specific day there was a problem with the SNATMAP server and everyone had issues with iChat Video and Audio chats.
    The Original Poster did not seem to make it to the other threads at the same time.
    I informed him that there had been a issue and that it seemed sorted for most people and asked if he still had an issue.
    On the basis he said he was working - the problem and cause of that problem have been dealt with.
    At which point do you not get that, in this thread, the issue discussed is sorted for the original poster and that you should move on ?
    I will be quite happy to discuss your issues in your thread.
    From Terms of Use
    Threadjack—To wrongly post a dissimilar issue in an existing discussion, distracting from the true focus of the discussion. If your issue has any significant difference from a similar topic, then you're probably better off posting a new topic to focus attention on your particular issue.
    See also http://discussions.apple.com/help.jspa#questions
    I can not make people mark their threads as finished.
    It also does not mean that the issue does not arise for you.
    What I am saying that in this context the solution will not suit your situation.
    An External event (SNATMAP Down) to all parties caused the problem he had and a second External event (SNATMAP up) solved it.
    AS SNATMAP has not fallen over recently you have another problem and it is not related to this one.
    I hope this is clear enough for you.
    11:26 PM Monday; June 16, 2008
    Please note the time. I may not get to New Posts Today (My Time)

  • Help needed, Createing Dynamic User input

    Hello,
    I am attempting to create some dynamic user input by "predicting" what the user requires in a text box.
    For example if the user enters "Smi" I have a select list pop up which gives the user all options that begin with "Smi".
    I am able to achieve the popups but the interface is quite jerky and not terribly responsive I am trying to solve this by using a thread which starts and stops when new input is received but it is still not quite right.
    The program uses a Sorted TreeSet to hold the data (I thought this would give me a quick search time) and a simple interface at this stage.
    Any help would be fantastic
    Thanks in advance :P
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
       /** This program represents part of a larger user interface for allowing the
       user to select data from a file or database.
       <p>
       When the program starts up, it will read in data from a given file, and hold
       it in some type of container allowing rapid access.
       <p>
       The user may then type in the first few letters of the surname of a person,
       and this program should immediately present in a popup dialog the names which
       match.  The user will be able to click on one of the names in the popup and
       that will cause all data about that person to be displayed in the JTextArea
       at the bottom of the window.
       <p>
       This program requires the FormLayout.class, FormLayout$Placement.class, and
       FormLayout$Constraint.class files in the same directory
       (folder) or in its classpath.  These is provided separately.
    class PartMatch extends JFrame implements Runnable
                        /** Close down the program. */
       JButton quitbtn;
                        /** Field for the surname. */
       JTextField namefld;
                        /** Full details of the person(s). */
       JTextArea  results;
                        /** Popup dialog to display the names and addresses which
                        match the leading characters given in namefld. */
       Chooser matches;
                      /** Default background color for a window. */
       final static  Color            defBackground = new Color(0xD0C0C0);
                      /** Default foreground color for a window. */
       final static  Color            defForeground = new Color(0x000000);
                      /** Default background color for a field */
       final static  Color            fldBackground = new Color(0xFFFFFF);
                      /** Default background color for a button */
       final static  Color            btnBackground = new Color(0xF0E0E0);
       final static  Color            dkBackground = new Color(0xB0A0A0);
                      /** Larger font */
       final static  Font bold = new Font("Helvetica", Font.BOLD, 30);
       TreeSet members;
       String input;
       String[] found;
       public static void main(String arg[])
          UIManager.put("TextField.background",fldBackground);
          UIManager.put("TextField.foreground",defForeground);
          UIManager.put("TextField.selectionBackground",btnBackground);
          UIManager.put("TextArea.background",fldBackground);
          UIManager.put("TextArea.foreground",defForeground);
          UIManager.put("TextArea.selectionBackground",btnBackground);
          UIManager.put("Panel.background",defBackground);
          UIManager.put("Label.background",defBackground);
          UIManager.put("Label.foreground",defForeground);
          UIManager.put("Button.background",btnBackground);
          UIManager.put("Button.foreground",defForeground);
          UIManager.put("CheckBox.background",defBackground);
          UIManager.put("ScrollBar.background",defBackground);
          UIManager.put("ScrollBar.thumb",btnBackground);
          UIManager.put("ComboBox.background",btnBackground);
          UIManager.put("ComboBox.selectionBackground",dkBackground);
          PartMatch trial = new PartMatch(arg);
       public PartMatch( String [] arg )
          super("Part Match");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container cpane = getContentPane();
          FormLayout form = new FormLayout(cpane);
          JLabel lab1 = new JLabel("Fetch details") ;
          lab1.setFont( bold );
          form.setTopAnchor( lab1, 4 );
          form.setLeftAnchor( lab1, 4 );
          JLabel lab2 = new JLabel("Surname: ") ;
          form.setTopRelative( lab2, lab1, 4 );
          form.setLeftAlign( lab2, lab1 );
          namefld = new JTextField( 30 );
          form.setBottomAlign( namefld, lab2 );
          form.setLeftRelative( namefld, lab2, 4 );
          namefld.addCaretListener( new CaretListener()
             public void caretUpdate(CaretEvent e)
                 showMatches();
          quitbtn = new JButton( "Quit" );
          quitbtn.addActionListener( new ActionListener()
             public void actionPerformed(ActionEvent e)
                quitProcessing();
          form.setBottomAlign( quitbtn, namefld );
          form.setLeftRelative( quitbtn, namefld, 15 );
          results = new JTextArea( 10,50 );
          results.setEditable(false);
          JScrollPane jsp = new JScrollPane( results,
                                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                     JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
          form.setTopRelative( jsp, lab2, 6 );
          form.setLeftAlign( jsp, lab2 );
          form.setBottomAnchor( jsp, 5 );
          form.setRightAnchor( jsp, 5 );
          form.setRightAnchor( quitbtn, 5 );
          matches = new Chooser( this );
          //matches.setUndecorated(true);
          pack();
          setVisible(true);
          namefld.requestFocus();
          if (arg.length > 0) init(arg[0]);
          else init("triathlon.txt"); //<<<<<<<<<<<<<<<< Place the default filename here
          /** Called once only, at the end of the constructor, to read the data
            * from the membership file.
       public void init( String fname )
          members = new TreeSet();
           try {
               FileReader fr = new FileReader(new File (fname));
               Scanner scan = new Scanner(fr);
               trimember cmem;
               String cLine, eTag, memberNo, first, last, gender, yob, tel ,addr,
                       club;
               while(scan.hasNextLine())
                   cLine = scan.nextLine();
                   Scanner scan2 = new Scanner(cLine);
                   scan2.useDelimiter(";");
                   eTag = scan2.next().trim();
                   memberNo = scan2.next().trim();
                   first = scan2.next().trim();
                   last = scan2.next().trim();
                   gender = scan2.next().trim();
                   yob = scan2.next().trim();
                   tel = scan2.next().trim();
                   addr = scan2.next().trim();
                   club = scan2.next().trim();
                   cmem = new trimember(eTag, memberNo, first, last, gender, yob,
                           tel, addr, club);
                   members.add(cmem);
           catch (FileNotFoundException ex)
               results.append("Sorry can't find the input file\n");
               results.append("Please check file name and location and try again");
               ex.printStackTrace();
          /** Called every time there is a change in the contents of the text field
            * namefld.  It will first clear the text area.  It then needs to search
            * through the container of data to find all records where the surname
            * starts with the characters that have been typed.  The names and
            * addresses need to be set up as strings and placed in
            * an array of Strings.  This can be placed in the "matches" window and
            * displayed for the user, inviting one to be selected.
            * <p>
            * The performance of this is very important.  If necessary, it may be
            * necessary to run as a separate thread so that the user interface is
            * not delayed.  It is essential that the user be able to type letters at a
            * reasonable speed and not have the keystroke processing held up by
            * previous text.
       public void showMatches( )
           run();
                // First clear the text area
          //results.setText("");
                // Determine the leading characters of the surname that is wanted
                input = namefld.getText();
                // Locate the data for this name, and display each matching item
                //  in the JTextArea ...
                // Example of how to set the data in the popup dialog
          matches.list.setListData(found);
          matches.pack();   // resize the popup
                // set the location of the popup if it is not currently visible
          if ( ! matches.isVisible())
             Dimension sz = matches.getSize();
             Point mouse = getMousePosition();
             Point framepos = getLocation();
             int x=0, y=0;
             if (mouse == null)
                Point pt = results.getLocation();
                x = pt.x + 20 + framepos.x;
                y = pt.y + 20 + framepos.y;
             else
                x = mouse.x - 2 + framepos.x;
                y = mouse.y - 2 + framepos.y;
             matches.setLocation(x,y);
          matches.setVisible(true);
          namefld.requestFocus();
          /** Perform any final processing before closing down.
       public void quitProcessing( )
          // Any closing work.  Then
          System.exit(0);
        public void run()
            ArrayList<String> foundit = new ArrayList<String>();
            System.out.println(input);
            if(input != null)
            Iterator it = members.iterator();
            while(it.hasNext())
               trimember test = (trimember) it.next();
               if (test.last.startsWith(input))
                   foundit.add(test.last +", "+ test.first);
            found = new String[foundit.size()];
            for(int i=0; i<foundit.size();i++)
                found[i] = foundit.get(i);
         /** A window for displaying names and addresses from the data set which
          match the leading characters in namefld.
          <p>
          This will automatically pop down if the user moves the mouse out of the
          window.
          <p>
          It needs code added to it to respond to the user clicking on an item in
          the displayed list. */
       class Chooser extends JWindow
                /** To display a set of names and addresses that match the leading
                characters of the namefld text field. */
          public JList list = new JList();
          Chooser( JFrame parent )
             super( parent );
             Container cpane = getContentPane();
             cpane.addMouseListener( new MouseAdapter()
                public void mouseExited(MouseEvent e)
                   Chooser.this.setVisible(false);
             cpane.add("Center",list);
             list.addListSelectionListener( new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                   Chooser.this.setVisible(false);
                   System.out.println("ValueChanged");
                   // First clear the text area
                   results.setText("");
                   String in = (String) list.getSelectedValue();
                   System.out.println("Selected Value was : "+in);
                   String[] inlf = in.split(", ");
                   System.out.println("inlf[0]:"+inlf[0]+" inlf[1]:"+inlf[1]);
                   results.append("Surname \tFirst \teTag \tMemberNo \tSex \tYOB " +
                           "\tTel \tAddress \t\t\tClub\n");
                   Iterator it = members.iterator();
                   while(it.hasNext())
                       trimember test = (trimember) it.next();
                       if (test.last.equals(inlf[0])&&test.first.equals(inlf[1]))
                           results.append(test.toString()+"\n");
                   namefld.requestFocus();
          public class trimember implements Comparable
           String eTag;
           public String memberNo;
           public String first;
           public String last;
           String gender;
           String yob;
           String tel;
           String addr;
           String club;
           public trimember(String eT, String me, String fi, String la,
                   String ge, String yo, String te, String ad, String cl)
               eTag = eT;
               memberNo = me;
               first = fi;
               last = la;
               gender = ge;
               yob = yo;
               tel = te;
               addr = ad;
               club = cl;         
           //To String method to output string of details
           public String toString()
               return last + "\t" + first + "\t" + eTag + "\t" +
                       memberNo + "\t" + gender + "\t" + yob + "\t"+ tel + "\t" +
                       addr + "\t" + club;
           //Compare and sort on Last name
           public int compareTo(Object o)
               trimember com = (trimember) o;
               int lastCmp = last.compareTo(com.last);
               int firstCmp = first.compareTo(com.first);
               int memCmp = memberNo.compareTo(com.memberNo);
               if (lastCmp == 0 && firstCmp !=0)return firstCmp;
               else if (lastCmp==0&&firstCmp==0)return memCmp;
               else return lastCmp;
    }

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?messageID=9953193

  • Help needed, Providing Dynamic User input

    Hello,
    I am attempting to create some dynamic user input by "predicting" what the user requires in a text box.
    For example if the user enters "Smi" I have a select list pop up which gives the user all options that begin with "Smi".
    I am able to achieve the popups but the interface is quite jerky and not terribly responsive I am trying to solve this by using a thread which starts and stops when new input is received but it is still not quite right.
    The program uses a Sorted TreeSet to hold the data (I thought this would give me a quick search time) and a simple interface at this stage.
    Any help would be fantastic
    Thanks in advance :P
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
       /** This program represents part of a larger user interface for allowing the
       user to select data from a file or database.
       <p>
       When the program starts up, it will read in data from a given file, and hold
       it in some type of container allowing rapid access.
       <p>
       The user may then type in the first few letters of the surname of a person,
       and this program should immediately present in a popup dialog the names which
       match.  The user will be able to click on one of the names in the popup and
       that will cause all data about that person to be displayed in the JTextArea
       at the bottom of the window.
       <p>
       This program requires the FormLayout.class, FormLayout$Placement.class, and
       FormLayout$Constraint.class files in the same directory
       (folder) or in its classpath.  These is provided separately.
    class PartMatch extends JFrame implements Runnable
                        /** Close down the program. */
       JButton quitbtn;
                        /** Field for the surname. */
       JTextField namefld;
                        /** Full details of the person(s). */
       JTextArea  results;
                        /** Popup dialog to display the names and addresses which
                        match the leading characters given in namefld. */
       Chooser matches;
                      /** Default background color for a window. */
       final static  Color            defBackground = new Color(0xD0C0C0);
                      /** Default foreground color for a window. */
       final static  Color            defForeground = new Color(0x000000);
                      /** Default background color for a field */
       final static  Color            fldBackground = new Color(0xFFFFFF);
                      /** Default background color for a button */
       final static  Color            btnBackground = new Color(0xF0E0E0);
       final static  Color            dkBackground = new Color(0xB0A0A0);
                      /** Larger font */
       final static  Font bold = new Font("Helvetica", Font.BOLD, 30);
       TreeSet members;
       String input;
       String[] found;
       public static void main(String arg[])
          UIManager.put("TextField.background",fldBackground);
          UIManager.put("TextField.foreground",defForeground);
          UIManager.put("TextField.selectionBackground",btnBackground);
          UIManager.put("TextArea.background",fldBackground);
          UIManager.put("TextArea.foreground",defForeground);
          UIManager.put("TextArea.selectionBackground",btnBackground);
          UIManager.put("Panel.background",defBackground);
          UIManager.put("Label.background",defBackground);
          UIManager.put("Label.foreground",defForeground);
          UIManager.put("Button.background",btnBackground);
          UIManager.put("Button.foreground",defForeground);
          UIManager.put("CheckBox.background",defBackground);
          UIManager.put("ScrollBar.background",defBackground);
          UIManager.put("ScrollBar.thumb",btnBackground);
          UIManager.put("ComboBox.background",btnBackground);
          UIManager.put("ComboBox.selectionBackground",dkBackground);
          PartMatch trial = new PartMatch(arg);
       public PartMatch( String [] arg )
          super("Part Match");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container cpane = getContentPane();
          FormLayout form = new FormLayout(cpane);
          JLabel lab1 = new JLabel("Fetch details") ;
          lab1.setFont( bold );
          form.setTopAnchor( lab1, 4 );
          form.setLeftAnchor( lab1, 4 );
          JLabel lab2 = new JLabel("Surname: ") ;
          form.setTopRelative( lab2, lab1, 4 );
          form.setLeftAlign( lab2, lab1 );
          namefld = new JTextField( 30 );
          form.setBottomAlign( namefld, lab2 );
          form.setLeftRelative( namefld, lab2, 4 );
          namefld.addCaretListener( new CaretListener()
             public void caretUpdate(CaretEvent e)
                 showMatches();
          quitbtn = new JButton( "Quit" );
          quitbtn.addActionListener( new ActionListener()
             public void actionPerformed(ActionEvent e)
                quitProcessing();
          form.setBottomAlign( quitbtn, namefld );
          form.setLeftRelative( quitbtn, namefld, 15 );
          results = new JTextArea( 10,50 );
          results.setEditable(false);
          JScrollPane jsp = new JScrollPane( results,
                                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                     JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
          form.setTopRelative( jsp, lab2, 6 );
          form.setLeftAlign( jsp, lab2 );
          form.setBottomAnchor( jsp, 5 );
          form.setRightAnchor( jsp, 5 );
          form.setRightAnchor( quitbtn, 5 );
          matches = new Chooser( this );
          //matches.setUndecorated(true);
          pack();
          setVisible(true);
          namefld.requestFocus();
          if (arg.length > 0) init(arg[0]);
          else init("triathlon.txt"); //<<<<<<<<<<<<<<<< Place the default filename here
          /** Called once only, at the end of the constructor, to read the data
            * from the membership file.
       public void init( String fname )
          members = new TreeSet();
           try {
               FileReader fr = new FileReader(new File (fname));
               Scanner scan = new Scanner(fr);
               trimember cmem;
               String cLine, eTag, memberNo, first, last, gender, yob, tel ,addr,
                       club;
               while(scan.hasNextLine())
                   cLine = scan.nextLine();
                   Scanner scan2 = new Scanner(cLine);
                   scan2.useDelimiter(";");
                   eTag = scan2.next().trim();
                   memberNo = scan2.next().trim();
                   first = scan2.next().trim();
                   last = scan2.next().trim();
                   gender = scan2.next().trim();
                   yob = scan2.next().trim();
                   tel = scan2.next().trim();
                   addr = scan2.next().trim();
                   club = scan2.next().trim();
                   cmem = new trimember(eTag, memberNo, first, last, gender, yob,
                           tel, addr, club);
                   members.add(cmem);
           catch (FileNotFoundException ex)
               results.append("Sorry can't find the input file\n");
               results.append("Please check file name and location and try again");
               ex.printStackTrace();
          /** Called every time there is a change in the contents of the text field
            * namefld.  It will first clear the text area.  It then needs to search
            * through the container of data to find all records where the surname
            * starts with the characters that have been typed.  The names and
            * addresses need to be set up as strings and placed in
            * an array of Strings.  This can be placed in the "matches" window and
            * displayed for the user, inviting one to be selected.
            * <p>
            * The performance of this is very important.  If necessary, it may be
            * necessary to run as a separate thread so that the user interface is
            * not delayed.  It is essential that the user be able to type letters at a
            * reasonable speed and not have the keystroke processing held up by
            * previous text.
       public void showMatches( )
           run();
                // First clear the text area
          //results.setText("");
                // Determine the leading characters of the surname that is wanted
                input = namefld.getText();
                // Locate the data for this name, and display each matching item
                //  in the JTextArea ...
                // Example of how to set the data in the popup dialog
          matches.list.setListData(found);
          matches.pack();   // resize the popup
                // set the location of the popup if it is not currently visible
          if ( ! matches.isVisible())
             Dimension sz = matches.getSize();
             Point mouse = getMousePosition();
             Point framepos = getLocation();
             int x=0, y=0;
             if (mouse == null)
                Point pt = results.getLocation();
                x = pt.x + 20 + framepos.x;
                y = pt.y + 20 + framepos.y;
             else
                x = mouse.x - 2 + framepos.x;
                y = mouse.y - 2 + framepos.y;
             matches.setLocation(x,y);
          matches.setVisible(true);
          namefld.requestFocus();
          /** Perform any final processing before closing down.
       public void quitProcessing( )
          // Any closing work.  Then
          System.exit(0);
        public void run()
            ArrayList<String> foundit = new ArrayList<String>();
            System.out.println(input);
            if(input != null)
            Iterator it = members.iterator();
            while(it.hasNext())
               trimember test = (trimember) it.next();
               if (test.last.startsWith(input))
                   foundit.add(test.last +", "+ test.first);
            found = new String[foundit.size()];
            for(int i=0; i<foundit.size();i++)
                found[i] = foundit.get(i);
         /** A window for displaying names and addresses from the data set which
          match the leading characters in namefld.
          <p>
          This will automatically pop down if the user moves the mouse out of the
          window.
          <p>
          It needs code added to it to respond to the user clicking on an item in
          the displayed list. */
       class Chooser extends JWindow
                /** To display a set of names and addresses that match the leading
                characters of the namefld text field. */
          public JList list = new JList();
          Chooser( JFrame parent )
             super( parent );
             Container cpane = getContentPane();
             cpane.addMouseListener( new MouseAdapter()
                public void mouseExited(MouseEvent e)
                   Chooser.this.setVisible(false);
             cpane.add("Center",list);
             list.addListSelectionListener( new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                   Chooser.this.setVisible(false);
                   System.out.println("ValueChanged");
                   // First clear the text area
                   results.setText("");
                   String in = (String) list.getSelectedValue();
                   System.out.println("Selected Value was : "+in);
                   String[] inlf = in.split(", ");
                   System.out.println("inlf[0]:"+inlf[0]+" inlf[1]:"+inlf[1]);
                   results.append("Surname \tFirst \teTag \tMemberNo \tSex \tYOB " +
                           "\tTel \tAddress \t\t\tClub\n");
                   Iterator it = members.iterator();
                   while(it.hasNext())
                       trimember test = (trimember) it.next();
                       if (test.last.equals(inlf[0])&&test.first.equals(inlf[1]))
                           results.append(test.toString()+"\n");
                   namefld.requestFocus();
          public class trimember implements Comparable
           String eTag;
           public String memberNo;
           public String first;
           public String last;
           String gender;
           String yob;
           String tel;
           String addr;
           String club;
           public trimember(String eT, String me, String fi, String la,
                   String ge, String yo, String te, String ad, String cl)
               eTag = eT;
               memberNo = me;
               first = fi;
               last = la;
               gender = ge;
               yob = yo;
               tel = te;
               addr = ad;
               club = cl;         
           //To String method to output string of details
           public String toString()
               return last + "\t" + first + "\t" + eTag + "\t" +
                       memberNo + "\t" + gender + "\t" + yob + "\t"+ tel + "\t" +
                       addr + "\t" + club;
           //Compare and sort on Last name
           public int compareTo(Object o)
               trimember com = (trimember) o;
               int lastCmp = last.compareTo(com.last);
               int firstCmp = first.compareTo(com.first);
               int memCmp = memberNo.compareTo(com.memberNo);
               if (lastCmp == 0 && firstCmp !=0)return firstCmp;
               else if (lastCmp==0&&firstCmp==0)return memCmp;
               else return lastCmp;
    }Edited by: Roger on Nov 3, 2007 11:50 AM

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?threadID=5233033&messageID=9953169#9953169

  • Adobe form created in LiveCycle does not remember user input

    Adobe form created in LiveCycle does not remember user input when the file has been re-opened after it has been saved.
    Example:
    "Check box" that has been selected and who have registered Action script (may be that it should be disabled), seems to be reset when the file is re-opened, although it apparently is checked.
    Are there settings or script that can prevent this?

    Hi there,
    usually if the values are not kept in form after saving and re-opening the form, it would be because of your code... or because it is not Reader Extended PDF...
    If your code has a function which is to return a value to your field without it to be working based on your Design, it will reset any data..(variables)
    Which means...
    e.g.: You have an array/var/JSONobject which you populate varying on the data entered in the design, as long as you are in the actual form, without closing and re-opening the form, it will keep all values inside that array / variables / JSONobject. But, once the form closed and re-opened, if you have a function that returns a value to your field, whatever the field, from any variable in the script it will return nothing because every variables are reset. To avoid such a thing, you must repopulate all variables that were assigned previously before closing the PDF Form. To do so, I recommend to have a page(hidden) which contains every important values according to that function and you must repopulate those variables according to the values in the keepVar page...
    If you do not have any function that returns a value to a field based on your variables, this is not the solution you are looking for and I am not aware of the reason why it behaves like this... Maybe more information on the behaviour of your form would help locate the issue...
    Hope this help

  • Check user input

    Have this small script (my first attempt in Scripting), which is loaded with Acrobat 9 at startup.
    app.addMenuItem({ cName: "Gem &KMS-skrivelse", cParent: "File", cExec: "SaveAs('registreringsmeddelelse', 'produkter/')", nPos: 3 });
    app.addMenuItem({ cName: "Gem &dokument i sag", cParent: "File", cExec: "SaveAs('', '')", nPos: 4 });
    function SaveAs(cName, cDirectory)
        //Get full year
        var date=new Date();
        cYear = date.getFullYear();
        //Get year, case number and file name from user input
        var cYear = app.response({ cQuestion: "Indtast sagsår:", cTitle: "Sagsår", cDefault: cYear });
        var cCase = app.response({ cQuestion: "Indtast sagsnr.:", cTitle: "Sagsnr."});
        var cFile = app.response({ cQuestion: "Indtast filnavn (uden .pdf):", cTitle: "Filnavn", cDefault: cName });
        if (cFile == null)
             return;
        //Concatenate path string
        var cPath = "/h/digi/s" + cYear + "/" + cYear + "-" + cCase + "/" + cDirectory + cFile + ".pdf";
        //Try to save the document, if success, inform the user where to
        try {
            this.saveAs({ cPath: cPath, bPromptToOverwrite: true });
            app.alert("Dokumentet blev gemt i " + cPath, 3);
        catch(e) {
            app.alert("Kunne ikke gemme dokument i " + cPath + ". Kontroller at mappen er oprettet, og at du har skriverettigheder til denne, samt at Acrobat/Reader er sat korrekt op.");
        //So long and thanks for all the fish
        return;
    Based on user input it saves documents to folders on a network share.
    It  works just fine, but if the user cancel the input dialog, null is  returned, and eventually will be part of the filename. So I use a if  statement to check if cFile is null, and if true just returns the  function. But this fails with this error message:
    GeneralError: Handlingen mislykkedes.
    Root.(null):17:Menu Gem &dokument i sag:Exec
    script terminated
    Why is this so?
    Best regards
    mp

    The script still continues after return;
    Try this
    app.addMenuItem({ cName: "Gem &KMS-skrivelse", cParent: "File", cExec: "SaveAs('registreringsmeddelelse', 'produkter/')", nPos: 3 });
    app.addMenuItem({ cName: "Gem &dokument i sag", cParent: "File", cExec: "SaveAs('', '')", nPos: 4 });
    function SaveAs(cName, cDirectory)
        //Get full year
        var date=new Date();
        cYear = date.getFullYear();
        //Get year, case number and file name from user input
        var cYear = app.response({ cQuestion: "Indtast sagsår:", cTitle: "Sagsår", cDefault: cYear });
        var cCase = app.response({ cQuestion: "Indtast sagsnr.:", cTitle: "Sagsnr."});
        var cFile = app.response({ cQuestion: "Indtast filnavn (uden .pdf):", cTitle: "Filnavn", cDefault: cName });
       if (cFile == null)
    else
        //Concatenate path string
        var cPath = "/h/digi/s" + cYear + "/" + cYear + "-" + cCase + "/" + cDirectory + cFile + ".pdf";
        //Try to save the document, if success, inform the user where to
        try {
            this.saveAs({ cPath: cPath, bPromptToOverwrite: true });
            app.alert("Dokumentet blev gemt i " + cPath, 3);
        catch(e) {
            app.alert("Kunne ikke gemme dokument i " + cPath + ". Kontroller at mappen er oprettet, og at du har skriverettigheder til denne, samt at Acrobat/Reader er sat korrekt op.");
        //So long and thanks for all the fish
        return;

  • IPhoto 11 has stopped responding. I was making a slideshow when it froze, I had to force quit to close it down but now when I try to open it starts to try to open but cannot and I can only close it down through force quit.

    IPhoto 11 has stopped responding. I had been working on a large slideshow for a week now and all was great when the slideshow froze when I tried to add another image. To shut it down I had to force quit.  When I have tried to re-open IPhoto starts to launch  but the rainbow icon just keeps going round and I have to force quit to get out of the programm. I cannot access any of the files in IPhoto and it wil not open. Any suggestions??? I would really want to save my images in IPhoto if at all possible as I do not have them stored anywher elese. Any help would be very apprreciated.

    Remember: you always need a back up for any important data on your computer. Always.
    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.
    If that fails
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

Maybe you are looking for

  • Duplicates in my catalog

    After fooling around with the folders, I hit Synchronize Folders and Lightroom added about 3,000 files to my catalog. Approximately half of them have no metadata and cannot be located (at least not immediately). The other half appeaer to be duplicate

  • Open document

    I want to connect two parameters for the open document.  The "main" report for lack of a better word.  Has a parameter that allows multi numbers to be picked from a LOV.  I want to pass whatever they picked to the report at the other end of the open

  • Skype to go Argentina

    I have set up a S2G number for my son in Argentina, but when I dial it, a message says he is not available. Will this function not work in Argentina?

  • Where can I download WAS 6.2 from?

    Pleas help. I have 6.1 WAS and am looking ofr 6.2 version. Does anyone know where I can download that from. Thanks in advance

  • Why does the iTunes store freeze ?

    My iTunes store freezes on me and all the icons at the bottom of the screen do not respond. How can I fix the problem?