Crazy imageData

Ken Ray kray at sonsothunder.com
Mon Jun 21 15:33:15 EDT 2004


Troy,

Can you solve it with a simple "put":

  put img id 1018 of stack "Button Icons" into image \
    "Thumbnail" of card tClipSelected of stack "CurrentP"

That would avoid using the imagedata and not require you have exactly the
same dimensions (the destination image will adjust to fit the incoming image
unless the lockLoc is true).

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Troy Rollins
> Sent: Monday, June 21, 2004 12:51 PM
> To: How to use Revolution
> Subject: Crazy imageData
> 
> 
> My stacks do some moving of imageData between main stacks.
> 
> The code seems to break, randomly, but with regularity. I 
> think I have 
> the issue resolved, it works fine for a while, then suddenly doesn't 
> work... with no changes to any of the related code. It looks 
> like this 
> -
> 
> PUT the imageData of image ID 1018 of stack "Button Icons" into 
> tClearImage
>      set the imageData of image "ThumbNail" of card tClipSelected of 
> stack "CurrentP" to tClearImage
> 
> *Sometimes* this will work a hundred times in a row. Then, it will 
> suddenly fail, and fail every time after that.
> 
> A little more info -
> image ID 1018 of stack "Button Icons" is an imported JPG, but I've 
> tried PNG, and GIF with the same results.
> When it fails, the image is pure black.
> "Button Icons" is a substack of my main app.
> "CurrentP" is a  mainstack, loaded by my main app as a resource.
> 
> It seems to me that although I have the paths right, it can't 
> find the 
> proper image?? The fact that it works *sometimes* but not always is 
> just weird, as computers usually make the same mistakes consistently. 
> Could this have something to do with the defaultStack? I didn't think 
> so, as I'm not using "this stack" anywhere, and I explicitly 
> define the 
> stack names.
> 
> Any pointers? Thanks.
> 
> --
> Troy
> RPSystems, Ltd.
> http://www.rpsystems.net
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list