Example ====== Delete Workspace X ====== ^ by: | Sebastian Beutel | ^ published: | June 2018 | ^ description: | deletes a designated workspace | {{tag>delete workspace handle}} ==== functions ==== * [[:macros:function:ActionScript.SetProperty.Boolean]] * [[:macros:function:Handles.SetSourceHandle]] * [[:macros:function:Handles.ConfirmDelete]] ==== affected properties ==== * [[:macros:property:Handles.AllowEditWorkspaces]] ===== Code ===== sb delete ws 2 ActionScript.SetProperty.Boolean("Handles.AllowEditWorkspaces", true) Handles.SetSourceHandle("Workspaces", 2) Handles.ConfirmDelete() ActionScript.SetProperty.Boolean("Handles.AllowEditWorkspaces", false) ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] * ''ActionScript.SetProperty.Boolean("Handles.AllowEditWorkspaces", true)'' unlocks the workspaces to be edited/deleted * ''Handles.SetSourceHandle("Workspaces", 2)'' marks the workspace #3 as sourHandle for the next operation * ''Handles.ConfirmDelete()'' deletes the previously selected handle (the workspace #3) * ''ActionScript.SetProperty.Boolean("Handles.AllowEditWorkspaces", false)'' locks the workspaces from being edited/deleted ===== How to use it ===== * [[:macros:deploying|make this macro available]] * while it may be interesting to delete a workspace by individual macro, a good use case is shown in [[macros:example:createworkspaces|]] ~~DISCUSSION~~