cks@ziebmef.uucp (Chris Siebenmann) (03/19/89)
[hah. finally got around to commenting on this topic.] In article <6206@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: ... | Part of this is the Mac's clipboard. This makes integration of | artwork and text, and import of text, very easy. We in theory have the same | ability, but few people support the clipboard device (bad developers, bad! :-) | (That's just a joke!)). I can't comment on why everyone seems to ignore the clipboard, though I have a pretty good idea. I can tell you why ComicSetter doesn't use it, and it's very simple. There's no IFF routines that will write to the clipboard, and it's not at all obvious how to write them. You see, the clipboard requires you to put IFF data into it. Now IFF is a perfectly good structure for data; it's nicely recursive 'cause it's made up of things inside things (and so on..), includes a decent amount of error checking, and is very nice overall. However, each thing in an IFF data stream has to include its size (including the sizes of all sub-things inside it) ... at the beginning of itself. And the clipboard.device doesn't appear to support random seeking around to write data (when writing to a file, the IFF routines seek back to the start of a hunk and write the size once they know it). This makes it remarkably difficult to write a complicated recursive data structure out in IFF chunks to the clipboard, of course. You basically have to "write" it twice, once to find out the sizes of all the hunks, and the second time to do the real writing with the real sizes. Faced with this problem, we punted and decided that we didn't really need to support the clipboard after all (it didn't help that we were short for time). It only took me a couple of days to write the cut-and-paste code that didn't use the clipboard. Using the clipboard would have taken considerably longer, and we were short for time and code space. So (to turn this into a comp.sys.amiga.tech topic), having listened to my tale of woe, does anyone have any suggestions? Does the clipboard.device support random seeks after all (the documentation is remarkably opaque on this point)? Does anyone have a clever idea about how to do this, or nifty code? -- "Though you may disappear, you're not forgotten here And I will say to you, I will do what I can do" Chris Siebenmann uunet!{utgpu!moore,attcan!telly}!ziebmef!cks cks@ziebmef.UUCP or .....!utgpu!{,ontmoh!,ncrcan!brambo!}cks