Page 1 of 1

cancel all messages doesn't work (8.1.1 rc1)

Posted: Sun Oct 16, 2016 10:10 am
by jmburnod
Hi All,
I noticed that"cancel all messages" btn doesn't work.
Just use this to cancel all messages

Code: Select all

on stopAllPending 
   repeat for each line aLine in the pendingmessages
         cancel item 1 of aLine
   end repeat
end stopAllPending
Edit: same with 8.1.1 rc2

Best regards
Jean-Marc

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Sun Oct 16, 2016 12:26 pm
by FourthWorld
Did you file a bug report?

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Sun Oct 16, 2016 1:52 pm
by jmburnod
Yes,
Bug 18616
Best

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Tue Oct 18, 2016 10:36 pm
by [-hh]
Hi Jean-Marc,

this is possibly not a bug.
'For each' enumerates top-down and may be not fast enough.

You could try the following (in some situations one may need even more 'outer' repeats than two):

Code: Select all

repeat 2
   repeat for each line aLine in the pendingmessages
         cancel item 1 of aLine
   end repeat
end repeat
Kind regards, Hermann

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Tue Oct 18, 2016 11:53 pm
by dunbarx
Hermann.

I think Jean-Marc was saying that the loop solution worked all the time, but the "cancel..." btn at the bottom of the pendingMessages pane did not.

Craig

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Wed Oct 19, 2016 1:56 am
by [-hh]
Hi Craig.
They do it (already) this way in the palette:

Code: Select all

command cancelAllMessages
   local tPendingMessages, tMessage
   if lSelectedCard is not "Pending Messages" then exit cancelAllMessages
   
   put the cREVPendingMessages of me into tPendingMessages
   repeat for each line tMessage in tPendingMessages
      cancel item 1 of tMessage
   end repeat
  
   lock screen
   revIDEPendingMessagesRefresh
   disableFrameItem "cancelAll"
   unlock screen
end cancelAllMessages
As I said, this may be too slow. If you have for example a timer loop, say every 8 millisecs, then it's kind of a lottery to cancel it by one such loop . At least my animation examples need several such loops for a "STOP ALL".

Hermann
Sorry for the edit. Safari 10 kicks me out every 2 minutes.

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Wed Oct 19, 2016 12:15 pm
by jmburnod
Not sure I understand all comments
This bug is confirmed with comments you can see here
http://quality.livecode.com/show_bug.cgi?id=18616
Kind regards
Jean-Marc

Re: cancel all messages doesn't work (8.1.1 rc1)

Posted: Wed Oct 19, 2016 12:25 pm
by [-hh]
Oh, I learn, this button doesn't work from several points of view.
Misunderstanding by me, sorry for that!