Skip to content
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

custom event handler matching is case sensitive #340

Closed
jmesserly opened this issue Nov 6, 2013 · 4 comments
Closed

custom event handler matching is case sensitive #340

jmesserly opened this issue Nov 6, 2013 · 4 comments
Assignees

Comments

@jmesserly
Copy link
Contributor

(reported by @ErikGrimes here: dart issue 14719 ... I'm not endorsing this one way or another, just passing it on :) )

What steps will reproduce the problem?

  1. Create a custom element
  2. Attach a custom event handler to the element 'on-polymerSelect'.
  3. Call this.fire('polymerSelect').

What is the expected output? What do you see instead?

The handler bound to on-polymerSelect should fire.

The handler doesn't fire.

What version of the product are you using? On what operating system?

0.8.9 build 19720

Please provide any additional information below.

If the name of the handler is case insensitive, then firing the event should be case insensitive as well. Otherwise, event names have to be all lowercase which make them difficult to read and write. You
can improve legibility with underscores, but then you get funky event handlers line on-polymer_select.

@dannymk
Copy link

dannymk commented Jan 31, 2014

I can confirm this issue, the error returned is:

Exception: The null object does not have a getter '_observe@0x29474386'.

NoSuchMethodError : method not found: '_observe@0x29474386'
Receiver: null
Arguments: []
HtmlElement&Polymer.observeProperties (package:polymer/src/instance.dart:514:34)
HtmlElement&Polymer.prepareElement (package:polymer/src/instance.dart:153:22)
HtmlElement&Polymer.polymerCreated (package:polymer/src/instance.dart:139:21)
PolymerElement.PolymerElement.created (package:polymer/src/instance.dart:1088:19)

@jmesserly
Copy link
Contributor Author

@dannymk your error looks different, can you file a bug at http://dartbug.com/new with instructions to reproduce?

it looks like you got a PolymerElement subtype with no associated polymer-element. You can try putting a breakpoint in prepareElement() in package:polymer/src/instance.dart and see what's going on. My guess is your @CustomTag("x-foo") doesn't match the <polymer-element name="x-foo"> ... anyway, we should have a better error message when that happens.

@dannymk
Copy link

dannymk commented Jan 31, 2014

Done:  http://code.google.com/p/dart/issues/detail?id=16469

On Friday, January 31, 2014 4:42 PM, John Messerly [email protected] wrote:

@dannymk your error looks different, can you file a bug at http://dartbug.com/new with instructions to reproduce?
it looks like you got a PolymerElement subtype with no associated polymer-element. You can try putting a breakpoint in prepareElement() in package:polymer/src/instance.dart and see what's going on. My guess is your @CustomTag("x-foo") doesn't match the ... anyway, we should have a better error message when that happens.

Reply to this email directly or view it on GitHub.

@sorvell
Copy link
Contributor

sorvell commented Aug 20, 2014

Dupe of #634

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

No branches or pull requests

3 participants