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

jsnx unresolved variable #10

Closed
Brian1966 opened this issue Jun 16, 2013 · 7 comments
Closed

jsnx unresolved variable #10

Brian1966 opened this issue Jun 16, 2013 · 7 comments

Comments

@Brian1966
Copy link

Hello,

I've used the python version of Networkx so was interested in trying out this port.

I'm working on Windows 7 box and use the RubyMine IDE I've created a script tag

<script src="js/jsnetworkx.js"></script> <script src="js/main.js"></script>

However in my main.js if I declare

var G = jsnx.complete_graph(6);

The error jsnx unresolved is produced, can you advise what I'm doing wrong?

Brian

@fkling
Copy link
Owner

fkling commented Jun 16, 2013

Did you download and include jsnetworkx.js?

<script src="path/to/jsnetworkx.js"></script>

@Brian1966
Copy link
Author

I think I downloaded the correct file jsnetworkx.js I also have d3.js in the same directory . d3 seems to resolve it's references.When I open the jsnetworkx.js and hover over g.jsnx the IDE say that the reference is unresolved.

In the Chrome console there are no errors saying that jsnetworkx.js has not been found. I've attached some screen shots so I guess I've made a slip up some where!

jsnetworkx
jsnetworkx2
jsnetworkx3

@fkling
Copy link
Owner

fkling commented Jun 16, 2013

In the Chrome console there are no errors saying that jsnetworkx.js has not been found.

Does this mean you actually have no problem running the code in the browser and the problem is only in the IDE? Dynamically typed languages can be difficult for IDEs to handle and I cannot really help you there.

@Brian1966
Copy link
Author

Hello
In the Chrome console (for windows 7) I get the following result. It does not return ["1", "3", "5", "7", "11"]. Please refer to my screen shot.

jsnetworkx

@fkling
Copy link
Owner

fkling commented Jun 16, 2013

The undefined value is what console.log always returns. At the bottom of the console, at the right hand side you see multiple buttons: All, Errors, Warnings, Logs, Debug. You have to select All or Logs to see the output of console.log.
This has nothing to do with JSNetworkX though.

@Brian1966
Copy link
Author

Hello,

Problem seemed to be the IDE's ability to resolve the library. All seems to be working great library! Very quick to create and visualize graphs.

Regards
networkx

@fkling
Copy link
Owner

fkling commented Jun 17, 2013

Yeah, as I said, IDEs can have troubles to resolve dynamic languages. Happy coding! :)

@fkling fkling closed this as completed Jun 17, 2013
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

2 participants