[sedonadev] how to find the string name of a slot inside linkEvent callback.

37 views
Skip to first unread message

keith bradley

unread,
Jun 3, 2017, 11:25:00 PM6/3/17
to sedo...@googlegroups.com
Hello a sedona peeps!

So given:

  virtual override int linkEvent(int eType, Link link)
  {
Component cLinked = Sys.app.lookup(link.fromComp)

??
  }


... how would I check to see if link.fromSlot is the 'out' slot?
link.fromSlot returns a byte ID.




  virtual override int linkEvent(int eType, Link link)
  {
Component cLinked = Sys.app.lookup(link.fromComp)

Slot sLinked = cLinked.findSlot("out")
if (cLinked.Slot.id == link.fromSlot) "do somthing"?
  }

... should I use safe navigation here?
... where should I put the question mark?

I am still struggling to figure out this OPP stuff.

Thanks!











Murat Egrikavuk

unread,
Jun 4, 2017, 3:52:23 AM6/4/17
to sedo...@googlegroups.com

Shouldn't that be: "if (sLinked.id == link.fromSlot)" ?
--
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+...@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.



keith bradley

unread,
Jun 4, 2017, 11:32:47 AM6/4/17
to sedo...@googlegroups.com
AH! ... Thanks Murat.



On Sun, Jun 4, 2017 at 2:52 AM, Murat Egrikavuk <murat.e...@ontrol.com.tr> wrote:

Shouldn't that be: "if (sLinked.id == link.fromSlot)" ?



On Sun, 04 Jun 2017 06:24:58 +0300, keith bradley <kmbra...@gmail.com> wrote:

Hello a sedona peeps!

So given:

  virtual override int linkEvent(int eType, Link link)
  {
Component cLinked = Sys.app.lookup(link.fromComp)

??
  }


... how would I check to see if link.fromSlot is the 'out' slot?
link.fromSlot returns a byte ID.




  virtual override int linkEvent(int eType, Link link)
  {
Component cLinked = Sys.app.lookup(link.fromComp)

Slot sLinked = cLinked.findSlot("out")
if (cLinked.Slot.id == link.fromSlot) "do somthing"?
  }

... should I use safe navigation here?
... where should I put the question mark?

I am still struggling to figure out this OPP stuff.

Thanks!











--
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.

--
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.
Reply all
Reply to author
Forward
0 new messages