JSValueMBS constants

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to JSValueMBS class.

Types

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