Clipboard.Clear … oops

Bob Warfield is upset because he lost some work. He copied some text in Live Writer, deleted it, then opened Word and tried to paste. No go .. clipboard empty.

Frustrating, but is he right to call his post Microsoft: Bad User Experience Is Cultural, on the grounds that Word is designed to clear the clipboard every time it opens?

Here’s a bit more information. First, Word does not do that here. Second, if it weren’t that I do equally silly things I’d suggest that it is always risky to entrust the clipboard with your work without a backup.

That said, I can understand why Word might appear to clear the clipboard on start-up. It could be a bug, or it could be an add-in of some kind. The thing is, it is really easy to clear the clipboard in code. Just call EmptyClipboard and you’re done. There are ways to do it in VBA too, via a DataObject, or in .NET via Clipboard.Clear.

As Warfield’s case shows, clearing the clipboard in code can be deeply user-hostile. Should Windows prevent it? Difficult, because if your application or add-in implements clipboard functionality, it is the correct thing to do when the user selects Cut, Copy or Paste.

Lessons? A warning, I guess, not to use the clipboard for any purpose other than a user-initiated clipboard action – though I guess it can be tempting if you are hacking some sort of inter-process data exchange.

Second, when Windows lets you down it is not necessarily Microsoft culture to blame. There is an argument though … applications that don’t conform to Windows guidelines are a big problem and without them things like User Account Control might not need to exist; and that is Microsoft’s fault in a way, because of the history of Windows, its changing guidelines, and the inability of even Microsoft to stick to them in the past. Maybe Microsoft is partly to blame for the wild culture of third-party Windows apps.

This is a blog entry rather than a comment because Warfield’s blog needs registration to comment, and I am allergic.

VN:F [1.8.1_1037]
Rate this post
Rating: 0.0/10 (0 votes cast)

Related posts:

  1. Word 2007 clipboard slowdown
  2. Microsoft’s Office UI patent trap: watch out with that MFC update
  3. Developers: will you or have you signed for ribbon rights?
  4. Silverlight 4 with COM can do anything – on Windows
  5. 10 steps to a well-behaved Windows application

6 comments to Clipboard.Clear … oops

  • We are four it lecturers sharing an office. Whenever a problem like that arises I always say: “There’s medicine against that”.
    But then again I am the only non-Windows-user of the four ;-)
    The medicine, well in the old days every IBM’er had a “Think” on the wall or on his desk.

  • George

    In this case the “bad user experience” was due to his own stupidity. Who would delete something before it had been pasted (and saved) in _any_ OS?

    Its like handing over your car before the cheque has cleared and then blaming the bank when it bounces.

  • I can understand his frustration but you can’t really blame the OS or even the application here (incidentally was it Word or Live Writer? It changed half way through the post)

    There are utils that allow you to keep multiple clipboard entries

    Clip collector is one of them

    http://gallery.live.com/liveItemDetail.aspx?li=973e928c-19e2-4bd0-a292-817674273d4b&bt=1&pl=1

  • Grant

    I agree it’s careless to delete something before pasting it, but users come to expect a certain experience in applications. Not every app conforms, but basic good design suggests menus / toolbars at the top, status bars at the bottom, close button in the upper-left, and NO CLEARING THE CLIPBOARD upon opening! lol

    I bet it’s a bug. For me, Word always clears the clipboard upon opening. This is particularly annoying when I hit “Print Screen” to take a screen shot and then open a technical document in Word to paste it. Excel also clears the clipboard. It doesn’t seem to happen if I already have one document open and then open a second document to paste into – only if Word or Excel were completely closed.

    Yes, it’s easy to clear the clipboard in code (Clipboard.Clear() is all it takes in C#) but why would an app do that, unless it is a bug?

  • I think this begs the question, if Word is doing this and he knows it does this – why did he not find an alternative for saving temporary work? Open Office while not having everything Word does would make a good enough alternative for simple spell check and formatting blog posts.

    It begs another question, does WordPress not have the ability to save a post but not publish it yet? Surely it does, and if so why didn’t he just download the post when he got home rather than deleting it?

    Quite frankly, Bob Warfield was in a hurry to leave and made a mistake, something we have all done. In that situation you normally would copy, paste it into Word, Save, THEN delete the source. I am sure he normally would take such precautions too, its common sense.

    I mean yes, if Word is doing this Microsoft were partly to blame here. But nobody is forcing you to use Word for this purpose. If it doesn’t work properly, find something that does. If this is something it has done for years you can only blame yourself for a lapse of judgement. It was Microsofts fault the first time you did it, after that its on your own head.

  • tim

    incidentally was it Word or Live Writer?

    It was Live Writer to Word. Maybe the copy failed, of course.

    Tim

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>