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

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

Clear the MessageBox

Post by chipsm » Fri Dec 04, 2020 11:35 pm

I use the message box for testing and troubleshooting. I noticed that the message box keeps past commands. I don't know how long these items are kept but is there a way to clear all of the past message box commands?
Clarence Martin
chipsm@themartinz.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Clear the MessageBox

Post by dunbarx » Sat Dec 05, 2020 1:02 am

Intersting question.

I think messages are saved forever. I have, just because. gone back in time with it, and gave up after many dozens. It got boring, though I remembered some of the things as they passed by.

Not sure how to clear them.

Craig

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 2:00 pm

Code: Select all

on mouseUp
   put empty into fld "message" of stack "Message Box"
end mouseUp
At least, clears out whatever current 'cruft' is there.

Poking around in revApplicationOverview I found these:
-
Screenshot 2020-12-06 at 15.04.58.png
Screenshot 2020-12-06 at 15.04.58.png (20.6 KiB) Viewed 8249 times
-
Screenshot 2020-12-06 at 15.05.21.png
Screenshot 2020-12-06 at 15.05.21.png (30.52 KiB) Viewed 8249 times

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 2:24 pm

Poking around a bit further, in the stackScript of the stack

revMessageBoxSingleLineMessageBehavior


[try saying that 10 times fast when you are lying drunk in the bath]

there is quite a lot of intriguing stuff such as:

Code: Select all

revIDEGetPreference("IDESingleLineMessageHistory")
which made me get fairly stroppy, as, obviously, the way messageHistory works CAN be modified, BUT is not made available
(as far as I can tell) in the Preferences.

Presumably (?) one can STOP the messageBox remembering past stuff.

I knocked together an impromptu stack with a single field and a button with this stack in it:

Code: Select all

on mouseUp
   put revIDEGetPreference("IDESingleLineMessageHistory") into fld "ff"
end mouseUp
and got 200 lines of past guff/stuff/fluff I had put into the messageBox command field.

AND this:

Code: Select all

on mouseUp
   put empty into revIDEGetPreference("IDESingleLineMessageHistory")
end mouseUp
threw a bluey.

OK, hang on a mo' maybe it's an array or something.

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 2:43 pm


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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 2:46 pm

Aaaaaah:
-
Screenshot 2020-12-06 at 15.45.50.png
-
This does the trick:

Code: Select all

on mouseUp
   set the IDESingleLineMessageHistory of stack "revpreferences" to empty
end mouseUp
-
I've got a headache . . . off for some coffee. 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 » Sun Dec 06, 2020 4:16 pm

Thank You! Thank You! Thank You!.
I tried poking around and couldn't find this.
I hope that others can use this information.
I will need some coffee just from reading your post.
One would think that Livecode would provide a button on the MessageBox to do this.

GREAT INFORMATION!
Clarence Martin
chipsm@themartinz.com

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 4:29 pm

One would think that Livecode would provide a button on the MessageBox to do this.
Just submitted an enhancement request:

https://quality.livecode.com/show_bug.cgi?id=23021

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 4:37 pm

The number of custom props in the revpreferences stack is mindboggling,
and, presumably, one can play "merry hell" by mucking around with them:

cToolbarText
palette_rect_revCustomCursors
cResourceTree
cEditorPath
cREVButtonSecondTabHeight
cScriptEditor,shortcuts,Print
cScriptEditor,paneHeight
cBackDrop
cScriptEditor,find,replacehistory
cScriptEditor,editor,hilitecolor
cREVProfileReadOnlyWarning
cScriptEditor,editor,useInteractiveFind
cShowrevProps
cIDE_SAGeneralTipLastShown
revHelpListMethod
cVersionNo
cFieldHeight
cScriptEditor,shortcuts,FindNext
revDocsAlreadySeen
cScriptEditor,editor,showDefaultHandlers
cScriptEditor,documentation,lastLoadedDoc
cVerboseDebug
cMacOSScrollbarWidth
palette_rect_Stack_1590437629
cREVRotatePrev5
cScriptEditor,shortcuts,DebugStepInto
cRevDocsCurrentCard
IDEActiveStack
palette_rect_revMessageBoxSingleLineMessageBehavior
palette_rect_Stack_1597170671
cToolbarIcons
palette_rect_revStandaloneSettingsInclusionsBehavior
cScriptEditor,editor,debugBackgroundcolor
cResourceLastCard
cREVMsgTabRectMultipleLines
cScriptEditor,gutter,linenumbers
cREVMsgTabRectpendingMessages
resizeable
cRevPopups
cScriptEditor,find,findhistory
cTipsShown
cDictionaryTree
cTabButtonHeight
cDictionaryLastEntryNew
cREVMacOSMenubar
cScriptEditor,editor,liveerrors
cIDE_SAIOSTipLastShown
cScriptEditor,shortcuts,Copy
palette_rect_revPropertyPopup_outerGlow
palette_rect_Stack_1591382757
cRevOnlinePrefs
cAppOverview
cGridSize
palette_rect_revIDEProjectBrowser
cRecentSort
cErrorDisplayScreenRect
cScriptEditor,debugShowToolbars
cREVTipNumber
cREVMultipleLineHistory
cScriptEditor,editor,backgroundcolor
Gray
cDefaultSizes
cMenuWidth
cREVSaveStacksAfterMoving
cScrollbarwidth
cREVMsgShowUIVariables
cREVMsgTabRectGlobalProperties
cStartCenterClassic
palette_rect_Stack_1590517592
cScriptEditor,shortcuts,NextScriptTab
palette_rect_revTitleBarSelector
cDictionaryTreeSplit
cDictionaryIndexHorizontalSplit
cScriptEditor,shortcuts,Cut
idePropertyInspector_labels
cREVTemplateMasterName
cScriptEditor,editor,commentchar
cFieldWidth
cREVMsgTabRectGlobal Properties
cNotifyMeOfBetaReleases
cScriptEditor,panes,visiblelist
cREVExtension
cScriptEditor,find,casesensitive
cNotifyMeOfStableReleases
cScriptEditor,editor,findvisible
cScriptEditor,shortcuts,FindDialog
cScriptEditor,debug,lastSelectedPane
pb_sections
cScriptEditor,editor,providercompletion
cCustomerNumber
cDocsFirstRun
cREVScriptColor
cScriptEditor,find,lastsearch
cScriptEditor,useTabs
cREVDefaultMenubar
cREVTextHeight
pb_textSize
cREVMsgTabRectfrontScripts
cREVMsgIntelligenceObject
cBreakPoints
cREVGraphicHeight
cREVMsgTabRectcard id 1002
cShowAsHandlers
cREVMsgTabRectSingle Line
cREVPlayerHeight
cScriptEditor,find,plaintext
palette_rect_Stack_1593937325
cScriptEditor,find,wholematches
cSelectionHandle
tooltip delay
cREVScriptTextHeight
palette_rect_revTools
cScriptEditor,variables,showenvvars
cREVAnimationTopLeft
cRecentNum
cShowRevolutionStacks
cREVToolsPaintToolsVisible
IDESingleLineMessageHistory
cDictionaryLocation
cREVMsgAutoRefresh
cREVRulerMeasurement
palette_rect_revPropertyInspector_2
palette_rect_Message_Box
cScriptEditor,documentation,lastLoadedAlternativeDocs
cResourceLocation
cHandlerList
cREVRotatePrev2
palette_rect_revNewScriptEditor_2
palette_rect_Stack_1591048214
cScriptEditor,shortcuts,ApplyAndSave
palette_rect_revDictionary
cDictionaryColumnWidthsNews
cColumnVisibility
cButtonHeight
red
cScriptEditor,editor,findcolor
Cyan
cREVSingleLineHistory
cIDEProjectBrowserOpen
cLabelFieldWidth
cCustomWordList
cDictionaryLastEntryNewSetInBuild
LightBlue
palette_rect_revRulersV
cREVUnmaximizedScriptWidth
cScriptEditor,shortcuts,Comment
cDictionaryHeight
palette_rect_revPropertyPopup_fillGradient
cREVMenuManagerTopleft
cREVCustomWidth
pb_controlSort
cSEHidePalettes
cGoAlign
cScriptEditor,colorization,config
cREVToolTipDelay
cScriptEditor,editor,fontsize
cREVProfileEditorTopLeft
palette_rect_revIDEExtensionManager
cREVAOTopLeft
suppressIDE
suppressedMessages
cScriptEditor,shortcuts,ToggleBreakpoint
cREVMsgTabRectrevstack
cUserEmail
Pink
cBuildNo
cAutoFormat
cScriptEditor,shortcuts,DebugRun
cRevUnseenTips
cREVMessageBoxControlStatus
cScriptEditor,shortcuts,Uncomment
cREVOpenTabPositions
cMacOSProgressScrollbarWidth
cMBMoveObjects
cScriptEditor,editor,autocomplete
cScriptEditor,shortcuts,ApplyAndClose
cREVRotatePrev4
cIDEProjectBrowserOrder
cAudioclipTabs
cPreferencesLoc
cREVProfileReadOnly
palette_rect_Stack_1593936487
cREVMsgTopLeft
cShowProfileEditor
cDictionaryColumnVisibilityNew
cREVScriptWidth
palette_rect_revExtensionBuilder
ideMessageBox_intelligenceobject
GreenYellow
cNotifyMeOfDevelopmentReleases
cShowAudioclips
cScriptEditor,leftSplit
cResourceWidth
cMenuHeight
revHelpUnixReligion
palette_rect_revSaving
palette_rect_revPreferencesGUI
palette_rect_com.livecode.palette.autocomplete-pro
cREVMaximizedScriptEditorTopLeft
cUserAutocompleteProviders
cNOPICTWarning
cLoadQuickTimeOnStartup
cColumnWidths
cREVMsgTabRectrevbasic
cRevDocsRect
cUngroupWarning
pb_indicator
palette_rect_revRulersH
revTools_columns
cScrollbarHeight
cSEHideMessageBox
cREVHelpText
cPaletteTopLeft
palette_rect_revDocsEmacs_Key_Bindings_Reference
suppressedTypes
cScriptEditor,editor,brackethighlighting
cScriptEditor,shortcuts,FindPrevious
cSEHideErrors
cFirst_RunInfo
StartCenterClassic
yellow
palette_rect_revMessageBoxBehavior
cAppBrowserWidgetLeft
cVideoclipTabs
palette_rect_revMenuManager
cREVMsgTabRectstacksInUse
cREVScriptDebugMode
cToolsTopLeft
cREVMsgTabRectSingleLine
New Field 2
cTraceDelay
cScriptEditor,actioncontext,Paste
cScriptEditor,editor,font
palette_rect_revRestore
cResourceHeight
cScriptEditorRect
cDictionaryWidth
cREVImageHeight
cScriptEditor,shortcuts,SendWindowToBack
palette_rect_revTutorial
http proxy
cDictionaryMode
cDocsLastViewedCard
cGrid
cScriptEditor,find,regularexpressions
cREVUIScriptShortcut
cScriptEditor,shortcuts,Redo
palette_rect_revGettingStartedScripts
cABOptionDoubleClick
cScriptEditor,shortcuts,Close
cUsername
cScriptEditor,variables,showglobals
palette_rect_revSETemplate
cREVMsgTabRectcard id 1147
cAppBrowserRect
cScriptEditor,editor,paneupdatedelay
palette_rect_Stack_1591382902
palette_rect_revNewScriptEditor_4
cFirstRun
cREVMsgTabRectbackScripts
cDestroyStack
cScriptEditor,edit,lastSelectedPane
cScriptEditor,shortcuts,InteractiveFind
cREVMenuBarTopLeft
cShowVideoclips
cMessageWatcherRect
cREVScriptHeight
palette_rect_revNavigator
revHelpHiliteColor
pb_stackSort
palette_rect_revPropertyPopup_dropShadow
cREVGeoTopLeft
cIDEProjectBrowserShowThumbnails
cRecentPaths
cREVRecentList
cDontWrap
cREVUnmaximizedScriptHeight
palette_rect_revPropertyInspector_1
revTools_show
cScriptEditor,historySize
cScriptEditor,editor,autoformat
cABCommandDoubleClick
cREVPlayerWidth
cNotifyMeOfMaintainenceReleases
cScriptEditor,variables,background
cScriptEditor,shortcuts,CloseTab
palette_rect_revPropertyInspector_3
cREVPropertyPaletteTopLeft
cREVRotatePrev1
cScriptEditor,shortcuts,GoDialog
cScriptEditor,editor,bracketcompletion
cVariableWatcherRect
palette_rect_revNewScriptEditor_3
cScriptEditor,shortcuts,PreviousScriptTab
cREVMsgTabRectGlobalVariables
cREVScriptSize
palette_rect_revPropertyPopup_colorOverlay
cButtonWidth
cScriptEditor,editor,brackethighlightcolor
cREVCustomHeight
cMacOSScrollbarHeight
cREVMsgTabRectMultiple Lines
cScriptEditor,shortcuts,ShowHandlerList
palette_rect_Stack_1590686203
cScriptEditor,preserveVariables
cREVMsgShowUIBackScripts
cScriptEditorHistory
cREVDBName
cScriptEditor,editor,hscrollbar
palette_rect_revbackscriptlibrary
cREVErrorsPaletteExpandedHeight
cREVAutoCreateProfiles
cScriptEditor,debug,lastcontext
cREVAutoCreateProfilesWarning
cCommentCharacter
cUpdate,MaxAutoPopupFrequency
cLiveColor
revPaletteFrameSize
cScriptEditor,editor,sortHandlerList
Num Recent Files
cScriptEditor,explicitVariables
cREVRecentPaths
palette_rect_Stack_1590579366
cIDEProjectBrowserShowGroupThumbnails
cStartPageShow
cVariablePreservation
cScriptEditor,editor,tabdepth
cScriptEditor,editor,lastsearchresults
cREVFieldFirstTabHeight
cSelectGrouped
cCardTabs
revHelpDefaultSection
cScriptEditor,editor,selectbackgroundcolor
cSelectionHandleColor
cREVDBCode
cREVMsgTabRectGlobal Variables
cREVHelpHiliteColor
cScriptEditor,shortcuts,DebugStepOut
cMacOSProgressScrollbarHeight
cHTTPProxy
palette_rect_revMenuBar
cREVMsgShowUIFrontScripts
palette_rect_revApplicationOverview
cVariableChecking
cScriptEditor,shortcuts,Undo
palette_rect_revSEErrorsPaneBehavior
cAppearanceTopLeft
cScriptEditor,documentation,lastMatchingSearch
cScriptEditor,shortcuts,Paste
cScriptEditor,shortcuts,DebugStepOver
cREVDontMaximizeScriptEditor
palette_rect_revMessageBoxSingleLineCardBehavior
cBuiltInColors
cREVRotatePrev3
pb_cardSort
cCustomColorsList
palette_rect_revNewScriptEditor_1
cNumRecent
cLabelFieldHeight
cScriptEditor,shortcuts,SelectAll
cLargeFonts
cREVMsgTabRectrevscript
cIDE_SAGeneralTipShow
cREVGraphicWidth
revstack
cScriptEditor,print,textSize
cScriptEditor,colorization,scheme
palette_rect_revMessageBoxMultipleLinesMessageBehavior
palette_rect_revMacCursors
cNavigationArrows
cRecentStackPaths
cControlTabs
cREVImageWidth
palette_rect_revNewScriptEditor
palette_rect_Stack_1583915330
cREVScriptFont
cErrorDisplayRect
cCaseSensitive
cScriptEditor,rect
cShowTips
cREVScriptShortcut
cSupportContact
cDocsQuickLinksVisible
suppressedActions
cScriptEditor,shortcuts,FindSelection
cBackDropColor
cScriptEditor,showErrors
cREVMsgShowUIMessages
cTabButtonwidth
ideExtensionManager_showInactiveExtensions
palette_rect_Stack_1596053412
cSort
cWholeMatches
cScriptEditor,shortcuts,LaunchMessageBox
palette_rect_revPropertyInspector_4
cScriptEditor,shortcuts,DebugStop
cShowAudioclipsclips
cScriptEditor,editShowToolbars
cDictionaryIndexVerticalSplit
cASKDestroy
cUserOrganization
cShowAudioclipclips
cIDE_SAIOSTipShow
cREVGeoOpen

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 » Sun Dec 06, 2020 5:13 pm

After exploring all of this, was just one cup of coffee enough? Seems like one would need at least a whole pot of coffee or more.
Thank you for filing an enhancement request.
Clarence Martin
chipsm@themartinz.com

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

Re: Clear the MessageBox

Post by richmond62 » Sun Dec 06, 2020 6:53 pm

Why do I feel that LiveCode needs an awful lot more documentation?

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

Re: Clear the MessageBox

Post by FourthWorld » Mon Dec 07, 2020 12:18 am

richmond62 wrote:
Sun Dec 06, 2020 6:53 pm
Why do I feel that LiveCode needs an awful lot more documentation?
Language elements designed for us developers to use are generally documented in the Dictionary, and sometimes also in the User Guide and/or Lessons.

Functions, command, custom properties, and other elements designed for internal use only by the IDE are generally documented only in the code in which they're used.

This seems a reasonable level of effort, a pattern we see with a great many other such tools.
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: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Clear the MessageBox

Post by richmond62 » Mon Dec 07, 2020 9:53 am

other elements designed for internal use
Surely, if I buy a car I can fiddle around with anything I like in it?
-
Horsey.jpg
-

AND, one could argue it is slightly high-handed of the folks at LiveCode central to assume that
certain elements are 'designed for internal use' only: and, certainly, I can see no obvious harm
in end-users being able to delete their command history from the Message Box.

The fact that LiveCode central has decided that some elements are 'designed for internal use' does not, also,
preclude the possibility of documenting them.

I bought a new dishwasher 2 weeks ago, and I have no chance whatsoever of understanding the
circuit diagram in the back of the manual; and I wonder who else has beyond the manufacturers:
but it is 'there' in the documentation; and should I or someone else be so foolhardy to try something
"clever" we will, at least, have a chance which we might not without that circuit diagram.
Last edited by richmond62 on Mon Dec 07, 2020 12:18 pm, edited 2 times in total.

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Clear the MessageBox

Post by AndyP » Mon Dec 07, 2020 11:28 am

Richmond, fantastic detective work. Many thanks for your efforts on this.

I just check my message history and had entries spanning the last 6 months!

I see that Panos has already agreed that adding this as an option in the IDE would be a good idea...super!

In the meantime, whilst we are are waiting for this, I've add a plugin stack to Sample Stacks which will add a Clear Message Box History button to the IDE menu bar.

Look for ClearMessagesBoxHistory

Again great work.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

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

Re: Clear the MessageBox

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

The odd thing is that the multiline message box thingy seems a bit more awkward:

palette_rect_revMessageBoxMultipleLinesMessageBehavior would seem only to deal with the size of the thing.

Admittedly I have never used the thing, and, just now, having entered 2 lines of commands I cannot work outhow
to get them to execute:
-
Screenshot 2020-12-07 at 13.28.18.png
Screenshot 2020-12-07 at 13.28.18.png (53.73 KiB) Viewed 8076 times
-

I see from other postings that other users have found this problematic.

Aaaaaah:
-
daft.png
-
I wonder if I hit that key several times I'll 'develop' a new custom prop. in the revpreferences stack?

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”