Name
Pageview.Insert -- insert new page into pageview
Synopsis
moai.DoMethod(id, "Insert", obj, pos[, active])
Function
This method can be used to insert a new page into a pageview at the position specified by pos. Insert positions are counted from 0 which marks the position of the first page. The new page specified by obj must be a detached group object. After this method returns the specified group object will change its state from detached to attached. That is why you must no longer use functions that expect a detached object with this object now.

Detached MOAI objects can be created either by calling the moai.CreateObject() function or by explicitly detaching them from their parent by using the Pageview.Remove method.

On AmigaOS and compatibles this feature requires at least MUI 4.0.

Inputs
id
id of the pageview object
obj
id of the group object to insert as a new page
pos
desired insert position for the new page (starting from 0)
active
optional: set this to True to activate the page after adding it

Show TOC