-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
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
Access length and value of models from .60 #98
Comments
I am working on |
PR #580 covers the API part and initial implementation of this ticket - thanks @jamesblacklock! What's left is binding updates then the model changes - I'll take a look at that. |
That's a good question and IMO it ties into a bigger topic: IMO the evaluation of bindings can fail, for different reasons. When that is the case I think we should make diagnostics available to the developer (this happens at run-time) and maintain the previous value of the property the binding is associated with. |
Good point, right now it panicks, but that might not be a good idea. We should change the model implementation to return a default value.
I think all types that can be in properties are bounded on the |
Regarding the tracking of changes to the length, I see that the C++ and Rust implementation will have to differ (that's ok). For C++ it might be possible to add a For Rust, the use of
(2) is nicely automatic but it's missing elegance. Perhaps there's a third way for Rust? I could also start with a variant of (2) and we see in the review if it can be simplified. What do you think? |
with (2) who will own and initialize the |
The Rust generator would have to generate a |
I think I may have found a way to get hold of the |
This is done by exposing the ModelNotify to the caller via the new ModelTracker trait, which has a function that allows "hooking" into the dirty tracking of the size. By extension, this also works in JavaScript. cc #98
Similar to the parent commit, the model tracks changes to the rows and marks an internal property dirty. Since we have a base class this is a little less intrusive. cc #98
This is done by exposing the ModelNotify to the caller via the new ModelTracker trait, which has a function that allows "hooking" into the dirty tracking of the size. By extension, this also works in JavaScript. cc #98
Similar to the parent commit, the model tracks changes to the rows and marks an internal property dirty. Since we have a base class this is a little less intrusive. cc #98
This is done by exposing the ModelNotify to the caller via the new ModelTracker trait, which has a function that allows "hooking" into the dirty tracking of the size. By extension, this also works in JavaScript. cc #98
Similar to the parent commit, the model tracks changes to the rows and marks an internal property dirty. Since we have a base class this is a little less intrusive. cc #98
(implemented in 0.1.6) |
Suggested syntax:
Alternative syntax
The problem is that we want to get binding updates when the model changes, which makes the implementation a bit tricky.
The text was updated successfully, but these errors were encountered: