[sedonadev] how to test that a link changed event is associated with the same kit?

12 views
Skip to first unread message

keith bradley

unread,
May 24, 2017, 7:16:47 PM5/24/17
to sedo...@googlegroups.com
Good afternoon all !

I am implementing a linkEvent callback.
I need to test whether an added or deleted link is not from another Comp in my kit ... and if so return.




  virtual override int linkEvent(int eType, Link link)
  {
if (Sys.kit(link.fromComp) != Sys.findKit("myKit")) return 0;

        // the link to my Comp is from another Comp in my kit.
  }



... I am not getting far.

link.fromComp should be the Comp ID (short) of the Comp that links to this ... right?

I am getting:

Must return a value from non-void method


mski

unread,
May 24, 2017, 8:29:08 PM5/24/17
to Sedona Framework
Your linkEvent method is defined to return an int.
You have told it to return 0 if link.fromComp indicates it is not from "myKit".
But you have not told it what to return if it *is*, so if that happens there is no return value.
That's what the error is about.

keith bradley

unread,
May 24, 2017, 9:27:37 PM5/24/17
to sedo...@googlegroups.com
AH! ... Thanks mski!



--
You received this message because you are subscribed to the Google Groups "Sedona Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sedonadev+unsubscribe@googlegroups.com.
To post to this group, send email to sedo...@googlegroups.com.
Visit this group at https://groups.google.com/group/sedonadev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages