Tcl/Tk Script Base

#######################################################################
#  Create the UI components in the window
#  This function MUST return 0
#
#  This method is optional, and you may delete this function,
#  if there is no UI to show
#######################################################################
proc ::hw::pmgr::${::hw::pmgr::namespace}::DisplayWnd {}
variable mainWnd;
variable id;

if {[WndExists] == 0}
# Create the basic wnd with the Apply, Next, Prev, Cancel buttons
# CreateWnd takes the title of the wnd and the label on the Apply
# button as arguments
CreateWnd "HWPM" "Apply"
}

return 0;
}

#######################################################################
# The heart of the module.  The actual action performed by the module
# will be done here
#######################################################################
proc ::hw::pmgr::${::hw::pmgr::namespace}::Exec {}
## ----------------------------------------------------------------
## NOTE:
## 1.  THIS PROCEDURE SHOULD RETURN 0 IF NO ERROR
##     ANY OTHER RETURN VALUE IMPLIES ERROR !!!
## 2.  DO NOT TRY TO GET VALUES FROM THE UI COMPONENTS -- THIS FUNC
##     IS ALSO CALLED IN PLAY MODE (NO WINDOW & UI COMPONENTS WILL
##     BE CREATED IN THAT MODE).  RELY ON DATA FROM THE DATAMODEL
## ----------------------------------------------------------------
variable id;

return 0;
}

#######################################################################
# This method will be called when
# 1. When the "Apply" button is pressed - this procedure will be called
#                                         before the Exec method
# 2. When you switch from this task to another.
#
#  This method is optional, and you may delete this function,
#  if not required
#######################################################################
proc ::hw::pmgr::${::hw::pmgr::namespace}::SetDataInDataModel {}
variable mainWnd;
variable id;
}

#######################################################################
# This method will be called in "Play" mode, before the Exec method is # called. Retrieve any data from the datamodel required and populate
# the global/namespace variables (if required)
#
# This method is optional, and you may delete this function,
# if not required
#######################################################################
proc ::hw::pmgr::${::hw::pmgr::namespace}::GetDataFromDataModel {}
variable mainWnd;
variable id;
}