B4J Question [BANano] [SOLVED] How to Async and Await with BANano

Mashiane

Expert
Licensed User
Longtime User
Ola

How do I use async and await with BANano, for example.

B4X:
async function handleButtonClick() {
      const actionSheet = await actionSheetController.create({
        header: 'Albums',
        buttons: [
          { text: 'Delete', role: 'destructive' },
          { text: 'Share' },
          { text: 'Play' },
          { text: 'Favorite' },
          { text: 'Cancel', role: 'cancel' }
        ]
      });

      await actionSheet.present();
    }

Thank you.
 
Top