web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Tables as Classes

Hossein.K Profile Picture Hossein.K 6,648
A table can be considered an independent class used to address fields or methods
defined on that table. In fact when a table is instantiated, it is done so with the
system class called xRecord. This class contains methods called when
committing record changes to the database and some other system methods that
operate on records.
Differences between tables and classes include the following:
• A place for a table buffer is automatically assigned in a table (in
classes the new method is used).
• Fields in tables are public; they can be referred to from everywhere.• Fields in tables can be referred to directly; for example, in a report,
whereas variables in a method can only be referred to using accessor
methods.

Table CodeThe following example illustrates how table code differs from code for a class.

1
2
3
4
str text;
text = CustTable.name; // Fields in a table are public
print CustTable.name; // Fields in a table can be
referred to directly

Best Regards,
Hossein Karimi

Comments

*This post is locked for comments