@published String foo;
we suggest you write:
@published
String get foo => readValue(#foo);
set foo(String value) => writeValue(#foo, value);
The old style will continue to work, but the new style has a more predictable timing. In particular, say you use 'foo' in a binding, someone updates that binding, and later you read 'foo'. The old style has no guarantees about what you'll read out of 'foo'. If notifications have been propagated through the system, you'll see the latest value, but if not, you may see the old value. The new style guarantees that you'll see the new value in the binding regardless of the state of the notifications. This also matches how things work in polymer.js elements.
@ComputedProperty('a + b')
String get aPlusB => readValue(#aPlusB);
You can find more details in the dart docs for ComputedProperty
We just uploaded a new stable version of the polymer, core, and paper packages, bringing us up to date with the latest release of polymer.js and it's related libraries (js version 0.3.4 as of today).
- Change in @published: There is a variation for how to declare @published properties. Instead of:
@published String foo;
we suggest you write:@published
String get foo => readValue(#foo);
set foo(String value) => writeValue(#foo, value);
@PublishedProperty(reflect: true)
String get foo => readValue(#foo);set foo(String value) => writeValue(#foo, value);
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/672fa515-4b73-41b8-b21c-b0c95dfb43aa%40dartlang.org.
On Wed, Jul 30, 2014 at 9:18 PM, Günter Zöchbauer <gzo...@gmail.com> wrote:
Thanks for the great work and for the info!On Thursday, July 31, 2014 2:11:34 AM UTC+2, 'Siggi Cherem' via Dart Announcements wrote:We just uploaded a new stable version of the polymer, core, and paper packages, bringing us up to date with the latest release of polymer.js and it's related libraries (js version 0.3.4 as of today).
- Change in @published: There is a variation for how to declare @published properties. Instead of:
@published String foo;
we suggest you write:@published
String get foo => readValue(#foo);
set foo(String value) => writeValue(#foo, value);Are the values of such properties reflected to the attribute and is @PublishedProperty(reflect: true) obsolete then or how does this relate to reflected properties?@publishedProperty(reflect: true) is still needed if you want to make it reflected as an attribute.
Both annotations work the same way in terms of timing, so you can do:@PublishedProperty(reflect: true)String get foo => readValue(#foo);set foo(String value) => writeValue(#foo, value);--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/672fa515-4b73-41b8-b21c-b0c95dfb43aa%40dartlang.org.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/CAJmP2_qDou3Bz9fwewG4CkiCaWKjXoWZWY8y8dp2r5emgs5E-A%40mail.gmail.com.
1. @PublishedProperty(reflect: true) in new syntax?
@PublishedProperty(reflect: true)
String get foo => readValue(#foo);set foo(String value) => writeValue(#foo, value);
2. @observable similar behavior of @published in new syntax?
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/c994e238-f3a1-478a-802f-33f7f4a4e6d6%40dartlang.org.
Core 0.1.0+1, Paper 0.1.0+1: The core and paper packages have been updated too, they now have the Dart API associated with the 0.3.4 js elements. Many of the examples have been updated to use some of the changes above (like the better js-interop features)
Core 0.1.0+1, Paper 0.1.0+1: The core and paper packages have been updated too, they now have the Dart API associated with the 0.3.4 js elements. Many of the examples have been updated to use some of the changes above (like the better js-interop features)Any chance you will also convert/wrap Googlewebcomponents (http://googlewebcomponents.github.io/) ?
-g.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/27b6b7ad-4906-41c0-b914-d2425ef4c720%40dartlang.org.
On Thu, Jul 31, 2014 at 10:15 AM, 'Siggi Cherem' via Dart Web Development <w...@dartlang.org> wrote:
On Wed, Jul 30, 2014 at 9:18 PM, Günter Zöchbauer <gzo...@gmail.com> wrote:
Thanks for the great work and for the info!On Thursday, July 31, 2014 2:11:34 AM UTC+2, 'Siggi Cherem' via Dart Announcements wrote:We just uploaded a new stable version of the polymer, core, and paper packages, bringing us up to date with the latest release of polymer.js and it's related libraries (js version 0.3.4 as of today).
- Change in @published: There is a variation for how to declare @published properties. Instead of:
@published String foo;
we suggest you write:@published
String get foo => readValue(#foo);
set foo(String value) => writeValue(#foo, value);Are the values of such properties reflected to the attribute and is @PublishedProperty(reflect: true) obsolete then or how does this relate to reflected properties?@publishedProperty(reflect: true) is still needed if you want to make it reflected as an attribute.The intent isn't very clear in this annotation. Any more thoughts on calling this @attribute ? That's a lot more clear, at least to me :) And then if it matters (for performance?) @attribute(two-way: false) (where two-way is the default)
var x = querySelector('x-foo');x.bar = "hi";...print(x.attributes["bar"]);
"reflect" is an overloaded term, especially with mirrors.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/CAJmP2_qDou3Bz9fwewG4CkiCaWKjXoWZWY8y8dp2r5emgs5E-A%40mail.gmail.com.Both annotations work the same way in terms of timing, so you can do:@PublishedProperty(reflect: true)String get foo => readValue(#foo);set foo(String value) => writeValue(#foo, value);--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/672fa515-4b73-41b8-b21c-b0c95dfb43aa%40dartlang.org.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
--
For more news and information, visit http://news.dartlang.org/
To join the conversation, visit https://groups.google.com/a/dartlang.org/
To unsubscribe from this group and stop receiving emails from it, send an email to announce+u...@dartlang.org.
- announce,engOn Thu, Jul 31, 2014 at 10:25 AM, George Moschovitis <george.mo...@gmail.com> wrote:
Core 0.1.0+1, Paper 0.1.0+1: The core and paper packages have been updated too, they now have the Dart API associated with the 0.3.4 js elements. Many of the examples have been updated to use some of the changes above (like the better js-interop features)Any chance you will also convert/wrap Googlewebcomponents (http://googlewebcomponents.github.io/) ?Hi George,I'm under the impression that they should "just work". Did you run into a bug when you tried them?
-g.--To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/27b6b7ad-4906-41c0-b914-d2425ef4c720%40dartlang.org.
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/CACr%3D8_Of8UYuibAXW5ZzDQtyGy8npeR6Cb1qyQbsuSEebxk%2BHg%40mail.gmail.com.
Thoughts?SiggiTo view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/CAJmP2_qDou3Bz9fwewG4CkiCaWKjXoWZWY8y8dp2r5emgs5E-A%40mail.gmail.com.Both annotations work the same way in terms of timing, so you can do:@PublishedProperty(reflect: true)String get foo => readValue(#foo);set foo(String value) => writeValue(#foo, value);--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/672fa515-4b73-41b8-b21c-b0c95dfb43aa%40dartlang.org.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To unsubscribe from this group and stop receiving emails from it, send an email to announce+u...@dartlang.org.--
For more news and information, visit http://news.dartlang.org/
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
I'm under the impression that they should "just work". Did you run into a bug when you tried them?
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/1bf49d2a-f10c-4279-8e57-ab868c709112%40dartlang.org.
const attribute = const PublishedProperty(reflect: true);
We handle both Bower and Pub packages in Chrome Dev Editor, so if we could have a formalized, step-by-step, guaranteed-to-work description of what needs to be done, we could do it.Also, several thoughts on @PublishedProperty(reflect: true) and the new boilerplate with readValue/writeValue:* First of all, if you're writing a library of reusable elements, you can't possibly know how they will be used on the other end. That means that the whole thing is a must: otherwise, your end users are bound to run into and give you a headache with bizarre timing issues (we've have more that a fair share of those with our own widgets in CDE).* Second, among the possible solutions that Siggi has suggested under 'Are we willing to always require a transformation step?', quite a few might not work with Chrome apps (e.g. a server proxying requests). Just something to keep in mind.
* Third, at least speaking of @PublishedProperty(reflect: true) vs. @attribute debate, I've added the following in a common source included by all the widgets in CDE:const attribute = const PublishedProperty(reflect: true);
...and use it as:@attribute foo;Question is, is it possible to expand that to auto-generate the entire readValue/writeValue boilerplate? Does Dart's annotations allow that?
On Friday, August 1, 2014 11:46:37 AM UTC-7, sethladd wrote:On Fri, Aug 1, 2014 at 11:27 AM, George Moschovitis <george.mo...@gmail.com> wrote:
I'm under the impression that they should "just work". Did you run into a bug when you tried them?Maybe we have a different interpretation of 'just work'. I would like to do just a 'pub get' and be ready to add html imports to my page.In other words, I am looking for a pub package similar to core_elements and paper_elements.Gotcha, thanks. I think the plan is to integrate Bower with Pub somehow, or let them play nicely together: https://code.google.com/p/dart/issues/detail?id=19354unfortunately, it's not scalable to put every web component into pub. We'll need a way to work with Bower.Glad to see the interest in the google-components!--To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/1bf49d2a-f10c-4279-8e57-ab868c709112%40dartlang.org.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/5a517c24-ca74-4462-9556-cec59712547f%40dartlang.org.
Question is, is it possible to expand that to auto-generate the entire readValue/writeValue boilerplate? Does Dart's annotations allow that?Unfortunately annotations can't do that. However, to follow up on the feedback and discussions we had here, last week we've started some discussions with the language designers to see if we can pursue some new language feature in this direction.
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/aac160f2-120b-484a-8654-76f91f3830ff%40dartlang.org.