[DGD] call_touch

Erwin Harte harte at is-here.com
Tue Sep 9 20:31:09 CEST 2008


chris . wrote:
> The documentation in /doc/kfun/ shows me that call_touch has one 
> argument, an object. Within the object manager functions, the 
> function touch has a second argument, function. Does this function 
> always have a specific name, or is it definable?  There isnt a 
> second arg to call_touch, right?

Correct, there isn't.  This is the description of the touch() hook:

    * int touch(object obj, string function)

        An object which has been marked by call_touch() is about to
        have the given function called in it.  A non-zero return value
        indicates that the object's "untouched" status should be
        preserved through the following call.

When an object is just about to be 'touched' because some function
call will be made in it (and someone had previously requested that it
be notified about that) the DGD code calls the driver object with the
object and said function's name.  The driver object can then do
something useful with this information.

In the kernel-lib's case it calls the touch() in the object manager,
passing the information on as-is, that's why there is an argument
named 'function' there.

Hope that helps,

Erwin.



More information about the DGD mailing list