Bug in Windows Cut/Copy/Paste

William O. Dargel wDargel at shoshana.com
Tue Jan 13 22:01:28 UTC 1998


The Clipboard doesn't seem to be fully supported under Windows. I can
copy from other applications and paste into Squeak without any problem.
But, in general, text copied from Squeak can't be pasted into other
Windows' applications.

Has anyone else noticed this problem? I've seen it in both Windows NT
3.51 and 4.0.

I did some investigating, using the Windows "ClipBook Viewer"
application to see what Windows thought was in the clipboard. For
example using NotePad and doing a "copy", it places the text in the
Clipboard in 3 formats: "Unicode Text", "Text" and "OEM Text". Of which
Unicode Text appears to be the "default". When you do a "copy" within
Squeak, it only changes the "Text" format, not the other 2. And
apparently when then pasting it into NotePad, it uses the "Unicode Text"
and doesn't get what is in "Text".

I found that if you "delete" the clipboard contents using the ClipBook
Viewer application first, and then do a "copy" within Squeak, that the
text will appear in all three formats (the one time). At which point it
will paste OK into NotePad (for example).

My guess is that a call to EmptyClipboard() before calling
SetClipboardData(CF_TEXT, h) in the primitive might be a way to fix this
problem. Anybody in a position to test this out? I'd hate to have to
unearth my C tools if I didn't have to. :-)

-------------------------------------------
Bill Dargel            wdargel at shoshana.com
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA





More information about the Squeak-dev mailing list