Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Weird errors when using NeonAnimatableBehavior #579

Closed
zoechi opened this issue Sep 15, 2015 · 4 comments
Closed

Weird errors when using NeonAnimatableBehavior #579

zoechi opened this issue Sep 15, 2015 · 4 comments

Comments

@zoechi
Copy link

zoechi commented Sep 15, 2015

I don't know if this is a user-errors or polymer-elements or a Polymer.dart bug.
I got some simple examples with and without polymer_elements working but with JS wrapped behaviors I'm stuck.

Full example https://github.com/bwu-dart-playground/polymer1/tree/master/neon_animation
(app_element.dart and app_element.html)

Exception: Unhandled exception:
NoSuchMethodError: method not found: 'playAnimation'
Receiver: Instance of 'JsObjectImpl'
Arguments: ["entry", null]

0 JsObject.callMethod (dart:js:623)

1 PolymerElement&PolymerBase&NeonAnimatableBehavior&NeonAnimationRunnerBehavior.playAnimation (package:polymer_elements/neon_animation_runner_behavior.dart:24:17)

2 AppElement.play (http://localhost:63342/polymer1/neon_animation/web/app_element.dart:57:5)

3 AppElement.ready (http://localhost:63342/polymer1/neon_animation/web/app_element.dart:52:5)

4 Function._apply (dart:core-patch/function_patch.dart:7)

5 Function.apply (dart:core-patch/function_patch.dart:28)

6 _InstanceMirrorImpl.invoke (package:reflectable/src/reflectable_transformer_based.dart:149:23)

7 _setupLifecycleMethods.. (package:polymer/src/common/polymer_descriptor.dart:127:31)

8 JsObject._callMethod (dart:js:678)

9 JsObject.callMethod (dart:js:618)

10 HtmlElement&PolymerMixin.polymerCreated (package:polymer/src/common/polymer_mixin.dart:26:15)

11 PolymerElement.PolymerElement.created (package:polymer/polymer_micro.dart:25:5)

12 PolymerElement&PolymerBase.PolymerElement&PolymerBase.created (http://localhost:63342/polymer1/neon_animation/web/app_element.dart)

13 PolymerElement&PolymerBase&NeonAnimatableBehavior.PolymerElement&PolymerBase&NeonAnimatableBehavior.created (http://localhost:63342/polymer1/neon_animation/web/app_element.dart)

14 PolymerElement&PolymerBase&NeonAnimatableBehavior&NeonAnimationRunnerBehavior.PolymerElement&PolymerBase&NeonAnimatableBehavior&NeonAnimationRunnerBehavior.created (http://localhost:63342/polymer1/neon_animation/web/app_element.dart)

15 AppElement.AppElement.created (http://localhost:63342/polymer1/neon_animation/web/app_element.dart:20:26)

16 Blink_Utils.changeElementWrapper (dart:_blink:31542)

17 _Utils.changeElementWrapper (dart:html:42281)

18 _VMElementUpgrader.upgrade (dart:html:41073)

19 registerDartType.upgradeElement (package:web_components/interop.dart:38:45)

20 JsObject._callMethod (dart:js:678)

21 JsObject.callMethod (dart:js:618)

22 registerDartType (package:web_components/interop.dart:41:8)

23 CustomElementProxy.initialize (package:web_components/custom_element_proxy.dart:23:5)

24 PolymerRegister.initialize (package:polymer/src/common/polymer_register.dart:21:21)

25 loadInitializers.. (package:initialize/src/static_loader.dart:46:32)

26 _runInitQueue (package:initialize/initialize.dart:35:24)

27 _runInitQueue. (package:initialize/initialize.dart:38:26)

28 _RootZone.runUnary (dart:async/zone.dart:1165)

29 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:502)

30 _Future._propagateToListeners (dart:async/future_impl.dart:585)

31 _Future._completeWithValue (dart:async/future_impl.dart:376)

32 _Future._asyncComplete. (dart:async/future_impl.dart:430)

33 _microtaskLoop (dart:async/schedule_microtask.dart:43)

34 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)

35 _ScheduleImmediateHelper._handleMutation (dart:html:42565)

(I tried to port http://codepen.io/MWalid/pen/KpZpMz to Polymer.dart)

@jakemac53
Copy link
Contributor

It wasn't finding behaviors properly due to a change in reflectable (superclassQuantifyCapability is now required explicitly), fixed by b36e731

@zoechi
Copy link
Author

zoechi commented Sep 15, 2015

Yay! It's working. Thanks a lot for the quick fix!
Lots of fun playing with the new Polymer and elements :)

@jakemac53
Copy link
Contributor

Ya, I really like how you can use JS behaviors from Dart elements :)

@zoechi
Copy link
Author

zoechi commented Sep 15, 2015

Great work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants