space
Previous Page | Next Page

The BUILD Procedure

SYNC Statement


Updates RESOURCE entries to incorporate changes made to one or more CLASS entries contained in the RESOURCE entries, or updates CLASS and FRAME entries to re-establish links from instance variables in the CLASS or FRAME entries to the parent classes.
Note: The synchronization operation is performed before the procedure opens any windows.
Tip: By default, all CLASS, FRAME, and RESOURCE entries in the current catalog (the catalog that was specified in the PROC BUILD statement) are synchronized. You can use the SELECT= option to select individual entries to synchronize, or use the EXCLUDE= option to prevent certain entries from being synchronized.

SYNC <ENTRYTYPE=entry-type>
<EXCLUDE=entry-name.entry-type | (entry-list)> | <SELECT=entry-name.entry-type | (entry-list) >

ENTRYTYPE=entry-type
ET=entry-type

specifies the type of entry to synchronize. By default, all CLASS, FRAME, and RESOURCE entries in the current catalog are synchronized (unless you also use the SELECT= or EXCLUDE= option). Use the ENTRYTYPE= option to synchronize only entries of the specified type.

To synchronize entries of more than one type, use a separate SYNC statement for each entry type.

EXCLUDE=entry-name.entry-type | (entry-list)
SELECT=entry-name.entry-type | (entry-list)

specify catalog entries to exclude from or select for synchronizing. By default, all CLASS, FRAME, and RESOURCE entries in the current catalog are synchronized (unless you also use the ENTRYTYPE= option). Use the EXCLUDE= option to prevent specified entries from being synchronized. Use the SELECT= option to synchronize only specified entries. If you specify more than one entry for either of these options, enclose the list in parentheses and separate the names with spaces.

If you use the ENTRYTYPE= option in the same SYNC statement, you can omit the entry-type portion of the entry specification for the EXCLUDE= or SELECT= options because only entries of the type specified in the ENTRYTYPE= option can be synchronized.

Each SYNC statement can include only one EXCLUDE= option or one SELECT= option. However, you can use multiple SYNC statements with the same PROC BUILD statement.


Using the SYNC Statement

Objects and classes can link their instance variables to their parent classes, enabling you to change instance variables in a class. The change will also affect instances in subclasses of that class. However, it is possible to break the link to the parent class by changing a value to something other than the value specified in the parent, then changing it back. This gives you an instance variable that has the same value as the variable in the parent class. Synchronization restores this link by removing the duplicate item from the object attribute list (for FRAME entries) or from the class instance variables list (for CLASS and RESOURCE entries).

Note:   You can also synchronize CLASS, FRAME, and RESOURCE entries by issuing the SYNC command in the BUILD procedure windows while editing the entries.  [cautionend]

space
Previous Page | Next Page | Top of Page