I am having difficulty figuring out how to use the VCursor Class Casting Field Methods in LiveCode.
If I use the VCursor_Field() method, then everything works fine. However, if I attempt to use, for example, VCursor_UShortField() then I get an "error in function handler" error.
What is the correct LiveCode syntax for these methods?
The code that I am using is:
put VCursor_RecordCount(tCursor) into tRecordCount
if tRecordCount <> 0 then
-- These two statements will operate as expected
put VCursor_Field(tCursor, "number_of_recently_opened_databases") into tField
put VField_Value(tField) into sNumberOfRecentlyOpenedDatabases
-- These two statements are the way that I would like to code this because I know that the field in the database is an unsigned short
-- This statement generates an "error in function handler" error
put VCursor_UShortField(tCursor, "number_of_recently_opened_databases") into tField
put VUShort_Value(tField) into sNumberOfRecentlyOpenedDatabases
put true into tSuccess
put false into tSuccess