dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
180 stars 33 forks source link

@Property on `List get foo` blows up #622

Closed Andersmholmgren closed 9 years ago

Andersmholmgren commented 9 years ago

Seems there is a missing reflection capability

  // works
  @Property()
  List<String> foos = ['foo1'];

  // doesn't work
  @Property()
  List<String> get foos => ['foo1'];
Exception: Uncaught Error: Reflecting on class 'ClassMirror on 'List'' without capability
Stack Trace:
#0      wrapClassMirrorIfSupported (package:reflectable/src/reflectable_mirror_based.dart:35:7)
#1      wrapTypeMirror (package:reflectable/src/reflectable_mirror_based.dart:95:12)
#2      MethodMirrorImpl.returnType (package:reflectable/src/reflectable_mirror_based.dart:881:12)
#3      _getPropertyInfoForType (package:polymer/src/common/polymer_descriptor.dart:180:41)
#4      _buildPropertiesObject.<anonymous closure> (package:polymer/src/common/polymer_descriptor.dart:56:24)
#5      _HashVMBase&MapMixin&&_LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:340)
#6      _buildPropertiesObject (package:polymer/src/common/polymer_descriptor.dart:54:16)
#7      createPolymerDescriptor (package:polymer/src/common/polymer_descriptor.dart:25:19)
#8      PolymerRegister.initialize (package:polymer/src/common/polymer_register.dart:19:36)
zoechi commented 9 years ago

Worked for me https://github.com/bwu-dart-contributing/polymer_elements/blob/demo2/demo/web/all_demos.dart#L132 What version of reflectable are you using?

Andersmholmgren commented 9 years ago

0.3.2 (the latest). I started by generating the app from stagehand web-polymer with the latest stagehand

zoechi commented 9 years ago

I haven't tried 0.3.2 yet, only 0.3.1

Andersmholmgren commented 9 years ago

I got the same with 0.3.1

I cloned your demo and thought I saw it was using 0.2.1 On Sun, 11 Oct 2015 at 9:06 AM, Günter Zöchbauer notifications@github.com wrote:

I haven't tried 0.3.2 yet, only 0.3.1

— Reply to this email directly or view it on GitHub https://github.com/dart-lang/polymer-dart/issues/622#issuecomment-147129431 .

zoechi commented 9 years ago

I'm still working on upgrading to the newest Polymer version and haven't checked in the latest changes yet.

dam0vm3nt commented 9 years ago

I'm using the latest of everything and List properties are definitively working for me.

Il giorno dom 11 ott 2015 10:21 Günter Zöchbauer notifications@github.com ha scritto:

I'm still working on upgrading to the newest Polymer version and haven't checked in the latest changes yet.

— Reply to this email directly or view it on GitHub https://github.com/dart-lang/polymer-dart/issues/622#issuecomment-147171904 .

jakemac53 commented 9 years ago

closing for now as I assume this is stale, please reopen if that is not the case