Help : widget.newSlider() spritesheet not working on devices

Yes, here it is :

slidersheet.png

Hi @nmichaud,

I tested your slider on iOS7 using Corona build #2189, and it works fine… I see the slider and I can manipulate it as expected. I haven’t tested on Android. Perhaps there’s some conflict with another theme file being declared (or not declared), or perhaps are you using an older build of Corona?

Brent

@Brent, we are using a more recent build #2282. Are you calling setTheme to make it work ?

I didn’t call setTheme. Also, I tested in #2303 and it looked fine.

Well I really don’t understand how it works on your side. 

Here is a small test app for you to test (click to download)

This demo will show you that on windows simulator it is working. If you build the app, run it on Android Samsumg S3 if will not work. Here is 2 screenshots showing it running :

outputslider.png

I would really appreciate if anybody else could try the code I have posted just before this one and tell me if it works for you. We do not understand why it is not working.

Hi @nmichaud,

I notice you did not name the sheet file properly, which is probably why it’s breaking (it can’t find the sheet). You have it “sliderSheet.png” in the code and “slidersheet.png” as the file name. Files must be case-sensitive matches in every case. The Simulator can be more forgiving of this (which explains why it might work in the Simulator), but devices are not forgiving and require the case match.

Brent

Oh no… I am so sorry. How come I did not see that. basic error, Sorry for the noise, I will go and hide in the corner for a few hours

Brent just beat me to the line… I was coming back to post my results. Even the simulator (2014.2316) is now complaining about this : 

ERROR: The resource file (sliderSheet.png) could not be found at case-sensitive path (/Users/xxxxxx/Desktop/Slider Test/sliderSheet.png).

Warning: /Users/xxxxxx/Desktop/Slider Test/main.lua:21: Failed to find image ‘sliderSheet.png’

Its great that the simulator is not as forgiving as before so you can catch these issues quickly. All the best.

If you have the “showRuntimeErrors” setting enabled on the simulator settings page… Does an error like this now halt the simulation and throw an error popup on the screen?

That would be handy.

Cheers

There is no error popup on screen but the simulation is now halted and simulator shows you a black screen. When you look at the simulator logs you see the error I posted above. So the simulator no longer covers the capitalization mistakes you make. This is good.

Thanks for the info, that is much more helpful.

What build did this behaviour change first happen in?

I observed this behaviour on #2316 and @nmichaud says above that he tested his code in build #2282 and obviously he wasn’t presented with this error message. So in nutshell it must have been introduced somewhere between #2282 and #2316. Hope this helps.