|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--GLOBALS
| Method Summary | |
<static> string
|
base64ToString(<string> encStr)
decode a string of Base64 to normal text See this site for the method usede: http://www.faqts.com/knowledge_base/view.phtml/aid/1748 |
<static> int
|
checkRemoteFileLength( url )
Trys to determine the length of a remote file using an HTTP "HEAD" request. |
<static> void
|
downloadWithManager( <string> sourceUri, <File> targetFile, <boolean> suppress )
Download a file using the "Download Manager" to allow the user to monitor progress. |
<static> DOMElement
|
geid( <string> id )
does the equivelent of document.getElementById( id ) |
<static> string
|
getFilepathFromURL( <string> url )
Return a proper platform specific filepath from a "file://" url. |
<static> Object
|
getGemstonePref( <string> pref )
Provides access to Gemstone's user and internal preferences |
<static> File
|
getTempDir( <string> name, <int> permissions )
create a dir for temporary use |
<static> File
|
getTempFile( <string> name, <int> permissions )
create a file for temporary use on a mac the file is created in Library/Cache/ |
<static> void
|
openExternalURI(<string> aPath)
last resort for opening an unknown file/directory on the system. |
<static> Object
|
paramErrorCheck( <string> mode, <string> paramName, <array> paramArray, msg, custom)
Check whether various given parameters are NOT valid. |
<static> array
|
readByteArray( content, <string> mode )
return file contents as an array of bytes |
<static> void
|
saveLocalFile( <string> path, <string> text, replace )
Save text to a file |
<static> void
|
setGemstoneBoolPref( <string> pref, <boolean> value )
Sets a boolean preference |
<static> void
|
setGemstoneIntPref( <string> pref, <int> value )
Sets an integer preference |
<static> void
|
setGemstoneStringPref( <string> pref, <string> value )
Sets a string preference |
<static> Object
|
showFilePicker( <string> aMode, <string> aTitle, <array> filters, <string> aDefaultName, <nsILocalFile> aDefaultDir )
display a filepicker and return the selection does not catch exceptions, caller is responsible. |
<static> string
|
simplePrompt( <string> msg, <string> initial )
Prompt the user for a simple string of info from the user |
<static> string
|
stringToBase64( <string> aString )
convert a string of text to Base64 |
<static> void
|
trace( <string> msg )
logs an information-level message to the JavaScript/Error console. |
<static> array
|
xPathSearch(<DOM> aXmlDoc, <string> aXpath)
do an xPath search on a document |
| Method Detail |
<static> string base64ToString(<string> encStr)
encStr - the Base64 encoded text
<static> int checkRemoteFileLength( url )
URL - the URL of the file to check
<static> void downloadWithManager( <string> sourceUri, <File> targetFile, <boolean> suppress )
sourceUri - - string uri (NOT nsURI) of file or page to save
targetFile - - File object or nsIFile to save to. should be writable by user
suppress - - whether to suppress the download manager window from opening
<static> DOMElement geid( <string> id )
id - The id of the DOM element to get
<static> string getFilepathFromURL( <string> url )
url - the file URL (usuall generated form rdf:files)
<static> Object getGemstonePref( <string> pref )
pref - preference to obtain
<static> File getTempDir( <string> name, <int> permissions )
name - - an additional identifier
permissions - - unix style permissions to give to the dir
<static> File getTempFile( <string> name, <int> permissions )
name - - an additional identifier
permissions - - unix style permissions to give to the file
<static> void openExternalURI(<string> aPath)
aPath - should be a string file url
<static> Object paramErrorCheck( <string> mode, <string> paramName, <array> paramArray, msg, custom)
mode - -any/some of the following: NULL_BLANK check to make sure parameters are not null or "". NUMBER make sure parameters do not include any numbers. WORD make sure parameters do not include any characters. SPACE make sure parameters do not include any whitespace. CUSTOM check params using a custom regexp
paramName - - the name of the parameter we're checking
paramArray - - Array of paramters to check
msg - - [optional] an additional message to include
custom - - [optional] a custom regular expression to check for. Must set mode to CUSTOM as well. msg should also be set to provide an explanation of the possilbe error.
<static> array readByteArray( content, <string> mode )
mode - "file": interpret "content" as a file path and convert the file. "string" treat "content" as plain text
text - or a filepath
<static> void saveLocalFile( <string> path, <string> text, replace )
path - the location of where to create the file
text - text to save TODO: action: append/write mode: binary/string
<static> void setGemstoneBoolPref( <string> pref, <boolean> value )
pref - name of the preference to set
value - the boolean value to set
<static> void setGemstoneIntPref( <string> pref, <int> value )
pref - name of the preference to set
value - the integer value to set
<static> void setGemstoneStringPref( <string> pref, <string> value )
pref - name of the preference to set
value - the string value to set
<static> Object showFilePicker( <string> aMode, <string> aTitle, <array> filters, <string> aDefaultName, <nsILocalFile> aDefaultDir )
aMode - String, specifying the mode to open filepicker in: open, save, etc as defined here http://www.xulplanet.com/references/xpcomref/ifaces/nsIFilePicker.html
aTitle - title string of the dialog (optional)
filters - array, strings each of which specifies a content filter to append (optional)
aDefaultName - default filename to display. Only useful for save mode (optional)
aDefaultDir - nsILocalFile, default directory to display (optional)
<static> string simplePrompt( <string> msg, <string> initial )
msg - the message to display
initial - text to pre-fill the textbox
<static> string stringToBase64( <string> aString )
aString - string of text
<static> void trace( <string> msg )
msg - the text message to log
<static> array xPathSearch(<DOM> aXmlDoc, <string> aXpath)
aXmlDoc - the DOM document to search in
aXpath - xPath query
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||