We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 5065a59
import ipywidgets as widgets import ipysheet sheet = ipysheet.Sheet(rows=1, columns=1) sheet.cells = ipysheet.Cell(value=[""], row_start=0, row_end=0, column_start=0, column_end=0, squeeze_column=False), output = widgets.Output() def observer(change): with output: print("{0} -> {1}".format(change.old, change.new)) sheet.cells[0].observe(observer, names='value') sheet.cells[0].value = ['a'] sheet.cells[0].value = ['b'] sheet.cells[0].value = ['c'] output
output contains
output
[''] -> ['a'] ['a'] -> ['b'] ['b'] -> ['c'] ['c'] -> ['a'] ['a'] -> ['c']
Related: #85
The text was updated successfully, but these errors were encountered:
Another example:
In[0]:
import ipywidgets as widgets import ipysheet sheet = ipysheet.Sheet(rows=1, columns=2) sheet.cells = ( ipysheet.Cell(value=[""], row_start=0, row_end=0, column_start=0, column_end=0, squeeze_column=False), ipysheet.Cell(value=[""], row_start=0, row_end=0, column_start=1, column_end=1, squeeze_column=False) ) output = widgets.Output() def observer(change): with output: print("{0} -> {1}".format(change.old, change.new)) sheet.cells[0].value = ["A"] sheet.cells[1].value = ["B"] sheet.cells[0].observe(observer, names='value') sheet.cells[1].observe(observer, names='value') output
In[1]:
sheet.cells[0].value = ["C"] sheet.cells[1].value = ["D"]
Run In[0] and then In[1]. output will then contain
In[0]
In[1]
['A'] -> ['C'] ['B'] -> ['D'] ['D'] -> ['B'] ['B'] -> ['D']
Interestingly, if you replace In[1] with
sheet.cells[1].value = ["D"] sheet.cells[0].value = ["C"]
then it works fine. output contains
['B'] -> ['D'] ['A'] -> ['C']
Doesn't seem to happen if the cells are in two different sheets.
Sorry, something went wrong.
No branches or pull requests
Version: 5065a59
output
containsRelated: #85
The text was updated successfully, but these errors were encountered: