From 7c0528340d55a9d4acaca2e697d84e41af600b57 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 18 Jan 2019 08:57:08 +0000 Subject: [PATCH] Docs: Clarify use of "actionTiddler" variable --- .../tw5.com/tiddlers/variables/actionTiddler Variable.tid | 7 +++++-- editions/tw5.com/tiddlers/widgets/DraggableWidget.tid | 7 +++++-- editions/tw5.com/tiddlers/widgets/DroppableWidget.tid | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/editions/tw5.com/tiddlers/variables/actionTiddler Variable.tid b/editions/tw5.com/tiddlers/variables/actionTiddler Variable.tid index 1daddf6f6..53e26fa6c 100644 --- a/editions/tw5.com/tiddlers/variables/actionTiddler Variable.tid +++ b/editions/tw5.com/tiddlers/variables/actionTiddler Variable.tid @@ -1,7 +1,10 @@ created: 20170406083917224 -modified: 20170406084026289 +modified: 20190118084621046 tags: Variables [[Core Variables]] title: actionTiddler Variable type: text/vnd.tiddlywiki -Within the ''action'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains the title of the tiddler being dropped. +The variable `actionTiddler` is used in subtly different ways by different widgets: + +* Within the ''actions'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains the title of the tiddler being dropped. +* Within the ''startactions'' and ''endactions'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains a quoted [[Title List]] of all of the titles being dragged. diff --git a/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid b/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid index 5ae28567e..31cbcbdd1 100644 --- a/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid @@ -1,6 +1,6 @@ caption: draggable created: 20170406081938627 -modified: 20170406083157871 +modified: 20190118084621046 tags: Widgets title: DraggableWidget type: text/vnd.tiddlywiki @@ -23,6 +23,9 @@ See DragAndDropMechanism for an overview. Either or both of the ''tiddler'' and ''filter'' attributes must be specified in order for there to be a payload to drag. -The ''actionTiddler'' variable is accessible in both //startactions// and //endactions//. It holds the payload tiddler(s) specified through the //tiddler// attribute. +The [[actionTiddler Variable]] is accessible in both //startactions// and //endactions//. It holds the payload tiddler(s) specified through the //tiddler// and //filter// attributes as a [[Title List]] using double square brackets to quote titles that include whitespace. + +<<.tip """Note that the [[actionTiddler Variable]] holds a [[Title List]] quoted with double square brackets. This is unlike the DroppableWidget which uses the same variable to pass a single unquoted title."""> + The LinkWidget incorporates the functionality of the DraggableWidget via the ''draggable'' attribute. diff --git a/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid b/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid index 10c58e4c0..99df96b18 100644 --- a/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid @@ -1,6 +1,6 @@ caption: droppable created: 20170406082820317 -modified: 20170406085304387 +modified: 20190118084621046 tags: Widgets title: DroppableWidget type: text/vnd.tiddlywiki @@ -38,6 +38,8 @@ Within the action string, there are two Variables generated by the DroppableWidg If multiple items are dropped then the actions are performed repeatedly, once for each dropped item. +<<.tip """Note that the [[actionTiddler Variable]] holds a single, unquoted title. This is unlike the DraggableWidget which uses the same variable to pass a quoted [[Title List]]."""> + ! Examples This example displays a palette of icons. Dragging a tiddler onto one of the icons assigns that icon to the tiddler.