Don't load a file that is not an image

Malte Brill revolution at derbrill.de
Tue Feb 28 10:10:45 CST 2006


Hi,

I hope you do not mind a lurkers post here. :-)

you could also try to have a test image and set the filename of that 
image to the chosen path. If it is no valid image the pixmapID of the 
image will be empty (And the result will contain "Could not open 
image"). A script might look like this:

on mouseUp
   answer file "Please choose an image"
   put it into tPath
   set the fileName of img "testIt" to tPath
   if the imagePixMapID of img "testIt" is not empty then
     import paint from file tPath
   end if
end mouseUp

Just to add another way to skin a cat. :-)

All the best,

Malte

-- 
ArcadeEngine - prepare to WOW your audience within minutes
http://www.runrev.com/section/revselect/arcadeengine
http://www.derbrill.com/arcadeengine/forum 



More information about the metacard mailing list