Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

JSValueMBS.booleanValue as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Converts a JavaScript value to boolean and returns the resulting boolean.
Example:
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithBool(true)
MsgBox str(j.booleanValue)
Notes: (Read only property)

Feedback, Comments & Corrections

JSValueMBS.context as JSContextMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: The context for this value.
Notes: (Read only property)

Feedback, Comments & Corrections

JSValueMBS.doubleValue as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Converts a JavaScript value to number and returns the resulting number.
Example:
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithDouble(5.3)
MsgBox str(j.doubleValue)
Notes:
Returns the numeric result of conversion, or NaN if an exception is thrown.
(Read only property)

See also:

Feedback, Comments & Corrections

JSValueMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: The internal object reference.
Notes: (Read and Write property)

Feedback, Comments & Corrections

JSValueMBS.isArray as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value is an array.
Example:
dim c as new JSContextMBS

dim e as JSValueMBS
dim v as JSValueMBS = c.NewArray(nil, e)

MsgBox str(v.isArray)
Notes:
Returns true if value is an array, otherwise false.
Requires OS X 10.11 or newer.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isBoolean as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the boolean type.
Example:
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithBool(true)
MsgBox str(j.isBoolean)
Notes:
Returns true if value's type is the boolean type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isDate as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value is a date.
Example:
dim c as new JSContextMBS

dim year as JSValueMBS = c.valueWithDouble(2015)
dim month as JSValueMBS = c.valueWithDouble(5)
dim day as JSValueMBS = c.valueWithDouble(12)

dim e as JSValueMBS // exception
dim d as JSValueMBS = c.NewDate(array(year, month, day), e)

MsgBox str(d.isDate)
Notes:
Returns true if value is a date, otherwise false.
Requires OS X 10.11 or newer.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isNull as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the null type.
Example:
dim c as new JSContextMBS
dim n as JSValueMBS = c.valueWithNull

MsgBox str(n.isNull)
Notes:
Returns true if value's type is the null type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isNumber as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the number type.
Example:
dim c as new JSContextMBS

dim j as JSValueMBS = c.valueWithDouble(5)
MsgBox str(j.isNumber)
Notes:
Returns true if value's type is the number type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isObject as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the object type.
Example:
dim c as new JSContextMBS

dim e as JSValueMBS
dim v as JSValueMBS = c.NewArray(nil, e)

MsgBox str(v.isObject)
Notes:
Returns true if value's type is the object type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isString as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the string type.
Example:
dim c as new JSContextMBS
dim s as JSValueMBS = c.valueWithJSON("""Hello""")
MsgBox str(s.isString)
Notes:
Returns true if value's type is the string type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.isUndefined as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Tests whether a JavaScript value's type is the undefined type.
Example:
dim c as new JSContextMBS

dim j as JSValueMBS = c.valueWithUndefined
MsgBox str(j.isUndefined)
Notes:
Returns true if value's type is the undefined type, otherwise false.
(Read only property)

Feedback, Comments & Corrections

JSValueMBS.JSONString as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Creates a JavaScript string containing the JSON serialized representation of a JS value.
Example:
dim c as new JSContextMBS

dim v as JSValueMBS = c.valueWithString("Hello")
MsgBox v.JSONString
Notes:
Requires Mac OS X 10.7 and newer.
(Read only property)

See also:

Feedback, Comments & Corrections

JSValueMBS.StringValue as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Converts a JavaScript value to string and copies the result into a JavaScript string.
Example:
dim c as new JSContextMBS

dim v as JSValueMBS = c.valueWithString("Hello")
MsgBox v.StringValue
Notes:
Returns a JSString with the result of conversion, or NULL if an exception is thrown.
(Read only property)

See also:

Feedback, Comments & Corrections

JSValueMBS.Tag as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: The tag value.
Notes:
You can store anything here and as long as the JSValue object exists, this value is kept referenced.
(Read and Write property)

Feedback, Comments & Corrections

JSValueMBS.Type as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JavaScript MBS MacFrameworks Plugin 15.4 Yes No No Yes, macOS only No
Function: Returns a JavaScript value's type.
Example:
dim c as new JSContextMBS
dim j as JSValueMBS

j = c.valueWithDouble(1) // double
'j = c.valueWithNull // null
'j = c.valueWithUndefined // undefined
'j = c.valueWithString("Hello") // string
'j = c.valueWithJSON("{""tag"": 1}") // object
'j = c.valueWithBool(true)

Select case j.Type
case JSValueMBS.kJSTypeUndefined
MsgBox "undefined"
case JSValueMBS.kJSTypeNull
MsgBox "null"
case JSValueMBS.kJSTypeBoolean
MsgBox "boolean "+str(j.booleanValue)
case JSValueMBS.kJSTypeNumber
MsgBox "number "+str(j.doubleValue)
case JSValueMBS.kJSTypeString
MsgBox "string "+j.StringValue
case JSValueMBS.kJSTypeObject
MsgBox "object "+j.JSONString
else
Break
end Select
Notes: (Read only property)

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacFrameworks Plugin.




Links
MBS FileMaker tutorial videos