Just took quick look and SomeGuy22006 had most of the code needed to prove some of what's going on commented out so saved a lot of trying to work out what I'd need.
commented out was:
Code:
....
allImages=allImages[1..10]
show(allImages)
showButton("OK")
....
running this returns a list of the images in the form
Quote:
[images/deault-female.jpg, images/alice.jpg ....etc]
so it is returning "images..." in this case
to prove things I edited to be:
Code:
...
allImages=allImages[1..10]
show(allImages)
showButton("OK")
setImage("default-female.jpg")
showButton("OK")
setImage(allImages[1].toString())
showButton("OK")
...
and when ran,
setImage("default-female.jpg") - works as expected
where as
setImage(allImages[1].toString()) - throws the error Missing File: .\images\images\default-female.jpg
I expect if ran on windows this may be different which is causing the issue on Mac,
(unless you happen to have an "images/images..." directory by any remote chance)
Haven't got a windows machine I can use to test on so If SomeGuy22006 could run the equivalent we may be able to prove there is a difference.
not sure what the fix would be without breaking one or the other platform.
I wouldn't really want to suggest attempting string manipulation on every found path because of the overheads it could potentially create especially when not needed on some platforms, unless there is a way in groovy to catch a file not found exception when displaying an image and then strip the "images/" from the string only at the point of attempting to display. which would reduce some of the potential overheads.