Flake System Object
The Flake System Object enables the code within the Flake User Object to interact with the Pageflakes framework, and access certain functions and variables that pertain to the flake instance in question.
The Flake System Object is accessed through the "instance" variable that is passed to the load() function of the Flake User Object. As a convention, the Flake User Object stores the reference to this instance in a variable called _instance.
toggleEdit() |
Toggles between the normal flake mode and edit mode. |
showEditArea() |
Switches the flake to edit mode. |
hideEditArea() |
Switches the flake to normal mode. |
resize() |
Forces a resize of the currently displayed page. |
close(force) |
Closes the flake instance. If force is set to true, no confirmation dialog box is shown. |
canClose() |
Returns true if the flake can close, false otherwise. This behavior can be implemented by defining the beforeClose() function (see below). |
setTitle(title) |
Changes the title on the flake title bar. This is not saved to permanent store, unless the save() function is called. |
save() |
Saves changes made on the Profiles or title. |
collapse() |
Collapses the flake. |
expand() |
Expands the flake. |
setIcon(url) |
Sets the icon to the provided URL. URL must point to a 16x16 pixel .gif or .jpg image. |
editEdit() |
Saves the flake's title under the "Preference" tab in the flake's setting section. |
enableRefresh() |
Enables the flake's refresh button.
See also: |
disableRefresh() |
Disable the flake's refresh button.
See also: |
dispose |
Disposes the instance of the flake. |
setNumber() |
Displays a number in parentheses at the end of the flake title. This can be used for any number of applications, such as number of unread emails, or number of unread RSS items. |
clearNumber() |
Removes any number on the flake title that was set using setNumber. |
beforeClose() |
This function is called when a flake instance is about to be closed. If this function returns false, the flake is not closed. If desired, this function is defined by the flake developer. For example:
|

