Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!tut!ra!rosenber From: rosenber@ra.abo.fi (Robin Rosenberg INF) Newsgroups: comp.sys.amiga Subject: Re: Clipboard support, and why it hasn't happened. Message-ID: <156@ra.abo.fi> Date: 4 Oct 89 22:16:45 GMT References: <8909250219.AA13930@jade.berkeley.edu> <899@madnix.UUCP> <4272@sugar.hackercorp.com> Organization: Abo Academy, Finland Lines: 63 In article <4272@sugar.hackercorp.com>, peter@sugar.hackercorp.com (Peter da Silva) writes: > In article , portuesi@tweezers.esd.sgi.com (Michael Portuesi) writes: > > This is not intended to be a flame against the Clipboard. I would > > like to see Clipboard support in all programs myself. Though if the > > Clipboard is to be truly successful, the following things must happen: > > * It must be no harder to use the clipboard than it is to use > a file. The easiest way to do this is to provide a CLIPBOARD: > handler. That way you could open CLIPBOARD:0, write stuff, > and close it with no more difficulty than you have now creating > a file in RAM:. MHO: It is no harder than writing/reading files, really. It looks different and it's more flexible. For simple clipboard access the correspondence is like this. fopen() --> OpenDevice(), set id and io_Offset to zero fwrite() --> set data and length, CMD_WRITE fread() --> set data and length, CMD_READ, check io_actual fseek() --> fill in the io_Offset field before read or write fclose() --> CMD_UPDATE, CloseDevice() Wha *IS* nasty is reading the thing. This is because one cannot know what is in the clip other than it is an IFF file. The special case is a CAT with id 'CLIP' or id ' ', (the docs are ambigous on this). This kind of clip is for representing alternative forms of the data, Lets say a spreatsheet supports the clipboard (Maxiplan does not, grrrrr...), If it's correct and the authors have understood the philosophy of the clipboard the would write a clipfile like this CAT CLIP FORMSPSH - 'SPSH' -> spreadsheet data whatever format the spreadsheet preferes it's data in FORMFTXT - 'FTXT' -> Formattet text. Can be simple text if there is no need for formatting it. FORMILBM - 'ILBM' -> Graphical representation (seems a little superflous in this case. Now switch to a word processor and select 'paste'. The program sees that the clip has alternative representations so it scans the clip for a representation it understands and processes it. The rest is skipped since it is other representations of the same thing. I know of no programs that handles the clipboard correctly. Most assume that the clipboard contains a FORM-FTXT, otherwise it chokes. I think this must be annoying for developers since thay cannot implement the clipboard fulle (in most cases) without being incompatible with other programs. What is needed is powerful and easy to use routines for manipulating iff-files in a correct and consistent manner. C-A has only provided code and examples the simple cases. The guidelines are very fuzzy. > For 1.4. Pretty please? Simple routines for the simple cases and more advanced routines for the nasty ones. "Simple things should be simple and complex things should be possible" should be the rule. Another question: WIll there be a format for structured drawings in 1.4? ---------- Robin Rosenberg