Platforms to show: All Mac Windows Linux Cross-Platform

Back to JSValueMBS class.

JSValueMBS.kJSTypeBoolean = 2

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithBool(true)

if j.Type = JSValueMBS.kJSTypeBoolean then
MsgBox "boolean "+str(j.booleanValue)
end if

A primitive boolean value, one of true or false.

JSValueMBS.kJSTypeNull = 1

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithNull

if j.Type = JSValueMBS.kJSTypeNull then
MsgBox "null"
end if

The unique null value.

JSValueMBS.kJSTypeNumber = 3

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithDouble(1) // double

if j.Type = JSValueMBS.kJSTypeNumber then
MsgBox "number "+str(j.doubleValue)
end if

A primitive number value.

JSValueMBS.kJSTypeObject = 5

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithJSON("{""tag"": 1}")

if j.Type = JSValueMBS.kJSTypeBoolean then
MsgBox "object "+j.JSONString
end if

An object value (meaning that this JSValueMBS is a JSObjectMBS).

JSValueMBS.kJSTypeString = 4

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithString("Hello")

if j.Type = JSValueMBS.kJSTypeString then
MsgBox "string "+j.StringValue
end if

A primitive string value.

JSValueMBS.kJSTypeUndefined = 0

Type Topic Plugin Version
const JavaScript MBS MacFrameworks Plugin 15.4
One of the type constant identifying the type of a JSValue.
Example
dim c as new JSContextMBS
dim j as JSValueMBS = c.valueWithUndefined

if j.Type = JSValueMBS.kJSTypeUndefined then
MsgBox "undefined"
end if

The unique undefined value.

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


💬 Ask a question or report a problem
The biggest plugin in space...