#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" sweatScriptBrowser ?/****************************************************************** Sweat Technologies - Script Browser @author Monte Goulding @copyright Sweat Technologies @version 1.2.1 @modified 2003.07.25 @url http://www.sweattechnologies.com/rev @url mailto:monte@sweattechnologies.com ******************************************************************/ constant kScriptIcon = 202312 -- The script icon local lReferences -- Array of references for each handler local lNotHandlers -- Array of varables etc declared in the comments --===================== MAIN FUNCTIONALITY =====================-- /***************************************************************** Javadoc style documentation for an objects script. @param pObject The long id or long name of the object whose script the function will parse @returns htmlText styled script documentation *****************************************************************/ function getDocs pObject local tComment -- Boolean that indicates in line is within a comment or not local tDoc -- The docs that are created local tFirstHandler -- Boolean check variable to make sure no docs are added on the first "/**" local tHandler -- Array used to hold the info for each handler/header block local tInHandler -- Boolean like tComment indicates that the handler is being parsed local tScript -- Hmmm... the script? local tSeparator -- Holds a separator until the next heading local tHeader -- Header info local tFront -- front scripts local tBack -- back scripts local tLibraries -- library stacks local tVar -- variable type local tMeaning -- variable meaning try put the script of pObject into tScript catch tError throw "Error accesing object script" end try -- can't have an owner if word 1 of pObject = "stack" then put "
"&markupH1(the abbrev name of pObject) &\
"
"&markupH1(the abbrev name of pObject) &\
"
Owner: "& the abbrev owner of pObject& \
"
" into tDoc end if put tHandler["Heading"]&"
" after tDoc if tHandler["Comment"] <> "" then put "
"&tHandler["Comment"]&"
" after tDoc put keys(tHandler) into tKeys sort tKeys repeat for each line tKey in tKeys if tKey is not among the items of "Heading,Comment" then if the number of lines of tHandler[tKey] > 1 then put ""&markupH3(tKey)&"
" after tDoc repeat for each line l in tHandler[tKey] put ""&tab&"- "&l&"
" after tDoc end repeat else put ""&markupH3(tKey)&": "&tHandler[tKey]&"
" after tDoc end if end if end repeat put "" after tDoc
delete variable tHandler
break
case char -2 to -1 of replaceText(tLine," ","") is "*/"
put false into tFirstHandler
put false into tComment
break
case tComment
repeat for each char tChar in tLine
if tChar <> " " then
exit repeat
else
delete char 1 of tLine
end if
end repeat
if char 1 of tLine = "*" then delete char 1 of tLine
-- can handle any type but you need to alter the merge source
if char 1 word 1 of tLine is "@" then
if char 2 to -1 of word 1 of tLine is among the items of "local,temp,constant,global,param" then
put markupLabel(word 2 of tLine)&tab&word 3 to -1 of tLine&cr after tHandler[char 2 to -1 of word 1 of tLine]
put word 2 of tLine&cr after tNotHandlers
else if char 2 to -1 of word 1 of tLine is among the items of "requires,calledby" then
put ""&word 2 to -1 of tLine&" " & cr after tHandler[char 2 to -1 of word 1 of tLine]
else if char 2 to -1 of word 1 of tLine = "url" then
put ""&word 2 to -1 of tLine&"" & cr after tHandler[char 2 to -1 of word 1 of tLine]
else
put word 2 to -1 of tLine & cr after tHandler[char 2 to -1 of word 1 of tLine]
end if
else
put tLine after tHandler["Comment"]
end if
break
case word 1 of tLine is among the items of "on,function,setProp,getProp"
if word 1 of tLine is "on" then put "message" into word 1 of tLine
put tSeparator&markupH2(tLine) into tHandler["Heading"]
put "" into tSeparator
put true into tInHandler
break
case word 1 of tLine is among the items of "local,global"
repeat for each item tItem in word 2 to -1 of tLine
put word 2 to -1 of tItem into tMeaning
if char 1 to 2 of tMeaning = "--" then delete char 1 to 2 of tMeaning
if char 1 of tMeaning = "#" then delete char 1 of tMeaning
if tInHandler then
put word 1 of tLine into tVar
else
put "script "&word 1 of tLine into tVar
end if
put markupLabel(word 1 of tItem)&tab&tMeaning&cr after tHandler[tVar]
put word 1 of tItem&cr after tNotHandlers
end repeat
break
case word 1 of tLine is "constant"
repeat for each item tItem in word 2 to -1 of tLine
put tItem into tMeaning
delete token 1 to 3 of tMeaning
put word 1 to -1 of tMeaning into tMeaning
if char 1 to 2 of tMeaning = "--" then delete char 1 to 2 of tMeaning
if char 1 of tMeaning = "#" then delete char 1 of tMeaning
put markupLabel(token 1 to 3 of tItem)&tab&tMeaning&cr after tHandler[word 1 of tLine]
put word 1 of tItem&cr after tNotHandlers
end repeat
break
case tInHandler
if not (char 1 of token 1 of tLine = "#" or char 1 to 2 of token 1 of tLine = "--") then
repeat for each token tToken in tLine
if tToken is not among the lines of tReferences["Calls"] then
if not (tNotHandlers[tToken] = true) and tToken is not a number then
try
if tFront then
repeat for each line tTempObject in frontScripts()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["front"] then
put tTempObject & cr after tReferences["front"]
put ""&"front scipt - "&the long name of tTempObject&"
" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
put pObject into tTempObject
repeat forever
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
throw "found"
end if
if word 1 of tTempObject <> "stack" then
put the long owner of tTempObject into tTempObject
else
exit repeat
end if
end repeat
if tLibraries then
repeat for each line tTempObject in stacksInUse()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["library"] then
put tTempObject & cr after tReferences["library"]
put ""&"library - "&the long name of tTempObject&"
" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
if tBack then
repeat for each line tTempObject in backScripts()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["back"] then
put tTempObject & cr after tReferences["back"]
put ""&"back scipt - "&the long name of tTempObject&"
" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
catch tError
if tError <> "found" then
throw tError
else
put tToken & cr after tReferences["calls"]
put ""&tToken&"
" & cr after tHandler["calls"]
end if
end try
end if
end if
end repeat
end if
break
case char 1 to 4 of tLine = "--=="
put "
"&markupLabel(tLine)&"
" into tSeparator break end switch end repeat if tDoc is "" then put tHeader&"
" into tDoc end if return tDoc end getDocs /***************************************************************** Display the docs for a particular object @param pObject The the object with script is being parsed *****************************************************************/ on objectDocs pObject if line 1 of the cBackList of this stack <> the cCurrent of this stack then set the cBackList of this stack to the cCurrent of this stack&cr&the cBackList of this stack end if set the cCurrent of this stack to "doc",pObject enable btn "back" if pObject <> "" then if "libXMLText" is among the lines of the stacksInUse then set the xmlText of fld 1 to getDocs(pObject) else set the htmlText of fld 1 to getDocs(pObject) end if end if end objectDocs /***************************************************************** Index a particular stack @param pStack The stack being indexed *****************************************************************/ on indexStack pStack if the cCurrent of this stack <> "" then set the cBackList of this stack to the cCurrent of this stack&cr&the cBackList of this stack set the cCurrent of this stack to "index",pStack put "
"&markupH1(""&the abbrev name of stack pStack&"
" into tindex repeat with tCardNum =1 to the number of cds of stack pStack put "
"&the abbrev name of cd tCardNum of stack pStack&"
"&tIndented & cr after tIndex end repeat end repeat if "libXMLText" is among the lines of the stacksInUse then set the xmlText of fld 1 to tIndex else set the htmlText of fld 1 to tIndex end if end indexStack --===================== PLUGIN MESSAGES =====================-- /***************************************************************** Activate whenever a script is edited @param pObject The the object with script is being edited @example edit script command @example script button on menubar @bug Does not seem to work but will leave it in for now as it could be a Rev bug @calledby button "revFrontScript" of card id 1002 of stack "revLibrary" *****************************************************************/ on revEditScript pObject objectDocs pObject end revEditScript /***************************************************************** Activate whenever an object is selected @example select command @example inspect object with inspector @example click on object in application browser @calledby button "revBackScript" of card id 1002 of stack "revLibrary" *****************************************************************/ on revSelectedObjectChanged objectDocs the selectedObject end revSelectedObjectChanged --====================== USER INTERFACE =====================-- /***************************************************************** Needed because stacks with rev prefix don't get geometry updated on resizeStack *****************************************************************/ on resizeStack revUpdateGeometry end resizeStack function markupH1 pHead if "libXMLText" is not among the lines of the stacksInUse then return ""&pHead&"" else return "
[[tHandler[Heading] ]]
[[tHandler[Comment] ]]
cForwardList cNotHandlers if then else repeat for with while on end switch case getprop setprop try catch a there me it of is not to into among the in token tokens item items word words line lines element char character chars chatacters card cards cd cds stack stacks each and or this control part button btn field fld scollbar image img graphic grc player group grp background bg bkgnd url EPS file - + = / * & ^ ( ) [ ] # - , cCurrent index,sweatScriptBrowser $Sweat Technologies - Script Browser @ Y U ms sans serif U ms sans serif U ms sans serif W ms sans serif W ms sans serif U Arial W Arial U Arial W Arial U Arial W Arial U ms sans serif W ms sans serif U ms sans serif W ms sans serif W ms sans serif U Verdana U Verdana W Verdana U Verdana W Verdana U Verdana W Verdana W Verdana U Verdana W Verdana U ms sans serif W ms sans serif W W Verdana W Verdana W Verdana U Verdana W Verdana W Verdana @U Verdana U Verdana U Lucida Grande @W Verdana AU Verdana @W Verdana AU Verdana @U Verdana @U Verdana @W Verdana U Arial U Arial W Arial U Courier U Courier W Courier @W Arial U Song U Song W Song U Skia U Skia W Skia U Seoul U Seoul W Seoul U Monaco CY U Monaco CY W Monaco CY U Herculanum U Herculanum W Herculanum U Futura U Futura W Futura U Didot U Didot W Didot U Beijing U Beijing W Beijing U American Typewriter U American Typewriter W American Typewriter U Cochin U Cochin W Cochin U Gill Sans U Gill Sans W Gill Sans U Trebuchet MS U Trebuchet MS W Trebuchet MS @W Trebuchet MS StyleXML heading Arial,20,#6a7454 bh1 Trebuchet MS,20,#3b1fb0 bh2 Courier,18,#000000 bh3 Verdana,14,#000000 bsubhead Courier,18,#000000 bstrong Verdana,12,#000000 b cREVGeneral scriptChecksum BLu4(e bookmarks handlerList wgetDocs objectDocs indexStack revEditScript revSelectedObjectChanged resizeStack markupH1 markupH2 markupH3 markupLabeltempScript prevHandler getDocsscriptSelection char 192 to 191script b
/******************************************************************
Sweat Technologies - Script Browser
@author Monte Goulding
@copyright Sweat Technologies
@version 1.2.1
@modified 2003.07.25
@url http://www.sweattechnologies.com/rev
@url mailto:monte@sweattechnologies.com
******************************************************************/
constant kScriptIcon = 202312 -- The script icon
local lReferences -- Array of references for each handler
local lNotHandlers -- Array of varables etc declared in the comments
--===================== MAIN FUNCTIONALITY =====================--
/*****************************************************************
Javadoc style documentation for an objects script.
@param pObject The long id or long name of the object whose script the function will parse
@returns htmlText styled script documentation
*****************************************************************/
function getDocs pObject
local tComment -- Boolean that indicates in line is within a comment or not
local tDoc -- The docs that are created
local tFirstHandler -- Boolean check variable to make sure no docs are added on the first "/**"
local tHandler -- Array used to hold the info for each handler/header block
local tInHandler -- Boolean like tComment indicates that the handler is being parsed
local tScript -- Hmmm... the script?
local tSeparator -- Holds a separator until the next heading
local tHeader -- Header info
local tFront -- front scripts
local tBack -- back scripts
local tLibraries -- library stacks
local tVar -- variable type
local tMeaning -- variable meaning
try
put the script of pObject into tScript
catch tError
throw "Error accesing object script"
end try
-- can't have an owner
if word 1 of pObject = "stack" then
put "<p>"&markupH1(the abbrev name of pObject) &\
" <a href=""e&urlEncode("edit the script of "&(the long name of pObject))&\
quote&"><img src=""e&kScriptIcon"e& "/></a></p>"&cr into tHeader
else
put "<p>"&markupH1(the abbrev name of pObject) &\
" <a href=""e&urlEncode("edit the script of "&(the long name of pObject))&\
quote&"><img src=""e&kScriptIcon"e& "/></a></p>"&cr& \
"<p><b>Owner: </b><a href=""e&urlEncode(the long owner of pObject)"e&">"& the abbrev owner of pObject& \
"</a> <a href=""e&urlEncode("edit the script of "&(the long owner of pObject))&\
quote&"><img src=""e&kScriptIcon"e& "/></a></p>" into tHeader
end if
put tHeader into tHandler["Heading"]
put true into tFirstHandler
set the cursor to watch
-- setup the not handlers checker
if not lReferences["it"] then
repeat for each line tLine in commandNames()&cr&propertyNames()&cr&functionNames()&cr&constantNames()&cr&the cNotHandlers of this stack
put true into lNotHandlers[tLine]
end repeat
end if
put the hilite of btn "frontscripts" into tFront
put the hilite of btn "backscripts" into tBack
put the hilite of btn "libraries" into tLibraries
repeat for each line tLine in tScript
switch
case char 1 to 3 of tLine is "/**"
put true into tComment
if tHandler["Heading"] = "" or tFirstHandler then break
case char 1 to 3 of tLine = "end"
delete variable lReferences
put false into tInHandler
if tDoc is "" and char 1 to 3 of tLine = "end" then
put tHeader&"<P>" into tDoc
end if
put tHandler["Heading"]&"<p>" after tDoc
if tHandler["Comment"] <> "" then put "<p>"&tHandler["Comment"]&"</p>" after tDoc
put keys(tHandler) into tKeys
sort tKeys
repeat for each line tKey in tKeys
if tKey is not among the items of "Heading,Comment" then
if the number of lines of tHandler[tKey] > 1 then
put "<p>"&markupH3(tKey)&"</p>" after tDoc
repeat for each line l in tHandler[tKey]
put "<p>"&tab&"- "&l&"</p>" after tDoc
end repeat
else
put "<p>"&markupH3(tKey)&": </b></font>"&tHandler[tKey]&"</p>" after tDoc
end if
end if
end repeat
put "<p><p>" after tDoc
delete variable tHandler
break
case char -2 to -1 of replaceText(tLine," ","") is "*/"
put false into tFirstHandler
put false into tComment
break
case tComment
repeat for each char tChar in tLine
if tChar <> " " then
exit repeat
else
delete char 1 of tLine
end if
end repeat
if char 1 of tLine = "*" then delete char 1 of tLine
-- can handle any type but you need to alter the merge source
if char 1 word 1 of tLine is "@" then
if char 2 to -1 of word 1 of tLine is among the items of "local,temp,constant,global,param" then
put markupLabel(word 2 of tLine)&tab&word 3 to -1 of tLine&cr after tHandler[char 2 to -1 of word 1 of tLine]
put word 2 of tLine&cr after tNotHandlers
else if char 2 to -1 of word 1 of tLine is among the items of "requires,calledby" then
put "<a href=""e&urlEncode(word 2 to -1 of tLine)"e&">"&word 2 to -1 of tLine&"</a> <a href=""e&urlEncode("edit the script of "&word 2 to -1 of tLine)"e&"><img src=""e&kScriptIcon"e&"/></a>" & cr after tHandler[char 2 to -1 of word 1 of tLine]
else if char 2 to -1 of word 1 of tLine = "url" then
put "<a href=""e&word 2 to -1 of tLine"e&">"&word 2 to -1 of tLine&"</a>" & cr after tHandler[char 2 to -1 of word 1 of tLine]
else
put word 2 to -1 of tLine & cr after tHandler[char 2 to -1 of word 1 of tLine]
end if
else
put tLine after tHandler["Comment"]
end if
break
case word 1 of tLine is among the items of "on,function,setProp,getProp"
if word 1 of tLine is "on" then put "message" into word 1 of tLine
put tSeparator&markupH2(tLine) into tHandler["Heading"]
put "" into tSeparator
put true into tInHandler
break
case word 1 of tLine is among the items of "local,global"
repeat for each item tItem in word 2 to -1 of tLine
put word 2 to -1 of tItem into tMeaning
if char 1 to 2 of tMeaning = "--" then delete char 1 to 2 of tMeaning
if char 1 of tMeaning = "#" then delete char 1 of tMeaning
if tInHandler then
put word 1 of tLine into tVar
else
put "script "&word 1 of tLine into tVar
end if
put markupLabel(word 1 of tItem)&tab&tMeaning&cr after tHandler[tVar]
put word 1 of tItem&cr after tNotHandlers
end repeat
break
case word 1 of tLine is "constant"
repeat for each item tItem in word 2 to -1 of tLine
put tItem into tMeaning
delete token 1 to 3 of tMeaning
put word 1 to -1 of tMeaning into tMeaning
if char 1 to 2 of tMeaning = "--" then delete char 1 to 2 of tMeaning
if char 1 of tMeaning = "#" then delete char 1 of tMeaning
put markupLabel(token 1 to 3 of tItem)&tab&tMeaning&cr after tHandler[word 1 of tLine]
put word 1 of tItem&cr after tNotHandlers
end repeat
break
case tInHandler
if not (char 1 of token 1 of tLine = "#" or char 1 to 2 of token 1 of tLine = "--") then
repeat for each token tToken in tLine
if tToken is not among the lines of tReferences["Calls"] then
if not (tNotHandlers[tToken] = true) and tToken is not a number then
try
if tFront then
repeat for each line tTempObject in frontScripts()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["front"] then
put tTempObject & cr after tReferences["front"]
put "<a href=""e&urlEncode(tTempObject)"e&">"&"front scipt - "&the long name of tTempObject&"</a> <a href=""e&urlEncode("edit the script of "&tTempObject)"e&"><img src=""e&kScriptIcon"e&"/></a>" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
put pObject into tTempObject
repeat forever
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
throw "found"
end if
if word 1 of tTempObject <> "stack" then
put the long owner of tTempObject into tTempObject
else
exit repeat
end if
end repeat
if tLibraries then
repeat for each line tTempObject in stacksInUse()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["library"] then
put tTempObject & cr after tReferences["library"]
put "<a href=""e&urlEncode(tTempObject)"e&">"&"library - "&the long name of tTempObject&"</a> <a href=""e&urlEncode("edit the script of "&tTempObject)"e&"><img src=""e&kScriptIcon"e&"/></a>" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
if tBack then
repeat for each line tTempObject in backScripts()
if tToken is among the lines of the cRevGeneral["handlerList"] of tTempObject then
if tTempObject is not among the lines of tReferences["back"] then
put tTempObject & cr after tReferences["back"]
put "<a href=""e&urlEncode(tTempObject)"e&">"&"back scipt - "&the long name of tTempObject&"</a> <a href=""e&urlEncode("edit the script of "&tTempObject)"e&"><img src=""e&kScriptIcon"e&"/></a>" & cr after tHandler["requires"]
end if
throw "found"
end if
end repeat
end if
catch tError
if tError <> "found" then
throw tError
else
put tToken & cr after tReferences["calls"]
put "<a href=""e&urlEncode(tTempObject)"e&">"&tToken&"</a> <a href=""e&urlEncode("edit the script of "&tTempObject)"e&"><img src=""e&kScriptIcon"e&"/></a>" & cr after tHandler["calls"]
end if
end try
end if
end if
end repeat
end if
break
case char 1 to 4 of tLine = "--=="
put "<p>"&markupLabel(tLine)&"<p><p>" into tSeparator
break
end switch
end repeat
if tDoc is "" then
put tHeader&"<P>" into tDoc
end if
return tDoc
end getDocs
/*****************************************************************
Display the docs for a particular object
@param pObject The the object with script is being parsed
*****************************************************************/
on objectDocs pObject
if line 1 of the cBackList of this stack <> the cCurrent of this stack then
set the cBackList of this stack to the cCurrent of this stack&cr&the cBackList of this stack
end if
set the cCurrent of this stack to "doc",pObject
enable btn "back"
if pObject <> "" then
if "libXMLText" is among the lines of the stacksInUse then
set the xmlText of fld 1 to getDocs(pObject)
else
set the htmlText of fld 1 to getDocs(pObject)
end if
end if
end objectDocs
/*****************************************************************
Index a particular stack
@param pStack The stack being indexed
*****************************************************************/
on indexStack pStack
if the cCurrent of this stack <> "" then set the cBackList of this stack to the cCurrent of this stack&cr&the cBackList of this stack
set the cCurrent of this stack to "index",pStack
put "<p>"&markupH1("<a href=""e&urlEncode(the long name of stack pStack)"e&">"&the abbrev name of stack pStack&"</a> <a href=""e&urlEncode("edit the script of "&the abbrev name of stack pStack)"e&"><img src=""e&kScriptIcon"e&"/></a></p>")&"<p>" into tindex
repeat with tCardNum =1 to the number of cds of stack pStack
put "<p><a href=""e&urlEncode(the long name of cd tCardNum of stack pStack)"e&">"&the abbrev name of cd tCardNum of stack pStack&"</a> <a href=""e&urlEncode("edit the script of "&the long name of cd tCardNum of stack pStack)"e&"><img src=""e&kScriptIcon"e&"/></a></p>" & cr after tIndex
repeat with tControlNum =1 to the number of controls of card tCardNum of stack pStack
put the long name of control tControlNum of cd tCardNum of stack pStack into tGroupExp
put tab&"<a href=""e&urlEncode(tGroupExp)"e&">"&the abbrev name of control tControlNum of cd tCardNum of stack pStack&"</a> <a href=""e&urlEncode("edit the script of "&the long name of control tControlNum of cd tCardNum of stack pStack)"e&"><img src=""e&kScriptIcon"e&"/></a></p>" into tIndented
repeat for each word w in word 2 to -1 of tGroupExp
if w is "group" then put tab before tIndented
end repeat
put "<p>"&tIndented & cr after tIndex
end repeat
end repeat
if "libXMLText" is among the lines of the stacksInUse then
set the xmlText of fld 1 to tIndex
else
set the htmlText of fld 1 to tIndex
end if
end indexStack
--===================== PLUGIN MESSAGES =====================--
/*****************************************************************
Activate whenever a script is edited
@param pObject The the object with script is being edited
@example edit script command
@example script button on menubar
@bug Does not seem to work but will leave it in for now as it could be a Rev bug
@calledby button "revFrontScript" of card id 1002 of stack "revLibrary"
*****************************************************************/
on revEditScript pObject
objectDocs pObject
end revEditScript
/*****************************************************************
Activate whenever an object is selected
@example select command
@example inspect object with inspector
@example click on object in application browser
@calledby button "revBackScript" of card id 1002 of stack "revLibrary"
*****************************************************************/
on revSelectedObjectChanged
objectDocs the selectedObject
end revSelectedObjectChanged
--====================== USER INTERFACE =====================--
/*****************************************************************
Needed because stacks with rev prefix don't get geometry updated on resizeStack
*****************************************************************/
on resizeStack
revUpdateGeometry
end resizeStack
function markupH1 pHead
if "libXMLText" is not among the lines of the stacksInUse then
return "<font size=20><b>"&pHead&"</b></font>"
else
return "<h1>"&pHead&"</h1>"
end if
end markupH1
function markupH2 pHead
if "libXMLText" is not among the lines of the stacksInUse then
return "<font size=18><i>"&pHead&"</i></font>"
else
return "<h2>"&pHead&"</h2>"
end if
end markupH2
function markupH3 pHead
if "libXMLText" is not among the lines of the stacksInUse then
return "<font size=14><b>"&pHead&"</b></font>"
else
return "<h3>"&pHead&"</h3>"
end if
end markupH3
function markupLabel pHead
if "libXMLText" is not among the lines of the stacksInUse then
return "<b>"&pHead&"</b>"
else
return "<label>"&pHead&"</label>"
end if
end markupLabel
cREVGeometryCache stackID 1020 cREVLoadInfo revEditScript truerevResumeStack falsemode ModelessrevSelectedObjectChanged true P on preOpenCard set the cCurrent of this stack to "" set the cBackList of this stack to "" set the cForwardList of this stack to "" disable btn "back" disable btn "forward" indexStack the short name of the topStack end preOpenCard cREVGeneral scriptChecksum GU' $Jօj` bookmarks handlerList preOpenCardtempScript prevHandler scriptSelection char 242 to 241script kon preOpenCard
set the cCurrent of this stack to ""
set the cBackList of this stack to ""
set the cForwardList of this stack to ""
disable btn "back"
disable btn "forward"
indexStack the short name of the topStack
end preOpenCard
cREVGeometryCacheIDs 1055936116401 10131055977480389 10181055977439703 10151055331696284 10091055315797693 10031056607132371 10201055936118993 10141055331642068 10081055977474183 10161055330946647 10061055977477614 1017 cREVGeometrycache order 1055315797693 1055330946647 1055331696284 1055936116401 1055936118993 1055977439703 1055977474183 1055977477614 1055977480389 1056607132371 total 11 doc x @on linkClicked pLink if char 1 to 4 of pLink is "http" then revGoURL pLink else if char 1 to 6 of pLink is "mailto" then revMail char 8 to -1 of pLink else put urlDecode(pLink) into pLink if there is a pLink then objectDocs pLink else do pLink end if end if end linkClicked - htmltext xmlTexton linkClicked pLink
if char 1 to 4 of pLink is "http" then
revGoURL pLink
else if char 1 to 6 of pLink is "mailto" then
revMail char 8 to -1 of pLink
else
put urlDecode(pLink) into pLink
if there is a pLink then
objectDocs pLink
else
do pLink
end if
end if
end linkClicked
stack "sweatScriptBrowser" , \stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` , 2edit+the+script+of+stack+%22sweatScriptBrowser%22 202312 , card id 1002 # lcard+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # field "doc" # field+%22doc%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+field+%22doc%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "Help" # button+%22Help%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22Help%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # image "webheader.png" # image+%22webheader.png%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+image+%22webheader.png%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "Index TopStack" # button+%22Index+TopStack%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22Index+TopStack%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "Forward" # button+%22Forward%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22Forward%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "Back" # button+%22Back%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22Back%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # field "Field 1" # field+%22Field+1%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+field+%22Field+1%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "frontscripts" # button+%22frontscripts%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22frontscripts%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "backscripts" # button+%22backscripts%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22backscripts%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "libraries" # button+%22libraries%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22libraries%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # button "Text Style" # button+%22Text+Style%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 ` # edit+the+script+of+button+%22Text+Style%22+of+card+id+1002+of+stack+%22C%3A%2FDocuments+and+Settings%2FMonster%2FMy+Documents%2FsweatScriptBrowser.rev%22 202312 # ` @ . a @ Help ex Gon mouseUp set the htmlText of fld 1 to the cHelp of me end mouseUpcHelp
n Sweat Technologies - Script Browser 1.2 Developed by Monte Goulding Copyright © 2003 Sweat Technologies Sweat Technologies - Script Browser provides a way for Revolution scripters to incorporate javadoc script comments into object scripts and view them in a graphical format. LICENSE
You can use this plugin in any way you like, however, you may not modify it, redistribute it or resell it without the author's permission. INSTALLATION
Save this file into your plugins folder within the Revolution folder. This plugin is compatable with Revolution 2.0 and up only. USE
To view your javadoc comments using the plugin just select the object whose script you wish to view. For an example have a look at the sweatScriptBrowser stack script There are a few extra attributes that javadoc doesn't have and far greater flexibility. In this implementation you can use any attribute type, however, some attributes (local, global, temp, param and constant) have special formatting characteristics to handle name, definition pairs. To write javadoc comments you use a special form of the new "/* */" comments. The opening comment must have at least 2 *s. For Example, "/**" or "/********". It also must start at char 1 of the line in the script editor and be above the handler it relates to. The closing one must be at least "*/" but could be "****/" etc. It must be at the end ot the line (char -2 to -1 must be */). The main comment or description of the handler is written in htmlText. You don't need to surround it in the p tag because the code already does that. Attributes are written by prefixing the attribute name with @. For example: @param pSomething Means something @returns something else Any local, global or constant declarations (whether inside a handler on not) are automatically included as attributes. If you have comments after the declaration they are also included. For example: local lSomething -- Means something Variables declared outside of handlers are referred to as script local or script global. The value of each constant is also shown as this may often be sufficient for documenting the constant. For an example have a look at the sweatScriptBrowser stack script For scripting style information refer to the Fourth World Scripting Style Guide For javadoc comment information refer to How To Write Doc Comments For the JavaDoc(TM) Tool To check for updates to this plugin go to the Sweat Technologies Revolution Developer Secion on mouseUp set the htmlText of fld 1 to the cHelp of me end mouseUp. Note that when you see the script icon next to an object reference you can click it to edit the script of the object.
.