Getting a View's NEXT selection


#1

I was wondering if it is possible to get the user’s next selection in code.

Thank you


#2

(goview).Selection.Primary is the first GoObject in the Selection collection…

Just iterate the Selection to see the rest:

    foreach (GoObject temp in this.Selection) {
      GoObject t = temp.SelectionObject;
      ...
    }

#3

But what if the item isn’t selected already? I am talking about the user’s next selection click.


#4

Does that make sense? Is there a built in way to get the next selection?


#5

How can code predict the future behavior of the user? The user might never select anything.


#6

Yeah, makes sense. I am just trying to create a link between the already selected Node and the next selected Node but can’t seem to figure out the logistics.


#7

In a GoView.ObjectGotSelection event handler you can look at the GoView.Selection collection to see what had been selected before. Then you can decide to create a new link or not.


#8

Is there way to write a method that returns an Object on a mouse click?


#9

Sections “Tools” and “Events”. Starts pg 11 in the User Guide.


#10

Alright, thanks…