Navigation: ABC Library Reference > QueryClass > QueryClass Methods >====== Reset (reset the QueryClass object) ====== | |
Reset( [ name ] )
Reset | Resets the QueryClass object. |
name | A string constant, variable, EQUATE, or expression containing the queryable item to reset. Queryable items are established by the AddItem method. If omitted, the Reset method resets all the queryable items. |
The Reset method resets the QueryClass object by clearing prior query values.
Implementation:
The Reset method calls the SetLimit method to clear the search values for each queryable item.
Example:
MyQueryForm.Ask PROCEDURE(BYTE UseLast) !derived class Ask method
W WINDOW('Example values'),CENTER,SYSTEM,GRAY !declare user input dialog
BUTTON('&OK'),USE(?Ok,1000),DEFAULT
BUTTON('Cancel'),USE(?Cancel,1001)
END
CODE
OPEN(W)
IF ~UseLast THEN SELF.Reset(). !preserve or discard prior query
IF SELF.Win.Run()=RequestCancelled !show dialog and handle events
RETURN Level:Benign !return Cancel indicator
ELSE
RETURN Level:Notify !return OK indicator