NathanWalker / nativescript-fancyalert

Fancy alerts for NativeScript.
Other
147 stars 38 forks source link

nativescript_fancyalert_1.TNSFancyAlert.showCustomButtons is not a function #41

Closed kumarandena closed 5 years ago

kumarandena commented 6 years ago

Hi Nathan,

I have encountered with mentioned typo error when i tried with TNSFancyAlert.showCustomButtons, If i tried with other fancyalerts, then all works fine.

JS: ERROR TypeError: nativescript_fancyalert_1.TNSFancyAlert.showCustomButtons is not a function JS: ERROR CONTEXT [object Object]

This is how i implement,

html. <ActionBar class="action-bar"> <ActionItem icon="res://ic_notifications_none" (tap)="showCustomButtons()"></ActionItem> </ActionBar>

ts. ` getOptions(){

let buttons = [ new TNSFancyAlertButton({ label: 'Add Finding', action: () => { console.log('Add Finding'); this.addfinding(); } }), new TNSFancyAlertButton({ label: 'Save', action: () => { console.log('Save'); this.goAudithome(); } }), new TNSFancyAlertButton({ label: 'Home', action: () => { console.log('Three'); } }) ]; TNSFancyAlert.showCustomButtons(buttons, undefined, undefined, 'Got Buttons?', Add as many as you'd like., 'Ok');

}`

Thanks.

romulowspp commented 6 years ago

The showCustomButtons are not implemented in android, only for iOS.

NathanWalker commented 5 years ago

Thanks @Ablankzin Android is a bit more limited however a new showColorDialog was just added for android which adds a few more options you can try out.

MetaiR commented 5 years ago

for those have this problem I did this:

tns platform clean android
tns run android

and it works

mhtsharma948 commented 4 years ago

Having the same issue. Is it implemented for android now?