diff --git a/editions/tw5.com/tiddlers/concepts/Messages.tid b/editions/tw5.com/tiddlers/concepts/Messages.tid index a36962eeb..77c9df290 100644 --- a/editions/tw5.com/tiddlers/concepts/Messages.tid +++ b/editions/tw5.com/tiddlers/concepts/Messages.tid @@ -1,10 +1,10 @@ created: 20140226083311937 -modified: 20140226090209479 +modified: 20211117042057208 tags: Concepts Reference title: Messages type: text/vnd.tiddlywiki -Widget messages are generated by widgets in response to user actions. They flow up the widget tree until they are handled by an ancestor widget. +Widget ''messages'' are generated by [[Widgets]] in response to user actions. Messages have a <<.param name>>, an optional primary <<.param parameter>>, and one or more optional named parameters. These messages travel up the widget tree where they are handled by ancestor widgets or the core itself. The following widget messages are implemented by the core: diff --git a/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid b/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid new file mode 100644 index 000000000..800f2c27c --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid @@ -0,0 +1,10 @@ +created: 20211109165213041 +modified: 20211109175739768 +tags: +title: SampleWindowTemplate + + +| ''Name:'' |<$edit field=name tag="input" />| +|''Rank:'' |<$edit field=rank tag="input" />| + +''Variable 'something' contains:''<> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid index 432aecebf..9e452fd7d 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid @@ -1,11 +1,11 @@ caption: tm-open-window created: 20160424181447704 -modified: 20190704145627537 +modified: 20211117042202771 tags: Messages title: WidgetMessage: tm-open-window type: text/vnd.tiddlywiki -The `tm-open-window` message opens a tiddler in a new //browser// window. If no parameters are specified, the current tiddler is opened in a new window. Similiar to `tm-modal` any additional parameters passed via the <<.param "paramObject">> are being provided as variables to the new window. +The `tm-open-window` [[message|Message]] opens a tiddler in a new //browser// window. If no parameters are specified, the current tiddler is opened in a new window. Similiar to `tm-modal` any additional parameters passed via the <<.param "paramObject">> are provided as variables to the new window. |!Name |!Description | |param |Title of the tiddler to be opened in a new browser window, defaults to <<.var "currentTiddler">> if empty | @@ -13,7 +13,25 @@ The `tm-open-window` message opens a tiddler in a new //browser// window. If no |windowTitle |Title string for the opened window | |width |Width of the new browser window | |height |Height of the new browser window | -|paramObject |Hashmap of variables that will be provided to the window | +|paramObject |Hashmap of variables to be provided to the modal, contains all extra parameters passed to the widget sending the message. | + +The `tm-open-window` message is best generated with the ActionSendMessageWidget, which in turn is triggered by a widget such as the ButtonWidget. It is handled by the core itself. + +<<.tip """When used with the ActionSendMessage Widget, <<.param 'param'>> becomes <<.param '$param'>> """>> +<<.tip """Parameters <<.param template>>, <<.param windowTitle>>, <<.param width>>, and <<.param height>> require the ActionSendMessageWidget.""">> -The `tm-open-window` message is usually generated with the ButtonWidget and is handled by the core itself. +<$macrocall $name='wikitext-example-without-html' +src=""" +<$button>Open Window +<$action-sendmessage + $message="tm-open-window" + $param="$:/temp/openme" + template="SampleWindowTemplate" + windowTitle="My Window Title" + width="100em" + height="50em" + something="I just in over in a variable, and boy is my Hashmap tired." /> + +""" /> +