[sedonadev] how to get a slot of the same name from all Comp's in a kit.

41 views
Skip to first unread message

keith bradley

unread,
May 31, 2017, 6:13:12 PM5/31/17
to sedo...@googlegroups.com
Good afternoon all  !

I have a slot named 'pointer' in every component in my kit.

I need to call a function within the linkEvent(int eType, Link link) callback.
passing the value in 'pointer' for all types in the kit.

When I try:

myFunc(link.fromComp.pointer)

link.fromComp resolves to a short which I am led to believe is the Component ID.

... so I get an error when I build the kit:

Unknown field: short.pointer


I assume I need to cast to the type that is the particular Comp linking from or to.


How could I do this when there is no one type?

Thanks!


Murat Egrikavuk

unread,
Jun 1, 2017, 4:07:34 AM6/1/17
to sedo...@googlegroups.com

Component comp = Sys.app.lookup(link.fromComp)
--
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 1, 2017, 1:06:22 PM6/1/17
to sedo...@googlegroups.com
Thanks Murat!

I'm going to have to buy you a steak dinner someday.

keith bradley

unread,
Jun 1, 2017, 7:17:19 PM6/1/17
to sedo...@googlegroups.com

So I ran into a few issues:



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

if (Sys.kit(link.fromComp) == Sys.findKit("myKit"))
{
 if (eType == ADDED)
 {
addedLink(((Parent_Type)c).pointer, pointer, Clinked.pointer, 29)
return 0
 }
}
  }


... got:

Unknown field: sys::Component.pointer

How do I cast CLinked when there are several Comp in the kit ??

Thanks!







Reply all
Reply to author
Forward
0 new messages