From 89ab7ad54fd7226e39762b69adb5cd3c766068ae Mon Sep 17 00:00:00 2001 From: Monte Goulding Date: Tue, 13 Mar 2018 10:11:34 +1100 Subject: [PATCH 1/6] [[ Bug 21032 ]] Relayer iOS settings tab button below controls --- .../revstandalonesettingsiosbehavior.livecodescript | 2 ++ notes/bugfix-21032.md | 1 + 2 files changed, 3 insertions(+) create mode 100644 notes/bugfix-21032.md diff --git a/Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript b/Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript index 93f9cbec50..eec6a74a23 100644 --- a/Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript +++ b/Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript @@ -28,6 +28,8 @@ on initialize set the enabled of group "iOS Settings" to false end if + relayer button "iOSTabMenu" after group "cards" + updateIosSettingState local tTipLastShown, tShowTip diff --git a/notes/bugfix-21032.md b/notes/bugfix-21032.md new file mode 100644 index 0000000000..9114fa8c5a --- /dev/null +++ b/notes/bugfix-21032.md @@ -0,0 +1 @@ +# Layer tab button on iOS standalone settings below other controls From f1529e5d6c4ce040d3afd04add46ad9445dcca9a Mon Sep 17 00:00:00 2001 From: Ali Lloyd Date: Fri, 16 Mar 2018 16:42:33 +0000 Subject: [PATCH 2/6] [[ Bug 21082 ]] Ensure errors are thrown when failiing to validate extension package --- .../revideextensionlibrary.livecodescript | 87 ++++--------------- notes/bugfix-21082.md | 1 + 2 files changed, 16 insertions(+), 72 deletions(-) create mode 100644 notes/bugfix-21082.md diff --git a/Toolset/libraries/revideextensionlibrary.livecodescript b/Toolset/libraries/revideextensionlibrary.livecodescript index e30082c282..4cf5d14f9b 100644 --- a/Toolset/libraries/revideextensionlibrary.livecodescript +++ b/Toolset/libraries/revideextensionlibrary.livecodescript @@ -362,59 +362,27 @@ private command __extensionDownloadVerify pCacheIndex set the itemdel to "." 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'.") - # Get initial manifest data needed for loading - local tManifestData, tManifestXMLTree - put __extensionManifestData(pCacheIndex) into tManifestData - put revXMLCreateTree(tManifestData,true,true,false) into tManifestXMLTree - - # Check the manifest contains a name - local tExtensionName - put __extensionManifestValueFromTree(tManifestXMLTree, "name") into tExtensionName + # Ensure the zip contains the things we expect + local tManifestDataA + extensionValidateLCEPackage tExtensionPath, tManifestDataA if the result is not empty then - return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a valid name (com.livecode.extensions..)") - end if - __extensionPropertySet pCacheIndex, "name", tExtensionName - - # Check the manifest contains a version - local tExtensionVersion - put __extensionManifestValueFromTree(tManifestXMLTree, "version") into tExtensionVersion - if the result is not empty then - return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a valid version number (1.2.3 - major,minor,maintenance)") - end if - __extensionPropertySet pCacheIndex, "version", tExtensionVersion - - # Check the manifest contains an author - local tExtensionAuthor - put __extensionManifestValueFromTree(tManifestXMLTree, "author") into tExtensionAuthor - if the result is not empty then - return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain an author") - end if - __extensionPropertySet pCacheIndex, "author", tExtensionAuthor - - # Check the manifest contains an type - local tExtensionType - put __extensionManifestValueFromTree(tManifestXMLTree, "type") into tExtensionType - if the result is not empty then - return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a type") - end if - __extensionPropertySet pCacheIndex, "type", tExtensionType - - # Check the manifest contains an title - local tExtensionTitle - put __extensionManifestValueFromTree(tManifestXMLTree, "title") into tExtensionTitle - if the result is not empty then - return __extensionError(pCacheIndex,"Could not install extension. The package manifest must contain a title") + return the result end if - __extensionPropertySet pCacheIndex, "title", tExtensionTitle - revXMLDeleteTree tManifestXMLTree + repeat for each key tKey in tManifestDataA + __extensionPropertySet pCacheIndex, tKey, tManifestDataA[tKey] + end repeat # Build the type ID from the name and version - __extensionPropertySet pCacheIndex, "type_id", tExtensionName & "." & tExtensionVersion + __extensionPropertySet pCacheIndex, "type_id", \ + tManifestDataA["name"] & "." & tManifestDataA["version"] end __extensionDownloadVerify private command __extensionInstall pCacheIndex, pPackage, pFromStore __extensionDownloadVerify pCacheIndex + if the result is not empty then + throw "Error installing extension" && pPackage & return & the result + end if local tName, tTypeId, tInstallPath put __extensionPropertyGet(pCacheIndex, "name") into tName @@ -497,6 +465,9 @@ end __extensionInstallCopyInterfaceFile private command __extensionInstallLoad pCacheIndex, pName, pInstallFolder, pProgress local tFolderData extensionFindInFolder pInstallFolder, true, false, tFolderData + if tFolderData is empty then + throw "extension missing from" && pInstallFolder + end if local tDataA put tFolderData[pName][pInstallFolder] into tDataA["copies"][1] @@ -1346,34 +1317,6 @@ private function __extensionManifestValueFromTree pTreeID, pProperty return tValue for value end __extensionManifestValueFromTree -private function __extensionManifestData pCacheIndex - # Get the path to the package file - local tExtensionPackageFile - put __extensionPropertyGet(pCacheIndex, "download_package_path") into tExtensionPackageFile - - if not there is a file tExtensionPackageFile then return __extensionError(pCacheIndex,"Could not extract manifest because package was not found in downloads folder") - - # A zip can come compressed with a base folder or without. So work out what the - # root folder is before trying to extract files - revZipOpenArchive tExtensionPackageFile, "read" - - local tZipItems, tZipRoot - put revZipEnumerateItems(tExtensionPackageFile) into tZipItems - - if the last char of line 1 of tZipItems is "/" then - put line 1 of tZipItems into tZipRoot - else - put empty into tZipRoot - end if - - # Extract the package manfiest to a variable to read key data - local tManifestData, tManifestXMLTree, tValue - revZipExtractItemToVariable tExtensionPackageFile, (tZipRoot & "manifest.xml"), "tManifestData" - - revZipCloseArchive tExtensionPackageFile - return tManifestData -end __extensionManifestData - function __extensionSampleStacks pID, pFolder local tSampleFolder, tSamples, tSampleArray diff --git a/notes/bugfix-21082.md b/notes/bugfix-21082.md new file mode 100644 index 0000000000..53ed1f32c7 --- /dev/null +++ b/notes/bugfix-21082.md @@ -0,0 +1 @@ +# Notify when attempting to install package that doesn't validate From 9c5bafb811e363f93cb1564abffb5eb7f50aed0f Mon Sep 17 00:00:00 2001 From: Monte Goulding Date: Wed, 21 Mar 2018 16:53:07 +1100 Subject: [PATCH 3/6] [[ Bug 21090 ]] Create DG2 template controls with msgs unlocked This patch ensures that the project browser will be updated when the IDE adds the additional controls to the datagrid template stack required for DG2 --- .../behaviorsdatagridbuttonbehavior.livecodescript | 8 ++++---- notes/bugfix-21090.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 notes/bugfix-21090.md diff --git a/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript b/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript index e60a710ca2..ecafbccbc1 100644 --- a/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript +++ b/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript @@ -10791,7 +10791,7 @@ function DG2_CustomisableControlsGetDefaultEditModeReorderControl if there is not a group "DG2 Default Edit Mode Reorder Control"of _TemplateControl() then local tMsgsAreLocked put the lockMessages into tMsgsAreLocked - lock messages + unlock messages reset the templateGroup create invisible group "DG2 Default Edit Mode Reorder Control" in _TemplateControl() @@ -10812,7 +10812,7 @@ function DG2_CustomisableControlsGetDefaultEditModeActionSelectControl if there is not a group "DG2 Default Edit Mode Action Select Control" of _TemplateControl() then local tMsgsAreLocked put the lockMessages into tMsgsAreLocked - lock messages + unlock messages reset the templateGroup create invisible group "DG2 Default Edit Mode Action Select Control" in _TemplateControl() @@ -10836,7 +10836,7 @@ function DG2_CustomisableControlsGetDefaultEditModeActionControl local tMsgsAreLocked put the lockMessages into tMsgsAreLocked - lock messages + unlock messages reset the templateGroup create invisible group "DG2 Default Action Control" in _TemplateControl() @@ -10866,7 +10866,7 @@ private function DG2_CustomisableControlsGetDefaultSwipeControl pName local tMsgsAreLocked put the lockMessages into tMsgsAreLocked - lock messages + unlock messages local tGroup reset the templateGroup diff --git a/notes/bugfix-21090.md b/notes/bugfix-21090.md new file mode 100644 index 0000000000..3f735c4892 --- /dev/null +++ b/notes/bugfix-21090.md @@ -0,0 +1 @@ +# Ensure project browser updates when DG2 controls are added to the template stack From 54ae5523f40a00da0d8bc098f21e5b84007f04ec Mon Sep 17 00:00:00 2001 From: Ali Lloyd Date: Wed, 14 Mar 2018 10:52:54 +0000 Subject: [PATCH 4/6] [[ Bug 21065 ]] Don't try to set loc of stack to empty --- .../libraries/revidedeveloperextensionlibrary.livecodescript | 2 +- notes/bugfix-21065.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 notes/bugfix-21065.md diff --git a/Toolset/libraries/revidedeveloperextensionlibrary.livecodescript b/Toolset/libraries/revidedeveloperextensionlibrary.livecodescript index c2aa1c6a4d..b2b7ad0c65 100644 --- a/Toolset/libraries/revidedeveloperextensionlibrary.livecodescript +++ b/Toolset/libraries/revidedeveloperextensionlibrary.livecodescript @@ -383,7 +383,7 @@ on __revIDEDeveloperExtensionDoCreateTestStack pPath, tRectsA, pDetailsA create stack "LiveCode Extension Test Window" if tRectsA["rect"] is not empty then set the rect of stack "LiveCode Extension Test Window" to tRectsA["rect"] - else + else if tRectsA["loc"] is not empty then set the loc of stack "LiveCode Extension Test Window" to tRectsA["loc"] end if set the destroyStack of stack "LiveCode Extension Test Window" to true diff --git a/notes/bugfix-21065.md b/notes/bugfix-21065.md new file mode 100644 index 0000000000..b3e66a3dcd --- /dev/null +++ b/notes/bugfix-21065.md @@ -0,0 +1 @@ +# Set loc of extension builder generated test stack correctly on first test From 387e03058119d8aa1c44b37cee571499b5097153 Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Wed, 21 Mar 2018 15:17:31 +0000 Subject: [PATCH 5/6] [Bug 21100] Ensure we restore the defaultstack when opening stack revVariableVisualizer --- .../behaviors/revsevariablespanebehavior.livecodescript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Toolset/palettes/script editor/behaviors/revsevariablespanebehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsevariablespanebehavior.livecodescript index aab416aaee..f7c9fcf8c0 100644 --- a/Toolset/palettes/script editor/behaviors/revsevariablespanebehavior.livecodescript +++ b/Toolset/palettes/script editor/behaviors/revsevariablespanebehavior.livecodescript @@ -318,6 +318,8 @@ private on nodeCreateVisualizationObject pPathToNode revMetadataSet the name of stack tStack, "general", "visualizer", true -- generate variable visualizer UI + local tOldDefaultStack + put the defaultStack into tOldDefaultStack set the defaultStack to the short name of tStack reset the templateButton set the height of the templateButton to 23 @@ -340,6 +342,7 @@ private on nodeCreateVisualizationObject pPathToNode reset the templateButton reset the templateField set the lockMessages to tOldLock + set the defaultStack to tOldDefaultStack return tStack end nodeCreateVisualizationObject From d5de9d891f0b0237313786956711aab58b6b0e1f Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Wed, 21 Mar 2018 15:19:41 +0000 Subject: [PATCH 6/6] [21100] Added bugfix note --- notes/bugfix-21100.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 notes/bugfix-21100.md diff --git a/notes/bugfix-21100.md b/notes/bugfix-21100.md new file mode 100644 index 0000000000..4b626d82ca --- /dev/null +++ b/notes/bugfix-21100.md @@ -0,0 +1 @@ +# Ensure the defaultStack does not change after opening revVariableVisualizer stack