XWidgetSoft Forum https://bbs.xwidget.com/ |
|
HELP: Can Widgets Communicate?- CLOSED https://bbs.xwidget.com/viewtopic.php?f=8&t=5148 |
Page 1 of 1 |
Author: | yereverluvinuncleber [ October 15th, 2014, 3:22 pm ] |
Post subject: | HELP: Can Widgets Communicate?- CLOSED |
How can Xwidgets talk to each other? Is there a built-in method of relaying information from one Xwidget to another? On some widget engines, the widgets have a method for passing information through a tellwidget() function or similar. This allows you to set up a listening routine on the target widget. Has anyone done this? I'll need this functionality for one of my widgets to work with others. |
Author: | meme [ October 17th, 2014, 5:11 pm ] |
Post subject: | Re: HELP: Can Widgets Communicate? |
Messages - example // In the sender widget use this code from the button click to close all widgets function button1OnClick(Sender) { msg("close","receiver"); // add extra lines replacing "receiver" with the name of the widgets you wish to close } // In the widget you wish to close add this code function widgetOnMsg(MsgString) { if(MsgString=="close") widget.close } Dont forget in the widget you wish to close to set the function OnMsg = widgetOnMsg so the code runs when a message is received Topic here |
Author: | yereverluvinuncleber [ October 18th, 2014, 3:26 am ] |
Post subject: | Re: HELP: Can Widgets Communicate? |
Very good Meme, very useful, thanks! A very useful function and I'm glad Xwidget has it. Marked as CLOSED. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |