REVO5500DStorage Administrator@mvu 5S  cREVGeneralbreakpointconditions breakpointsbreakpointstatesstackfileversion5.5 PFglobal gAStorage command getReadyToUse pStorage, pApp local t put the effective filename of this stack into t if "aagDbLib" is not among the lines of the stacksinuse then put "aagDbLib.livecode" into item -1 of t start using stack t end if if "aagDataStorageLib" is not among the lines of the stacksinuse then put "aagDataStorageLib.livecode" into item -1 of t start using stack t end if dsOpen pStorage, pApp end getReadyToUse on doKeys local tStorage, tApp addToChoices put the label of btn "Storage" into tStorage put fld "fldApp" into tApp getReadyToUse tStorage, tApp put dsKeys(tStorage) into fld "fldKeys" put empty into fld "fldShow" end doKeys on doShow local tStorage, tApp, tKey, tKeyLine addToChoices put the label of btn "Storage" into tStorage put fld "fldApp" into tApp -- dsOpen tStorage, tApp put the hilitedline of fld "fldKeys" into tKeyLine put line tKeyLine of fld "fldKeys" into tKey getReadyToUse tStorage, tApp put dsGet(tStorage, tKey) into gAStorage clearOutput -- dumparray gAStorage printarray "AA", gAStorage showOutput "fldShow" end doShow on doWrite local tStorage, tApp, tKey, tKeyLine addToChoices put the label of btn "Storage" into tStorage put fld "fldApp" into tApp put gAStorage["key"] into tKey answer "Save" && tKey && "into" && tStorage && "?" with "Yes" or "No" if it = "Yes" then getReadyToUse tStorage, tApp dsSave tStorage, gAStorage if the result = tKey then answer "Saved OK" else answer "Saved with return code" && the result end if else answer "No Changes made" end if doKeys -- clearOutput -- dumparray sA -- showOutput "fldShow" end doWrite on doDelete local tStorage, tApp, tKey, tKeyLine addToChoices put the label of btn "Storage" into tStorage put fld "fldApp" into tApp put gAStorage["key"] into tKey answer "Really delete" && tKey && "from" && tStorage && "?" with "Yes" or "No" if it = "Yes" then getReadyToUse tStorage, tApp dsRemove tStorage, tKey if the result = tKey then answer "Saved OK" else answer "Saved with return code" && the result end if else answer "No Changes made" end if doKeys end doDelete on addToChoices local tStorage, tLines put the label of btn "Storage" into tStorage put the text of btn "Storage" into tLines if tStorage is not among the lines of tLines then put tStorage & CR after tLines sort lines of tLines set the text of btn "Storage" to tLines end if end addToChoices global gSomethingOutputAlready, gOutputDestination on showOutput pFieldName put gOutputDestination into field pFieldName end showOutput on pl pStr put true into gSomethingOutputAlready if the environment = "server" then put pStr & "
" & CR else put pStr & CR after gOutputDestination end if end pl on pline pStr put true into gSomethingOutputAlready if the environment = "server" then put pStr & CR else put pStr & CR after gOutputDestination end if end pline command printArray pArrayName, pArray if pArray is an array then pl pArrayName & " = {" dumpArray pArray, " ", " " pl "}" end if end printArray command dumpArray pArray, pIndent, pIndentString local tKeys, tError if pArray is an array then put the keys of pArray into tKeys sort lines of tKeys repeat for each line tKey in tKeys if pArray[tKey] is an array then pl pIndent & tKey & " = {" dumpArray pArray[tKey], (pIndent & pIndentString), pIndentString pl pIndent & "}" else pl pIndent & tKey & " = " & pArray[tKey] end if end repeat end if end dumpArray u cREVGeneralscripteditorvscroll812scripteditorselection205ButtonE`(R2 cREVGeneral revUniqueID 1354529622022  lblStorage  d cREVTable currentview

App & Storage :

 cREVGeneral revUniqueID 1354529646900 App & Storage : fldKeys)`P cREVGeneral revUniqueID 1354529802501  region2LA2type shortids asdfh+term HScotland_City of Edinburgh_Secondary_James Gillespie's High School+term *Scotland_City of Edinburgh_Secondary+term Scotland_City of Edinburgh+term Scotland+term `QĴ fldApp)`~ cREVTable currentview YourAppName cREVGeneral revUniqueID 1354529848665  YourAppName fldShow)`&8 cREVGeneral revUniqueID 1354533708260   `'6btnShowep! on mouseUp doShow end mouseUp *R2Show cREVGeneral revUniqueID 1354533754926scripteditorvscroll0scripteditorselection0 WriteEp#on mouseUp doWrite end mouseUp (R0 cREVGeneral revUniqueID 1354534422553scripteditorvscroll0scripteditorselection21 btnDelep$on mouseUp doDelete end mouseUp *RWDelete cREVGeneral revUniqueID 1354535506351scripteditorvscroll0scripteditorselection22 Storage+e Ustoragestorage  cREVGeneral revUniqueID 1354535812559 revOnline | RunRev