App Error

 I want to test my app on my phone so i went to file and select build i put all my information and i installed it into my phone. But as soon as i launch the app  it says 

" Runtime Erorr"

/User/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1451:/Users/

jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_button.lua:595:

attempt to index local ‘view’ (a nil value)

i dont know what that means.

Can you tell me more about widget.newButtons you are using? Are you using images for them?

Keep in mind devices are case sensitive the simulator (and OS desktop builds) are not and if you’ve named your button image:   button.png but you try to code the widget.newButton to use “Button.png”, it will crash on device but run perfectly fine in the sim.

So look for case sensitivity issues.

Rob

I haven’t tried your solution yet but so far this is what i got. 

the name of the buttons are “Button-play.png” and for overFile = “overButtonFile.png”

I can see the error. But can you please post the code? So we can copy and edit it? I don’t think most people would wanna help if they have to type out code from an image. When your typing (like I am doing typing this post) you’ll see “<>” press that and post your code in there.

–SonicX278

local playbutton = widget.newButton( { left = 35, top = 145, defaultFile = "Button-play.png", overFile = "overButtonPlay.png", } ) local settingButton = widget.newButton ( { left = 27, top = 220, defaultFile ="Button-setting.png", overFile = "overButtonSettings.png", } )

never mind i fixed.  all i did was change the names to “PlayButton”, “OverButtonPlay” and so on.  I guess what the problem was that  the dashes created a conflict in phone system. 

Yes. Try not using “-” in image file or any other dashy type of thing.

–SonicX278

Can you tell me more about widget.newButtons you are using? Are you using images for them?

Keep in mind devices are case sensitive the simulator (and OS desktop builds) are not and if you’ve named your button image:   button.png but you try to code the widget.newButton to use “Button.png”, it will crash on device but run perfectly fine in the sim.

So look for case sensitivity issues.

Rob

I haven’t tried your solution yet but so far this is what i got. 

the name of the buttons are “Button-play.png” and for overFile = “overButtonFile.png”

I can see the error. But can you please post the code? So we can copy and edit it? I don’t think most people would wanna help if they have to type out code from an image. When your typing (like I am doing typing this post) you’ll see “<>” press that and post your code in there.

–SonicX278

local playbutton = widget.newButton( { left = 35, top = 145, defaultFile = "Button-play.png", overFile = "overButtonPlay.png", } ) local settingButton = widget.newButton ( { left = 27, top = 220, defaultFile ="Button-setting.png", overFile = "overButtonSettings.png", } )

never mind i fixed.  all i did was change the names to “PlayButton”, “OverButtonPlay” and so on.  I guess what the problem was that  the dashes created a conflict in phone system. 

Yes. Try not using “-” in image file or any other dashy type of thing.

–SonicX278