Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Distinguishing between programmatically raised events and user triggered events (Read 1535 times)
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Distinguishing between programmatically raised events and user triggered events
Aug 1st, 2016 at 11:04am
Print Post  
Hi,

I'm trying to distinguish in the event handler of OnNodeSelected and OnLinkSelected of a diagram wheater a user or the program selected the Node/Link and therefore raised the event.

Is there a way to do that?

Best regards,

Cyrinael
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Distinguishing between programmatically raised events and user triggered events
Reply #1 - Aug 2nd, 2016 at 6:23am
Print Post  
Hi,

I can't find any way to detect it from the API, so you'll have to set a boolean flag or detach the handler temporarily when the program selects. If you are not interested in selection state itself but in mouse clicks, you could handle NodeClicked and LinkClicked instead.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Re: Distinguishing between programmatically raised events and user triggered events
Reply #2 - Aug 2nd, 2016 at 8:30am
Print Post  
Hi Slavcho,

i will detatch the handler as you described it. I just hoped, there would be a more elegant way to do that.

Thank you for your effort,

Cyrinael
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint