Object_Name as C = <OBJECT>.NAME( [ Flag as N ] )
The <OBJECT>.NAME() method applies to:
Alpha Five (for <OBJECT> use the keyword "A5")
Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)
The <OBJECT>.NAME() method returns the object's name.
Alpha Five Version 5 and Above
Desktop applications only.
This script finds the name of the first object on the "Customer" form:
dim frm as P
frm = form.view("Customers")
obj = frm.child(1)
name = obj.name()
? name -> "Customers"
If Flag is 1, the actual name of the layout is returned (not the alias). For example, if two instances of the "customer" form are open, topparent.name() would return "customer" for the first instance, and "customer0" (or some other unique name) for the second instance. However, topparent.name(1) returns "customer" for both instances.
Form Functions and Methods, Browse Functions and Methods