Orange Forum • View topic - Widget dev: pointer to sending widget

Widget dev: pointer to sending widget

A place to ask questions about methods in Orange and how they are used and other general support.

Widget dev: pointer to sending widget

Postby axanthos » Thu Aug 15, 2013 14:22

Hi,

Working on Orange Textable, I find that the id received by a multi-input widget (cf http://orange.biolab.si/doc/extend-widgets/channels.htm) is no longer a reference to the sending widget but an int.

Unfortunately Orange Textable was using this id (the widget reference) and the change breaks some functionalities.

Is there an alternative way to retrieve a reference to the sending widget, ideally by using the new int id (maybe as a list index)?

Thanks in advance.

Re: Widget dev: pointer to sending widget

Postby axanthos » Fri Aug 16, 2013 22:57

I've found the answer to my own question at http://orange.biolab.si/docs/latest/extend-widgets/rst/api/#output-channels:

When tokens are send around, the signaling mechanism annotates them with a pointer to an object that sent the toke (e.g., a widget id). Additionally, this annotation can be coupled with some name passed to send...


Thus if the sending widget annotates the token with a reference to (it-)self, the receiving one can access it by means of this annotation.

I'll post an updated (fixed) version of Orange Textable as soon as I'm done translating the first part of the existing tutorial from French to English.


Return to Questions & Support