Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dglux5_wiki:widgets_and_property_inspector:repeaters:home [2019/10/29 19:03]
oem [Repeaters FAQ]
dglux5_wiki:widgets_and_property_inspector:repeaters:home [2019/10/29 21:29]
oem [Repeaters FAQ]
Line 214: Line 214:
 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>​
-<hidden **How to use “onDone” trigger while using “Threaded” mode in a Repeater**>​+<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**.     - <​WRAP>​In the [[dglux5_wiki:​workspace_and_workflow:​panels_and_menus:​outline|Outline panel]], right-click the **Stage** and select **Insert** > **Components** > **Text**.
Line 236: Line 236:
 e. Edit the dataflow model according to the requirements.\\ e. Edit the dataflow model according to the requirements.\\
 f. Right-click an empty area in the dataflow window, and choose **Symbol Properties**.\\ 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|}}</​WRAP>​ +{{:​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>​ 
 + 
 +Now you can trigger other actions using **onDone** property. 
 +<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>​