Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Suggest typo correction for unmatched template variables #13

Open
warpech opened this issue Feb 16, 2015 · 4 comments
Open

Suggest typo correction for unmatched template variables #13

warpech opened this issue Feb 16, 2015 · 4 comments

Comments

@warpech
Copy link
Contributor

warpech commented Feb 16, 2015

As an enhancement of #11, it should be possible to suggest fixes for common typos in cased of missed TemplateBinding.

Typical typos:

  • name -> Name
  • Nmae -> Name
  • Name -> Name$

This is point 6 and 9 from https://github.com/Starcounter/Starcounter/issues/2468

@warpech
Copy link
Contributor Author

warpech commented Dec 19, 2017

@alshakero I am not sure if it is possible to implement it in Starcounter DevTools, but perhaps this can be done in JSONPatcherProxy?

In case JS tries to read an undefined property from the data model, check if it is one of the common typos and print an error like:

The script tried to read the property Name from the data model , but it is undefined. Did you mean: Name$? If you want to use variables outside of the data model, please follow the Palindrom instructions on ignoring the local data changes: https://palindrom.github.io/docs/03-_Filtering%20Patches/

@tomalec, @alshakero WDYT?

@tomalec
Copy link
Contributor

tomalec commented Dec 19, 2017

I think if we cannot implement/monkeypatch it in DevTools we shouldn't do that, as it affects runtime performance and a clerk at the POS at the ship does not care about console errors, just want this app to run as fast as possible.

@warpech
Copy link
Contributor Author

warpech commented Dec 19, 2017

I totally agree with that, we should only do that in DevTools extension.

@alshakero
Copy link
Contributor

alshakero commented Dec 19, 2017

Me too. My prospective opinion is that it's easily doable in SDA.

@warpech warpech added this to the DevTools maturity milestone Apr 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants