widget.newButton and baseDir parameter

How to use baseDir parameter of widget.newButton if my PNGs are located in “gui” folder?

widget.newButton {  
 -- other parameters goes here...  
 baseDir = "gui",  
 default = "test.png"  
}  

this example doesn’t work. [import]uid: 39634 topic_id: 26452 reply_id: 326452[/import]

Just FORWARDING @Joshua answer for you at the API page:

@hsardaryan: Great question. The answer is, just as you would with any other Corona API:
[lua]widget.newButton{
default = “gui/test.png”
}[/lua]
You don’t have to specify a baseDir if you’re referring to system.ResourceDirectory (your project directory), because that’s the default.
Rodrigo.
[import]uid: 89165 topic_id: 26452 reply_id: 107314[/import]

Thank you guys! Now I am doing exactly that way, but why we need baseDir param then? [import]uid: 39634 topic_id: 26452 reply_id: 107452[/import]

You need it as soon as you`re not using the Default directory, that is the [lua]system.ResourceDirectory[/lua]

For example if you are using the [lua]system.TemporaryDirectory, system.DocumentsDirectory[/lua], etc you would need to state/code the [lua].baseDir[/lua] into your project.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 26452 reply_id: 107454[/import]