dmill-bz / gremlin-bin

Placeholder for gremlin-bin website issues
19 stars 1 forks source link

Customized graph initializations no longer work #16

Closed dkuppitz closed 8 years ago

dkuppitz commented 8 years ago

Trying to initialize a custom graph using that script:

Vertex v1 = graph.addVertex()

... fails with the following error:

No such property: graph for class: Script20 >
dmill-bz commented 8 years ago

Looks like the creation page isn't all that clear. You actually need to define graphand g:

graph = TinkerGraph.open();
g = graph.traversal();
Vertex v1 = graph.addVertex();

There's reason for this madness as I was planning (still am) to allow Titan (neo4j/etc.) graph implementations. Also not only does this allow people to chose their implementation manually but they can also define multiple graphs if required. That box really is for full manual control.

Something can probably be changed around to make this more intuitive and easier to understand though.

dkuppitz commented 8 years ago

Indeed, then I just didn't get it / read carefully enough. I selected "empty graph" and tried to add vertices and edges using the provided sample (Vertex v1 = graph.addVertex()). Maybe provide a 3-line sample snippet, that creates a "graph" with one vertex. When I see a code snippet, I tend to ignore the text around it and instead just copy+paste the code to try it out.

dmill-bz commented 8 years ago

That's a really good idea, I could probably add it as a placeholder as well.

There was another suggestion on the mailing list to put one submit button for each section. That way it's obvious that they are separate.

I'll probably implement both.

dmill-bz commented 8 years ago

I pushed changes that should make this way easier.