Jump to content

unimForm.ShowToast duration time


x11

Recommended Posts

In the mobile version, the window does not close and hangs all the time

 

procedure ShowToastMy(const Title, Text: string; iDuration: integer = 5000);
begin
  UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', ' + iDuration.ToString + ');');
end;


ShowToastMy('Title', 'Text');

 

Screenshot_25.jpg

Link to comment
Share on other sites

51 minutes ago, x11 said:

In the mobile version, the window does not close and hangs all the time

 





procedure ShowToastMy(const Title, Text: string; iDuration: integer = 5000);
begin
  UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', ' + iDuration.ToString + ');');
end;


ShowToastMy('Title', 'Text');

 

Screenshot_25.jpg

try with smaller duration and try without QuotedStr.

I use unigui with Android application (using WebView) and all Toast work corect.

Try out and this examples: https://docs.sencha.com/extjs/6.5.0/modern/Ext.Toast.html

and :

var t = Ext.create('Ext.Toast',{cls: 'mytoast',timeout: 2000});
t.show({message: 'foo'});

May be You need to add ',timeout: YourDuration'

UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', timeout:' + iDuration.ToString + ');');

Link to comment
Share on other sites

2 hours ago, irigsoft said:

UniSession.AddJs('Ext.toast({message:' + QuotedStr(Text) + ', timeout:' + iDuration.ToString + '});');

thank you very match

it is works

 

It would be nice if the developers add the Duration parameter to unimForm1.ShowToast()

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...