Clear the MessageBox

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 12:53 pm

Nope; not so lucky.

Interestingly enough . . . on deleting the contents of the multiline message box thingy, reverting to the single line thingy, then
returning to the multiline one the deleted commands are NOT deleted.

So, obviously (err; not THAT obviously) this does not behave in a similar way to the single command line.

Thunder
Posts: 20
Joined: Thu Mar 12, 2015 1:52 pm

Re: Clear the MessageBox

Post by Thunder » Mon Dec 07, 2020 5:04 pm

richmond62 wrote:
Mon Dec 07, 2020 12:53 pm
Nope; not so lucky.

Interestingly enough . . . on deleting the contents of the multiline message box thingy, reverting to the single line thingy, then
returning to the multiline one the deleted commands are NOT deleted.

So, obviously (err; not THAT obviously) this does not behave in a similar way to the single command line.

Stack :

revMessageBoxMultipleLinesMessageBehavior

Line : 45 -> command revInitialise

Line : 50 -> put revIDEGetPreference("IDEMultipleLinesMessageHistory") into lHistory


Could this be of help ? revIDEGetPreference("IDEMultipleLinesMessageHistory")

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 6:04 pm

Certainly worth a look: after supper. 8)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Clear the MessageBox

Post by jacque » Mon Dec 07, 2020 6:26 pm

I'm still trying to figure out why one would want to delete old message box entries. I find it very convenient to begin typing a command I used a long time ago and still have it pop up immediately after only two or three characters. Must be related to work flow I guess.

The way to execute the multi-line message box is documented. I remember reading it but can't recall if it was in the dictionary or the user guide.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 6:50 pm

I'm still trying to figure out why one would want to delete old message box entries.
Well, it is probably no more than a matter of taste, but the auto-complete feature on my Android phone nearly drove me round the twist until I worked out how to disable it.

And the point is, surely, that one can disable auto-complete in Android, as one should be able to in the LiveCode IDE.

Things I dislike about modern computer systems:

1. The spell check that tries to turn my perfectly acceptable "British" English into some North American dialect. 8)

2. The spell check that tries to turn my perfectly acceptable "British" English into some North American dialect. 8)

3. The spell check that tries to turn my perfectly acceptable "British" English into some North American dialect. 8)

Erm . . .
Last edited by richmond62 on Mon Dec 07, 2020 7:02 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 6:55 pm

Um . . . this disnae wark:
-
Screenshot 2020-12-07 at 19.54.11.png
-
Because it disnae search in IDE stacks. :cry:

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 7:00 pm

BUT this does:

Code: Select all

on mouseUp
   set the IDEMultipleLinesMessageHistory of stack "revPreferences" to empty
end mouseUp
BIG thanks to Thunder for something I had overlooked. 8)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Clear the MessageBox

Post by jacque » Mon Dec 07, 2020 7:13 pm

The spell check that tries to turn my perfectly acceptable "British" English into some North American dialect. 8)
Go into Settings and search for "language". You should see several options. Go through them all and change each to "English (UK)". Done.

You may need to add the UK keyboard.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Clear the MessageBox

Post by FourthWorld » Mon Dec 07, 2020 7:25 pm

jacque wrote:
Mon Dec 07, 2020 6:26 pm
I'm still trying to figure out why one would want to delete old message box entries. I find it very convenient to begin typing a command I used a long time ago and still have it pop up immediately after only two or three characters. Must be related to work flow I guess.
Most other command-line consoles like Terminal provide a way to clear history (in Unix and Linux it's "history -c"). It's not used every day, but often enough to have a command for it.

I've added a note to the enhancement request to consider a new command for Message Box operations, with args for clearing history. The UI is already cumbersome, I see little benefit in making it even more visually noisy for something seldom needed. But it is useful, so a general Message Box handler with options for useful tasks may strike a good middle ground, and follow conventions anticipatable by those who enjoy command line tools like Message Box.
The way to execute the multi-line message box is documented. I remember reading it but can't recall if it was in the dictionary or the user guide.
Apparently that part of the User Guide is very old, before they started being more aware of the world outside Apple-specific keyboard layouts.

Under "LiveCode IDE" -> "Message Box" on p 501 it says:
Type valid LiveCode code into this area. In Single Line mode, separate multiple lines with; (semi-colon) and press Return to execute. In Multiple Line mode, press return to separate lines, and press Enter to execute.
No doubt that makes good sense if you happen to be using Apple hardware. But the other 85% of the world has no key labeled "Return". Instead, what Apple calls "Return" is labeled "Enter" on keyboards for all other systems, and what Apple calls "Enter" can be emulated on normal keyboards with Ctrl-Enter.

The good news is that this is consistent with how we trigger the Apply button in the Script Editor, and there are likely a few other contexts where this same convention is used consistently.

The bad news is that at least that one instance in the User Guide is incorrectly described, so I just filed a docs report on it:
https://quality.livecode.com/show_bug.cgi?id=23023
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Clear the MessageBox

Post by FourthWorld » Mon Dec 07, 2020 7:45 pm

richmond62 wrote:
Mon Dec 07, 2020 9:53 am
other elements designed for internal use
The fact that LiveCode central has decided that some elements are 'designed for internal use' does not, also,
preclude the possibility of documenting them.
True, it does not preclude the possibility of documenting IDE internals, but neither does it obligate them to do so.

What you really want is indeed quite practical, a way to clear MB history. Most other command line tools offer a command for that, and it seems fitting LC should as well. And when they add such a command, I would imagine they'd document it.

But what you posted immediately prior to "Why do I feel that LiveCode needs an awful lot more documentation?" was a long list of property names used internally within the IDE. Documenting all of those would not solve your problem, as doing so would not provide you with a command to clear MB history.

And as Thunder demonstrated, one of the great things we love about LC is that it's so readable it's nearly self-documenting. Even though the team didn't take hundreds of hours away from fixes and features we ask of them to create thousands of pages of documentation for internals unlikely to ever be read, the self-documenting nature of LC and the availability of LC's source code allow anyone experienced enough to use such properties to read how the IDE uses them.

Indeed, as nice as it will be for newcomers to see a MB-clearing command included right out of the box, the ease of the language means the experienced users asking for it here don't even need to wait for that: making one's own takes just a few minutes' research and two statements to write as a library or plugin we can have and enjoy right now.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 7:54 pm

Documenting all of those would not solve your problem
No, that's true: it would solve neither 'my problem' (and that's something for my wife to deal with, not LiveCode),
nor anything else, and I was NOT proposing a monster set of preferences that would allow end-users to bugger up the
whole IDE: ALL I was doing was demonstrating how much stuff there is "under the hood' of LiveCode (which, even
if nothing else, should make us all appreciate the vast work done by Kevin, Mark and the other workers at the coal face).

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 8:00 pm

Screenshot 2020-12-07 at 20.57.28.png
-
Just to be a complete pain in the bum (OK, that's nothing new), I should like to point out that 3 Apple keyboards
I use on on a regular basis have NO keys labelled either RETURN or ENTER.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Tue Dec 08, 2020 8:26 pm

Screenshot 2020-12-08 at 21.24.03.png
-
Mockup. 8)

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: Clear the MessageBox

Post by chipsm » Tue Dec 08, 2020 9:11 pm

Interesting idea. I like it.
Clarence Martin
chipsm@themartinz.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Clear the MessageBox

Post by FourthWorld » Tue Dec 08, 2020 10:58 pm

Much better than adding more complexity to the Message Box UI itself.

You could add the feature and update the docs in a pull request via GitHub.

Or you could take 15 minutes and write a two-line plugin.

I guess it depends on how quickly you'd like this. If it's not important you can wait.

It's been a good discussion, because while I don't use LC's Message Box it reminds me that I should include a way to purge history in my drop-in replacement tool. In mine, unencumbered by other considerations, I have the freedom to make it as flexible as I'd like, so I'll probably use a command with the default being to clear all of history, and options to list the full history, and to delete a specific line from history, all without leaving the keyboard.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”