@amigamaniac_aus
I checked Wikipedia too. It looks like that when they found a moth from a computer relay it wasn't the first time when the word "bug" was used. But those guys had a good sense of humour. There's even a picture of that log book where they taped that moth. It's funny:
"First actual case of bug being found".
@Chris
Alright. You asked. So I answer long version this time.
Quote:
I don't understand how you have managed to try to open it as different type
Of course it doesn't open because it's wrong file type. But datatypes library shouldn't cause a crash when examining a file.
Quote:
have you tried a real 700MB picture
I don't think I have any such big picture to test.
Quote:
I don't really understand what you are doing
You can force datatypes library to try to open only certain types of files using DTA_GroupID tag. For example this is much faster...:
if (DTFile=IDataTypes->NewDTObject(filename,DTA_GroupID,GID_PICTURE,...,TAG_DONE))
else
if (DTFile=IDataTypes->NewDTObject(filename,DTA_GroupID,GID_TEXT,...,TAG_DONE))
else
if (DTFile=IDataTypes->NewDTObject(filename,DTA_GroupID,GID_ANIMATION,...,TAG_DONE))
else
if (DTFile=IDataTypes->NewDTObject(filename,DTA_GroupID,GID_MOVIE,...,TAG_DONE))
... than this:
DTFile=IDataTypes->NewDTObject(filename,...,TAG_DONE);
The latter is
significantly slower. (I guess in the latter case the library is trying/testing every single datatype you have installed.)
My program is trying to use scaled thumbnails replacing icons. So originally my program loaded icons first so a user can browse a drawer when a computer is trying to detect all file types in the background. I had to spend few hours to make many changes to my program so it will try to detect all file types first before loading icons (and using default icons in the meanwhile) to work around that problem.
My guess is that picture class is trying to load the whole file into memory and with paging enabled Exec will give such big block of memory to the class. But anim class is trying to load only one anim frame at the time so it doesn't try to allocate such huge amount of memory. But I've never seen the source code of the datatypes library so this is only a guess.
@Chris + all
I was going to start a thread something like: "Did you know AOS4.x can do this" type of thread some time ago. But I didn't do it. So if you don't have
WBPreview installed already download and install it from os4depot. Then open some drawer containing for example mp3 files which contains embedded cover picture on Workbench. Select any file in the drawer. Open a preview. If any of your files don't have such embedded pictures then download
this NewsTek podcast and try again and be amazed
(Hint: "Cover flow" on Amiga.)
So it's a very good idea try to open f.ex. audio files as picture files
(I must say I found that "feature" accidently.) One of my friends sent a Powerpoint file to me in email some time ago. It had such embedded "cover picture" too. (Those two files are the only non-picture files on my hard drive which have a picture embedded.)
@Hans
This comment is from os4depot: Quote:
Datatypes are actually gadgets too; they can be added to a window's glist.
I don't know still how to make datatypes objects to work inside Reaction layout (or if it's possible at all).
(Edited)
Edited by TSK on 2008/12/20 0:35:30