Все,
В одном из наших приложений базы данных Filemaker Server 10 клиентский пользователь периодически получал ошибки -1728 при запуске скрипта, прикрепленного к кнопке:
Неизвестная ошибка: -1728
Основываясь на том, что я узнал от пользователя, ошибка -1728 возникает прямо перед командой «показать макет». (увидеть ниже). Я подозреваю, что команда «set theInventoryID» выполняется прямо перед ошибкой:
set theDatabaseName to "F&B POs"
set theCellName to "Product ID"
tell application "FileMaker Pro"
set theInventoryID to contents of cell "ID" of current record
tell database theDatabaseName
-- -1728 error happens here!!
show layout "Inventory - All Quantities"
show every record
...
Какова наилучшая практика в FM, чтобы защититься от этого?
Что-то типа?
tell application "FileMaker Pro"
try
set theInventoryID to contents of cell "ID" of current record
on error
display dialog ("Make sure all inventory ids are valid")
end try
tell database theDatabaseName
-- -1728 error happens here
show layout "Inventory - All Quantities"
show every record
...
Спасибо!