Triger OnRelease event Corona Widget button

Hi I am testing Corona Widget Sample code.

there is a Button (pickerButton), if this button is pressed, this will triger to call function onButtonRelease, how can I trigger to call this function Without physically press the button, but trigger to call the function with program, something like:
pickerButton:onButtonRelease() ?

Below is the button definition:

pickerButton = widget.newButton{
label = “Show Picker”,
left = 22, top = 285,
onRelease = onButtonRelease
}

Thank you in advance.

Mila [import]uid: 83418 topic_id: 18937 reply_id: 318937[/import]

In your code you have a function called onButtonRelease which you call when the button is released.

However to call the function independent of the button you can simply do this;

[lua]onButtonRelease()[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 18937 reply_id: 73031[/import]