Braodcasting

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Braodcasting

Postby danny.richadson » Thu Nov 08, 2018 11:46 am

How can I write a OnBroadCasting method that only overwrite certain situation and al other situation are handled as 'normal'? In the documenation it is not clear to me how this behavoir works. I would like something like:

function onDataBroadcast(dataSource, action, pks, cached) {

if ((dataSource == '.....' )&& (action == SQL_ACTION_TYPES.UPDATE_ACTION)) {
do something.......
} else {
super() // or some statement that will run de default behavior
}
}
Danny Richardson
e-mail: [email protected]
User avatar
danny.richadson
 
Posts: 30
Joined: Wed Oct 17, 2007 3:46 pm
Location: Netherlands

Re: Braodcasting

Postby goldcougar » Thu Nov 08, 2018 11:18 pm

The onDataBrodcast isn't like the Servoy table events where you can stop it by returning false, or change what the default behavior will be. You can only hook into the event, and add extra stuff you want to happen, like notify other Servoy servers about the change. So, by just doing nothing, the default behavior will happen (which is just notifying local clients on the server about the broadcast event)
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
goldcougar
Servoy Expert
 
Posts: 666
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests

cron