Copying BufferedImage to clipboard fails

The clipboard is giving me some trouble... If I copy an image selection with transparency data and then create a BufferedImage from the clipboard contents (paste), then everything works fine everywhere. However if I have a BufferedImage with transparency data that I want to SET to the clipboard (copy) then I observe two different behaviors between Ubuntu and Windows XP -- both incorrect.
On Ubuntu:
getTransferDataFlavors of my Transferable is called once. isDataFlavorSupported and getTransferData are never called. The clipboard is unaltered. No exception is thrown -- nothing. It just silently fails to do anything. Calling Toolkit.getDefaultToolkit().getSystemClipboard().getAvailableDataFlavors() shows me that DataFlavor.imageFlavor is indeed present.
On Windows:
My getTransferData is indeed called and the clipboard is modified. However, the image is set on a BLACK background -- the transparency data is lost.
Relevant code portions look like:
btnCopy.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent e){
                    CopyableImage img = new CopyableImage(frame.getImage());
                    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(img, null);
          });Where frame.getImage is a BufferedImage of type ARGB, with a transparent background
private static class CopyableImage implements Transferable {
        private BufferedImage image;
        public CopyableImage(BufferedImage image) {
            this.image = image;
        // Returns supported flavors
        public DataFlavor[] getTransferDataFlavors() {
            return new DataFlavor[]{DataFlavor.imageFlavor};
        // Returns true if flavor is supported
        public boolean isDataFlavorSupported(DataFlavor flavor) {
            return DataFlavor.imageFlavor.equals(DataFlavor.imageFlavor);
        // Returns image
        public BufferedImage getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
            if (!DataFlavor.imageFlavor.equals(flavor)) {
                throw new UnsupportedFlavorException(flavor);
            return image;
    }Any ideas...?
Additional Notes:
I'm am running Java 1.6
My paste destination is in GIMP, on a new image with transparent background.
Edited by: MichaelDGagnon on Dec 14, 2008 11:18 AM

A fully self contained example which continues to replicate the problems observed for me is as follows. Paste works (slowly) and copy fails
import java.io.IOException;
import java.net.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import javax.swing.*;
import javax.imageio.*;
import java.awt.datatransfer.*;
public class CopyTest extends JPanel{
     public static void main(String args[]) throws Exception{
          final CopyTest copyTest = new CopyTest();
          JFrame f = new JFrame();
          f.addWindowListener(new WindowListener(){
               public void windowClosed(WindowEvent e){}
               public void windowClosing(WindowEvent e){ System.exit(0); }
               public void windowIconified(WindowEvent e){}
               public void windowDeiconified(WindowEvent e){}
               public void windowActivated(WindowEvent e){}
               public void windowDeactivated(WindowEvent e){}
               public void windowOpened(WindowEvent e){}
          f.setLayout(new BorderLayout());
          JButton btnCopy = new JButton("Copy");
          JButton btnPaste = new JButton("Paste");
          JPanel southPanel = new JPanel();
          southPanel.add(btnCopy);
          southPanel.add(btnPaste);
          f.add(copyTest, BorderLayout.CENTER);
          f.add(southPanel, BorderLayout.SOUTH);
          btnCopy.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent e){ copyTest.copy(); }
          btnPaste.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent e){ copyTest.paste(); }
          f.setSize(320, 240);
          f.setVisible(true);
     private static final int SQUARE_SIZE=6;
     private BufferedImage image;
     // Constructor
     public CopyTest() throws Exception{
          this.image = ImageIO.read(new URL("http://forums.sun.com/im/duke.gif"));
     // Copy
     public void copy(){
          Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
                    new Transferable(){
                         public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[]{DataFlavor.imageFlavor}; }
                         public boolean isDataFlavorSupported(DataFlavor flavor) { return DataFlavor.imageFlavor.equals(DataFlavor.imageFlavor); }
                         public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
                           if(!DataFlavor.imageFlavor.equals(flavor)){ throw new UnsupportedFlavorException(flavor); }
                           return image;
                    , null);
     // Paste
     public void paste(){
          // Get the contents
          BufferedImage clipboard = null;
          Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
          try {
            if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                 clipboard = (BufferedImage)t.getTransferData(DataFlavor.imageFlavor);
        } catch (Exception e) { e.printStackTrace(); }
        // Use the contents
        if(clipboard != null){
               image = clipboard;
               repaint();
     // Paint
     public void paint(Graphics g){
          // Paint squares in the background to accent transparency
          g.setColor(Color.LIGHT_GRAY);
          g.fillRect(0, 0, getWidth(), getHeight());
          g.setColor(Color.DARK_GRAY);
          for(int x=0; x<(getWidth()/SQUARE_SIZE)+1; x=x+1){
               for(int y=0; y<(getHeight()/SQUARE_SIZE)+1; y=y+1){
                    if(x%2 == y%2){ g.fillRect(x*SQUARE_SIZE, y*SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); }
          // Paint the image
          g.drawImage(image, 0, 0, this);
}

Similar Messages

  • BufferedImage to clipboard GIF to PowerPoint

    Hello All:
    I know there has been a lot of discussion about copying images to the clipboard, and believe me, I've read them all about 20 times each. Believe it or not, I still haven't found an answer that helps. I'm hoping someone will take the time to help me out. My actual applet is more complex than the one I provide here, but I've simplified it down to make it easier to post and discuss.
    I have an applet that reads in an image, stores it to a BufferedImage and an array of pixel values. Now I want to put that image on the System clipboard so that I can switch windows to PowerPoint, and paste the image in the PPT document. When I do this, I get a ClassCastException thrown at the clipboard.setContents(...) call. I can copy a string to the clipboard just fine (the code to do so is in the applet below, currently commented out), but the image always results in the ClassCastException.
    One of the posts I've read indicated that if the data format doesn't match the data flavor, this exception will be thrown. I actually created an array of bytes that exactly represented a .BMP image, and set the DataFlavor to "image/bmp" but the exact same problem occurred. I could actually write the array of bytes to a file and get a BMP file that was viewable in image viewers. I'm out of things to try at this point, so any help would be very appreciated.
    Some notes of interest:
    I am NOT using any Swing components, and I'm hoping to keep it that way.
    When I copy the string, or when I do no copying at all, the image displays perfectly, so I know it is read in correctly, and that the security policies are set to allow that.
    I write and compile the code on a Sun Solaris machine, then run it via Internet Explorer and a Windows 2000 maching, running Java(TM) Plug-in: Version 1.4.2_05.
    Here's the simplified applet source:
    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.net.*;
    import java.awt.datatransfer.*; //for clipboard ops
    public class cbTest extends Applet implements ClipboardOwner
      public static DataFlavor myFlavor = new DataFlavor("image/gif", "GIF Image");
      BufferedImage bufImg;
      int imgWid;
      int imgHt;
      int pix[];
      public void init()
        Image img;
        URL imgURL;
        PixelGrabber pixGrab;
        imgURL = null;
        try
          imgURL = new URL("file:/v:\\temp\\java\\radar.jpg");
          imgURL.openConnection().getInputStream(); //test for open...
        catch (MalformedURLException e)
          System.out.println("Malformed URL exception caught");
        catch (Throwable t)
          System.out.println("Couldn't open image");
        img = getImage(imgURL);
        while (img.getWidth(this) < 0)
          try
            Thread.sleep(100); //could throw InterruptedException
          catch (InterruptedException t)
            System.out.println("Interrupted Exception Caught");
        imgWid = img.getWidth(this);
        imgHt = img.getHeight(this);
        pix = new int[imgWid * imgHt];
        pixGrab = new PixelGrabber(img, 0, 0, imgWid, imgHt, pix, 0, imgWid);
        try
          pixGrab.grabPixels();  //could throw an InterruptedException
        catch (InterruptedException e)
          System.out.println("Caught interrupted exception");
        bufImg = new BufferedImage(imgWid, imgHt, BufferedImage.TYPE_INT_ARGB);
        bufImg.setRGB(0, 0, imgWid, imgHt, pix, 0, imgWid);
        //copyStringToClipboard(); //This works fine!
        copyToClipboard();         //This causes a ClassCastException at the
                                   //clipboard.setContents(...) call.
      public void paint(Graphics g)
        g.drawImage(bufImg, 0, 0, this);
      public void copyStringToClipboard()
        Clipboard clipboard;
        StringSelection selec;
        clipboard = getToolkit().getSystemClipboard();
        selec = new StringSelection("Copy This String");
        clipboard.setContents(selec, this);
      public void copyToClipboard()
        Clipboard clipboard;
        MyImageSelection selec;
        clipboard = getToolkit().getSystemClipboard();
        selec = new MyImageSelection();
        clipboard.setContents(selec, this);
      public void lostOwnership(Clipboard cb, Transferable trans)
        System.out.println("Lost ownership of system clipboard");
      public class MyImageSelection implements Transferable
        public synchronized DataFlavor[] getTransferDataFlavors()
          return new DataFlavor[]{myFlavor};
        public boolean isDataFlavorSupported(DataFlavor flavor)
          return myFlavor.equals(flavor);
        public synchronized Object getTransferData(DataFlavor flavor)
                                     throws UnsupportedFlavorException, IOException
          if (!myFlavor.equals(flavor))
            throw new UnsupportedFlavorException(flavor);
          return (pix);
    }

    Nice to hear its working for you.
    The ability to copy an image to the system clipboard was introducted with JDK1.4.
    Image transfer didn't work with JDK1.3 and older.
    You had to use JNI to build a custom dll or so to enable the transfer.
    I am not aware of another way to get around using imageFlavor.
    If you want to compile with JDK1.3 you can try the following.  private static DataFlavor imageFlavor;
      static {
          try {
              java.lang.reflect.Field imageFlavorField = DataFlavor.class.getField("imageFlavor");
              imageFlavor = (DataFlavor)imageFlavorField.get(null);
          } catch (Exception e) { }
      } // end static{}I haven't tried it but this might work too.
    new DataFlavor("image/x-java-image; class=java.awt.Image", "Image");Look in the src.jar for the source code to DataFlavor for details.
    Eugenio

  • " Attempting to copy to disk "---- ipod" failed.The disk could not be.... ?

    hello every one and happy holidays.
    " Attempting to copy to disk "---- ipod" failed.The disk could not be read from or written to. "
    I have this problem and I can find a solution
    I had try every possible tip
    including.
    - reset many times
    - restore
    - diskwarrior
    - disk utility
    - erase disk
    - erase disk Zero out data
    - erase disk 7-Pass Erase
    - iPod Updater 2005-03-23
    - iPod Updater 2005-09-06
    - iPod Updater 2005-09-23
    - MacOSXUpdateCombo10.4.3
    - iTunes6.0.1 reinstall
    the ipod works just fine and operates properly
    it just does NOT whant to sync with itunes
    I know I'm not the only one with this issue
    there are many post in regard of this problem
    I believe that this is a software issue and not a hardware
    please comment and give any tip for me and the other people with this problem
    thank you
    sam
    dual 800 G4   Mac OS X (10.4.3)  

    I had the same problem. And to think I actually HESITATED at installing the update. Oh wait... this happened AFTER the update. Funny how often that happens, eh? But I digress...
    Anyway, I had two errors- initially the iPod stated my music library was somewhere else, and did I want to sync to that library. When I said yes, it reverted then to the "attempting to copy to disk"error. Further, iTunes showed that my iPod on the iTunes was EMPTY. However, my actual iPod hadn't lost any data. Confused yet? So am I.
    *Last ditch effort- I went back in, and updated all my permissions, did a permission repair and then a permission verify.
    * Also did a disk verify on the iPod to make sure it wasn't sick.
    *I also drug a new song into my library.
    *Changed from the USB plugin to the firewire. (Although I did this earlier in the day, and hadn't seen a noticeble change)
    * Opened the bottle of Sauvignon Blanc. (should have done that a few hours ago)
    When my first pop up asked about did I want to sync to the mystery persons library, I said yes. (At the worst, I have all my music and could reimport all 30G of it, if necessary.) And immediately, the sync began, and began appropriately. However, it IS re-syncing every single song I had on the iPod to begin with.
    I suspect something nasty happened in the iTunes update, ever since the intel thing happened, the updates have been a bit sketchy. I really like Apple products, but I've gone through 3 iPods due to software meltdowns, and it's a bit frustrating.
    Good luck!
    iMac G4   Mac OS X (10.3.9)   iPod scroll wheel,
    iMac G4   Mac OS X (10.3.9)   3rd generation I think...

  • "attempting to copy to [external drive] failed. the disk could not be read"

    this is a problem on my 2x3GHz quad-core intel xeon macPro running os 10.5.7, and itunes 8.2. i have a 1TB external hard drive (firewire 800) that holds all my music for itunes. i have never had any problem with this setup before, until recently.
    once, a while back i got an error on my itunes (that popped up without me doing anything.. seemingly random) saying something about not being able to save the itunes library. that went away after a restart, and hasn't returned.
    BUT a new problem now happens any time i try to add more music to my itunes library. i have always added music to itunes by setting up my preferences "add file to library" and have the itunes library pointing to my external hard drive. then by dragging the files on-top of a playlist, it sorts and adds the files to my external hard drive. i have been using this process for years without any glitches.
    now when i try to drag files into itunes, i get: "attempting to copy to [external drive] failed. the disk could not be read from or written to"
    i double checked the read/write privileges on my external drive and nothing has changed since i got it. (it's still read/write access for my user.. and i've even tried putting a "read/write" for "all" as well. no dice)

    thanks, that actually doesn't help the issue i'm having.
    but now the problem has expanded to finder and everything else. so i'm pretty sure the external hard drive is starting to go out. i'm currently attempting to back up all 700GB of info from the drive.

  • The Imap command UID copy (to deleted messages) failed for the mailbox "bulk mail" with server error UID copy mailbox in use.  PLease try again later

    The Imap command UID copy (to deleted messages) failed for the mailbox "bulk mail" with server error UID copy mailbox in use.  PLease try again later

    What program are you using?  And what version?

  • Attempting to copy to the disk failed. An unknown error occurrred (-51).

    I apologize if this issue has been addressed before, but I’m pretty well at the end of my rope here. As mentioned in the title, the message is:
    “Attempting to copy to the disk failed. An unknown error occurred (-51)”
    I have tried resetting my 20G iPod, as well as re-downloading and running the iTunes and iPod installer. If I delete something off of my iPod, unplug it, and then plug it back in again, the song name is there again, but this time it has an exclamation point next to it and it won’t play the song. It plays the rest of the music fine through the computer and through my stereo (I was having some problems with it skipping to the next song in the middle of a song, but I reset it and haven’t had the problem since). I don’t want to have to restore the iPod for the simple fact that I didn’t take the time to backup all my music. That would be a pain. Also, something else I’ve noticed is that I can actually hear its hard drive now kicking in and out when it’s really quiet and plugged into the computer. I hope that I just never noticed that before.
    Without having to restore, is there anything else that I haven’t tried? HELP!!
    15" Powerbook G4   Mac OS X (10.3.9)  

    Welcome to Apple Discussions!
    See if either of these help (even though they apply for different error numbers/messages)...
    http://docs.info.apple.com/article.html?artnum=302684
    http://docs.info.apple.com/article.html?artnum=301267
    Also, make sure everything is up to date...
    iTunes
    iPod Updater
    Updating iPod's Software
    If none of that works, you may need to restore...
    Restore the iPod
    But you can try to recover your music first...
    MacMuse: Computer Crashed
    btabz

  • Signed Applet JTextField copy to system clipboard

    Hi all,
    We have a signed and deployed our JAR file that contains our applet following the instructions listed at:
    http://java.sun.com/products/plugin/1.3/docs/rsa_signing.html
    We used Thwate as our CA. All seemed good.
    However any JTextFields that are in our applet cannot access the system clip board. Looking at the source for JTextComponent it should have access to the system clipboard if the securitymanager allows it.
    The strange thing is that if I call getToolkit().getSystemClipboard() from our applets I can access the clipboard and copy to the system clipboard. Even the code in JTextComponent that checks for system clipboard access (canAccessSystemClipboard) works fine when pasted into the applet.
    Why cant a JTextField copy to the clipboard? Has anyone else come across this?

    Juste an idea.... Is your JTextField belonging to the javax.swing.... packages ?
    Or did you compile using some com.ms , ibm.... sun... package ? This could lead to some different implementations.

  • More DataFlavors copied to the clipboard/used in D&D in one step

    Hallo,
    For my GUI app. I would like to enable different types of information to copied to the clipboard.
    e.g. object type 1 - Document ID ( actual row's document ID from JTable ) - to copy document type
    object type 2 - string representation ( columns texts from JTable ) - to copy to excel
    I would like to keep them general, with different possible combinations
    among them ( up to 10 different object types ), according to some specs.
    Has anybody idea, if it is possible ? ( prefarably with 1.4 D&D interface ).
    Data are packed in createTransferable() call, but it allows just 1 format (?) ...
    Maybe I can use some 'envelope' format holding all possible information,
    but that idea doesn't looks nice for me :(
    Thanks for any hint.
    Tibor

    Hi !
    Thanks for your help. For drag & drop it's fine. System will ask for 'best' format as I expect.
    How is it with clipboard ? I had idea to copy table columns as a "text" flavor
    ( for paste into excel ) and user created flavor "id" with documentId inside.
    On paste I would take 'what's better' ( e.g. as a document reference better would be better my "id" flavor,
    because that information doesn't need to be in table cells inside ).
    Maybe I will have to use 'own' clipboard for these reasons.
    Tibor

  • Attempting to copy to the disk failed. An unknown error occured (-69)

    i bought a whole bunch of stuff on itunes, then when i went to sync my ipod it asked if i wanted to update to the new software, i said yes and updated, then while it was syncing it says attempting to copy to the disk failed, an unknown error. it wont put any of the new video or music i bought on my ipod. its an 80 gig, ipod classic.

    Have you had a look at this troubleshooting page? It may be of some help: iTunes displays a -69 error when syncing iPod

  • 30gb Video error message "Attempting to copy to disk "Ipod" failed.

    I have a 30gb ipod video and over the past day it is come up with this error message when I have tried to put songs from itunes into it. "Attempting to copy to disk "Ipod" failed. This disc could not be read from or written to". I've tried restarting it with no joy, I've evne tried resetting it back to it's factory settings now and nothing. Right now the Ipod had no songs on it can not even in use due to this. It was all fine till I updated to the lastest Itunes. Anyone out ther no whats wrong?

    I have and 80gb Classic and Im getting the same message now it just started last night when i was syncing some new podcasts now everything that was on my ipod is gone and it acts like its syncing then i disconnect and its all gone I've reset and restored default settings nothing works
    and my warranty expired 2 days ago

  • Attempting to copy to the disk failed. An unknown error occured (-4)

    I am simply trying to sync my son's iTouch with iTunes and I get the following error:
    "Attempting to copy to the disk failed. An unknown error occured (-4)"
    All my software (e.g.: iTunes) and the iOS is fully up-to-date.
    iTunes (v.12.1.0.50)
    OSX Yosemite Version 10.10.2 (14C109)

    Hello there, Wyrzezbiator.
    The following Knowledge Base article offers some great steps for the very issue you're describing:
    Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/ts3694#4
    Configure your security software
    Related errors: 2, 4, 6, 9, 1000, 1611, 9006, 9807, or 9844. Sometimes as a result of this issue, a device might stop responding during the restore process.
    Check your security software and settings, which can block ports and prevent connection to Apple servers during update and restore.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • CIC - Copy to the clipboard

    Hello,
    When user, on transaction CIC (l-shape), click on the ISU-Finder to find a BP by giving a premise number it should copy to the clipboard the BP when i click on the checkmark button. This part is build by SAP.
    I am trying to copy the Premise to the clipboard by using user-exit EXIT_SAPLEECIC_COMP00_001. I tried many attempts by using SAP function modules in order to create a Business Object Premise and add the element to the clipboard.
    I tried FMs such as :
    CALL FUNCTION 'CIC_EVENT_RAISE'
         EXPORTING
              event  = 'ADD_XTAINER_TO_BDD'
              p1     = xtain
         EXCEPTIONS
              OTHERS = 99.
    When i used this one, i got an item in the clipboard but it said : Uninitiliazed Business Process Unit.
    Does somebody have to code a 'Copy to Clipboard' for a businness object.
    Thanks

    I found byselft the solution. Here the step for those who have to do the same:
    Copy Premise to the clipboard (BDD)
      l_procobj-header = 'OBJH'.
      l_procobj-type   = 'SWO'.
    Create object Premises
      CALL FUNCTION 'SWO_CREATE'
           EXPORTING
                objtype = 'PREMISES'
                objkey  = l_key
           IMPORTING
                object  = l_procobj-handle
                return  = l_return.
      IF NOT l_return IS INITIAL.
        EXIT.
      ENDIF.
    Set Object ID
      CALL FUNCTION 'SWO_OBJECT_ID_SET'
           EXPORTING
                object    = l_procobj-handle
                objectkey = l_key
           IMPORTING
                return    = l_return
           EXCEPTIONS
                OTHERS    = 1.
      IF NOT l_return IS INITIAL.
        EXIT.
      ENDIF.
    Buffer Refresh
      CALL FUNCTION 'SWO_OBJECT_REFRESH'
           EXPORTING
                object       = l_procobj
           EXCEPTIONS
                error_create = 02.
      l_def-element      = '<MAINOBJ>'.
      l_def-editorder    = 2000 - 1.
      l_def-reftype      = 'O'.
      l_def-refobjtype   = 'PREMISES'.
    APPEND l_def TO li_def.
      CALL FUNCTION 'EWO_XTAINER_ELEMENT_SET'
           EXPORTING
                x_elemdef       = l_def
                x_value         = l_procobj
           CHANGING
                xy_xtainer      = l_desk_xtain
           EXCEPTIONS
                invalid_elemdef = 1
                internal_error  = 2
                OTHERS          = 3.
      CALL FUNCTION 'CIC_EVENT_RAISE'
           EXPORTING
                event  = 'ADD_XTAINER_TO_BDD'
                p1     = l_desk_xtain
           EXCEPTIONS
                OTHERS = 99.

  • E71 - Copy text to clipboard from from html reader...

    I could not copy text to clipboard from
    - Web page, html readers,
    - Web feed reader
    - Email reader. (if I choose reply or forward, then I can copy text)
    How to do it?
    is almighty E71 unable to do it?

    U can not even copy link on html reader or
    email address from email reader.
    How can Nokia make such a mistake?
    I think the Nokia programmers are aliens from other planet!!!

  • Receive error: There was an error while copying to the Clipboard. An internal error occurred.

    I receive the message "There was an error while copying to the Clipboard. An internal error occurred." when I highlight anything and copy to the clipboard. I've searched and found others with the same issue, but they were either on an older OS, Acrobat ver, or their issue was intermittent. My issue always occurrs and I cannot copy anything to the clipboard.
    I'm running Win 7 Ultimate x64 SP1 and Acrobat Pro 9.4.4. Any suggestions would be appreciated.
    Thanks,
    RJ

    Hi MelSchultz,
    Thanks for your post. However, this Forum is meant to discuss
    issues related to acrobat.com and not acrobat. To post an issue
    related to acrobat please visit the acrobat forum :
    http://www.adobeforums.com/cgi-bin/webx/.3bbeda8b/
    You may also open a web case with Adobe Support. To do so,
    please visit the following link :
    https://www.adobe.com/cfusion/support/index.cfm?event=portal

  • Safari copy wipes the clipboard

    Anyone else have this in Safari 4 for Windows?
    I use Safari at work, often copying and pasting text; in Safari 4 I have noticed an issue that when I have text in the clipboard and use the keyboard shortcut to paste the text into a text box on a web page.
    Here's what happens, I first have some text I copied into the clipboard, when I accidentally hit Ctrl-C instead of Ctrl-V the clipboard gets wiped out as Safari copies a null amount of text into the clipboard, thus if I realize my mistake and try to do a Ctrl-V my previously copied text has disappeared from the clipboard and nothing pastes.
    Yeah I know I should learn to type better, ha ha, but we all occasionally make mistakes and it's infuriating when this happens. I am sure this was not the behaviour Safari 3 and also this issue does not occur in FireFox and I think most other browsers out there.
    I clean installed Safari on a new install of Windows on a virtual machine and was able to recreate the issue.
    Any thoughts?
    Phil
    Message was edited by: sixfootphil

    I found byselft the solution. Here the step for those who have to do the same:
    Copy Premise to the clipboard (BDD)
      l_procobj-header = 'OBJH'.
      l_procobj-type   = 'SWO'.
    Create object Premises
      CALL FUNCTION 'SWO_CREATE'
           EXPORTING
                objtype = 'PREMISES'
                objkey  = l_key
           IMPORTING
                object  = l_procobj-handle
                return  = l_return.
      IF NOT l_return IS INITIAL.
        EXIT.
      ENDIF.
    Set Object ID
      CALL FUNCTION 'SWO_OBJECT_ID_SET'
           EXPORTING
                object    = l_procobj-handle
                objectkey = l_key
           IMPORTING
                return    = l_return
           EXCEPTIONS
                OTHERS    = 1.
      IF NOT l_return IS INITIAL.
        EXIT.
      ENDIF.
    Buffer Refresh
      CALL FUNCTION 'SWO_OBJECT_REFRESH'
           EXPORTING
                object       = l_procobj
           EXCEPTIONS
                error_create = 02.
      l_def-element      = '<MAINOBJ>'.
      l_def-editorder    = 2000 - 1.
      l_def-reftype      = 'O'.
      l_def-refobjtype   = 'PREMISES'.
    APPEND l_def TO li_def.
      CALL FUNCTION 'EWO_XTAINER_ELEMENT_SET'
           EXPORTING
                x_elemdef       = l_def
                x_value         = l_procobj
           CHANGING
                xy_xtainer      = l_desk_xtain
           EXCEPTIONS
                invalid_elemdef = 1
                internal_error  = 2
                OTHERS          = 3.
      CALL FUNCTION 'CIC_EVENT_RAISE'
           EXPORTING
                event  = 'ADD_XTAINER_TO_BDD'
                p1     = l_desk_xtain
           EXCEPTIONS
                OTHERS = 99.

Maybe you are looking for