Args Class
The Args class is used to pass arguments such as a name, a caller, and parameters between application objects.
Syntax
class Args extends xArgs implements SysPackable
Run On
Called
Methods
Method | Description | |
---|---|---|
allowUseOfPreloadedForm | Determines if the form launched for this instance may come from the pre-loaded form pool. (Inherited from xArgs.) | |
arrIdx | (Inherited from xArgs.) | |
caller | Gets or sets the instance of the object that created the instance of the Args class. (Overrides the caller Method.) | |
callerFormControl | (Inherited from xArgs.) | |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
copyCallerQuery | (Inherited from xArgs.) | |
dataset | Gets the table ID of the table in which the caller object is working. (Inherited from xArgs.) | |
designName | Gets or sets a string that indicates a design on a report or form. (Inherited from xArgs.) | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
extType | (Inherited from xArgs.) | |
finalize | Removes the current instance of the xArgs class from memory. (Inherited from xArgs.) | |
formViewOption | (Inherited from xArgs.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
initialQuery | (Inherited from xArgs.) | |
lookupField | Gets or sets the field ID in a table to use to look up a specified record. (Inherited from xArgs.) | |
lookupRecord | Finds a record in the specified table. (Inherited from xArgs.) | |
lookupTable | (Inherited from xArgs.) | |
lookupValue | Gets or sets a string to use with the LookupField method to find a value in a field of a table. (Inherited from xArgs.) | |
managedContentItemName | (Inherited from xArgs.) | |
menuItemName | Gets or sets the name of the menu item to use to start the application object. (Inherited from xArgs.) | |
menuItemType | Gets or sets the type of the menu item to use to start the called application object. (Inherited from xArgs.) | |
multiSelectionContext | (Inherited from xArgs.) | |
name | Gets or sets the name used in code to identify a form, report, rable, query, or another MSDAX application object. (Inherited from xArgs.) | |
new | Initializes a new instance of the Object class. (Inherited from xArgs.) | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
object | Gets and sets the application name of the object for which to open a new instance. (Overrides the object Method.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
openMode | (Inherited from xArgs.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
pack | Serializes the current instance of the Args class. | |
parentWnd | (Inherited from xArgs.) | |
parm | Gets or sets the parameter. (Inherited from xArgs.) | |
parmEnum | Gets or sets the enumeration value of the enumeration type that is specified in the parmEnumType method. (Inherited from xArgs.) | |
parmEnumType | Gets or sets the EnumType parameter. (Inherited from xArgs.) | |
parmObject | Gets or sets the instance of any object to pass to the called object. (Overrides the parmObject Method.) | |
record | Gets or sets the record from the table on which the caller object is working. (Inherited from xArgs.) | |
refField | (Inherited from xArgs.) | |
selectField | (Inherited from xArgs.) | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
setupArgs | (Inherited from xArgs.) | |
toString | Retrieves a string representation of an instance of the xArgs. (Inherited from xArgs.) | |
unpack | Deserializes the _pack parameter value to an instance of the Args class. | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::copyArgs | Copies data from an Args object into another Args object. | |
::create | Creates a new instance of an Args class. | |
::createFromArgs | Creates a new instance of an Args class based on another instance of the Args class. |
Top
Remarks
Forms, reports, and queries all use this class as their first argument in the constructor.
The preferred way to use this class is to call the Args.construct method, supply a name-string, and then pass the Args object to the constructor of the form or a ClassFactory method. If you want to see the xArgs object passed to one of these classes, it can be reached using the args method of that class.
The instance of the Args class that is sent from the caller can be created automatically by the kernel or explicitly by the caller. When the caller uses a menu item to call an object, an instance of the Args class is created by the kernel code. The menu item name will be set to the name of the menu item used. If the menu item has values for the Parameters , EnumParameter , or EnumTypeParameter properties set, the kernel will set the values of the corresponding Parm, ParmEnum, or ParmEnumType properties for this instance of the Args class.
Examples
The following example demonstrates how to explicitly create an instance of the Args class:
public static void main(Args args)
{
BankPaymCancel bankPaymCancel;
Args localArgs = new Args();
// Check the instance of the args class passed into this main method.
if (args && args.record())
{
bankPaymCancel = BankPaymCancel::newBankPaymCancel(args.record());
if (bankPaymCancel.prompt())
{
//The following lines set the caller and record methods on the instance of the localArgs class.
localArgs.caller(bankPaymCancel);
localArgs.record(args.record());
BankPaymCancel::serverRun(localArgs);
}
}
}
The following code example consumes an instance of the Args class:
public void init()
{
super();
//Check to see if the parmEnumType method has been set.
if (element.args().parmEnumType())
{
//Get the enum value specified in the parmEnum method.
salesUpdate = element.args().parmEnum();
selectionUpdate.selection(salesUpdate);
}
//Get the TableId value of the table record passed in the record method.
switch(element.args().record().TableId)
{
case tablenum(SalesTable) :
break;
case tablenum(SalesParmTable) :
salesParmTable= element.args().record();
selectionUpdate.allowEdit(false);
selectionUpdate.skip(true);
selectionUpdate.visible(false);
groupSelectionUpdate.visible(true);
break;
case tablenum(SalesBasket) :
salesBasket= element.args().record();
selectionUpdate.allowEdit(false);
selectionUpdate.skip(true);
selectionUpdate.visible(false);
groupSelectionUpdate.visible(true);
break;
}
}
Inheritance Hierarchy
Object Class
xArgs Class
Args Class
SysArgs Class