Libraries.Interface.Forms.FormPrimitiveContainer Documentation

This class represents a general form primitive container. This class provides a generic structure for primitive variables to be shared across any container. That might include individual pages or on a form application itself. The idea is that this allows primitive values to be shared across an application without manually sharing it everywhere.

Inherits from: Libraries.Language.Object

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetBoolean(text name)

This action gets a primitive boolean variable stored on the form by using it's name to retrieve its value.

Parameters

  • text name: of the variable. The key, to obtain the boolean variable value.

Return

boolean: boolean value of the variable.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetBoolean("i", true)
        output page:GetBoolean("i")

        form:Display()
    end
end

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetInteger(text name)

This action gets a primitive integer variable stored on the form by using its name to retrieve its value.

Parameters

  • text name: The name of the variable. The key, used to obtain the integer variable value.

Return

integer: integer value of the variable.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetInteger("i", 1)
        output page:GetInteger("i")

        form:Display()
    end
end

GetNumber(text name)

This action gets a primitive number variable stored on the form by using it's name to retrieve its value.

Parameters

  • text name: of the variable. The key, to obtain the number variable value.

Return

number: number value of the variable.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetNumber("i", 1.5)
        output page:GetNumber("i")

        form:Display()
    end
end

GetText(text name)

This action gets a primitive text variable stored on the form by using it's name to retrieve its value.

Parameters

  • text name: of the variable. The key, to obtain the text variable value.

Return

text: text value of the variable.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetText("i", "Hello, how are you?")
        output page:GetText("i")

        form:Display()
    end
end

SetBoolean(text name, boolean value)

This action sets a primitive boolean variable and stores it on the form.

Parameters

  • text name: of the variable. The key, to obtain the boolean variable value.
  • boolean value: of the variable, of type boolean.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetBoolean("i", true)
        output page:GetBoolean("i")

        form:Display()
    end
end

SetInteger(text name, integer value)

This action sets a primitive integer variable and stores it on the form.

Parameters

  • text name: The name of the variable. The key, to obtain the integer variable value.
  • integer value: of the variable, of type integer.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetInteger("i", 1)
        output page:GetInteger("i")

        form:Display()
    end
end

SetNumber(text name, number value)

This action sets a primitive number variable and stores it on the form.

Parameters

  • text name: of the variable. The key, to obtain the number variable value.
  • number value: of the variable, of type number.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetNumber("i", 1.5)
        output page:GetNumber("i")

        form:Display()
    end
end

SetText(text name, text value)

This action sets a primitive text variable and stores it on the form.

Parameters

  • text name: of the variable. The key, to obtain the integer variable value.
  • text value: of the variable, of type text.

Example

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

class Main
    action Main
        Form form
        Page page = form:GetMainPage()

        page:SetTitle("The Title")
        page:SetText("i", "Hello ")
        output page:GetText("i") + page:GetTitle()

        form:Display()
    end
end