#! ../mofe --f

# Sometimes, it is conceniant to associate any kind of data together
# with the widget. Such data can be stored in the resource userData of
# any Motif widget. User data can be a string or list as well. The
# data hold in userData will be deallocated when the widget is
# destroyed. The standard resource mechanisms (resource files,
# mergeResources, fallbackResource) can be used for defaults for
# userData.

XmPushButton b topLevel \
    labelString "Press me...." \
    width 250 \
    userData 0 \
    activateCallback {
       sV %W userData [expr [gV %W userData]+1]
       sV %W labelString "The value of userData is now [gV %W userData]"
    } 

realize
