Scenario #1:
bindLog1 ← 2015⌶'Log1'
bindLog2 ← 2015⌶'Log2'
bindLog3 ← 2015⌶'Log3'
After the bind is done the 3 matrices will continue to change (same number of columns but the number of rows will increase). When required to show a 'Log' matrix the DataContext of the ListBox is simply set to the appropriate bind:
listBox.DataContext ← bindLog1 ⍝ or bindLog2 or bindLog3
Scenario #2:
There is only one bind that is remake all the time when needed to display one of the Log matrices:
⎕EX 'LogToBind'
LogToBind ← Log1 ⍝ or Log2 or Log3
bind ← 2015⌶'LogToBind'
listBox.DataContext ← bind
Scenario #2 correspond to the documentation that is always erasing the matrix to bind before binding and oblige to have a double of the matrix that you want to bind before binding. Scenario #1 correspond more to our actual case where we have multiple matrices to bind one at a time to a single .net object.
Question: Is Scenario #1 can be safely done ? Is there another approach that is better ?
Thanks in advance,
Pierre Gilbert
Note: Binding a large matrix to a .net ListBox is crazy fast with 2015⌶ and is faster than binding with a .net DataTable. Congratulations and thank you Team Dyalog for that.