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

Commit 06edb2d

Browse files
Merge pull request #1977 from livecode/merge-develop-9.0-22.05.2018
Merge develop 9.0 22.05.2018
2 parents a58d2f9 + 51cf182 commit 06edb2d

23 files changed

+386
-307
lines changed

Documentation/guides/LiveCode Data Grid.md

Lines changed: 273 additions & 273 deletions
Large diffs are not rendered by default.

Toolset/libraries/revcommonlibrary.livecodescript

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ end revGoPDF
5555
# should be ussed by people sending unicode characters, the original revMail can be used otherwise
5656
command revMail pTo, pCC, pSubject, pBody
5757
if the environment is "mobile" then
58-
pass revMail
58+
mobileComposeMail pSubject, pTo, pCC, , pBody
59+
else
60+
revMailUnicode pTo, pCC, uniEncode(pSubject), uniEncode(pBody)
5961
end if
60-
revMailUnicode pTo, pCC, uniEncode(pSubject), uniEncode(pBody)
6162
end revMail
6263

6364
command revMailUnicode pTo, pCC, pSubject, pBody

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,15 @@ function revIDEStacksInUse
22492249
return tData
22502250
end revIDEStacksInUse
22512251

2252+
function revIDEStackIsIDEWindow pStackName
2253+
if pStackName begins with revIDEScriptEditorPrefix() or pStackName is "revDictionary" \
2254+
or pStackName is "revResourceCenter" or pStackName is "revOnline" then
2255+
return true
2256+
end if
2257+
2258+
return false
2259+
end revIDEStackIsIDEWindow
2260+
22522261
function revIDEAPIFilters
22532262
end revIDEAPIFilters
22542263

@@ -4927,11 +4936,21 @@ on revIDEGoToDictionaryEntry pLibrary, pTag, pType
49274936
revIDEMessageSend "ideOpenPalette", "dictionary"
49284937
end revIDEGoToDictionaryEntry
49294938

4930-
on revIDEGoToWidgetAPI pKind
4939+
command revIDEGoToExtensionAPI pKind
4940+
local tType
4941+
put revIDEExtensionProperty(pKind, "type") into tType
4942+
__GoToExtensionAPI pKind, tType
4943+
end revIDEGoToExtensionAPI
4944+
4945+
private command __GoToExtensionAPI pKind, pType
49314946
local tName, tLibrary
49324947
put revIDEExtensionProperty(pKind, "title") into tName
49334948
put tolower(pKind) into tLibrary
4934-
revIDEGoToDictionaryEntry tLibrary, tName, "widget"
4949+
revIDEGoToDictionaryEntry tLibrary, tName, pType
4950+
end __GoToExtensionAPI
4951+
4952+
command revIDEGoToWidgetAPI pKind
4953+
__GoToExtensionAPI pKind, "widget"
49354954
end revIDEGoToWidgetAPI
49364955

49374956
on revIDEGoToObjectAPI pObjectID
@@ -9816,7 +9835,7 @@ User stacks, script editors, the dictionary and resource center are considered w
98169835
from the point of view of the menubar
98179836
*/
98189837
function revIDEStackIsWindow pStackName
9819-
if pStackName begins with revIDEScriptEditorPrefix() or pStackName is "revDictionary" or pStackName is "revResourceCenter" then
9838+
if revIDEStackIsIDEWindow(pStackName) then
98209839
return true
98219840
end if
98229841

@@ -11514,7 +11533,11 @@ command ideExecuteScript pScript, pObject, pDebugMode, @rValidScript
1151411533
end if
1151511534

1151611535
if tValidScript is empty then
11517-
return tOriginalCompileError for error
11536+
if tOriginalCompileError is not empty then
11537+
return tOriginalCompileError for error
11538+
else
11539+
put pScript into tValidScript
11540+
end if
1151811541
end if
1151911542
unlock screen
1152011543

Toolset/palettes/dictionary/behaviors/revdictionarybehavior.livecodescript

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ end showUpgradeOptions
9393

9494
# bug 17819 enable cmd+c in dictionary
9595
on commandKeyDown pWhich
96-
if pWhich is not "C" then
97-
if pWhich is "W" then
96+
switch pWhich
97+
case "A"
98+
-- trap Cmd + A for select all
99+
case "C"
100+
-- trap Cmd + C for copy
101+
break
102+
case "W"
98103
close me
99-
else
104+
break
105+
default
100106
pass commandKeyDown
101-
end if
102-
end if
107+
end switch
103108
end commandKeyDown

Toolset/palettes/extension manager/revideextensionmanagerrowbehavior.livecodescript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ private function __MenuActionsForRow pDataA
133133
put tLoadOnStartup after tActions
134134
end if
135135

136+
put "Show Documentation" & return after tActions
137+
136138
local tSampleList
137139
if pDataA["samples"] is not empty then
138140
put "Sample Stacks" & return after tActions
@@ -281,6 +283,9 @@ on menuPick pAction
281283
put the cSampleStacks of me into tSampleStacks
282284
launchExtensionSampleStack tSampleStacks[tSample]
283285
break
286+
case "Show Documentation"
287+
revIDEGoToExtensionAPI tKind
288+
break
284289
end switch
285290
end menuPick
286291

Toolset/palettes/menubar/revmenubar.livecodescript

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private on setupWindowMenu
173173
repeat for each line tStack in tWindows
174174
if there is not a stack tStack then next repeat
175175
put the short name of tStack into tStackName
176-
if tStackName begins with "revNewScriptEditor" or tStackName is "revDictionary" or tStackName is "revResourceCenter" then
176+
if revIDEStackIsIDEWindow(tStackName) then
177177
put the title of tStack into tStackName
178178
end if
179179

@@ -1019,7 +1019,11 @@ on mouseUp
10191019
revIDETutorialSkipToNextSkipPoint
10201020
end if
10211021
else if the short name of the owner of the target is "upgrade" then
1022+
local tStartCenterClassic
1023+
put revIDEGetPreference("StartCenterClassic") into tStartCenterClassic
1024+
revIDESetPreference "StartCenterClassic", true
10221025
ideShowUpgradeOptions
1026+
revIDESetPreference "StartCenterClassic", tStartCenterClassic
10231027
else if the short name of the owner of the target is "toolbar" and the target begins with "button" then
10241028
revMenubarMenuButtonClicked the short name of the target
10251029
setButtonReleased the long id of the target
@@ -1382,7 +1386,7 @@ private function revMenubarFileMenu pContext
13821386
put "(Open Recent File" & return after tFile
13831387
end if
13841388

1385-
put enableMenuItem("&Close/W", the mode of the topStack <= 3) & return after tFile
1389+
put enableMenuItem("&Close/W", the mode of the topStack <= 3 and the short name of the topstack is not "revMenubar") & return after tFile
13861390
put enableMenuItem("Close and Remove From Memor&y", tCanSaveStack) & return after tFile
13871391
put "-" & return after tFile
13881392

@@ -2439,7 +2443,7 @@ function revListMenuHandlers pObject, pSort, pIndentationLevel
24392443
end revListMenuHandlers
24402444

24412445
on unIconifyStack
2442-
global gREVBackDropRestore
2446+
global gREVBackDropRestore, gREVRestore
24432447
set cursor to watch
24442448
lock messages
24452449
set the iconic of stack "revMenubar" to false
7 Bytes
Binary file not shown.

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

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ end textReplaceNewGroupNeeded
846846
# This is the point through which all standard editing operations on scripts are sent through.
847847
# Any change made via this function will be added to the undo system. This is called when the
848848
# user types keys, formats text, cuts, pastes etc.
849-
command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
849+
command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup, pDontSelect
850850
lock screen
851851

852852
local tObject
@@ -943,27 +943,33 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
943943
end repeat
944944
put true into sPlaceholders[sEditPlaceholder]["edited"]
945945

946-
if tSelection is not empty then
947-
select tSelection
948-
else if pNewText is empty then
949-
select char pOffset to pOffset-1 of field "script" of me
950-
else if the length of pNewText is 1 then
951-
select char pOffset+1 to pOffset of field "script" of me
952-
else if tBracketCompletionType is "pair" then
953-
select after char pOffset of field "script" of me
946+
if not pDontSelect then
947+
if tSelection is not empty then
948+
select tSelection
949+
else if pNewText is empty then
950+
select char pOffset to pOffset-1 of field "script" of me
951+
else if the length of pNewText is 1 then
952+
select char pOffset+1 to pOffset of field "script" of me
953+
else if tBracketCompletionType is "pair" then
954+
select after char pOffset of field "script" of me
955+
end if
954956
end if
955957
else
956958
-- clear highlighted bracket background color
957959
__ClearHighlights
958960
textReplaceRaw pOffset, pOldText, pNewText
959-
if tSelection is not empty then
960-
select tSelection
961-
else if tBracketCompletionType is "pair" then
962-
select after char pOffset of field "script" of me
961+
if not pDontSelect then
962+
if tSelection is not empty then
963+
select tSelection
964+
else if tBracketCompletionType is "pair" then
965+
select after char pOffset of field "script" of me
966+
end if
963967
end if
964968
end if
965969

966-
selectionUpdateRequest
970+
if not pDontSelect then
971+
selectionUpdateRequest
972+
end if
967973

968974
-- when formatting or pasting we don't want autocomplete to pop up
969975
if the number of lines of pNewText <= 1 then
@@ -3455,6 +3461,10 @@ end __UpdateAutoCompleteList
34553461

34563462
private command __ClearCurrentPlaceholder pForce
34573463
if not pForce then
3464+
if the selectedField is empty or \
3465+
the long id of the selectedField is not the long id of field "script" of me then
3466+
exit __ClearCurrentPlaceholder
3467+
end if
34583468
local tChunk
34593469
put the selectedChunk into tChunk
34603470
if exists(tChunk) then

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2203,7 +2203,7 @@ command replaceOnce pString
22032203
put tFrom into tAt
22042204

22052205
textBeginGroup "Replace"
2206-
textReplace tAt, char tFrom to tTo of textGetScript(), pString
2206+
textReplace tAt, char tFrom to tTo of textGetScript(), pString, , , true
22072207

22082208
# OK-2009-02-16 : Bug 7712 - Return information about the replaced text so that in a the context of replaceOnceAndFind, we can ensure
22092209
# that the replaced text does not get searched.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ command update
7777
put getReplaceLabel() into tReplaceLabel
7878

7979
local tReplaceText
80-
put getReplaceLabel() into tReplaceLabel
80+
put historyGet("replace") into tReplaceText
8181
if tReplaceLabel is not empty and tReplaceLabel is not among the lines of tReplaceText then
8282
put tReplaceLabel & return & tReplaceText into tReplaceText
8383
end if
@@ -119,7 +119,6 @@ command updateButtonStates
119119
enable button "Find all" of me
120120
enable button "Replace all" of me
121121
enable button "Replace" of me
122-
select item 1 of button "replace"
123122
else
124123
enable button "Find all" of me
125124

@@ -130,7 +129,6 @@ command updateButtonStates
130129
disable button "Find Next" of me
131130
disable button "Replace one" of me
132131
disable button "Replace" of me
133-
set the label of button "replace" of me to empty
134132
end if
135133
end updateButtonStates
136134

0 commit comments

Comments
 (0)