access instance of a class from a different class?
<p>I have to create a user interface that allows the user to create a graph by adding vertices and edges. I have all the base coding done, and want to add a button to the gui to allow the addition of the vertex. i draw the graph from a canvas, in another class. Now my problem is, if i create the graph in the gui class, how do I access it from the canvas to draw it? Or if i create the graph in the canvas class, how do i let the button update the graph?
Not sure which code snippets to give...</p>
