Min RK
17ee541add
actually catch failure to load widget state
...
load callback was called directly,
rather than in promise function that catches errors
11 years ago
Jonathan Frederic
d78915af13
Fix variable scope.
11 years ago
Min RK
9e3e5cfca7
store widget state in single key
...
rather than in a dict, which doesn't work without reserializing *all* stored widget states (of all notebooks), since localStorage only supports storing strings.
11 years ago
Jonathan Frederic
8ad7cb3f4b
Associate persistence with URL
11 years ago
Jonathan Frederic
3b11cc66a7
Make widgets persist across page refresh
11 years ago
Jonathan Frederic
3d9e43f0c4
Fix persistence API,
...
it expecited a view dictionary not a dictionary of view promises
11 years ago
Jonathan Frederic
88d8d85987
Another widget promise bug fix
11 years ago
Jonathan Frederic
cf9b092013
Use once instead of on
11 years ago
Jonathan Frederic
52c8f14223
Added changes discussed with @jasongrout
11 years ago
Jonathan Frederic
152982efcd
Updated comments to new style.
11 years ago
Jonathan Frederic
a56a6f5657
Document set_state_callbacks and,
...
make load_state callback support promises.
11 years ago
Jonathan Frederic
0c737867fe
Rebase fixes
11 years ago
Jonathan Frederic
16e3bad23f
Address @jasongrout 's review comments, take 2
11 years ago
Jonathan Frederic
5d4b83ba4a
Add an event that fires before the notebook saves
11 years ago
Jonathan Frederic
71d2d47036
Fix, only return views that are direct children of the cell
11 years ago
Jonathan Frederic
a53f4cc9dd
Log save state callback failures
11 years ago
Jonathan Frederic
db62a210e7
Another that = this
11 years ago
Jonathan Frederic
f060947eb9
This, that, and the other thing
11 years ago
Jonathan Frederic
8a5770b811
Add convenience API
11 years ago
Jonathan Frederic
e02a5ec201
Promises...
11 years ago
Jonathan Frederic
d466601dbb
Persistence API,
...
This is a combination of 10 commits.
Enable widget instanciation from front-end.
Address @minrk 's review comments.
Make API that allows users to persist widget state easily.
Added support for view persistence
Started adding support for model persistence.
Half way there!
Finished persistence API.
Move persistence code into the widget framework.
Fin.
Bug fixes
11 years ago
Jonathan Frederic
e519371402
Merge pull request #7093 from jasongrout/model-views
...
Make the model.views dict a dict of promises for views
11 years ago
Jonathan Frederic
b53386b37b
Ran function comment conversion tool
11 years ago
Jason Grout
13c1b95fbd
Make the model.views dict a dict of promises for views
...
Otherwise, there is a race condition where the model doesn't know about views until they are actually created.
11 years ago
Jason Grout
63f8566c6f
Wait for any promises returned by a view's render method before considering the view created
...
This lets a view wait on children views to be created before considering itself created.
Thanks to @ssunkara for catching this.
11 years ago
Jason Grout
e6a8ef00e0
Catch errors after our then()s, instead of in parallel with them (this missing exceptions)
...
When an error is thrown in a then() success handler, it doesn't call the same then()'s error handler.
I also made all of the utils.reject handlers verbose to aid in debugging.
11 years ago
Jason Grout
2b96a97118
Simplify error-handling code
...
Thanks to @jdfreder for this change.
11 years ago
Jason Grout
da8cab76dd
Clean up promises code some more.
11 years ago
Jonathan Frederic
f9d730d01e
Address @takluyver 's review comments
11 years ago
Jonathan Frederic
907bde3b25
Address review comments
11 years ago
Jonathan Frederic
3c949aad92
Remove message promise.
11 years ago
Jonathan Frederic
56c5020a84
bool_test passing with slimerjs
11 years ago
Jonathan Frederic
bed3a4cfda
use es6
11 years ago
Jonathan Frederic
8c149c9112
Current state with lots and lots of debugging junk
11 years ago
Jonathan Frederic
b3c49fce66
Move the display Promise into a lower level method,
...
into the create view method of the widget manager.
This makes sure that views created by parent views
are also accounted for in the state/display order
guarantee.
11 years ago
Jonathan Frederic
bbcd5cb55f
Bug fixes
11 years ago
Jonathan Frederic
3870bb571b
Use rsvp.js for Promises
11 years ago
Jonathan Frederic
1d1572421f
Add a WrappedError class
11 years ago
Jonathan Frederic
b16b2e8749
Make display also pend on set_state.
11 years ago
Jason Grout
1b9948d178
Add some error handling for creating views and models
11 years ago
Jason Grout
686e73dfdf
More simplifications due to promises
11 years ago
Jason Grout
4412c12929
Simplify code by using Promises in a better way; try_load -> load
11 years ago
Jonathan Frederic
c41dcb35e9
Proxy console.error calls
11 years ago
Jonathan Frederic
5a745be138
Add Promise support to models.
11 years ago
Jonathan Frederic
78c0bbdb4d
Fix view rendering order.
11 years ago
Jonathan Frederic
4beda5d0fb
Initial stab at adding promises to the widget framework.
11 years ago
Jason Grout
ff680583c1
initial take on promises
11 years ago
Jonathan Frederic
ba77877c18
Rebase fixes
11 years ago
Jonathan Frederic
db10ae8f2d
s/target_name/widget_class
11 years ago
Jonathan Frederic
3cb5ac6fbb
Clarified API for the create_model function,
...
Also added a test!
11 years ago