Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 897f2bc

Browse files
committed
Merge remote-tracking branch 'origin/release-8.1.6' into merge-release-8.1.6_31.07.17
2 parents eef9295 + 627d437 commit 897f2bc

41 files changed

Lines changed: 1520 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Toolset/home.livecodescript

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ command revInternal__ResetPreferences
744744
put "false" into tPropsArray["cShowRevolutionStacks"]
745745
put "22" into tPropsArray["cMenuHeight"]
746746
put "1067,251,1882,827" into tPropsArray["cRevDocsRect"]
747-
put "Black" into tPropsArray["cBackDropColor"]
747+
put "Gray88" into tPropsArray["cBackDropColor"]
748+
put "Gray88" into tPropsArray["cBackdrop"]
748749
put "false" into tPropsArray["cREVMsgShowUIFrontScripts"]
749750
put "false" into tPropsArray["revstack"]
750751
put "100" into tPropsArray["cMacOSProgressScrollbarWidth"]
@@ -802,7 +803,6 @@ command revInternal__ResetPreferences
802803
put "selectedObject" into tPropsArray["cREVMsgIntelligenceObject"]
803804
put "false" into tPropsArray["cSEHideErrors"]
804805
put "56" into tPropsArray["cFieldHeight"]
805-
put "none" into tPropsArray["cBackDrop"]
806806
put "300" into tPropsArray["cREVUnmaximizedScriptHeight"]
807807
put "13,125" into tPropsArray["cToolsTopLeft"]
808808
put "--" into tPropsArray["cCommentCharacter"]
@@ -1666,9 +1666,9 @@ command revInternal__InitialiseFinalSteps
16661666
revInternal__Log "Message", "Setting up verbose debugging"
16671667
send "revVerboseDebug" && the cVerboseDebug of stack "revPreferences" to stack "revFrontScriptLibrary"
16681668

1669-
if the cBackDrop of stack "revPreferences" is not "none" and the cBackDrop of stack "revPreferences" is not empty then
1669+
if the cBackDrop of stack "revPreferences" is not "none" then
16701670
revInternal__Log "Message", "Setting up backdrop"
1671-
set the backdrop to the cBackDrop of stack "revPreferences"
1671+
set the backdrop to the cBackDropColor of stack "revPreferences"
16721672
end if
16731673

16741674
revInternal__Log "Message", "Closing Splash"

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3389,7 +3389,11 @@ on revIDECreateObject pObjectTypeID, pTarget, pLoc
33893389
if sClassicObjectProperties is empty then __objectPropertiesRead
33903390
# Set the default stack to the target we're creating the object on
33913391
set the defaultstack to revIDEStackOfObject(pTarget)
3392-
3392+
3393+
if pLoc is empty then
3394+
put the loc of this card of the defaultStack into pLoc
3395+
end if
3396+
33933397
# Create the object
33943398
lock screen
33953399
lock messages
@@ -8716,9 +8720,6 @@ on revIDEToggle pProperty
87168720
break
87178721
case "Backdrop"
87188722
if the backDrop is "none" then
8719-
if revIDEGetPreference("cBackDropColor") is empty then
8720-
revIDESetPreference "cBackDropColor", "black"
8721-
end if
87228723
set the backDrop to revIDEGetPreference("cBackDropColor")
87238724
revIDESetPreference "cBackDrop", the backDrop
87248725
else

Toolset/palettes/script editor/behaviors/revsehandlerlistbehavior.livecodescript

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ function handlerTypeSortCallback pItem
129129
end switch
130130
end handlerTypeSortCallback
131131

132+
constant kDefaultHandlerTextColor = "#777777"
132133

133134
# Description
134135
# Called when the group might need to be updated. Updates the handler list. Also resizes the group.
@@ -139,7 +140,9 @@ command update
139140
put the result into tHandlers
140141

141142
local tDefaultHandlers, tIndex
142-
put revSEDefaultHandlers() into tDefaultHandlers
143+
if sePrefGet("editor,showDefaultHandlers") then
144+
put revSEDefaultHandlers() into tDefaultHandlers
145+
end if
143146
set the wholematches to false
144147

145148
local tCanAdd
@@ -170,7 +173,7 @@ command update
170173
end if
171174

172175
if tHandlers is not empty then
173-
put return &return after tHandlers
176+
put return & return & return after tHandlers
174177
end if
175178
put tCanAdd after tHandlers
176179

@@ -183,13 +186,15 @@ command update
183186

184187
if the number of words in tHandler is 1 then
185188
put false into tHandlerExists
189+
-- Existing handler names have a space after the icon
190+
put " " before tParseHandler
186191
end if
187192

188193
put "<p>" after tText
189194

190195
local tIsPrivate
191196
put false into tIsPrivate
192-
if char 1 of tParseHandler is "P" then
197+
if tHandlerExists and char 1 of tParseHandler is "P" then
193198
put true into tIsPrivate
194199
delete char 1 of tParseHandler
195200
end if
@@ -207,6 +212,11 @@ command update
207212
put merge("<sup shift=2><img src=[[tICon]]></img></sup>") after tText
208213
end if
209214

215+
if not tHandlerExists then
216+
put merge("<font color='[[kDefaultHandlerTextColor]]'>[[tParseHandler]]</font>") \
217+
into tParseHandler
218+
end if
219+
210220
put tParseHandler & "</p>" after tText
211221
end repeat
212222

@@ -274,28 +284,30 @@ command jumpToHandler pHandler, pAdded
274284
hideGroup
275285
end jumpToHandler
276286

277-
command closeAccept
278-
lock screen
279-
local tHandler
280-
put line (the hilitedLine of field "Handlers" of me) of the cHandlers of field "Handlers" of me into tHandler
281-
287+
command handlerPicked pHandler
282288
local tAdded
283289
put false into tAdded
284-
if the number of words in tHandler is 1 then
290+
if the number of words in pHandler is 1 then
285291
put true into tAdded
286292
-- Adding a default handler
287-
revSEAddDefaultHandler tHandler
293+
revSEAddDefaultHandler pHandler
288294
update
289295
set the wholematches to false
290296
local tLine
291-
put lineOffset(tHandler, the cHandlers of field "Handlers" of me) into tLine
297+
put lineOffset(pHandler, the cHandlers of field "Handlers" of me) into tLine
292298
select line tLine of field "Handlers" of me
293-
put line tLine of the cHandlers of field "Handlers" of me into tHandler
299+
put line tLine of the cHandlers of field "Handlers" of me into pHandler
294300
end if
295301

296302
-- Select the (now) extant handler
297-
jumpToHandler tHandler, tAdded
298-
303+
jumpToHandler pHandler, tAdded
304+
end handlerPicked
305+
306+
command closeAccept
307+
lock screen
308+
local tHandler
309+
put line (the hilitedLine of field "Handlers" of me) of the cHandlers of field "Handlers" of me into tHandler
310+
handlerPicked tHandler
299311
unlock screen
300312
end closeAccept
301313

Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,18 +275,41 @@ private command buildHandlerMenu pContext
275275

276276
local tFormattedHandlers
277277
repeat for each line tHandler in tHandlers
278-
put word 2 of tHandler & return after tFormattedHandlers
278+
put tab & word 2 of tHandler & return after tFormattedHandlers
279279
end repeat
280280
delete the last char of tFormattedHandlers
281281

282-
if the number of lines of tHandlers = 0 then
283-
put "(No Handlers" into tFormattedHandlers
284-
set the cHandlers of me to empty
282+
local tDefaultHandlers
283+
put revSEDefaultHandlers() into tDefaultHandlers
284+
285+
local tFormattedDefaultHandlers
286+
repeat for each line tHandler in tDefaultHandlers
287+
put tab & tHandler & return after tFormattedDefaultHandlers
288+
end repeat
289+
delete the last char of tFormattedDefaultHandlers
290+
291+
local tShowDefaultHandlers
292+
dispatch function "sePrefGet" to me with "editor,showDefaultHandlers"
293+
put the result into tShowDefaultHandlers
294+
295+
local tMenu
296+
if tHandlers is not empty then
297+
put enableMenuItem("Go to handler...", true) into tMenu
298+
put return & tFormattedHandlers after tMenu
285299
else
286-
set the cHandlers of me to tHandlers
300+
put enableMenuItem("Go to handler...", false) into tMenu
287301
end if
302+
if tDefaultHandlers is not empty then
303+
put return & enableMenuItem("Add default handler...", true) after tMenu
304+
put return & tFormattedDefaultHandlers after tMenu
305+
else
306+
put return & enableMenuItem("Add default handler...", false) after tMenu
307+
end if
308+
put return & toggleMenuItem("Show default handlers", tShowDefaultHandlers) after tMenu
309+
310+
set the cHandlers of me to tHandlers
288311

289-
set the text of button "Handler" of me to modifyMenu("Handler", tFormattedHandlers)
312+
set the text of button "Handler" of me to modifyMenu("Handler", tMenu)
290313
end buildHandlerMenu
291314

292315
on menuPick pItemName
@@ -321,15 +344,31 @@ private command handleHandlerMenuPick pItemName
321344
exit handleHandlerMenuPick
322345
end if
323346

324-
local tLineNumber
325-
put the menuHistory of button "Handler" of me into tLineNumber
326-
327-
local tHandler
328-
put line tLineNumber of the cHandlers of me into tHandler
347+
set the itemdelimiter to "|"
348+
switch item 1 of pItemName
349+
case "Go to handler..."
350+
local tPick, tHandlerInfo
351+
put item 2 of pItemName into tPick
352+
if not matchText(the cHandlers of me, "(.* " & tPick & " .*)", \
353+
tHandlerInfo) then
354+
exit handleHandlerMenuPick
355+
end if
356+
357+
dispatch "handlerPicked" to group "Left Handler List" \
358+
with tHandlerInfo
359+
break
360+
case "Add default handler..."
361+
dispatch "handlerPicked" to group "Left Handler List" \
362+
with item 2 of pItemName
363+
break
364+
case "Show default handlers"
365+
local tShowDefaultHandlers
366+
dispatch function "sePrefGet" to me with "editor,showDefaultHandlers"
367+
put the result into tShowDefaultHandlers
368+
dispatch "sePrefSet" to me with "editor,showDefaultHandlers", not tShowDefaultHandlers
369+
break
370+
end switch
329371

330-
local tScriptLineNumber
331-
put word 3 of tHandler into tScriptLineNumber
332-
send "goLine tScriptLineNumber, true" to group "Editor"
333372
seUpdateLeftBar
334373
seUpdateToolbar
335374
end handleHandlerMenuPick
@@ -511,6 +550,20 @@ end handleHelpMenuPick
511550

512551
#########
513552

553+
private function toggleMenuItem pItem, pHilited
554+
if pHilited then
555+
return "!c" & pItem
556+
end if
557+
return "!n" & pItem
558+
end toggleMenuItem
559+
560+
private function enableMenuItem pItem, pEnabled
561+
if pEnabled then
562+
return pItem
563+
end if
564+
return "(" & pItem
565+
end enableMenuItem
566+
514567
private function modifyMenu pMenuName, pMenu
515568
if the last char of pMenu is not return then
516569
put return after pMenu

Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,17 @@ end seGetObjectState
797797
# Stores the specified state for the object for later use. And updates any
798798
# script editor components that may depend on this information.
799799
command seSetObjectState pObject, pState
800+
if pState is "edited" then
801+
local tObj
802+
put the long id of pObject into tObj
803+
if not revIDEObjectIsOnIDEStack(tObj) then
804+
local tParams
805+
put the text of field "Script" into tParams[1]
806+
put tObj into tParams[2]
807+
send "ideMessageSendWithParameters" && "ideScriptEdited, tObj, tParams" to stack "revIDELibrary" in 0 milliseconds
808+
end if
809+
end if
810+
800811
# Small optimization, if pState is equal to the current state, don't do anything
801812
if pState is sObjectStates[seGetRuggedId(pObject)] then
802813
exit seSetObjectState
@@ -2940,6 +2951,10 @@ on revSEIndentScript
29402951
dispatch "scriptFormat" to field "Script" of me with "script"
29412952
end revSEIndentScript
29422953

2954+
on revSEApply pIgnoreErrors
2955+
actionCompile pIgnoreErrors
2956+
end revSEApply
2957+
29432958
private command appendToList @xList, pValue
29442959
if xList is not empty then
29452960
put return & pValue after xList

Toolset/palettes/script editor/behaviors/revseutilities.livecodescript

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,8 @@ command sePrefGetDefaults
659659

660660
put 7 into tPrefs["print,textSize"]
661661

662+
put true into tPrefs["editor,showDefaultHandlers"]
663+
662664
return tPrefs
663665
end sePrefGetDefaults
664666

9.77 KB
Binary file not shown.

0 commit comments

Comments
 (0)