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

Commit f41a256

Browse files
author
Monte Goulding
authored
Merge pull request #1946 from livecode/merge-release-9.0.0-22.03.2018
Merge release-9.0.0 22.03.2018
2 parents 146c12b + f5950ed commit f41a256

File tree

10 files changed

+30
-77
lines changed

10 files changed

+30
-77
lines changed

Toolset/libraries/revidedeveloperextensionlibrary.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ on __revIDEDeveloperExtensionDoCreateTestStack pPath, tRectsA, pDetailsA
383383
create stack "LiveCode Extension Test Window"
384384
if tRectsA["rect"] is not empty then
385385
set the rect of stack "LiveCode Extension Test Window" to tRectsA["rect"]
386-
else
386+
else if tRectsA["loc"] is not empty then
387387
set the loc of stack "LiveCode Extension Test Window" to tRectsA["loc"]
388388
end if
389389
set the destroyStack of stack "LiveCode Extension Test Window" to true

Toolset/libraries/revideextensionlibrary.livecodescript

Lines changed: 15 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -362,59 +362,27 @@ private command __extensionDownloadVerify pCacheIndex
362362
set the itemdel to "."
363363
if the last item of tExtensionPath is not "lce" then return __extensionError(pCacheIndex,"Could not install extension. The package extension '"&the last item of tExtensionPath&"' Is not valid. Must be 'lce'.")
364364

365-
# Get initial manifest data needed for loading
366-
local tManifestData, tManifestXMLTree
367-
put __extensionManifestData(pCacheIndex) into tManifestData
368-
put revXMLCreateTree(tManifestData,true,true,false) into tManifestXMLTree
369-
370-
# Check the manifest contains a name
371-
local tExtensionName
372-
put __extensionManifestValueFromTree(tManifestXMLTree, "name") into tExtensionName
365+
# Ensure the zip contains the things we expect
366+
local tManifestDataA
367+
extensionValidateLCEPackage tExtensionPath, tManifestDataA
373368
if the result is not empty then
374-
return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a valid name (com.livecode.extensions.<developer_ID>.<extension_name>)")
375-
end if
376-
__extensionPropertySet pCacheIndex, "name", tExtensionName
377-
378-
# Check the manifest contains a version
379-
local tExtensionVersion
380-
put __extensionManifestValueFromTree(tManifestXMLTree, "version") into tExtensionVersion
381-
if the result is not empty then
382-
return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a valid version number (1.2.3 - major,minor,maintenance)")
383-
end if
384-
__extensionPropertySet pCacheIndex, "version", tExtensionVersion
385-
386-
# Check the manifest contains an author
387-
local tExtensionAuthor
388-
put __extensionManifestValueFromTree(tManifestXMLTree, "author") into tExtensionAuthor
389-
if the result is not empty then
390-
return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain an author")
391-
end if
392-
__extensionPropertySet pCacheIndex, "author", tExtensionAuthor
393-
394-
# Check the manifest contains an type
395-
local tExtensionType
396-
put __extensionManifestValueFromTree(tManifestXMLTree, "type") into tExtensionType
397-
if the result is not empty then
398-
return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a type")
399-
end if
400-
__extensionPropertySet pCacheIndex, "type", tExtensionType
401-
402-
# Check the manifest contains an title
403-
local tExtensionTitle
404-
put __extensionManifestValueFromTree(tManifestXMLTree, "title") into tExtensionTitle
405-
if the result is not empty then
406-
return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a title")
369+
return the result
407370
end if
408-
__extensionPropertySet pCacheIndex, "title", tExtensionTitle
409371

410-
revXMLDeleteTree tManifestXMLTree
372+
repeat for each key tKey in tManifestDataA
373+
__extensionPropertySet pCacheIndex, tKey, tManifestDataA[tKey]
374+
end repeat
411375

412376
# Build the type ID from the name and version
413-
__extensionPropertySet pCacheIndex, "type_id", tExtensionName & "." & tExtensionVersion
377+
__extensionPropertySet pCacheIndex, "type_id", \
378+
tManifestDataA["name"] & "." & tManifestDataA["version"]
414379
end __extensionDownloadVerify
415380

416381
private command __extensionInstall pCacheIndex, pPackage, pFromStore
417382
__extensionDownloadVerify pCacheIndex
383+
if the result is not empty then
384+
throw "Error installing extension" && pPackage & return & the result
385+
end if
418386

419387
local tName, tTypeId, tInstallPath
420388
put __extensionPropertyGet(pCacheIndex, "name") into tName
@@ -497,6 +465,9 @@ end __extensionInstallCopyInterfaceFile
497465
private command __extensionInstallLoad pCacheIndex, pName, pInstallFolder, pProgress
498466
local tFolderData
499467
extensionFindInFolder pInstallFolder, true, false, tFolderData
468+
if tFolderData is empty then
469+
throw "extension missing from" && pInstallFolder
470+
end if
500471

501472
local tDataA
502473
put tFolderData[pName][pInstallFolder] into tDataA["copies"][1]
@@ -1346,34 +1317,6 @@ private function __extensionManifestValueFromTree pTreeID, pProperty
13461317
return tValue for value
13471318
end __extensionManifestValueFromTree
13481319

1349-
private function __extensionManifestData pCacheIndex
1350-
# Get the path to the package file
1351-
local tExtensionPackageFile
1352-
put __extensionPropertyGet(pCacheIndex, "download_package_path") into tExtensionPackageFile
1353-
1354-
if not there is a file tExtensionPackageFile then return __extensionError(pCacheIndex,"Could not extract manifest because package was not found in downloads folder")
1355-
1356-
# A zip can come compressed with a base folder or without. So work out what the
1357-
# root folder is before trying to extract files
1358-
revZipOpenArchive tExtensionPackageFile, "read"
1359-
1360-
local tZipItems, tZipRoot
1361-
put revZipEnumerateItems(tExtensionPackageFile) into tZipItems
1362-
1363-
if the last char of line 1 of tZipItems is "/" then
1364-
put line 1 of tZipItems into tZipRoot
1365-
else
1366-
put empty into tZipRoot
1367-
end if
1368-
1369-
# Extract the package manfiest to a variable to read key data
1370-
local tManifestData, tManifestXMLTree, tValue
1371-
revZipExtractItemToVariable tExtensionPackageFile, (tZipRoot & "manifest.xml"), "tManifestData"
1372-
1373-
revZipCloseArchive tExtensionPackageFile
1374-
return tManifestData
1375-
end __extensionManifestData
1376-
13771320
function __extensionSampleStacks pID, pFolder
13781321
local tSampleFolder, tSamples, tSampleArray
13791322

Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10791,7 +10791,7 @@ function DG2_CustomisableControlsGetDefaultEditModeReorderControl
1079110791
if there is not a group "DG2 Default Edit Mode Reorder Control"of _TemplateControl() then
1079210792
local tMsgsAreLocked
1079310793
put the lockMessages into tMsgsAreLocked
10794-
lock messages
10794+
unlock messages
1079510795

1079610796
reset the templateGroup
1079710797
create invisible group "DG2 Default Edit Mode Reorder Control" in _TemplateControl()
@@ -10812,7 +10812,7 @@ function DG2_CustomisableControlsGetDefaultEditModeActionSelectControl
1081210812
if there is not a group "DG2 Default Edit Mode Action Select Control" of _TemplateControl() then
1081310813
local tMsgsAreLocked
1081410814
put the lockMessages into tMsgsAreLocked
10815-
lock messages
10815+
unlock messages
1081610816

1081710817
reset the templateGroup
1081810818
create invisible group "DG2 Default Edit Mode Action Select Control" in _TemplateControl()
@@ -10836,7 +10836,7 @@ function DG2_CustomisableControlsGetDefaultEditModeActionControl
1083610836

1083710837
local tMsgsAreLocked
1083810838
put the lockMessages into tMsgsAreLocked
10839-
lock messages
10839+
unlock messages
1084010840

1084110841
reset the templateGroup
1084210842
create invisible group "DG2 Default Action Control" in _TemplateControl()
@@ -10866,7 +10866,7 @@ private function DG2_CustomisableControlsGetDefaultSwipeControl pName
1086610866

1086710867
local tMsgsAreLocked
1086810868
put the lockMessages into tMsgsAreLocked
10869-
lock messages
10869+
unlock messages
1087010870

1087110871
local tGroup
1087210872
reset the templateGroup

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ private on nodeCreateVisualizationObject pPathToNode
318318
revMetadataSet the name of stack tStack, "general", "visualizer", true
319319

320320
-- generate variable visualizer UI
321+
local tOldDefaultStack
322+
put the defaultStack into tOldDefaultStack
321323
set the defaultStack to the short name of tStack
322324
reset the templateButton
323325
set the height of the templateButton to 23
@@ -340,6 +342,7 @@ private on nodeCreateVisualizationObject pPathToNode
340342
reset the templateButton
341343
reset the templateField
342344
set the lockMessages to tOldLock
345+
set the defaultStack to tOldDefaultStack
343346

344347
return tStack
345348
end nodeCreateVisualizationObject

Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ on initialize
2828
set the enabled of group "iOS Settings" to false
2929
end if
3030

31+
relayer button "iOSTabMenu" after group "cards"
32+
3133
updateIosSettingState
3234

3335
local tTipLastShown, tShowTip

notes/bugfix-21032.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Layer tab button on iOS standalone settings below other controls

notes/bugfix-21065.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Set loc of extension builder generated test stack correctly on first test

notes/bugfix-21082.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Notify when attempting to install package that doesn't validate

notes/bugfix-21090.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure project browser updates when DG2 controls are added to the template stack

notes/bugfix-21100.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure the defaultStack does not change after opening revVariableVisualizer stack

0 commit comments

Comments
 (0)