I've run into a bizarre problem which makes me wonder if Alpha is behaving as desired. Namely, I have several operations which are run from Xbasic scripts. Since the operations require you to specify the master and transaction tables I would have thought that they were completely independent of which form contained the script from which they were called. Instead, I have found out the *&^%$#*! way that they are dependent on the table.current().
Specifically, a form based on Table_A has a button with a script which calls the Append_1 operation. In the Append_1 operation, the master table is Table_B and the transaction table is Table_C. When this script runs, Append_1 completes its task and the usual message box appears stating the number of appended records. Upon pressing OK, however, the script has an error reading: "Object does not support requested interface."
Upon viewing the Xbasic code for the Append_1 operation, I later realized that the operation opens the "current" table onto which it later applies the append method:
a_tbl = table.current()
. . .
. . .
a_tbl.append()
This implies that the behavior of an operation is dependent on what tables are open at the time the operation is called. Hence, if two forms are based on different tables, you cannot call the same operation from each form and expect the same results. Have others encountered this problem?
Workarounds (e.g. opening files prior to calling the operation) are obvious but I wouldn't have expected such to be required. Thank you.
Steve
Specifically, a form based on Table_A has a button with a script which calls the Append_1 operation. In the Append_1 operation, the master table is Table_B and the transaction table is Table_C. When this script runs, Append_1 completes its task and the usual message box appears stating the number of appended records. Upon pressing OK, however, the script has an error reading: "Object does not support requested interface."
Upon viewing the Xbasic code for the Append_1 operation, I later realized that the operation opens the "current" table onto which it later applies the append method:
a_tbl = table.current()
. . .
. . .
a_tbl.append()
This implies that the behavior of an operation is dependent on what tables are open at the time the operation is called. Hence, if two forms are based on different tables, you cannot call the same operation from each form and expect the same results. Have others encountered this problem?
Workarounds (e.g. opening files prior to calling the operation) are obvious but I wouldn't have expected such to be required. Thank you.
Steve
Comment