Overlay Images and Shapes on the same canvas

The example copde below was taken from: http://math.hws.edu/eck/cs124/javanotes3/source/
Is it possible to update the code so that images (jpg,gif) can be added as well as shapes?
Any help with this is much appreciated.
    The ShapeDraw applet lets the user add small colored shapes to
    a drawing area and then drag them around.  The shapes are rectangles,
    ovals, and roundrects.  The user adds a shape to the canvas by
    clicking on a button.  The shape is added at the upper left corner
    of the canvas.  The color of the shape is given by the current
    setting of a pop-up menu.  The user can drag the shapes with the
    mouse.  Ordinarily, the shapes maintain a given back-to-front order.
    However, if the user shift-clicks on a shape, that shape will be
    brought to the front.
    A menu can be popped up on a shape (by right-clicking or performing
    some othe platform-dependent action).  This menu allows the user
    to change the size and color of a shape.  It is also possible to
    delete the shape and to bring it to the front.
    This file defines the applet class plus several other classes used
    by the applet, namely:  ShapeCanvas, Shape, RectShape, OvalShape,
    and RoundRectShape.
    David Eck
    July 28,  1998
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
import java.util.Vector;
public class ShapeDrawWithMenu extends Applet {
   public void init() { 
        // Set up the applet's GUI.  It consists of a canvas, or drawing area,
        // plus a row of controls below the canvas.  The controls include three
        // buttons which are used to add shapes to the canvas and a Choice menu
        // that is used to select the color used for a shape when it is created.
        // The canvas is set as the "listener" for these controls so that it can
        // respond to the user's actions.  (The pop-up menu is created by the canvas.)
      setBackground(Color.lightGray);
      ShapeCanvas canvas = new ShapeCanvas();  // create the canvas
      Choice colorChoice = new Choice();  // color choice menu
      colorChoice.add("Red");
      colorChoice.add("Green");
      colorChoice.add("Blue");
      colorChoice.add("Cyan");
      colorChoice.add("Magenta");
      colorChoice.add("Yellow");
      colorChoice.add("Black");
      colorChoice.add("White");
      colorChoice.addItemListener(canvas);
      Button rectButton = new Button("Rect");    // buttons for adding shapes
      rectButton.addActionListener(canvas);
      Button ovalButton = new Button("Oval");
      ovalButton.addActionListener(canvas);
      Button roundRectButton = new Button("RoundRect");
      roundRectButton.addActionListener(canvas);
      Panel bottom = new Panel();   // a Panel to hold the control buttons
      bottom.setLayout(new GridLayout(1,4,3,3));
      bottom.add(rectButton);
      bottom.add(ovalButton);
      bottom.add(roundRectButton);
      bottom.add(colorChoice);
      setLayout(new BorderLayout(3,3));
      add("Center",canvas);              // add canvas and controls to the applet
      add("South",bottom);
   public Insets getInsets() {
        // Says how much space to leave between the edges of the applet and the
        // components in the applet.
      return new Insets(3,3,3,3);
}  // end class ShapeDraw
class ShapeCanvas extends Canvas implements ActionListener, ItemListener,
                                            MouseListener, MouseMotionListener {
      // This class represents a canvas that can display colored shapes and
      // let the user drag them around.  It uses an off-screen images to
      // make the dragging look as smooth as possible.  A pop-up menu is
      // added to the canvas that can be used to performa certain actions
      // on the shapes;
   Image offScreenCanvas = null;   // off-screen image used for double buffering
   Graphics offScreenGraphics;     // graphics context for drawing to offScreenCanvas
   Vector shapes = new Vector();   // holds a list of the shapes that are displayed on the canvas
   Color currentColor = Color.red; // current color; when a shape is created, this is its color
   ShapeCanvas() {
        // Constructor: set background color to white, set up listeners to respond to mouse actions,
        //              and set up the pop-up menu
      setBackground(Color.white);
      addMouseListener(this);
      addMouseMotionListener(this);
      popup = new PopupMenu();
      popup.add("Red");
      popup.add("Green");
      popup.add("Blue");
      popup.add("Cyan");
      popup.add("Magenta");
      popup.add("Yellow");
      popup.add("Black");
      popup.add("White");
      popup.addSeparator();
      popup.add("Big");
      popup.add("Medium");
      popup.add("Small");
      popup.addSeparator();
      popup.add("Delete");
      popup.add("Bring To Front");
      add(popup);
      popup.addActionListener(this);
   } // end construtor
   synchronized public void paint(Graphics g) {
        // In the paint method, everything is drawn to an off-screen canvas, and then
        // that canvas is copied onto the screen.
      makeOffScreenCanvas();
      g.drawImage(offScreenCanvas,0,0,this);
   public void update(Graphics g) {
        // Update method is called when canvas is to be redrawn.
        // Just call the paint method.
      paint(g);
   void makeOffScreenCanvas() {
         // Erase the off-screen canvas and redraw all the shapes in the list.
         // (First, if canvas has not yet been created, then create it.)
      if (offScreenCanvas == null) {
         offScreenCanvas = createImage(getSize().width,getSize().height);
         offScreenGraphics = offScreenCanvas.getGraphics();
      offScreenGraphics.setColor(getBackground());
      offScreenGraphics.fillRect(0,0,getSize().width,getSize().height);
      int top = shapes.size();
      for (int i = 0; i < top; i++) {
         Shape s = (Shape)shapes.elementAt(i);
         s.draw(offScreenGraphics);
   public void itemStateChanged(ItemEvent evt) {
          // This is called to respond to item events.  Such events
          // can only be sent by the color choice menu,
          // so respond by setting the current color according to
          // the selected item in that menu.
      Choice colorChoice = (Choice)evt.getItemSelectable();
      switch (colorChoice.getSelectedIndex()) {
         case 0: currentColor = Color.red;     break;
         case 1: currentColor = Color.green;   break;
         case 2: currentColor = Color.blue;    break;
         case 3: currentColor = Color.cyan;    break;
         case 4: currentColor = Color.magenta; break;
         case 5: currentColor = Color.yellow;  break;
         case 6: currentColor = Color.black;   break;
         case 7: currentColor = Color.white;   break;
   public void actionPerformed(ActionEvent evt) {
          // Called to respond to action events.  The three shape-adding
          // buttons have been set up to send action events to this canvas.
          // Respond by adding the appropriate shape to the canvas.  This
          // also be a command from a pop-up menu.
      String command = evt.getActionCommand();
      if (command.equals("Rect"))
         addShape(new RectShape());
      else if (command.equals("Oval"))
         addShape(new OvalShape());
      else if (command.equals("RoundRect"))
         addShape(new RoundRectShape());
      else
         doPopupMenuCommand(command);
   synchronized void addShape(Shape shape) {
          // Add the shape to the canvas, and set its size/position and color.
          // The shape is added at the top-left corner, with size 50-by-30.
          // Then redraw the canvas to show the newly added shape.
      shape.setColor(currentColor);
      shape.reshape(3,3,50,30);
      shapes.addElement(shape);
      repaint();
   // ------------ This rest of the class implements dragging and the pop-up menu ---------------------
   PopupMenu popup;
   Shape selectedShape = null;     // This is null unless a menu has been popped up on this shape.
   Shape draggedShape = null;      // This is null unless a shape has been selected for dragging.
   int prevDragX;  // During dragging, these record the x and y coordinates of the
   int prevDragY;  //    previous position of the mouse.
   Shape clickedShape(int x, int y) {
         // Find the frontmost shape at coordinates (x,y); return null if there is none.
      for ( int i = shapes.size() - 1; i >= 0; i-- ) {  // check shapes from front to back
         Shape s = (Shape)shapes.elementAt(i);
         if (s.containsPoint(x,y))
            return s;
      return null;
   void doPopupMenuCommand(String command) {
         // Handle a command from the pop-up menu.
      if (selectedShape == null)  // should be impossible
         return;
      if (command.equals("Red"))
         selectedShape.setColor(Color.red);
      else if (command.equals("Green"))
         selectedShape.setColor(Color.green);
      else if (command.equals("Blue"))
         selectedShape.setColor(Color.blue);
      else if (command.equals("Cyan"))
         selectedShape.setColor(Color.cyan);
      else if (command.equals("Magenta"))
         selectedShape.setColor(Color.magenta);
      else if (command.equals("Yellow"))
         selectedShape.setColor(Color.yellow);
      else if (command.equals("Black"))
         selectedShape.setColor(Color.black);
      else if (command.equals("White"))
         selectedShape.setColor(Color.white);
      else if (command.equals("Big"))
         selectedShape.resize(75,45);
      else if (command.equals("Medium"))
         selectedShape.resize(50,30);
      else if (command.equals("Small"))
         selectedShape.resize(25,15);
      else if (command.equals("Delete"))
         shapes.removeElement(selectedShape);
      else if (command.equals("Bring To Front")) {
         shapes.removeElement(selectedShape);
         shapes.addElement(selectedShape);
      repaint();
   synchronized public void mousePressed(MouseEvent evt) {
         // User has pressed the mouse.  Find the shape that the user has clicked on, if
         // any.  If there is a shape at the position when the mouse was clicked, then
         // start dragging it.  If the user was holding down the shift key, then bring
         // the dragged shape to the front, in front of all the other shapes.
      int x = evt.getX();  // x-coordinate of point where mouse was clicked
      int y = evt.getY();  // y-coordinate of point
      if (evt.isPopupTrigger()) {            // If this is a pop-up menu event that
         selectedShape = clickedShape(x,y);  // occurred over a shape, record which shape
         if (selectedShape != null)          // it is and show the menu.
            popup.show(this,x,y);
      else {
         draggedShape = clickedShape(x,y);
         if (draggedShape != null) {
            prevDragX = x;
            prevDragY = y;
            if (evt.isShiftDown()) {                 // Bring the shape to the front by moving it to
               shapes.removeElement(draggedShape);  //       the end of the list of shapes.
               shapes.addElement(draggedShape);
               repaint();  // repaint canvas to show shape in front of other shapes
   synchronized public void mouseDragged(MouseEvent evt) {
          // User has moved the mouse.  Move the dragged shape by the same amount.
      if (draggedShape != null) {
         int x = evt.getX();
         int y = evt.getY();
         draggedShape.moveBy(x - prevDragX, y - prevDragY);
         prevDragX = x;
         prevDragY = y;
         repaint();      // redraw canvas to show shape in new position
   synchronized public void mouseReleased(MouseEvent evt) {
          // User has released the mouse.  Move the dragged shape, then set
          // shapeBeingDragged to null to indicate that dragging is over.
          // If the shape lies completely outside the canvas, remove it
          // from the list of shapes (since there is no way to ever move
          // it back onscreen).
      int x = evt.getX();
      int y = evt.getY();
      if (draggedShape != null) {
         draggedShape.moveBy(x - prevDragX, y - prevDragY);
         if ( draggedShape.left >= getSize().width || draggedShape.top >= getSize().height ||
                 draggedShape.left + draggedShape.width < 0 ||
                 draggedShape.top + draggedShape.height < 0 ) {  // shape is off-screen
            shapes.removeElement(draggedShape);  // remove shape from list of shapes
         draggedShape = null;
         repaint();
      else if (evt.isPopupTrigger()) {        // If this is a pop-up menu event that
         selectedShape = clickedShape(x,y);   // occurred over a shape, record the
         if (selectedShape != null)           // shape and show the menu.
            popup.show(this,x,y);
   public void mouseEntered(MouseEvent evt) { }   // Other methods required for MouseListener and
   public void mouseExited(MouseEvent evt) { }    //              MouseMotionListener interfaces.
   public void mouseMoved(MouseEvent evt) { }
   public void mouseClicked(MouseEvent evt) { }
}  // end class ShapeCanvas
abstract class Shape {
      // A class representing shapes that can be displayed on a ShapeCanvas.
      // The subclasses of this class represent particular types of shapes.
      // When a shape is first constucted, it has height and width zero
      // and a default color of white.
   int left, top;      // Position of top left corner of rectangle that bounds this shape.
   int width, height;  // Size of the bounding rectangle.
   Color color = Color.white;  // Color of this shape.
   void reshape(int left, int top, int width, int height) {
         // Set the position and size of this shape.
      this.left = left;
      this.top = top;
      this.width = width;
      this.height = height;
   void resize(int width,int height) {
         // Set the size without changing the position
      this.width = width;
      this.height = height;
   void moveTo(int x, int y) {
          // Move upper left corner to the point (x,y)
      this.left = x;
      this.top = y;
   void moveBy(int dx, int dy) {
          // Move the shape by dx pixels horizontally and dy pixels veritcally
          // (by changing the position of the top-left corner of the shape).
      left += dx;
      top += dy;
   void setColor(Color color) {
          // Set the color of this shape
      this.color = color;
   boolean containsPoint(int x, int y) {
         // Check whether the shape contains the point (x,y).
         // By default, this just checks whether (x,y) is inside the
         // rectangle that bounds the shape.  This method should be
         // overridden by a subclass if the default behaviour is not
         // appropriate for the subclass.
      if (x >= left && x < left+width && y >= top && y < top+height)
         return true;
      else
         return false;
   abstract void draw(Graphics g); 
         // Draw the shape in the graphics context g.
         // This must be overriden in any concrete subclass.
}  // end of class Shape
class RectShape extends Shape {
      // This class represents rectangle shapes.
   void draw(Graphics g) {
      g.setColor(color);
      g.fillRect(left,top,width,height);
      g.setColor(Color.black);
      g.drawRect(left,top,width,height);
class OvalShape extends Shape {
       // This class represents oval shapes.
   void draw(Graphics g) {
      g.setColor(color);
      g.fillOval(left,top,width,height);
      g.setColor(Color.black);
      g.drawOval(left,top,width,height);
   boolean containsPoint(int x, int y) {
         // Check whether (x,y) is inside this oval, using the
         // mathematical equation of an ellipse.
      double rx = width/2.0;   // horizontal radius of ellipse
      double ry = height/2.0;  // vertical radius of ellipse
      double cx = left + rx;   // x-coord of center of ellipse
      double cy = top + ry;    // y-coord of center of ellipse
      if ( (ry*(x-cx))*(ry*(x-cx)) + (rx*(y-cy))*(rx*(y-cy)) <= rx*rx*ry*ry )
         return true;
      else
        return false;
class RoundRectShape extends Shape {
       // This class represents rectangle shapes with rounded corners.
       // (Note that it uses the inherited version of the
       // containsPoint(x,y) method, even though that is not perfectly
       // accurate when (x,y) is near one of the corners.)
   void draw(Graphics g) {
      g.setColor(color);
      g.fillRoundRect(left,top,width,height,width/3,height/3);
      g.setColor(Color.black);
      g.drawRoundRect(left,top,width,height,width/3,height/3);
}

Manveer-Singh
Please don't post in old threads that are long dead. When you have a question, please start a topic of your own. Feel free to provide a link to an old thread if relevant.
I'm locking this 3 year old thread now.
db
edit You have earlier been advised not to post in old dead threads.
[http://forums.sun.com/thread.jspa?threadID=354443]
Continuing to ignore this advice will render your account liable to be blocked.
Edited by: Darryl.Burke

Similar Messages

  • How can I put the image and header in the same animation

    I am working on presentation and want to have the image (I choose "Showroom" theme) on the half side of the page (either left or right) and the text header (on the middle top) coming at the same time in the annimation. I am now doing by choose effect direction and set the oder. How can I have let say oder no 1 and 2 coming at the same time.
    Thanks,
    Monkon

    Select both objects and group them ( command alt G ) or (Arrange > Group)
    Inspector > Builds > Effects
    click more options and choose torun the build Automatically or On Click

  • Swap Images and URLs at the Same Time

    I would like to not only to swap images when one rolls over a thum image, but at the same time I would like to have a link swapped in the new image.  I am using behaviors to swap multiple images on a page.   So to be clear I have several thums that one can roll over.   When a thum is rolled over with the mouse a large image is swaped  in a different location on the page.   I would like to be able to attach a unique link to a URL to each of these new large images when they are swapped.

    The link below will take you to a life page. In this example, the changing 
    text below the large changing image is in fact an image that is swaped out 
    as one moves the mouse over a thum on the right side of this page. This 
    changing text image will have an "Add to Cart" button. The button could be 
    part of the text or perhaps yet another image that changes as one moves 
    over the thums on the right. Here is where I need the help. As one clicks 
    on this text image that is changing (or changing button) I would like to 
    have a link associated with this image that will add the customors choice 
    of pillows to their cart. Need help with how to associate a unique link to 
    unique URLs with this changing text image.
    Life page: http://katetroyer.com/Pillows.html

  • Warp image and path at the same time

    I have this pepper, cut out from the background with a vector mask. We need the path for cutting out the printed pepper on our plotter.
    From this same pepper we need some variations, like the pictures below (top one is original + path, bottom one is one of many variations).
    I  made a smart object from the pepper with vector mask and distorted it using a custom warp. I can rasterize the layer, but i can't find a way to bring the distorted path to the parent psd.
    How can i distort both the pixels and vector mask at the same time? So i can place different versions in illustrator without needing to redraw the vector mask for each variation.
    Thanks!

    Ok got to the bottom of this. Turns out it won't work if you have an existing Warp transformation applied to a Smart Object, and a vector mask linked to that. But it will work the first time.
    Thinking it through you realise that this is logical, because it would need to produce a kind of "compound Warp", using the existing Transform values applied to the object already, and then applying the new ones. Only one set of Warp values to the mask, and two to the Smart Object. They are not compatible operations.

  • In Acrobat XI, how can I select and move multiple text/image blocks simultaneously on the same page?

    I work with student-generated PDFs that require all content to be within a specific margin range. Occasionally tables and figures are indented or otherwise spaced incorrectly so that the content violates the margin requirements. In Acrobat X, I could use the select tool to draw a select box around all of the text and lines within a table, for example, and just slide the entire table over a bit to meet the requirements without sending the PDF back to the author for a correction. This didn't always work, but often enough that I was able to use it on a daily basis.
    Is there a way to select multiple (but not ALL) text blocks and image pieces on a page, so they may be moved simultaneously? If I have to select every text block and line (or every point and line within a graph) and move them each individually, this is going to be a nightmare.
    I have Acrobat XI for both Mac and Windows, but tend to use the Windows version more often.

    Hey, I'm using Acrobat XI and I can't multi select like I use too do with shift as always. Now I get a green note every time I want to multi select with shift + click as always. I also use Pitstop and I get the same green notes.
    Can someone help me ?

  • How can I flip/mirror and image horizontally/vertically in the same programme? Is there a keyboard s

    How can I flip/mirror and image horizontally/vertically in the same programme? Is there a keyboard shortcut? Mac, latest version.
    Thanks in advance..

    Rola.AlGhalib wrote:
    …but figured how can an editing software not have the simplest things…? …
    Bridge is categorically NOT "editing software".  It's just a file browser, no more and no less.  Period.
    Bridge does not "edit" anything.  Bridge doesn't even open anything.  It just hands files to the appropriate application, whether this be Adobe Camera Raw, Photoshop, Illustrator, Acrobat, InDesign, or even Microsoft Word.
    No, there will most likely never be "an update" for this. 

  • Illustrator files size and instances of the same embedded image

    My question is, isn’t Illustrator supposed to use and save just one instance of an embedded image regardless of how many times it i used in an document?
    A senario: If I import and embed an image and I save the document I get a pretty small files size. But when I copy this image internally in the document, say that I copy the image 10 times, I get ten times the file size. Is it supposed to do that? Why doesn't it just save the image one time?

    Just did a test where I placed 5 images in Illustrator, one file with these images embedded, one with these images as Symbols, and one with these images as links. The winner for the smallest illustrator file is the file with images linked. But this is because you must supply the link with the Illustrator file if you want to actually use it for anything which would fall into the category of having one image used several times in Illustrator and not making the file have the weight of all 5 images.
    A better understanding of these usages in Illustrator can be attained with this link.
    http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-657aa .html

  • Can I use a camera for application in Labview and VBAI at the same time ?

    Dear all,
    I'm trying to save an AVI file with Labview and make an image process with VBAI at the same time, in one machine.
    The error : "Camera already in use" displayed.
    My Camera is a GIGE and I work with Imaqdx. I've test the multicast mode but it only operate with several machines.
    How can I do this ?
    Thank's to help me,
    Yoann B

    I'm not necessarily saying that.  It's been a while since I've used VBAI, so I don't remember all of the capabilities, but if VBAI can do the inspection and recording at the same time, you should be fine.
    The trick is that only one program can access the camera at the same time.  That application reserves the camera, thus making it unavailable to others.
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • Multiple data blocks on the same canvas

    Forms newbie question:
    Is it possible to have 2 data blocks with two different sets of transactional triggers (ON-UPDATE, ON-LOCK, etc.) on the same canvas?
    I've got an example where i've got two data blocks (one sourced from a view, and one that is a CTL block) on the same canvas. The block sourced from the view is working fine. When I make updates, they are reflected, etc. But, i've got one field in the control block that I need to update from as well, and I can't seem to get it (or any of the CTL block items) to show up as "updateable", regardless of the set_item_property....theyre always grayed out.
    Do i need to take the user to a new canvas to be able to utilize the update of the ctl field?

    A second canvas is not needed. Normally, control-block items are always updateable, so there is something going on in your form to prevent it.
    > I can't seem to get it (or any of the CTL block items) to show up as "updateable",
    regardless of the set_item_property....theyre always grayed out.
    What... Is there code someplace in the form that sets them to Enabled, false? If that is the case, then to get them working again, besides setting Enabled to true, you also must set Updateable and Navigable to Property_True. (This is documented at the end of the on-line help on Set_Item_Property.)

  • My SB Audigy 2 card can't use headset and musicamplifier at the same time

    Hi, i just bought a SB Audigy 2 [D400] and i have downloaded drivers and programs. I run Windows XP SP2.
    The soundcard works fine but it is very very annoying that i physically have to change the jack in the green=line out jack from headset to musicamplifier when i want to use my musicamplifier and change back the jack in the green=line out from musicamplifier to headset when i just want to use the headset/headphones .
    In the shop they told my that i can connect both amplifier and headset at the same time and then with creative software control whether there is sound in the headset or in the amplifier. But i can't simple get it work.
    I tried to use the green to the amplifier and the headset/speakers in the black (line out 2) and then with creative speaker settings softeware choose headphones but still the ampliefier receive the sound and no sound in the headphones. Why? In fact no matter what configuration i try the headphones doesn't work.
    But if i change the jacks so headset is in the green line out then only headset is working and the amplifier doesn't work no matter i put it in sort=line out 2 jack or orange=line out 3 jack.
    Can somebody here tell me if it is possible or not to connect both headset and external amplifier and control by software which to play? and how?
    please help, thx.
    Michael

    If you can have an ASIO compatible music playing system, then it might be possible to have system like you wish when using Creative Audigy 2 card. Since ASIO bypasses Windows Audio System, you can use both 'drivers' (ASIO - WDM/MME/DS) side by side.
    Say you want to play a game (using headset /w mic) and someone other like to listen music at the same time. With ASIO capable system you can output your music for example to "center L/R (stereo) channels" and same time output sounds from other source (using MME/DS/WDM drivers) to normal output channel (Front L/R). Only thing is, you need to set your speakersystem to 4 or 6 (depending which other channel you're using) (and for better 'balance' to adjust "angle" on THX console. You get the THX console by installing Audigy 2 Zs software).
    Try for example http://img332.imageshack.us/img332/463/djs9mo.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    Another option:
    Say you want to play music through external amplifier and play game online with your headset + microphone (eg. others but you listen the music, you play games)
    --> try free http://img332.imageshack.us/img332/4589/tbp7rz.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    If you use ASIO on BeatPort Player you can select L/R individually from the list(s). Same rules as described earlier.
    = You can play from 2 different sources simultaoneusly (ASIO + WDM/MME/DS) to two different outputs without disturbance. The other (WDM/MME/DS) source is set 'automatically' output to (Audigy) "green" port, and the other (ASIO) to "black" or "orange" port (as set).
    .jtpMessage Edited by jutapa on 09-5-2005 05:30 AM

  • Can I watch video through my iPhone and TV at the same time?

    Can I watch video through my iPhone and TV at the same time while using the Apple composite video cables? I am planning a trip in my car and would like to play videos for my kids through their video screen while my wife watches on the iphone from the passenger seat. I didn't want to spend $50 to find out it doesn't work.
    Thanks in advance!

    It doesn't work that way, sorry. When video out is being utilized, only the movie artwork (the cover or image) is displayed, and the actual movie is not displayed on the iPhone's screen.

  • XML document structures must start and end within the same entity

    Hi there,
    I'm working with a client/server application and using SaxParser for reading in xml. I get the SaxParserException: XML document structures must start and end within the same entity. I understand what that means, but it isn't applicable! The xml data being used is well-formed. I checked the well-formedness with Stylus Studio to make sure. Here's the data:
    <?xml version='1.0' encoding='UTF-8'?>
    <vcmessage>
         <vcsource>3</vcsource>
         <processevent>16</processevent>
         <shape>
              <llindex>0</llindex>
              <shapetype>9</shapetype>
              <shapeproperties>
                   <shapelocation>
                        <xcoord>54</xcoord>
                        <ycoord>184</ycoord>
                   </shapelocation>
                   <bounds>
                        <width>24</width>
                        <height>24</height>
                   </bounds>
                   <fgcolor>
                        <fgred>0</fgred>
                        <fggreen>0</fggreen>
                        <fgblue>0</fgblue>
                   </fgcolor>
                   <bgcolor>
                        <bgred>255</bgred>
                        <bggreen>255</bggreen>
                        <bgblue>255</bgblue>
                   </bgcolor>
                   <thickness>1</thickness>
                   <isfilled>false</isfilled>
              </shapeproperties>
         </shape>
    </vcmessage>The parser generally stops around the </bgcolor> tag.
    I'm using Eclypse as my IDE. I'm wondering if there's something wrong with it? Or maybe there's something wrong with the class I'm using for reading in the XML? Followng is the class.
    Please advise,
    Alan
    package vcclient;
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    public class XMLDocumentReader extends DefaultHandler
      private VCClient client = null;
      private Writer out;
      private String lineEnd =  System.getProperty("line.separator");
      private boolean haveSourceType = false;
      private boolean haveUserName = false;
      private boolean haveMessage = false;
      private boolean haveProcessEvent = false;
      private boolean haveLinkedListIndex = false;
      private boolean haveOpeningShapePropertiesTag = false;
      private boolean haveShapeType = false;
      private boolean haveOpeningShapeLocationTag = false;
      private boolean haveShapeLocation = false;
      private boolean haveOpeningXCoordTag = false;
      private boolean haveOpeningYCoordTag = false;
      private boolean haveOpeningBoundsTag = false;
      private boolean haveBoundsWidth = false;
      private boolean haveBoundsHeight = false;
      private boolean haveOpeningFGColorTag = false;
      private boolean haveOpeningBGColorTag = false;
      private boolean haveOpeningThicknessTag = false;
      private boolean haveOpeningIsFilledTag = false;
      private boolean haveOpeningImageDataTag = false;
      private boolean haveOpeningTextDataTag = false;
      private boolean haveFGRed = false;
      private boolean haveFGGreen = false;
      private boolean haveFGBlue = false;
      private boolean haveBGRed = false;
      private boolean haveBGGreen = false;
      private boolean haveBGBlue = false;
      private boolean haveThickness = false;
      private boolean haveIsFilled = false;
      private boolean haveImageData = false;
      private boolean haveTextData = false;
      private VCMessage vcmessage = null;
      public XMLDocumentReader(VCClient value)
           client = value;
           vcmessage = new VCMessage();
      public VCMessage getVCMessage()
           return vcmessage;
      public boolean haveSourceType()
         return haveSourceType; 
      public boolean ParseXML(InputStream stream)
         boolean success = false;
         // Use the default (non-validating) parser
        SAXParserFactory factory = SAXParserFactory.newInstance();
        try
             // Set up output stream
            out = new OutputStreamWriter(System.out, "UTF-8");
            // Parse the input
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse( stream, this );
            success = true;
        catch (SAXParseException spe)
            // Error generated by the parser
            System.out.println("\n** Parsing error"
               + ", line " + spe.getLineNumber()
               + ", uri " + spe.getSystemId());
            System.out.println("   " + spe.getMessage() );
            // Unpack the delivered exception to get the exception it contains
            Exception  x = spe;
            if (spe.getException() != null)
                x = spe.getException();
            x.printStackTrace();
            return success;
        catch (SAXException sxe)
             // Error generated by this application
             // (or a parser-initialization error)
             Exception  x = sxe;
             if (sxe.getException() != null)
                 x = sxe.getException();
             x.printStackTrace();
             return success;
        catch (ParserConfigurationException pce)
            // Parser with specified options can't be built
            pce.printStackTrace();
            return success;
        catch (Throwable t)
             t.printStackTrace();
             return success;
        return success;
      public void startDocument()throws SAXException
          emit("<?xml version='1.0' encoding='UTF-8'?>");
          nl();
      public void endDocument()throws SAXException
          try {
              nl();
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      public void startElement(String namespaceURI,
                               String lName, // local name
                               String qName, // qualified name
                               Attributes attrs)throws SAXException
          String eName = lName; // element name
          if (eName.equals(""))
             eName = qName; // namespaceAware = false
          emit("<"+eName);
          if (attrs != null) {
              for (int i = 0; i < attrs.getLength(); i++) {
                  String aName = attrs.getLocalName(i); // Attr name
                  if (aName.equals("")) aName = attrs.getQName(i);
                  emit(" ");
                  emit(aName + "=\"" + attrs.getValue(i) + "\"");
          emit(">");
          if(makeStartTag(eName).equals(Constants.OPENING_SHAPEPROPERTIES))
                haveOpeningShapePropertiesTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_SHAPELOCATION))
              haveOpeningShapeLocationTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BOUNDS))
                haveOpeningBoundsTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_FGCOLOR))
                 haveOpeningFGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGCOLOR))
              haveOpeningBGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGGREEN))
               System.out.println("See BGGreen");
          else if(makeStartTag(eName).equals(Constants.OPENING_BGBLUE))
               System.out.println("See BGBlue");
          else if(makeStartTag(eName).equals(Constants.OPENING_THICKNESS))
              haveOpeningThicknessTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_ISFILLED))
              haveOpeningIsFilledTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_IMAGEDATA))
              haveOpeningImageDataTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_TEXTDATA))
              haveOpeningTextDataTag = true;
      public void endElement(String namespaceURI,
                             String sName, // simple name
                             String qName  // qualified name
                            )throws SAXException
           if(sName.equals("") && !qName.equals(""))
              sName = qName;
              emit("</"+sName+">");
           else
              emit("</"+sName+">");
           if(makeEndTag(sName).equals(Constants.CLOSING_SOURCE_TYPE))
              haveSourceType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_USER))
              haveUserName = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_MESSAGE))
              haveMessage = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_PROCESSEVENT))
               haveProcessEvent = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_LINKEDLISTINDEX))
               haveLinkedListIndex = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPETYPE))
               haveShapeType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPELOCATION))
                haveOpeningShapeLocationTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_WIDTH))
               haveBoundsWidth = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_HEIGHT))
               haveBoundsHeight = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BOUNDS))
                haveOpeningBoundsTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGRED))
               haveFGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGGREEN))
               haveFGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGBLUE))
               haveFGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGCOLOR))
                haveOpeningFGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGRED))
               haveBGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGGREEN))
             haveBGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGBLUE))
               System.out.println("See closing BGBlue");
               haveBGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGCOLOR))
                haveOpeningBGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_THICKNESS))
               System.out.println("XMLDocumentReader: Step2");
                haveOpeningThicknessTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_ISFILLED))
               haveOpeningIsFilledTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_IMAGEDATA))
               haveOpeningImageDataTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_TEXTDATA))
               haveOpeningTextDataTag = false;
      private String makeStartTag(String tag_name)
           String start = "<";
           String end = ">";
           return start.concat(tag_name).concat(end);
      private String makeEndTag(String tag_name)
           String start = "</";
           String end = ">";
           return start.concat(tag_name).concat(end);
      public void characters(char buf[], int offset, int len)throws SAXException
           String s = new String(buf, offset, len);
          if(haveSourceType == false)
               if(vcmessage.getSourceType() == null)
                  try
                    if(s.equals(""))return;
                   int sourcetype = Integer.parseInt(s);
                   vcmessage.setSourceType(sourcetype);                            
                  catch(NumberFormatException nfe){}
          else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE)
            if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveUserName == false)
                 vcmessage.setUserName(s);          
            else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveMessage == false)
               //When the parser encounters interpreted characters like: & or <,
               //then this method gets invoked more than once for the whole message.
               //Therefore, we need to concatonate each portion of the message.  The
               //following method call automatically concatonates.
               vcmessage.concatMessage(s);                    
          else if(vcmessage.getSourceType() == SourceType.WHITEBOARD_SOURCE)
               if(haveProcessEvent == false)
                 try
                   vcmessage.setProcessEvent(Integer.parseInt(s));
                 catch(NumberFormatException nfe){}
               else if(haveLinkedListIndex == false)
                    try
                       vcmessage.setLinkedListIndex(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               else if(haveShapeType == false)
                    try
                       vcmessage.setShapeType(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               if(haveOpeningShapePropertiesTag)
                    if(haveOpeningShapeLocationTag)
                         if(haveOpeningXCoordTag)
                              try
                                vcmessage.setXCoordinate(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveOpeningYCoordTag)
                              try
                                vcmessage.setYCoordinate(Integer.parseInt(s));
                                //reset all flags for ShapeLocation, X and Y coordinates
                                haveOpeningXCoordTag = false;
                                haveOpeningYCoordTag = false;
                                //haveOpeningShapeLocationTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBoundsTag)
                         if(haveBoundsWidth == false)
                              try
                                vcmessage.setBoundsWidth(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveBoundsHeight == false)
                              try
                                vcmessage.setBoundsHeight(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBoundsTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningFGColorTag)
                         if(haveFGRed == false)
                              try
                                vcmessage.setFGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGGreen == false)
                              try
                                vcmessage.setFGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGBlue == false)
                              try
                                vcmessage.setFGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningFGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBGColorTag)
                         if(haveBGRed == false)
                              try
                                vcmessage.setBGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGGreen == false)
                              try
                                vcmessage.setBGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGBlue == false)
                         {   System.out.println("getting BGBlue data");
                              try
                                vcmessage.setBGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningThicknessTag)
                         try
                            vcmessage.setThickness(Integer.parseInt(s));                       
                          catch(NumberFormatException nfe){}
                    else if(haveOpeningIsFilledTag)
                         vcmessage.setIsFilled(s);
                    else if(haveOpeningImageDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setBase64ImageData(s);                    
                    else if(haveOpeningTextDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setTextData(s);
                    //reset
                    haveOpeningShapePropertiesTag = false;
          emit(s);
      //===========================================================
      // Utility Methods ...
      //===========================================================
      // Wrap I/O exceptions in SAX exceptions, to
      // suit handler signature requirements
      private void emit(String s)throws SAXException
          try {
              out.write(s);
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      // Start a new line
      private void nl()throws SAXException
          try {
              out.write(lineEnd);
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      //treat validation errors as fatal
      public void error(SAXParseException e)
      throws SAXParseException
        throw e;
      // dump warnings too
      public void warning(SAXParseException err)
      throws SAXParseException
        System.out.println("** Warning"
            + ", line " + err.getLineNumber()
            + ", uri " + err.getSystemId());
        System.out.println("   " + err.getMessage());
    }

    Just out of curiosity what happens if you append a space to the end of the XML document?

  • My iPod generation 6 160gb will not sync. iTunes says corrupt, won't restore just errors out and then loops the same messages.

    My iPod is corrupt according to iTunes, however it won't restore through iTunes either.  I've tried to reformat the drive.  Makes no difference.  I've tried to reformat after choosing disk manager, and again the same result.  The iPod takes forever to work through the reformatting process and I get the same message "Itunes has detected an iPod that appears to be corrupted. You may need to restore this iPod before it can be used with iTunes. You may also try disconnecting and reconnecting the iPod" and then my pc tells me to format the disk.
    It's so frustrating, is there a fix to this? It seems like the iPod could still function, but I'm missing the way to get out of this loop, please help me!

    Likely a hard drive fault, see the note that i wrote few years ago, hopefully it helps
    If a sad iPod icon or an exclamation point and folder icon appears on your iPod’s screen, or with sounds of clicking or HD whirring, it is usually the sign of a hard drive problem and you have the power to do something about it now. Your silver bullet of resolving your iPod issue – is to restore your iPod to factory settings.
    http://docs.info.apple.com/article.html?artnum=60983
    If you're having trouble, try these steps at different levels one at a time until the issue is resolved. These steps will often whip your iPod back into shape.
    Make sure you do all the following “TRYs”
    A. Try to wait 30 minutes while iPod is charging.
    B. Try another FireWire or USB through Dock Connector cable.
    C. Try another FireWire or USB port on your computer .
    D. Try to disconnect all devices from your computer's FireWire and USB ports.
    E. Try to download and install the latest version of iPod software and iTunes
    http://www.apple.com/itunes/download/
    For old and other versions of iPod updater for window you can get here
    http://www.ipodwizard.net/showthread.php?t=7369
    F. Try these five steps (known as the five Rs) and it would conquer most iPod issues.
    http://www.apple.com/support/ipod/five_rs/
    G. Try to put the iPod into Disk Mode if it fails to appear on the desktop
    http://docs.info.apple.com/article.html?artnum=93651
    If none of these steps address the issue, you may need to go to Intermediate level listed below in logical order. Check from the top of the lists to see if that is what keeping iPod from appearing on your computer in order for doing the Restore.
    Intermediate Level
    A. Try to connect your iPod with another computer with the iPod updater pre-installed.
    B. Still can’t see your iPod, put it in Disk Mode and connect with a computer, instead of doing a Restore on iPod Updater. Go and format the iPod instead.
    For Mac computer
    1. Open the disk utility, hope your iPod appears there (left hand side), highlight it
    2. Go to Tab “Partition”, click either “Delete” or “Partition”, if fails, skip this step and go to 3
    3. Go to Tab “Erase” , choose Volume Format as “MAC OS Extended (Journaled), and click Erase, again if fails, skip it and go to 4
    4. Same as step 3, but open the “Security Options....” and choose “Zero Out Data” before click Erase. It will take 1 to 2 hours to complete.
    5. Eject your iPod and do a Reset
    6. Open the iTunes 7 and click “Restore”
    For Window computer
    Go to folder “My Computer”
    Hope you can see your iPod there and right click on the iPod
    Choose “Format”. Ensure the settings are at “Default” and that “Quick Format” is not checked
    Now select “Format”
    Eject your iPod and do a Reset
    Open the iTunes 7 and click “Restore”
    In case you do not manage to do a “Format” on a window computer, try to use some 3rd party disk utility software, e.g.“HP USB Disk Storage Format Tool”.
    http://discussions.apple.com/thread.jspa?threadID=501330&tstart=0
    C. Windows users having trouble with their iPods should locate a Mac user. In many cases when an iPod won't show up on a PC that it will show up on the Mac. Then it can be restored. When the PC user returns to his computer the iPod will be recognized by the PC, reformatted for the PC, and usable again. By the way, it works in reverse too. A Mac user often can get his iPod back by connecting it to a PC and restoring it.
    Tips
    a. It does not matter whether the format is completed or not, the key is to erase (or partly) the corrupted firmware files on the Hard Drive of the iPod. After that, when the iPod re-connected with a computer, it will be recognized as an fresh external hard drive, it will show up on the iTunes 7.
    b. It is not a difficult issue for a Mac user to find a window base computer, for a PC user, if they can’t find any Mac user, they can go to a nearest Apple Shop for a favor.
    c. You may need to switch around the PC and Mac, try to do several attempts between “Format” and “Restore”
    http://discussions.apple.com/thread.jspa?messageID=2364921&#2364921
    Advance Level
    A. Diagnostic mode solution
    If you have tried trouble shooting your iPod to no avail after all the steps above, chances are your iPod has a hardware problem. The iPod's built-in Diagnostic Mode is a quick and easy way to determine if you have a "bad" iPod.
    You need to restart your iPod before putting it into Diagnostic Mode. Check that your hold switch is off by sliding the switch away from the headphone jack. Toggle it on and off to be safe.
    Press and hold the following combination of buttons simultaneously for approximately 10 seconds to reset the iPod.
    iPod 1G to 3G: "Menu" and "Play/Pause"
    iPod 4G+ (includes Photo, Nano, Video, and Mini): "Menu" and "Select"
    The Apple logo will appear and you should feel the hard drive spinning up. Press and hold the following sequence of buttons:
    iPod 1G to 3G: "REW", "FFW" and "Select"
    iPod 4G+ (includes Photo, Nano, Video, and Mini): "Back" and "Select"
    You will hear an audible chirp sound (3G models and higher) and the Apple logo should appear backwards. You are now in Diagnostic Mode. Navigate the list of tests using "REW" and "FFW". The scroll wheel will not function while in diagnostic mode. For further details on Diagnostic mode can be found at http://www.methodshop.com/mp3/ipodsupport/diagnosticmode/
    Try to do the 5in1, HDD R/W and HDD scan tests. Some successful cases have been reported after the running the few tests under the Diagnostic mode. In case it does not work in your case, and the scan tests reports show some errors then it proves your iPod has a hardware problem and it needs a repairing service.
    B. Format your iPod with a start disk
    I have not tried this solution myself, I heard that there were few successful cases that the users managed to get their iPod (you must put your iPod in disk mode before connecting with a computer) mounted by the computer, which was booted by a system startup disk. For Mac, you can use the Disk Utility (on the Tiger OS system disk), for PC user, you can use the window OS system disk. Try to find a way to reformat your iPod, again it does not matter which format (FAT32, NTFS or HFS+) you choose, the key is to erase the corrupted system files on the iPod. Then eject your iPod and do a Reset to switch out from Disk Mode. Reboot your computer at the normal way, connect your iPod back with it, open the iPod updater, and hopefully your iPod will appear there for the Restore.
    If none of these steps address the issue, your iPod may need to be repaired.
    Consider setting up a mail-in repair for your iPod http://depot.info.apple.com/ipod/
    Or visit your local Apple Retail Store http://www.apple.com/retail/
    In case your iPod is no longer covered by the warranty and you want to find a second repairing company, you can try iPodResQ or ifixit at your own risk
    http://www.ipodresq.com/index.php
    http://www.ifixit.com/
    Just in case that you are at the following situation
    Your iPod warranty is expired
    You don’t want to pay any service charges
    You are prepared to buy a new one
    You can’t accept the re-sell value of your broken iPod
    Rather than leave your iPod as paper-weight or throw it away.
    You can try the following, but again, only do it as your last resort and at your own risk.
    Warning !!!! – It may or may not manage to solve your problem, and with a risk that you may further damage your iPod, which end up as an expensive paper weight or you need to pay more higher repairing cost. Therefore, please re-consider again whether you want to try the next level
    Last Resort Level
    1. . Disconnecting the Hard Drive and battery inside the iPod – Warning !! Your iPod warranty will be waived once you open the iPod.
    In Hong Kong there are some electronic shops offering an iPod service for Sad iPod, the first thing they do is to open up the iPod’s case and disconnecting the battery and the Hard Drive from the main board of the iPod. Wait for 5-10 minutes and reconnecting them back. The reason behind which I can think of is to do a fully reset of a processor of the iPod. In case you want do it itself and you believe that you are good on fixing the electronics devices and have experience to deal with small bits of electronic parts, then you can read the following of how to open the iPod case for battery and HDD replacement (with Quicktimes)
    http://eshop.macsales.com/tech_center/index.cfm?page=Video/directory.html
    2.Press the reset button on the Hard Drive inside the iPod – Suggestion from Kill8joy
    http://discussions.apple.com/thread.jspa?messageID=2438774#2438774
    Have I tried these myself? No, I am afraid to do it myself as I am squeamish about tinkering inside electronic devices, I have few experiences that either I broke the parts (which are normally tiny or fragile) or failed to put the parts back to the main case. Therefore, I agree with suggestion to have it fixed by a Pro.
    2. Do a search on Google and some topics on this discussion forum about “Sad iPod”
    Exclamation point and folder and nothing else
    Spank your iPod
    http://www.youtube.com/watch?v=3ljPhrFUaOY
    http://discussions.apple.com/thread.jspa?messageID=3597173#3597173
    Exclamation point and folder and nothing else
    http://discussions.apple.com/thread.jspa?messageID=2831962#2831962
    What should I do with my iPod? Send it or keep it?
    http://discussions.apple.com/thread.jspa?threadID=469080&tstart=0
    Strange error on iPod (probably death)
    http://discussions.apple.com/thread.jspa?threadID=435160&start=0&tstart=0
    Sad Face on iPod for no apparent reason
    http://discussions.apple.com/thread.jspa?threadID=336342&start=0&tstart=0
    Meeting the Sad iPod icon
    http://askpang.typepad.com/relevant_history/2004/11/meeting_the_sad.html#comment -10519524
    Sad faced iPod, but my computer won’t recognize it?
    http://discussions.apple.com/thread.jspa?messageID=2236095#2236095
    iPod Photo: unhappy icon + warranty question
    http://discussions.apple.com/thread.jspa?messageID=2233746#2233746
    4th Gen iPod Users - are we all having the same problem?
    http://discussions.apple.com/message.jspa?messageID=2235623#2235623
    Low Battery, and clicking sounds
    http://discussions.apple.com/thread.jspa?messageID=2237714#2237714
    Sad faced iPod, but my computer won’t recognize it
    http://discussions.apple.com/thread.jspa?messageID=2242018#2242018
    Sad iPod solution
    http://discussions.apple.com/thread.jspa?threadID=412033&tstart=0
    Re: try to restore ipod and it says "can't mount ipod"
    http://discussions.apple.com/thread.jspa?threadID=443659&tstart=30
    iPod making clicking noise and is frozen
    http://discussions.apple.com/thread.jspa?messageID=2420150#2420150
    Cant put it into disk mode
    http://discussions.apple.com/thread.jspa?messageID=3786084#3786084
    I think my iPod just died its final death
    http://discussions.apple.com/thread.jspa?messageID=3813051
    Apple logo & monochrome battery stay
    http://discussions.apple.com/thread.jspa?messageID=3827167#3827167
    My iPod ism’t resetting and isn’t being read by my computer
    http://discussions.apple.com/thread.jspa?messageID=4489387#4489387
    I am not suggesting that you should follow as well, but just read them as your reference. You are the person to make the call.
    Finally, I read a fair comments from dwb, regarding of slapping the back of the iPod multiple times
    Quote “This has been discussed numerous times as a 'fix'. It does work, at least for a while. In fact I remember using the same basic trick to revive Seagate and Quantam drives back in the mid to late 1980's. Why these tiny hard drives go bad I don't know - could be the actuator gets stuck in place or misaligned. Could be the platter gets stuck or the motor gets stuck. 'Stiction' was a problem for drives back in the 80's. Unfortunately the fix can cause damage to the platter so we temporarily fix one problem by creating another. But I know of two instances where a little slap onto the table revived the iPods and they are still worked a year or more later.”UnQuote

  • Is it possible to keep both iPhoto and Aperture on the same Mac

    I would like to use both IPhoto (for day by day pictures) and Aperture (for pictures made with my SLR in Raw format).
    Is anybody able to advice me about this opportunity?

    You can keep both Applications (iPhoto and Aperture) on the same computer and separate libraries for iPhoto and Aperture;  images from both libraries will/should be available in other Applications from the Media Browser. In the long run, after you get accustomed to working Aperture, you will find it more convenient to migrate all your images to Aperture. Aperture has the more efficient storage strategy, you need less disk space to store multiple versions of the same image in Aperture than in iPhoto, and Aperture is the more versatile tool.
    It is easy to migrate iPhoto libraries to Aperture, but that is a one way road, if you want to export back to iPhoto, you can export your images, but not all of your library structure.

  • Can I use both iPhoto and Aperture on the same library?

    I like some of the features of iPhoto (like faces and places) but prefer to work in Aperture for its rich tool content. Is there any way I can use both iPhoto and Aperture on the same library? Or, import images from Aperture into iPhoto?
    Thanks much!
    John

    I think you may have answered a question I have with the above, but to be sure here is what I would like to do. I currently have iPhoto09 with about 50,000 pictures in it, which seems too much for it to manage. I would like to use Aperture, which I understand is better for managing a large number of photos, but still have iPhoto available to make slide shows, etc. for our AppleTV. Would the process you described above work for that?
    Thank you

Maybe you are looking for

  • How can i get an update for my macbook?

    I have a mac OS X version 10.4.11 and i just recently purchased the latest itouch but i can't use the latest version of itunes because the itunes needs version 10.5 and above. Where do i get this update from? I have tried looking for it on software u

  • Streaming from a FMS to another FMS (Youtube live)

    Hello. I need to stream some videos from a Flash Media Server (for example on Amazon Cloudfront or other servers) to the Adobe Flash Media Server of Yoube live (via a rtmp protocol). How can I do this but first of all: is it possible? Thank you very

  • SLD Configuration error: Dispatcher running but no server connected!

    Hi Gurus, In t-code solman_setup under SLD configuration, the error dispatcher running but no server connected is prompted in the web browser. Also, I've noticed that in SAP MMC the server0 in AS Java Process table has a return code error of -11113.

  • SFTP using Unix command

    Hi all, I am trying to upload a file from SAP to a folder in another server. Here they want us to use SFTP port 22 which is not supported by SAP by default i guess. Could any one give me clear procedure and commands to be used in program in order to

  • Windows 2008 r2 windows installer issue error 1719 when install Backup exec 12.5

    Hi all After a epic weekend of rebuilding our exchange server I have tried to reinstall Backup exec 12.5 64bit, this was installed with no issues during the last build, however at the end of this build I went to reinstall Backup Exec 12.5 and it is f