the FileTypes editor has 1 filetype set from the drop down menu for a jpg image.
the ImageWell is 100x100 and the file I am dropping on it is 160x160. When I drop the file (from the desktop) on the ImageWell I get the fatal error and Xojo IDE, not just the debug app, shuts down.
I have opened the jpg with both Preview and Photoshop and it is not corrupted or problematic in any way.
This application has encountered a fatal problem and must be shut down. Please tell us more about this problem. An error report has been prepared which will help us improve the product. Would you like to launch Feedback and report the problem now?
for one you are making a dangerous assumption in your drop event.
you are assuming that you will end up with a valid pPictureIn
But if you are droping a FILE (jpg etc) then YOU DO NOT HAVE A PICTURE… until you load it from the file (which I do not see here)
That being said… you then continue assuming you have a pPicturein… if it is NIL then DRAWPICTURE will FAIL
Agree with all you said Dave. But I am experimenting with how to do this. I have a blank window with nothing but the ImageWell. When it gets to an actual app I will put in all the safeguards. but for this I know I have a good picture and there is no extraneous code going on. I placed a trace in the window open event and when I drag and drop the picture - the trace shows the first dim statement in the drop event and then the error pops up. I can’t event track it to a statement in the code
Ok, I had a brain fart - I’m actually dropping a file that is a picture, not an image. I added the folderitem to the code as:
If Obj.PictureAvailable then
pPictureIn = obj.Picture
elseif Obj.FolderItemAvailable then
pPictureIn = Picture.Open(obj.FolderItem)
End if
with the same results. The code freezes on the Dim pPictureIn first line in the DropObject event…
This is getting weird. I decided to delete the filetype set from the drop down menu and add my own as image/jpg. tried 3 test. the 3rd time it did the same as above but the first 2 times it dropped the image but gave the error when I quit the app. The trace was on the quit statement in the quit event for the app.