Language Reference Guide : C. Generated User Classes : Query_Control User Class : Setup Method
 
Share this page                  
Setup Method
The Setup method initializes the object, identifying the QueryObject and query toolbar elements to the Query_Control.
This method has the following syntax:
integer = Query_Control.Setup(querytarget = DataStream default
          null, querybar = CompositeField default null,
          browsebar = CompositeField default null,
          criteriabar = CompositeField default null,
          sortbar = CompositeField default null,
          gobutton = ButtonField default null)
The queryTarget identifies the QueryObject (a subclass of DataStream) and is required. The other parameters are each optional, although a minimal subset of them is required. Generally, you should simply pass a reference to your query bar field as querybar, and let the QueryObject find the component fields on its own. However, if you use the toolbar segments individually rather than as part of a query bar, you must identify each one to the Query_Control.