-
Notifications
You must be signed in to change notification settings - Fork 1.7k
private event handlers, change watchers, databinding doesn't work #13881
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
Comments
Here's a commit demonstrating my work-around. googlearchive/notational_velocity.dart@8312bdc Renaming the private methods to end in 'Mutated' instead of 'Changed' eliminates the runtime error |
Right, "Changed" is a Polymer feature for setting up an observer. ... we can't do the right thing here until Dart2js supports private symbols :(. Observable has same issue. Added Library-Polymer, Triaged labels. |
Added this to the M8 milestone. |
It feels very weird that the names of private methods in my classes would cause runtime errors. Is there a check somewhere looking for methods that end in 'Changed'? Could this check add the condition that the method not start with "_" -- and is therefor private? |
Removed this from the M8 milestone. |
Issue #14191 has been merged into this issue. |
Issue #13559 has been merged into this issue. |
would be nice to fix in M8 but blocked on dart2js not-implemented-feature. Marked this as being blocked by #14231. |
Re merging Issue #14191 into this. 14191 indeed seems to have the same root cause (lack of support for private members), but the practical consequences are different: this one at least produces a runtime error, allowing the user to track it down, while with 14191 the unsupported usage is silently ignored. So while this can wait for the root cause to be fixed, it would be very desirable to at least add some diagnostic to the 14191 use case in the meantime. Also, 14191 is not about dart2js at all: it doesn't work in Dartium either. |
Ok, with the changed title this looks better :) |
Right, it doesn't work on either impl because we're waiting on a new API MirrorSystem.getSymbol. They just implemented it in Dart VM but not in dart2js yet. I can't use the new API until it works in both places. Hope that clarifies. |
Changed the title to: "private event handlers, change watchers, databinding doesn't work". |
Siggi, I wonder if we could fix this in Smoke? (or it's already fixed?) Removed Area-Polymer, Library-Polymer labels. |
it's possible, but not trivial because it requires changing how we generate code into the original source files (the way we generate getters today assumes that everything is visible from outside the library). I happen to have a bug tracking this enhancement though. Marking as duplicate. |
This issue has been moved to dart-archive/smoke#11. |
Uncaught Illegal argument(s): "_something" is a private identifier
It seems like a name is inferred from private members ending with 'Changed'
This is a regression since 0.7.6
The text was updated successfully, but these errors were encountered: