Register drag type

Can you register an EPS file as a drag type and if so what’s the syntax (eps image?). Also, does image view support eps files or do they get converted to jpeg or some other bit map format or just not appear at all?

Thanks

anyone?

:slight_smile:

You wouldn’t register for a specific file type. You would register for them generically and then check the file type yourself. Something like this…


on awake from nib theObject
	tell theObject to register drag types {"file names"}
end awake from nib

on drop theObject drag info dragInfo
	if "file names" is in types of pasteboard of dragInfo then
		set preferred type of pasteboard of dragInfo to "file names"
		set thePaths to contents of pasteboard of dragInfo
		-- loop through the paths and check the file extension to get the file type you want
	end if
end drop

I don’t know if an image view will show and EPS file type.