J John Sturt Active Member Licensed User Longtime User Jul 11, 2014 #1 Hello My app sends a lot of toastmessageshow commands by the time some are displayed the app has moved onto a new phase. Is there a way of clearing the queue? Many Thanks John
Hello My app sends a lot of toastmessageshow commands by the time some are displayed the app has moved onto a new phase. Is there a way of clearing the queue? Many Thanks John
DonManfred Expert Licensed User Longtime User Jul 11, 2014 #2 AFAIK no Maybe you should creape a Label on top or Botton and use this label as a kind of "Statusbar" instead of using a Toastmessage... You also can use the FloatingWindows class from Informatix to create a floating window wich shows your own Message in the floating window instead of a toastmessage... You have the advantage here that you can control the position AND Layout of your "Toastmessage" At the point you want to stop you simply hide the floating widow. and if you show a new one you set the new message and show the window again... Upvote 0
AFAIK no Maybe you should creape a Label on top or Botton and use this label as a kind of "Statusbar" instead of using a Toastmessage... You also can use the FloatingWindows class from Informatix to create a floating window wich shows your own Message in the floating window instead of a toastmessage... You have the advantage here that you can control the position AND Layout of your "Toastmessage" At the point you want to stop you simply hide the floating widow. and if you show a new one you set the new message and show the window again...
Erel B4X founder Staff member Licensed User Longtime User Jul 13, 2014 #3 I've used this code in B4A-Bridge to limit the number of messages: Code: Copy Sub ShowToastMessage(s As String) Log(s) If LastToastMessageShown + 5 * DateTime.TicksPerSecond > DateTime.Now Then Return Else LastToastMessageShown = DateTime.Now ToastMessageShow(s, True) End If End Sub This is useful in cases where multiple error messages may appear one after another. LastToastMessageShown is a global variable (Long). You should call this method instead of ToastMessageShow. Upvote 0
I've used this code in B4A-Bridge to limit the number of messages: Code: Copy Sub ShowToastMessage(s As String) Log(s) If LastToastMessageShown + 5 * DateTime.TicksPerSecond > DateTime.Now Then Return Else LastToastMessageShown = DateTime.Now ToastMessageShow(s, True) End If End Sub This is useful in cases where multiple error messages may appear one after another. LastToastMessageShown is a global variable (Long). You should call this method instead of ToastMessageShow.
J John Sturt Active Member Licensed User Longtime User Jul 14, 2014 #4 Thank you for all the feedback, I am going to pursue the label route. John. Upvote 0