1. Scott Roberts
  2. Education & Research
  3. Sunday, June 17 2018, 09:50 PM
  4.  Subscribe via email
Hello,

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:


local tRecordCount
put VCursor_RecordCount(tCursor) into tRecordCount

if tRecordCount <> 0 then
local tField

-- 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
else
put false into tSuccess
end if

Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
There are no such functions in V4REV.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Education & Research
  3. # 1
Ruslan Zasukhin Accepted Answer
Hi Scott,

you can download detailed PDF about methods in V4REV
https://goo.gl/KexYwE

it is marked as v5, but still valid - API is stable enough
Comment
There are no comments made yet.
  1. more than a month ago
  2. Education & Research
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories