Update example to wait for app.on('ready')

Related to Issue #383
Merge pull request #408 from FWeinb/patch-1

Update `tray` example to wait for app.on('ready')