
In DesktopX 2, a widget developer would create several objects on the desktop and then attach bits of scripting to each one based on what they wanted it to do. This made it easier to create fairly simple widgets but more complex ones were a bit of a pain because DesktopX 2.x couldn't really create new objects.
That changes in DesktopX 3. In DesktopX 3, you can control everything in your widgets from a single script. One place this makes things easier is in terms of dealing with user input. In DesktopX 2, the object being clicked on was the object that had to handle the input. This could be a pain in the butt. DesktopX 3 lets callbacks be in the same script.
So let's say you have a widget with several buttons on it. Each button is an object. In DesktopX 2, each object would have to have a script to deal with what happened when the user clicked on that button. In DesktopX 3 a new API exists:
function Object_OnLButtonUp(szObjectName, x, y, bStatus)
{
}
So now you just supply the object name and you can handle its inputs from a single script.
You can read the full article by clicking on the link below.