From: bloc1469@ee.ee.uwm.edu (Gregory R Block)
Newsgroups: comp.sys.amiga.advocacy
Subject: Re: Advocacy? What do you want for the Amiga?
Date: 13 Jan 1993 01:07:13 GMT
Organization: Electrical Engineering Dept. University of Wisconsin - Milwaukee
NNTP-Posting-Host: 129.89.2.33

In article <C0qF8B.EvC@news.iastate.edu> barrett@iastate.edu (Marc N. Barrett) writes:
>   For one, there is no standard means of getting graphics or text or
>whatever into the clipboard.  Every program has a different way of doing
>it, and none are the same.  That is, if they support the clipboard at
>all.  Very few applications do support the clipboard.

Then let me totally destroy this part.  As of 2.0x, there _IS_ a very
standard way of getting graphics and/or text or WHATEVER into the
clipboard.  There always HAS been, but it was never easy--you had to
do direct I/O with the clipboard.device.  As of 2.0x, there's some
help:

iffparse.library/AllocIFF
iffparse.library/AllocLocalItem
iffparse.library/CloseClipboard
iffparse.library/CloseIFF
iffparse.library/CollectionChunk
iffparse.library/CollectionChunks
iffparse.library/CurrentChunk
iffparse.library/EntryHandler
iffparse.library/ExitHandler
iffparse.library/FindCollection
iffparse.library/FindLocalItem
iffparse.library/FindProp
iffparse.library/FindPropContext
iffparse.library/FreeIFF
iffparse.library/FreeLocalItem
iffparse.library/GoodID
iffparse.library/GoodType
iffparse.library/HookEntry
iffparse.library/IDtoStr
iffparse.library/InitIFF
iffparse.library/InitIFFasClip
iffparse.library/InitIFFasDOS
iffparse.library/LocalItemData
iffparse.library/OpenClipboard
iffparse.library/OpenIFF
iffparse.library/ParentChunk
iffparse.library/ParseIFF
iffparse.library/PopChunk
iffparse.library/PropChunk
iffparse.library/PropChunks
iffparse.library/PushChunk
iffparse.library/ReadChunkBytes
iffparse.library/ReadChunkRecords
iffparse.library/SetLocalItemPurge
iffparse.library/StopChunk
iffparse.library/StopChunks
iffparse.library/StopOnExit
iffparse.library/StoreItemInContext
iffparse.library/StoreLocalItem
iffparse.library/WriteChunkBytes
iffparse.library/WriteChunkRecords

Consider that both a long clue and a tutoring section.  By writing
your "iff save" code in iffparse.library and having it take an IFF as
its parameter, the same iff-saving code can both save your code to
disk (Using InitIFF, InitIFFasDOS, and OpenIFF and then sending the
IFFHandle to your iff code) and to the clipboard (InitIFF,
OpenClipboard, InitIFFasClip, OpenIFF, and then sending the IFFHandle
to your iff code), you can invisibly support reading any kind of IFF
your program supports from both disk and clipboard.  And _USING_
IFFParse.library is extremely simple.  The exact same thing can be
said for writing to both disk and clipboard.

It is _NOT_ difficult.  Most of those are extremely unnecessary, and
some of them are only useful if you're going to be saving
"preferences" through iffparse.library.  You'll be lucky if you ever
use more than ParseIFF, StopChunk, PropChunk/FindProp, (these alone are
all you need for an ILBM displaying program which would automatically
parse complex FORM, LIST, and CAT chunks searching for what you were
looking for) CollectionChunk/FindCollection (for finding reocurring
chunks which may appear multiple times), StopOnExit(which will notify
you when ParseIFF finds the end of a specified chunk), and, of course,
the ReadChunkBytes/WriteChunkBytes/ReadChunkRecords/WriteChunkRecords
functions.

So now that you have a clue, perhaps you can see that by organizing
your code to read and write all of the IFF types you'd like to
support, you can support that for both clipboard AND for DOS streams.

>   Second, with many applications that do support the clipboard, the 
>clipboard support is broken.  I remember once trying to cut text with a
>'snap' utility, send it to the clipboard, and paste it into a 'Scribble!'
>document.  The text would always come out as garbage in 'Scribble!'.
>Always.  I never once got the clipboard support in 'Scribble!' to work.

I would say then that it was at least part the fault of "snap" for not
cutting your text BOTH as an ILBM bitmap of the image _AND_ as an FTXT
CHRS chunk, both within a CAT CLIP, if not Scribble!'s fault for not
using the correct one or not working properly.

However, the blame does NOT belong on the OS, and I will stick with
that until the day developers get their act(s) together.

>   The end result of all of this is that the clipboard is almost totally
>useless.  Whenever I want to exchange data between to applications using
>the clipboard, either one of the applications does not support the 
>clipboard at all, or the clipboard support in one of them is broken.  Just
>about the only way to do it is with a 'snap' utility, and when you resort
>to a utility like this it is far easier to just save the images to disk
>and load them again with the other application.

I'd also insist that you're probably using 1)really old software,
where newer software would probably have more of what you wanted.  In
particular in this case I mention WP 4.1, which you said was very
inadequate, yet you continue to use.

>   I was mentioning to someone once about how one of the 'snap' utilities
>supports the clipboard, and he remarked that snapping to the clipboard was
>the same as snapping to a black hole as far as he is concerned.  He is
>right.

Not on my system, it isn't.  Then again, I write some of the software
I run, and if I _DO_ run something else, I make sure it does what I
want.  Term has no problems with FTXT, though it doesn't support
cutting or pasting of other than that.  Then again, Term will tell you
when it doesn't support the type in the clipboard.

My advice would be to use software that makes use of IFFParse.library
and other 2.0x functions, and you'll find a lot of increased
usability.

Greg

--
(: (: (: (: Have you overdosed on smileys today?  Why NOT!?! :) :) :) :)
(: "Our father, who art in Iowa, Hollow be thy head, Thy ideas run    :)
(:  Thy will be done, At Commodore as it is at Apple"  -Dan Barrett   :)
(: (: (: (: (: (: (: (: (: (: (: (: () :) :) :) Wubba, the Dark Angel :)
Newsgroups: comp.sys.amiga.advocacy