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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...