User Tools

Site Tools


init_initialize_the_queryformvisual_object_.htm
Navigation:  ABC Library Reference > QueryFormVisual > QueryFormVisual Methods >====== Init (initialize the QueryFormVisual object) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Init, VIRTUAL, PROC

blk2blue.jpg

The Init method initializes the QueryFormVisual object. Init returns Level:Benign to indicate normal initialization.

The Init method “programs” the QueryFormVisual object.

Implementation:

The QueryFormClass.Ask method (indirectly) calls the Init method to configure the QueryFormClass WINDOW.

For each queryable item (defined by the QFC property), the Init method creates a series of window controls to accept search values. By default, each queryable item gets a prompt, an entry control, and an query operator button (equal, not equal, greater than, etc.).

The Init method sets the coordinates for the QueryFormClass WINDOW and for the individual controls.

Return Data Type:     BYTE

Example:

MyQuery.Ask PROCEDURE(BYTE UseLast)

W    WINDOW('Query values'),GRAY   !declare an “empty” window

      BUTTON('&OK'),USE(?Ok,1000),DEFAULT

      BUTTON('Cancel'),USE(?Cancel,1001)

    END

 CODE

 OPEN(W)

 IF SELF.Win.Run()=RequestCancelled !configure, display & process query dialog

                     ! Win &= QueryFormVisual

                     ! Win.Run calls Init, Ask & Kill

                     ! Win.Init configures the dialog

                     ! Win.Ask displays dialog & handles events

                     ! Win.Kill shuts down the dialog

 RETURN Level:Notify

ELSE

 RETURN Level:Benign

END

See Also:     QFC

init_initialize_the_queryformvisual_object_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1