Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
dglux5_wiki:widgets_and_property_inspector:repeaters:home [2019/07/17 19:17]
127.0.0.1 external edit
dglux5_wiki:widgets_and_property_inspector:repeaters:home [2019/10/29 21:26]
oem [Repeaters FAQ]
Line 213: Line 213:
  
 You have created custom selection behavior that uses the onMouseUp event instead of the onClick event.</​WRAP>​ You have created custom selection behavior that uses the onMouseUp event instead of the onClick event.</​WRAP>​
 +</​hidden>​
 +<hidden **How to use “onDone” trigger while using “Threaded” mode in a Repeater**>​
 +
 +    - <​WRAP>​In the [[dglux5_wiki:​workspace_and_workflow:​panels_and_menus:​outline|Outline panel]], right-click the **Stage** and select **Insert** > **Components** > **Text**.
 +
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-1.png?​direct|}}</​WRAP>​
 +    - <​WRAP>​Right-click the **Stage** and click {{:​dglux5_wiki:​92_icn-dataflow-icon.png?​nolink|}} **Dataflow** icon.
 +
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-2.png?​direct|}}</​WRAP>​
 +    - <​WRAP>​Drag a **Table** dataflow block and a **Repeater** block to the dataflow window.
 +
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-3.png?​direct|}}</​WRAP>​
 +    - <​WRAP>​To create a new dataflow symbol and to enter edit mode for that symbol:\\
 +a. Switch to the **Symbols** panel.\\
 +b. Click the {{:​dglux5_wiki:​27_icn-tool-convert-to-symbol.png?​nolink|}} **Convert to symbol** icon.\\
 +c. When prompted, enter a symbol name, and click OK.\\        ​
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-4.png?​direct|}}\\
 +
 +d. Right-click a symbol instance in the dataflow window, and choose **Edit**.\\
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-5.png?​direct|}}
 +
 +e. Edit the dataflow model according to the requirements.\\
 +f. Right-click an empty area in the dataflow window, and choose **Symbol Properties**.\\
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-6.png?​direct|}}
 +
 +g. Drag **trigger** from **Panel** to **Symbol Parameters**. Rename trigger to **onDone**.\\
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-7.png?​direct|}}</​WRAP>​
 +    - <​WRAP>​In the **Repeater** block, browse for the symbol in block'​s parameters.
 +
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-8.png?​direct|}}</​WRAP>​
 +    - <​WRAP>​Bind table to the **data** field of the **Repeater** block.
 +
 +{{:​dglux5_wiki:​widgets_and_property_inspector:​repeaters:​dglux5_repeater_ondone-9.png?​direct|}}</​WRAP>​
 +
 +Dataflow blocks can be modified according to the requirements. ​
 +<hidden **See a sample dg5 file below for the reference**>​
 +<file javascript ThreadedRepeater.dg5>​
 +{"​@type":"​group","​Text":​{"​@type":"​text","​width":​504,"​cornerRadius":​0,"​multiline":​true,"​fontSize":"​12","​height":​185,"​border":​{"​@type":"​fill","​gradient":​{"​@type":"​gradient","​@array":​[{"​ratio":​0,"​color":"#​000000","​alpha":​1},​{"​ratio":​100,"​color":"#​ffffff","​alpha":​1}]},"​color":​16777215},"​text":​["​@parent.storage.value"​],"​color":​12303296,"​left":​-5.684341886080802e-14,"​top":​5.595524044110789e-14},"​storage":​{"​@type":"​localStorage","​!ps":​["​key","​value"​],"​!x":​444,"​!y":​155,"​key":"​debug_out","​value":"","​!w":​208},"​width":"​100%","​height":"​100%","​clipContent":​true,"​repeater":​{"​@type":"​repeater","​renderer":​{"​map":​{"​string":​["​@parent.@data.v1"​]}},"​!ps":​["​symbol","​data","​mode","​output"​],"​!x":​293,"​!y":​34,"​symbol":"​s","​data":​["​@parent.table.data"​],"​mode":"​threaded"​},"​table":​{"​@type":"​table","​data":​{"​@type":"​tabledata","​cols":​[{"​name":"​row","​type":"​number","​meta":​{"​name":"​row","​type":"​number"​}},​{"​name":"​v1","​meta":​{"​name":"​v1"​}}],"​rows":​[[0,"​value 1"​],​[1,"​vvv 2"​],​[2,"​last row"​]]},"​!ps":​["​data"​],"​!x":​46,"​!y":​37},"​!df":​true,"​@array":​[["​Text"​]],"​@symbols":​{"​@df":​{"​s":​{"​@type":"​dfcontent","​script":​{"​@type":"​script","​!ps":​["​invoke","​script","​output","​print","​a","​onDone"​],"​!x":​166,"​!y":​63,"​invoke":​["​@parent.@params.onInit"​],"​script":"​@parent.storage.value = @parent.storage.value + \"\\n triggered: \" + @.a;​\n@.onDone = Math.random();","​!var":​[{"​n":"​a","​t":"​string"​},​{"​n":"​onDone","​t":"​trigger"​}],"​a":​["​@parent.@params.string"​]},"​!df":​true,"​storage":​{"​@type":"​localStorage","​!ps":​["​key","​value"​],"​!x":​378,"​!y":​82,"​key":"​debug_out","​!w":​208},"​@params":​{"​!var":​[{"​n":"​onInit","​t":"​trigger"​},​{"​n":"​onDone","​t":"​trigger","​isOutput":​true},​{"​n":"​string","​t":"​string"​}],"​onDone":​["​@parent.script.onDone"​]}}}},"​@ver":​8503}
 +</​file> ​   ​
 +</​hidden>​
 +
 </​hidden>​ </​hidden>​