Clear the MessageBox
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Clear the MessageBox
I rather think the limitation is in some of the scripts/behavior of the message box stack.
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
Possibly.
I have, however, reached my LIMIT for now.
I have got to have a bath, select a tie, trim my beard, and so forth,
and get ready to give a moderately good impression tomorrow
with all the Ukrainian kids and their Mums and Dads at my school.
I have got 11 kids coming free of charge until the end of June:
not really worried about teaching English as a Farcical Language as such,
much, much more worried about the emotional tone of things.
I have, however, reached my LIMIT for now.
I have got to have a bath, select a tie, trim my beard, and so forth,
and get ready to give a moderately good impression tomorrow
with all the Ukrainian kids and their Mums and Dads at my school.
I have got 11 kids coming free of charge until the end of June:
not really worried about teaching English as a Farcical Language as such,
much, much more worried about the emotional tone of things.
Re: Clear the MessageBox
Richmond,
you could also put into the single line message box
Kind regards
Bernd
you could also put into the single line message box
Code: Select all
put revIDEGetPreference("IDESingleLineMessageHistory")Bernd
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
I did:
- -
But I still have to have a bath.
- -
But I still have to have a bath.
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
I played football with a large wooden marble and the cat.So you really watched the field for 3 minutes straight?
OhhhhhhKayyyyyyyy...
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
And I did that again, at my work with LC 8.1.10 on my iMac running MacOS 10.7.5:
- -
And what am I supposed to do with that information, forbye?
- -
And what am I supposed to do with that information, forbye?
Re: Clear the MessageBox
I thought you wanted to know how many lines were buffered by the message box.richmond62 wrote: ↑Mon Apr 11, 2022 7:27 amAnd I did that again, at my work with LC 8.1.10 on my iMac running MacOS 10.7.5:
And what am I supposed to do with that information, forbye?
If that is wrong then I misunderstood something.
Kind regards
Bernd
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
What I would like to know is 2 things:
1. The maximum number of lines that can be buffered by the message box.
[I have already demonstrated that it is > 10,000]
2. A way to set a maximum number of lines that can be buffered by the message box.
As the lines are stored in a field called "messages" in the revpreferences stack I wonder
if there is a way to restrict the number of lines in a listField?
In a perfect world the Preferences stack of the IDE would contain a far larger number
of settings that could be tweaked to what would serve the end-user.
1. The maximum number of lines that can be buffered by the message box.
[I have already demonstrated that it is > 10,000]
2. A way to set a maximum number of lines that can be buffered by the message box.
As the lines are stored in a field called "messages" in the revpreferences stack I wonder
if there is a way to restrict the number of lines in a listField?
In a perfect world the Preferences stack of the IDE would contain a far larger number
of settings that could be tweaked to what would serve the end-user.
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 936
- Joined: Thu Nov 13, 2008 6:48 am
Re: Clear the MessageBox
Suddenly I want to add a little button to the right of the message box header bar that does just this. How brilliant!!!!!bn wrote: ↑Sun Apr 10, 2022 6:49 pmRichmond,
you could also put into the single line message box
Kind regardsCode: Select all
put revIDEGetPreference("IDESingleLineMessageHistory")
Bernd
Mark
macOS 15.6 (Sequola), Xcode 15.3, LC 10.0.2, iOS 18.6.2
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 936
- Joined: Thu Nov 13, 2008 6:48 am
Re: Clear the MessageBox
Well, it would save you loads of time having to scroll back through a list looking for something. And from the fact that I have at most 200 commands, it is evident that somewhere in the past I figured out (or accidentally) deleted all of the msgs in my msg box.richmond62 wrote: ↑Mon Apr 11, 2022 7:27 amAnd I did that again, at my work with LC 8.1.10 on my iMac running MacOS 10.7.5:
-
Screen Shot 2022-04-11 at 9.25.40 AM.png
-
And what am I supposed to do with that information, forbye?
Mark
macOS 15.6 (Sequola), Xcode 15.3, LC 10.0.2, iOS 18.6.2
Re: Clear the MessageBox
Not exactly. You demonstrated that you could put the contents of one field into another directly. The message box scripts may manipulate storage dynamically (but I haven't checked.)richmond62 wrote: ↑Mon Apr 11, 2022 7:38 amWhat I would like to know is 2 things:
1. The maximum number of lines that can be buffered by the message box.
[I have already demonstrated that it is > 10,000]
Aside: the reason your test took 3 minutes is because you wrote to a field on every pass through the loop. If you'd written to a variable instead it would have taken only a few seconds, if that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Clear the MessageBox
I put Bernd's code into a button:
The script stuffs the number of lines into another field.
The results show 200 lines.
Execute a few more commands in the message box and run the button again...still 200 lines.
Unless I am missing something, it seems to me that the answer to richmon62's question is ... 200 lines (at least on my system).
Bob C
I'm using LC 10.0.0-dp-3 on macOS 12.3.1 (Monterey)
Code: Select all
on mouseUp pButtonNumber
put revIDEGetPreference("IDESingleLineMessageHistory") into field "MessageBox History"
put the number of lines of field "MessageBox History" into field "Lines"
end mouseUpThe results show 200 lines.
Execute a few more commands in the message box and run the button again...still 200 lines.
Unless I am missing something, it seems to me that the answer to richmon62's question is ... 200 lines (at least on my system).
Bob C
I'm using LC 10.0.0-dp-3 on macOS 12.3.1 (Monterey)
-
richmond62
- Livecode Opensource Backer

- Posts: 10193
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clear the MessageBox
Clever stuff, and 200 is useful to know. Thanks. 
It is also worth knowing that ONLY valid code snippets that have been run are kept:
When I wrote 'shave me knees' in the messageBox it did NOT increment the number
of remembered lines.
When I wrote 'put "hello"' the number of remembered lines was only incremented AFTER I had
hit the ENTER key.
It is also worth knowing that ONLY valid code snippets that have been run are kept:
When I wrote 'shave me knees' in the messageBox it did NOT increment the number
of remembered lines.
When I wrote 'put "hello"' the number of remembered lines was only incremented AFTER I had
hit the ENTER key.
-
PaulDaMacMan
- Posts: 683
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: Clear the MessageBox
That 200 limit is "hardcoded" as a constant in the IDE file revmessageboxbehavior.livecodescript.
I think it could / should be made setable.
Seems like a rather arbitrary number to me.
I do like the idea of a button. or maybe a special key-combo, that would dump your msg box history into the msg box result field all at once. I can't imagine the total minutes that I've spent scrolling back through the list one keypress at a time looking for something I put in there a month ago, seems like that would be a great time saver.
I think it could / should be made setable.
Seems like a rather arbitrary number to me.
Code: Select all
script "revMessageBoxBehavior"
##GH created 12/11/2014
##GH last updated 31/12/2014
local lSelectedCard, lCardHistoryPref
constant kHistoryMax = 200
constant kHalfMessageFieldHeight = 12.5
constant kExternalErrorCode = 0