User Tools

Site Tools


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

Init, VIRTUAL, PROC

blk2blue.jpg

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

The Init method both “programs” the WindowManager object and initializes the overall procedure.

The WindowManager may be configured to implement a variety of options regarding update windows (forms). You can use the Init method to configure form behavior by setting the Request, InsertAction, ChangeAction, and DeleteAction properties.

The WindowManager is closely integrated with several other ABC Library objects. You can use the Init method to register these other objects with the WindowManager by calling the AddItem method. The objects can then set each other's properties and call each other's methods as needed to accomplish their respective goals.

Implementation:

Typically, the Init method is paired with the Kill method, performing the converse of the Kill method tasks.

The Run method calls the Init method.

Return value EQUATEs are declared in ABERROR.INC.

TipBox.jpg

To prevent the Ask method from starting, RETURN Level:Notify from the Init method.

Return Data Type:     BYTE

Example:

MyWindowManager.Run PROCEDURE

CODE

IF SELF.Init() = Level:Benign

 SELF.Ask

END

SELF.Kill

ThisWindow.Init PROCEDURE()

CODE

SELF.Request = GlobalRequest

PARENT.Init()

SELF.FirstField = ?Browse:1

SELF.VCRRequest &= VCRRequest

SELF.Errors &= GlobalErrors

SELF.AddItem(Toolbar)

CLEAR(GlobalRequest)

CLEAR(GlobalResponse)

SELF.AddItem(?Close,RequestCancelled)

Relate:Client.Open

FilesOpened = True

OPEN(QuickWindow)

SELF.Opened=True

Resizer.Init(AppStrategy:Surface,Resize:SetMinSize)

SELF.AddItem(Resizer)

Resizer.AutoTransparent=True

BRW1.Init|

(?Browse:1,Queue:Browse:1.Position,BRW1::View:Browse,Queue:Browse:1,Relate:Client,SELF)

BRW1.Q &= Queue:Browse:1

BRW1::Sort1:StepClass.Init(+ScrollSort:AllowAlpha,ScrollBy:Runtime)

BRW1.AddSortOrder(BRW1::Sort1:StepClass,CLI:NameKey)

BRW1.AddLocator(BRW1::Sort1:Locator)

BRW1::Sort1:Locator.Init(,CLI:Name,1,BRW1)

BRW1.AddField(CLI:Name,BRW1.Q.CLI:Name)

BRW1.AddField(CLI:StateCode,BRW1.Q.CLI:StateCode)

BRW1.AddField(CLI:ID,BRW1.Q.CLI:ID)

BRW1.InsertControl=?Insert:2

BRW1.ChangeControl=?Change:2

BRW1.DeleteControl=?Delete:2

BRW1.AddToolbarTarget(Toolbar)

BRW1.AskProcedure = 1

SELF.SetAlerts()

RETURN Level:Benign

See Also:     AddItem, Ask, Kill, Run

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