Article View: comp.sys.mac
Article #22364More clipboard strangeness under MultiFinder
From: Bill Lipa
Date: Tue, 01 Dec 1987 22:09
Date: Tue, 01 Dec 1987 22:09
42 lines
1906 bytes
1906 bytes
Here is a small Lightspeed Pascal program which demonstrates the problems I am
having getting MultiFinder to recognize that I have changed the contents of the
clipboard:
program testClipboard;
var
thePicture : PicHandle;
bounds : Rect;
pictureSize : Size;
result : longint;
begin
SetRect(bounds, 0, 0, 100, 100);
ClipRect(bounds);
thePicture := OpenPicture(bounds);
MoveTo(0, 0);
LineTo(100, 100);
ClosePicture;
HLock(Handle(thePicture));
pictureSize := GetHandleSize(Handle(thePicture));
result := ZeroScrap;
if result = NoErr then
begin
result := PutScrap(pictureSize, 'PICT', Ptr(thePicture^));
if result = NoErr then
result := LoadScrap;
end;
HUnlock(Handle(thePicture));
KillPicture(thePicture);
end.
This is probably the simplest program possible which puts anything into the
clipboard, but it does not work with MultiFinder. It DOES work will all other
systems that I tried it on, including System 4.2 running without the
MultiFinder. Tracing through the program under MultiFinder with LSP (a risky
proposition, admittedly) revealed that the clipboard routines did not report
an error. In fact, the clipboard was updated inside LSP, but once I quit back
to the Finder, the clipboard reverted to its old state. Is this my error or
some devious bug?
Bill Lipa
-------
Technical Details
Message-ID:
<12355088678.214.P.PRIAPUS@HAMLET.STANFORD.EDU>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!HAMLET.STANFORD.EDU!P.PRIAPUSShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!HAMLET.STANFORD.EDU!P.PRIAPUS From: P.PRIAPUS@HAMLET.STANFORD.EDU (Bill Lipa) Newsgroups: comp.sys.mac Subject: More clipboard strangeness under MultiFinder Message-ID: <12355088678.214.P.PRIAPUS@HAMLET.STANFORD.EDU> Date: Tue, 1-Dec-87 17:09:07 EST Article-I.D.: HAMLET.12355088678.214.P.PRIAPUS Posted: Tue Dec 1 17:09:07 1987 Date-Received: Fri, 4-Dec-87 23:19:12 EST Sender: daemon@ucbvax.BERKELEY.EDU Lines: 42