The Gravy Framework

Class GLOBALS

Object
   |
   +--GLOBALS

class GLOBALS

 
Method Summary
<static> Object _AjaxRequest( aRequestName, aReplyEventHandler, aBANK, anACCT, optPostData, optWaitFlag )
          
<static> void _RequestAccountLoad( <String> aBANK, <String> anACCT )
           Make a Load-Account-Data request to the server.
NOTE: this is a Command helper function.
NEVER call this from outside the context of a Command object!
<static> void _RequestAccountSave( <String> aBANK, <String> anACCT, <String> updates )
           Make a Save-Account-Data request to the server.
NOTE: this is a Command helper function.
NEVER call this from outside the context of a Command object!
<static> boolean _SelectFirstUnreconciled( <boolean> selectFirst )
           Select the first unreconciled Account
NOTE: this is a Command helper function.
NEVER call this from outside the context of a Command object!
<static> Object ArgsToString( args )
          
<static> Object ArrayToString( a )
          
<static> Object Break(msg)
          
<static> void Breakpoint()
          
<static> void busy()
           set the cursor to the hourglass icon
<static> void BusyDo( <String> funcname, <String> funcargs, <int> optDelayMilliSecs )
           generic utility function to queue up for future execution the specified function with the specified arguments after a specified amount of delay.
<static> String CallerName( <Arguments> argumentsObj )
           This utility function returns the name of the function that called this routine.
<static> Function Class( <Function> theClass, <StringArray> optConstructorArgDescArray )
           Declare a class and create the glue objects and code to allow "pretty" source; A mechanism is set up to insure that required constructor parameters each have a defined value; This function also defines the "name" attribute of the specified class and initializes it with the class name.
<static> void ClearGlobalVar( <String> varname )
           static routine to dynamically undefine/delete a global variable
<static> void ClearGlobalVars()
           static routine to dynamically undefine/delete ALL "...GlobalVars" variables
<static> void ClearPersistentVars()
           static routine to dynamically undefine/delete ALL "...PersistentVars" variables
<static> void DebugWindow( <String> contents )
           open debug window with contents in scrollable area
<static> String diamond(<boolean> optBlankFlag)
           return the HTML to draw a diamond
<static> boolean DoCmd( command )
           Do the given command in "synchonized" mode (meaning that it will wait until commands that are already running/queued have finished).
<static> boolean dollarKeyFilter( <int> keyCode, <String> valueSoFar )
           is the given character a legal addition to the given dollar string
<static> Object dollarStrFilter(s)
          
<static> String dot()
           return the HTML to draw a biggish dot
<static> void DRAWVIEWS()
           static function to draw the root view (and hence all views)
<static> void editElem( e, makeSelected, makeEdited, makeInvalid )
          
<static> void editElemID( ID, makeSelected, makeEdited, makeInvalid )
          
<static> String EmbedAttributeViewer( <View> parentView, <String> attribute, <Function> optFormatter, <Object> optParam )
           Create and embed, as a subview, a ScalarView of the specified data model attribute.
<static> String EmbedDollarDualEditor( <View> parentView, <String> attribute, <String> className )
           Create and embed, as a subview, a DualDollarController of the specified data model attribute which is expected to be a dollar amount data element.
<static> DualMenuController EmbedDualMenu( <View> parentView, <String> attribute, <SelectionModel> menuModel, <String> className, <Function> optEvtHndlr )
           Create and embed, as a subview, a DualMenuController of the specified data model attribute
<static> String epsilon()
           return the HTML to draw a smallish "E"
<static> void Error(msg)
          
<static> Function Extends( <Function> superClass )
           This utility function takes (via "THIS") a "class" and (re)sets its superClass.
<static> Object filterNum( str )
          
<static> String FindComplexCode( <Collection> transtypes )
           static routine to search for the special "complex" code
<static> String format_dollar( <anyType> v, <boolean> optZeroAsBlankFlag )
           format given value as $#,###.00
<static> String format_dollar_not( v )
           like format_dollar except empty string returned for zero
<static> String FuncName(<Function> f)
           This function returns the name of a given function; It does this by converting the function to a string, then using a regular expression to extract the function name from the resulting code.
<static> String genHook( <String> hookID, <String> optInnerHTML )
           generate a piece of HTML, identified by the given ID, that can safely have its innerHTML replaced at runtime.
<static> Object GetArg( argname )
          
<static> Object GetGlobalVar( <String> varname )
           static routine to return the value of persistent variable with given name
<static> Object getHook( hookID )
          
<static> Object GetPersistentVar( <String> varname )
           static routine to return the value of the persistent variable with given name
<static> Object getTodayAsMMDDYYYY()
          
<static> Object getTodayAsXXDDYYYY(monthNames)
          
<static> Object GetXslDOM( xslURL )
           retrieve XSL DOM from given URL
<static> void highlightElem( e, makeSelected, selectColor )
          
<static> Object isDate(dateStr)
           return error message on invalid date or null if valid
<static> Object isDigit(c)
           Returns true if character c is a digit (0 ..
<static> Object isEmpty(s)
           Check whether string s is "empty".
<static> Object isFloat(s)
           Returns true if string s is an unsigned floating point (real) number.
<static> Object isInteger(s)
           Returns true if all characters in string s are numbers.
<static> Object isLetter(c)
           Returns true if character c is an English letter (A ..
<static> Object isSignedFloat(s)
           Returns true if string s is a signed or unsigned floating point (real) number.
<static> Object isZeroDollars(v)
          
<static> boolean keyFilter( <int> keyCode, <String> allowedChars )
           Is the given keyCode in the given list of allowed characters?
<static> void LoudThrow( exceptionObj )
          
<static> Object MissingArgException( argDesc, funcName )
          
<static> void MUTEX_CPU_SLICE( <int> cmdID, <int> optStartID )
           static routine to give a slice of CPU to mutex with given ID
<static> boolean noDuplicates( <String> s, <String> charList )
           Is there no more than one occurance of each character in the given character list in the given string?
<static> void notbusy()
           set the cursor to the default icon
<static> Object NullArgException( argDesc, funcName )
          
<static> Object ObjectToInitializer( o )
          
<static> Object ObjectToShortInitializer( o )
          
<static> Object ObjectToString( o )
          
<static> void OnAccountLoadReply( <XMLreq> xmlReq )
           handle event for 'reply received from "load account data" server-request'
<static> void OnAccountSaveReply( <XMLreq> xmlReq )
           handle event for 'reply received from "save account data" server-request'
<static> void OnAccountSelect( <int> selectedAccountKey )
           handle event for 'user selects from the account menu'
<static> void OnBalanceClick( <int> balanceIndex )
           handle event for 'click on a balance record'
<static> void OnBeforeUnLoad()
           handle event for 'about to leave web page'; warn if attempting to leave with unsaved changes
<static> void OnCancelBtnPressed()
           handle event for 'cancel button pressed'
<static> void OnDeleteBtnPressed()
           handle event for 'delete button pressed'
<static> void OnEditBtnPressed()
           handle event for 'edit button pressed'
<static> void OnExitBtnPressed()
           handle event for 'exit button pressed'
<static> void OnFieldEditFocus( <Element> field )
           handle "entering a text field" event per webreference tip)
<static> boolean OnFieldEditKey( <String> viewID )
           handle "key pressed" events in text fields
<static> Object OnGlobalKeyPress()
           pre-screen all keypress events for entire page This implementation handles ctrl-z and ctrl-y to invoke Undo and Redo respectively.
<static> void OnInsertBtnPressed()
           handle event for 'insert button pressed'
<static> void OnLoad()
           handle event for 'entering web page'
<static> void OnRedoBtnPressed()
           redo-button-pressed event handler
<static> void OnSaveBtnPressed()
           handle event for 'save button pressed'
<static> boolean OnScalarEditUpdate( <String> viewID )
           ScalarEditController update-event handler
<static> void OnTransactionClick( <int> balanceIndex, <int> transIndex )
           handle event for 'click on a transaction record'
<static> Object OnTrTypeSelect( <String> viewID )
           handle event for 'user selects from the transaction type menu'
<static> void OnUndoBtnPressed()
           undo-button-pressed event handler
<static> void OnUnreconciledClick( <int> balanceIndex )
           handle event for 'click on an unreconciled panel'
<static> Object pleaseWait( <boolean> enableFlag, <String> msg, appId )
           create and open a window (if enabled) with the specified message
<static> void selectElem( e, makeSelected )
          
<static> void selectElemID( ID, makeSelected )
          
<static> void SendStatusMessage( <String> msg )
           send a message via the browser status bar
<static> void setBackgroundColor( ID, color )
          
<static> void setElemBackgroundColor( e, color )
          
<static> void setElemText( e, str )
          
<static> void setElemVisibility( e, visibleFlag )
          
<static> void SetGlobalVar( <String> varname, <Object> value )
           static routine to dynamically define/update a global (to window/page but reloaded with page) variable with the given name and value.
<static> void SetPersistentVar( <String> varname, <Object> value )
           static routine to dynamically define/update a persistent (across page loads) variable with the given name and value.
<static> void setText( ID, str )
          
<static> void setVisibility( ID, visibleFlag )
          
<static> boolean strFilter( s, <String> allowedChars )
           Does the given string consist of only characters in the given list of allowed characters?
<static> String subitem( isInValid )
           return the HTML to draw a subitem bullet
<static> Object timestamp()
           return the current time in milliseconds since start of epoc
<static> Object TooFewArgsException( funcName, required, passed )
          
<static> Object Trace(flag,msg)
          
<static> Object TraceEvt(msg)
          
<static> Object TraceMsg(msg)
          
<static> Object TraceMVC(msg)
          
<static> String trimStr(sInString)
           strip leading and trailing whitespace
<static> void UNWAIT(appId)
           close the "please wait" window if it exists otherwise no effect
<static> String URLDecode( <String> encoded )
           This decodes URL-encoded strings because the Javascript function "unescape" only does part of the job; adapted from here.
<static> void ValidateArgs( <StringArray> optArgDescArray )
           generic utility function to verify that required args (of the caller of this function) have been passed; The given array of descriptions defines how many arguments should be found with a defined value; Therefore, the caller of this routine should place its optional arguments at the end of its parameter list with no description specified in "optArgDescArray".
<static> void validateDate( hookID )
          
<static> void validateDollar( hookID )
          
<static> void validateFloat( hookID )
          
<static> void validateInteger( hookID )
          
<static> void WAIT(appId)
           Create an idempotent "wait a minute" window, if one doesn't exist, and squirrel away a reference to it that survives window reloads
<static> Object WaitWindowName(appId)
          
<static> void warnInvalid(theField, s)
           Notify user that contents of field theField are invalid.
<static> String XformDOM( xslDOM, xmlDOM )
           transform given XML DOM using given XSLT DOM
<static> String XformURL( xslURL, xmlDOM )
           transform given XML DOM using an XSLT retrieved from given URL


Method Detail

_AjaxRequest

<static> Object _AjaxRequest( aRequestName, aReplyEventHandler, aBANK, anACCT, optPostData, optWaitFlag )

_RequestAccountLoad

<static> void _RequestAccountLoad( <String> aBANK, <String> anACCT )

_RequestAccountSave

<static> void _RequestAccountSave( <String> aBANK, <String> anACCT, <String> updates )

_SelectFirstUnreconciled

<static> boolean _SelectFirstUnreconciled( <boolean> selectFirst )

ArgsToString

<static> Object ArgsToString( args )

ArrayToString

<static> Object ArrayToString( a )

Break

<static> Object Break(msg)

Breakpoint

<static> void Breakpoint()

busy

<static> void busy()

BusyDo

<static> void BusyDo( <String> funcname, <String> funcargs, <int> optDelayMilliSecs )

CallerName

<static> String CallerName( <Arguments> argumentsObj )

Class

<static> Function Class( <Function> theClass, <StringArray> optConstructorArgDescArray )

ClearGlobalVar

<static> void ClearGlobalVar( <String> varname )

ClearGlobalVars

<static> void ClearGlobalVars()

ClearPersistentVars

<static> void ClearPersistentVars()

DebugWindow

<static> void DebugWindow( <String> contents )

diamond

<static> String diamond(<boolean> optBlankFlag)

DoCmd

<static> boolean DoCmd( command )

dollarKeyFilter

<static> boolean dollarKeyFilter( <int> keyCode, <String> valueSoFar )

dollarStrFilter

<static> Object dollarStrFilter(s)

dot

<static> String dot()

DRAWVIEWS

<static> void DRAWVIEWS()

editElem

<static> void editElem( e, makeSelected, makeEdited, makeInvalid )

editElemID

<static> void editElemID( ID, makeSelected, makeEdited, makeInvalid )

EmbedAttributeViewer

<static> String EmbedAttributeViewer( <View> parentView, <String> attribute, <Function> optFormatter, <Object> optParam )

EmbedDollarDualEditor

<static> String EmbedDollarDualEditor( <View> parentView, <String> attribute, <String> className )

EmbedDualMenu

<static> DualMenuController EmbedDualMenu( <View> parentView, <String> attribute, <SelectionModel> menuModel, <String> className, <Function> optEvtHndlr )

epsilon

<static> String epsilon()

Error

<static> void Error(msg)

Extends

<static> Function Extends( <Function> superClass )

filterNum

<static> Object filterNum( str )

FindComplexCode

<static> String FindComplexCode( <Collection> transtypes )

format_dollar

<static> String format_dollar( <anyType> v, <boolean> optZeroAsBlankFlag )

format_dollar_not

<static> String format_dollar_not( v )

FuncName

<static> String FuncName(<Function> f)

genHook

<static> String genHook( <String> hookID, <String> optInnerHTML )

GetArg

<static> Object GetArg( argname )

GetGlobalVar

<static> Object GetGlobalVar( <String> varname )

getHook

<static> Object getHook( hookID )

GetPersistentVar

<static> Object GetPersistentVar( <String> varname )

getTodayAsMMDDYYYY

<static> Object getTodayAsMMDDYYYY()

getTodayAsXXDDYYYY

<static> Object getTodayAsXXDDYYYY(monthNames)

GetXslDOM

<static> Object GetXslDOM( xslURL )

highlightElem

<static> void highlightElem( e, makeSelected, selectColor )

isDate

<static> Object isDate(dateStr)

isDigit

<static> Object isDigit(c)

isEmpty

<static> Object isEmpty(s)

isFloat

<static> Object isFloat(s)

isInteger

<static> Object isInteger(s)

isLetter

<static> Object isLetter(c)

isSignedFloat

<static> Object isSignedFloat(s)

isZeroDollars

<static> Object isZeroDollars(v)

keyFilter

<static> boolean keyFilter( <int> keyCode, <String> allowedChars )

LoudThrow

<static> void LoudThrow( exceptionObj )

MissingArgException

<static> Object MissingArgException( argDesc, funcName )

MUTEX_CPU_SLICE

<static> void MUTEX_CPU_SLICE( <int> cmdID, <int> optStartID )

noDuplicates

<static> boolean noDuplicates( <String> s, <String> charList )

notbusy

<static> void notbusy()

NullArgException

<static> Object NullArgException( argDesc, funcName )

ObjectToInitializer

<static> Object ObjectToInitializer( o )

ObjectToShortInitializer

<static> Object ObjectToShortInitializer( o )

ObjectToString

<static> Object ObjectToString( o )

OnAccountLoadReply

<static> void OnAccountLoadReply( <XMLreq> xmlReq )

OnAccountSaveReply

<static> void OnAccountSaveReply( <XMLreq> xmlReq )

OnAccountSelect

<static> void OnAccountSelect( <int> selectedAccountKey )

OnBalanceClick

<static> void OnBalanceClick( <int> balanceIndex )

OnBeforeUnLoad

<static> void OnBeforeUnLoad()

OnCancelBtnPressed

<static> void OnCancelBtnPressed()

OnDeleteBtnPressed

<static> void OnDeleteBtnPressed()

OnEditBtnPressed

<static> void OnEditBtnPressed()

OnExitBtnPressed

<static> void OnExitBtnPressed()

OnFieldEditFocus

<static> void OnFieldEditFocus( <Element> field )

OnFieldEditKey

<static> boolean OnFieldEditKey( <String> viewID )

OnGlobalKeyPress

<static> Object OnGlobalKeyPress()

OnInsertBtnPressed

<static> void OnInsertBtnPressed()

OnLoad

<static> void OnLoad()

OnRedoBtnPressed

<static> void OnRedoBtnPressed()

OnSaveBtnPressed

<static> void OnSaveBtnPressed()

OnScalarEditUpdate

<static> boolean OnScalarEditUpdate( <String> viewID )

OnTransactionClick

<static> void OnTransactionClick( <int> balanceIndex, <int> transIndex )

OnTrTypeSelect

<static> Object OnTrTypeSelect( <String> viewID )

OnUndoBtnPressed

<static> void OnUndoBtnPressed()

OnUnreconciledClick

<static> void OnUnreconciledClick( <int> balanceIndex )

pleaseWait

<static> Object pleaseWait( <boolean> enableFlag, <String> msg, appId )

selectElem

<static> void selectElem( e, makeSelected )

selectElemID

<static> void selectElemID( ID, makeSelected )

SendStatusMessage

<static> void SendStatusMessage( <String> msg )

setBackgroundColor

<static> void setBackgroundColor( ID, color )

setElemBackgroundColor

<static> void setElemBackgroundColor( e, color )

setElemText

<static> void setElemText( e, str )

setElemVisibility

<static> void setElemVisibility( e, visibleFlag )

SetGlobalVar

<static> void SetGlobalVar( <String> varname, <Object> value )

SetPersistentVar

<static> void SetPersistentVar( <String> varname, <Object> value )

setText

<static> void setText( ID, str )

setVisibility

<static> void setVisibility( ID, visibleFlag )

strFilter

<static> boolean strFilter( s, <String> allowedChars )

subitem

<static> String subitem( isInValid )

timestamp

<static> Object timestamp()

TooFewArgsException

<static> Object TooFewArgsException( funcName, required, passed )

Trace

<static> Object Trace(flag,msg)

TraceEvt

<static> Object TraceEvt(msg)

TraceMsg

<static> Object TraceMsg(msg)

TraceMVC

<static> Object TraceMVC(msg)

trimStr

<static> String trimStr(sInString)

UNWAIT

<static> void UNWAIT(appId)

URLDecode

<static> String URLDecode( <String> encoded )

ValidateArgs

<static> void ValidateArgs( <StringArray> optArgDescArray )

validateDate

<static> void validateDate( hookID )

validateDollar

<static> void validateDollar( hookID )

validateFloat

<static> void validateFloat( hookID )

validateInteger

<static> void validateInteger( hookID )

WAIT

<static> void WAIT(appId)

WaitWindowName

<static> Object WaitWindowName(appId)

warnInvalid

<static> void warnInvalid(theField, s)

XformDOM

<static> String XformDOM( xslDOM, xmlDOM )

XformURL

<static> String XformURL( xslURL, xmlDOM )

The Gravy Framework

Documentation generated by JSDoc on Fri Mar 17 06:40:21 2006