would it be possible to provide a more useful hyper.log in means of being able to logging objects?
if you try to hyper.log a whole object it just says [object Object], which isn't very useful
browser consoles usually have an ability to expand the object and see through its properties.
or would it be possible to use external console, such as google chrome console?
logging objects
Re: logging objects
[object Object] is the Javascript default conversion of Object to String. As far as I know, it cannot be changed.
However, we have a function evothings.printObject that may do what you want.
However, we have a function evothings.printObject that may do what you want.
-
- Posts: 9
- Joined: 15:03, 03 Mar 2015
Re: logging objects
i know this is a default javascript string representation of object, that's why i asked whether would it be possible to print it in a more intelligent way, such as chrome or firefox does in the console.
by the way, evothings.printObject doesn't work
or should i copy paste the function definition from the evothings.js?
by the way, evothings.printObject doesn't work
Code: Select all
LOG: [ERR] TypeError: undefined is not a function (evaluating 'evothings.printObject(distances)') [app.js: 130]
or should i copy paste the function definition from the evothings.js?
Re: logging objects
You can either include evothings.js, like so, or copy/paste the function.
-
- Posts: 9
- Joined: 15:03, 03 Mar 2015
Re: logging objects
nope, it gives the error even with this included
<script src="libs/evothings/evothings.js"></script>
.. undefined is not a function (evaluating 'evothings.printObject ..
<script src="libs/evothings/evothings.js"></script>
.. undefined is not a function (evaluating 'evothings.printObject ..
Re: logging objects
Do you have the directories "libs/evothings" in your project folder? If not, the file "evothings.js" won't be there, the WebView will get a 404 when trying to load it, and will silently disregard the <script> tag.
Re: logging objects
Then I'm out of ideas. You'd better copy/paste the function.
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 55 guests