# NOMADS Object

> Source: https://manual.pvxplus.com/nomads-graphical-application/appendix/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** |
| --- | --- |
| **BckLoad***ctrl*(*evn*(*id$+''''.load''''*)) | Background load logic for control *ctrl*. Invoked when there is no user input. Return value is the load status.<br>***Where:***<br>Load status can be:<br>**0** - Load in process  <br> **1** - Load completed  <br> **-1** - Force a reload<br>Control type can be a list box or grid.<br>Note:  <br>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](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/event-handler-routines/background-loading).<br>***Example:***<br>Sample program to load list box LB1 using the Background Load method:<br>```<br>     def class "BCKLOAD"<br>     like "*nomads"<br>     property SCREEN_LIB$="TEST.EN"<br>     property SCREEN_ID$="BCKLOAD"<br>     local C,Z,X2,Y2<br>     local LB1.LOAD<br>     function Preload()Predisplay_Logic ! panel header pre-display logic<br>     function BckloadLb1(loadstatus)Load_ListBox ! background loading logic for list box 'LB1'<br>     function Reload_Btn()Reload_Lbx ! on change logic for button 'Reload_Btn' (force background loading to occur for 'LB1')<br>     end def<br>!<br>Predisplay_Logic:<br>     c=0,z=0,X2=0,Y2=0<br>     LB1.LOAD=0<br>     return<br>! Load_ListBox:<br>     enter loadstatus<br>     Y2=Y2+100,z=Y2,c=X2<br>     if Y2>80000 \<br>          then loadstatus=1;<br>                  return loadstatus<br>     settrace print "Loading another 100 items starting at "+str(c)+" for list box 'LB1'"<br>     for I=c to z<br>          list_box load LB1.CTL,0,str(I)<br>     next<br>     X2=z+1<br>     return loadstatus<br>!<br>Reload_Lbx:<br>     c=0,z=0,X2=0,Y2=0<br>     LB1.LOAD=-1 ! force a reload<br>     list_box load LB1.CTL,""<br>     return<br>``` |
| **Change***ctrl*( ) | Invoked whenever the control *ctrl* changes its value. Return value is ignored. |
| **ClassBckLoad***class$*(*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.<br>***Where:***<br>Load status can be:<br>**0** - Load in process  <br> **1** - Load completed  <br> **-1** - Force a reload<br>Control type can be a list box or grid. See **[Background Loading](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/event-handler-routines/background-loading)**. |
| **ClassChange***class*(*id*) | Invoked whenever the control *id* changes its value and there is no specific change logic associated with the control. Return value is ignored.<br>Note:  <br>class refers to the class name. |
| **ClassDrag***class1***ClassDrop***class2$*(*\_dragfrom$,\_dropon$*) | Invoked when controls in *class1* are dropped on controls in *class2*. See **[Object-Oriented Programming](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/object-oriented-programming/overview)**. |
| **ClassFormatter***class$*(*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.<br>Note:  <br>class refers to the class name. |
| **ClassInitialize***class*(*id*) | Invoked to initialize the control *id* and there is no specific control initialization. Return value is ignored.<br>Note:  <br>class refers to the class name. |
| **ClassOnFocus***class*(*id*) | Invoked whenever the control *id* receives focus and there is no specific on focus logic associated with the control. Return value is ignored.<br>Note:  <br>class refers to the class name. |
| **ClassOnItemNeeded***class*(*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. |
| **ClassPush***class*(*id*) | Invoked when a button is pressed and there is no specific logic associated with the button. Return value is ignored.<br>Note:  <br>class refers to the class name. |
| **ClassValidate***class$*(*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.<br>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.<br>Note:  <br>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](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/event-handler-routines/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. |
| **Drag***ctrl1***Drop***ctrl2*( ) | Invoked when control *ctrl1* is dropped on control *ctrl2.* See **[Object-Oriented Programming](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/object-oriented-programming/overview)**. |
| **Formatter***ctrl$*(*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. |
| **Initialize***ctrl*( ) | Invoked to initialize the control *ctrl*. Return value is ignored. |
| **Jumpto**(*panel$,library$*) | Jump to a specific panel and library.<br>***Where:***<br>*panel$* Name of the panel  <br> *library$* Path to the library name ***(Optional)*** |
| **OnExit**( ) | Invoked when the user/application requests main panel termination.<br>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. |
| **OnExit***ffffff*( ) | This method is invoked when the user/application requests sub-panel *fffffff* to be terminated or closed.<br>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. |
| **OnFocus***ctrl*( ) | Invoked when control *ctrl* receives focus. Return value is ignored. |
| **OnItemNeeded***ctrl*( ) | 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. |
| **PostLoad***ffffff*( ) | 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. |
| **PreLoad***ffffff*( ) | This method is invoked before the sub-panel *fffffff* is displayed. |
| **RefreshScrn**( ) | Invoke screen refresh logic. |
| **Validate***ctrl*$(*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.<br>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. |
