ReferenceError: Point is not defined - deprecated?
Closed this issue · 2 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
The Point class doesn't work.
Steps to Reproduce
- Open dev tools console
- Run
new Point(0, 0)
Expected behavior:
It returns an instance of Point.
Actual behavior:
Uncaught ReferenceError: Point is not defined
Reproduces how often:
Every time.
Versions
Atom : 1.40.1
Electron: 3.1.10
Chrome : 66.0.3359.181
Node : 10.2.0
(apm --version
returns AssignProcessToJobObject: (87) The parameter is incorrect.
, a bug at time of writing I assume)
Windows 10 v1903 build 18362.418 64-bit
Additional Information
See also
It seem's point.coffee has been deprecated but it is still on the documentation.
posted by @lachhebo in atom/atom#7893 (comment)
Actually, on further investigation, it merely seems that Point is not imported into the console. I had tried running new Range([0,0], [0,1])
in the console as well and it apparently worked where Point didn't, however the Range object returned didn't match the flight manual, so I'm not sure what is actually going on there.
It sounds like you're running into a confusion between the Point
Web API, and Atom's Point
class.
You need to run something like this in order to have access to Atom's Point
:
const { Point } = require('atom');
The same holds true for Range
, which also has a Web API of the same name.
Thanks for reaching out!
Because we treat our issues list as the Atom team's backlog, we close issues that are questions since they don't represent a task needing to be completed. For most questions about Atom there are a lot of options, check out:
- User Documentation — The Atom Flight Manual
- Developer Documentation — Atom API Documentation
- FAQ — The Atom FAQ on Discuss
- Message Board — Discuss, the official Atom and Electron message board
- Chat — Join the Atom Slack team
On Discuss and in the Atom Slack team, there are a bunch of helpful community members that should be willing to point you in the right direction.