# OOP Interface

NOMADS Object |

The NOMADS object (*nomads.pvc) includes methods for control events, panel events, classes and folders. The available methods are listed below.

Methods | Description
BckLoadctrl(evn(id$+''''.load'''')) | Background load logic for control ctrl. Invoked when there is no user input. Return value is the load status. Where: Load status can be: 0 - Load in process 1 - Load completed -1 - Force a reload Control type can be a list box or grid. #### Note: To force a reload of a list box or grid, you must define the controlname.load variable as a local variable (see Example). See Background Loading. Example: Sample program to load list box LB1 using the Background Load method: def class "BCKLOAD" like "*nomads" property SCREEN_LIB$="TEST.EN" property SCREEN_ID$="BCKLOAD" local C,Z,X2,Y2 local LB1.LOAD function Preload()Predisplay_Logic ! panel header pre-display logic function BckloadLb1(loadstatus)Load_ListBox ! background loading logic for list box 'LB1' function Reload_Btn()Reload_Lbx ! on change logic for button 'Reload_Btn' (force background loading to occur for 'LB1') end def ! Predisplay_Logic: c=0,z=0,X2=0,Y2=0 LB1.LOAD=0 return ! Load_ListBox: enter loadstatus Y2=Y2+100,z=Y2,c=X2 if Y2>80000 \ then loadstatus=1; return loadstatus settrace print "Loading another 100 items starting at "+str(c)+" for list box 'LB1'" for I=c to z list_box load LB1.CTL,0,str(I) next X2=z+1 return loadstatus ! Reload_Lbx: c=0,z=0,X2=0,Y2=0 LB1.LOAD=-1 ! force a reload list_box load LB1.CTL,"" return
Changectrl( ) | Invoked whenever the control ctrl changes its value. Return value is ignored.
ClassBckLoadclass$(id,evn(id$+''''.load'''')) | Background load logic for controls in class class. Invoked when there is no user input. Return value is the load status. Where: Load status can be: 0 - Load in process 1 - Load completed -1 - Force a reload Control type can be a list box or grid. See Background Loading.
ClassChangeclass(id) | Invoked whenever the control id changes its value and there is no specific change logic associated with the control. Return value is ignored. #### Note: class refers to the class name.
ClassDragclass1ClassDropclass2$(_dragfrom$,_dropon$) | Invoked when controls in class1 are dropped on controls in class2. See Object-Oriented Programming.
ClassFormatterclass$(id,new_val$,id$) | Invoked to format the new contents of id. It should return an error message if the value is invalid. Returning a null string indicates that the value is acceptable. #### Note: class refers to the class name.
ClassInitializeclass(id) | Invoked to initialize the control id and there is no specific control initialization. Return value is ignored. #### Note: class refers to the class name.
ClassOnFocusclass(id) | Invoked whenever the control id receives focus and there is no specific on focus logic associated with the control. Return value is ignored. #### Note: class refers to the class name.
ClassOnItemNeededclass(id) | Load On Demand logic for all controls in class class. Invoked when user scrolls the control to request items. Supported on the following list box types (Standard, Formatted, List View). Return value is ignored.
ClassPushclass(id) | Invoked when a button is pressed and there is no specific logic associated with the button. Return value is ignored. #### Note: class refers to the class name.
ClassValidateclass$(id,new_val$,id$) | Invoked to validate the new contents of id. It should return an error message if the value is incorrect. Returning a null string indicates that the value is acceptable. If the message is blank (NUL(msg) returns true), it is assumed you have displayed the error message in your validator routine, and the field will be rejected upon return to *winproc. Control-specific methods override class methods. #### Note: class refers to the class name.
DefaultBckLoad(evn(id$+''''.load'''') | Default method invoked for background loading of a list box or grid and no field specific logic exists. See Background Loading.
DefaultChange( ) | Default method invoked when a field changes and no field specific logic exists. Return value is ignored.
DefaultFolderOnExit( ) | Default folder on-exit logic. Invoked when the user/application requests the current tab to be terminated or closed. If the method returns 0, then the tab will not be terminated.
DefaultFolderPostLoad( ) | Default folder post-load logic. Invoked after the tab contents are displayed but before the first input. Return value is ignored.
DefaultFolderPreload( ) | Default folder pre-load logic. Invoked before the tab contents are displayed. Return value is ignored.
DefaultFormatter$(new_val$) | Default method invoked to format a field and no field specific logic exists.
DefaultInitialize( ) | Default panel field initialization logic. Return value is ignored.
DefaultOnFocus( ) | Default method invoked when a field receives focus and no field specific logic exists. Return value is ignored.
DefaultOnItemNeeded( ) | Default method invoked for standard, formatted or list view list boxes using Load-On-Demand and no field specific logic exists.
DefaultPush( ) | Default method invoked when a button is pressed and there is no specific logic associated with the button. Return value is ignored.
DefaultValidate$(new_val$) | Default method invoked to validate a field and no field specific logic exists.
Dragctrl1Dropctrl2( ) | Invoked when control ctrl1 is dropped on control ctrl2. See Object-Oriented Programming.
Formatterctrl$(new_val$,id$) | Invoked to format the new contents of ctrl. It should return an error message if the value is invalid. Returning a null string indicates that the value is acceptable.
GetName$(id) | Get control name for control id.
GetVariable$(id) | Get variable name for control id. Will return string or numeric variable name.
Initializectrl( ) | Invoked to initialize the control ctrl. Return value is ignored.
Jumpto(panel$,library$) | Jump to a specific panel and library. Where: panel$ Name of the panel library$ Path to the library name (Optional)
OnExit( ) | Invoked when the user/application requests main panel termination. Return value must be 1 in order to allow the panel to terminate. If the method returns 0, then the panel will not be closed.
OnExitffffff( ) | This method is invoked when the user/application requests sub-panel fffffff to be terminated or closed. Return value must be 1 in order to allow the sub-panel to terminate. If the method returns 0, then the sub-panel will not be closed.
OnFocusctrl( ) | Invoked when control ctrl receives focus. Return value is ignored.
OnItemNeededctrl( ) | Load On Demand logic for control ctrl. Invoked when user scrolls the control to request items. Supported on the following list box types (Standard, Formatted, List View). Return value is ignored.
PostLoad( ) | Invoked after the main panel is displayed but before the first input. Return value is ignored.
PostLoadffffff( ) | This method is invoked after the sub-panel fffffff is displayed but before the first input.
PostResize_ffffff( ) | This method is invoked after the panel fffffff has been resized.
PreLoad( ) | Invoked before the main panel is displayed. Return value is ignored.
PreLoadffffff( ) | This method is invoked before the sub-panel fffffff is displayed.
RefreshScrn( ) | Invoke screen refresh logic.
Validatectrl$(new_val$,id$) | Invoked to validate the new contents of ctrl. It should return an error message if the value is invalid. Returning a null string indicates that the value is acceptable. If the message is blank (NUL(msg) returns true), it is assumed you have displayed the error message in your validator routine, and the field will be rejected upon return to *winproc.
Ctrl( ) | Invoked whenever the button Ctrl is pressed; e.g. if a button on the panel has the name Add, pressing it causes the method Add( ) to be invoked. Return value is ignored.
'_Parent | Provides the object handle to the prior OOP-based NOMADS panel.