widget.newSpinner with custom image sheet not working

I’m banging my head against the wall here. No matter what I try I can’t get the spinner syntax correct.

local spinner = widget.newSpinner{  
 sheet="img/spinner.png",  
 data={width=44, height=44, numFrames=1, sheetContentWidth=44, sheetContentHeight=44},  
 width=44, height=44,  
 startFrame=1, frameCount=1};  

When the app is run I get a Runtime error which points to the line above:

Runtime error  
?:0: attempt to index a nil value  
stack traceback:  
[C]: ?  
?: in function <?:166>  
(tail call): ?  
...x2m10pjl28z8vxsh40000gn/T/TemporaryItems/93/help.lua:168:   

I’ve double-checked that the image is in the right place, and just about everything else (so I think). [import]uid: 70847 topic_id: 35154 reply_id: 335154[/import]

Hey ingemar.

This was my fault. The sheet/data paramaters for the new widgets are not implemented how they were intended to be.

This issue is fixed, and will appear in a daily build when the new remade widgets launch also.


The syntax has been simplified also.

sheet = an imagesheet object created with graphics.newImageSheet,

data table is no longer needed.

Apologies for any inconvenience caused. [import]uid: 84637 topic_id: 35154 reply_id: 139755[/import]

Hey ingemar.

This was my fault. The sheet/data paramaters for the new widgets are not implemented how they were intended to be.

This issue is fixed, and will appear in a daily build when the new remade widgets launch also.


The syntax has been simplified also.

sheet = an imagesheet object created with graphics.newImageSheet,

data table is no longer needed.

Apologies for any inconvenience caused. [import]uid: 84637 topic_id: 35154 reply_id: 139755[/import]

how was it now? because I am working with it,

now i am looking for the image sheet to work with the spinner,

Seng keat

@missionbatch09camb It’s OK now.

how was it now? because I am working with it,

now i am looking for the image sheet to work with the spinner,

Seng keat

@missionbatch09camb It’s OK now.