object tool { help http://rappture.org/wiki/rappture_xml_elements attr title -type string -path title -tooltip "Sets the title of your tool, which usually appears on the right-hand side of your tool when it first starts up." attr description -type string:lines=6 -expand yes -path about -tooltip "A few paragraphs describing your tool, which usually appear just below the title on the right-hand side of your tool when it first starts up." attr command -title "Program" -type language -path command -tooltip "Sets the programming language used to implement your underlying simulation tool. This determines the command line that Rappture will use to invoke your tool." check title { if {[string length [string trim $attr(title)]] == 0} { return [list warning "You should include a title that describes your tool. This usually appears on the opening screen when the tool starts up."] } } check description { if {[string length [string trim $attr(description)]] == 0} { return [list warning "You should include a brief description of your tool. This usually appears on the opening screen when the tool starts up."] } } check command { set cmd [string trim $attr(command)] if {[string length $cmd] == 0} { return [list warning "You should set the program type or enter a custom command that will be used to invoke the simulation program. This is necessary in order for the tool to compute any results. If you select a programming language, the builder will let you save a skeleton program that you can use as a starting point."] } if {[string index $cmd 0] ne "!"} { if {![regexp @tool $cmd]} { return [list warning "The command string usually contains @tool, which represents the directory containing the tool.xml file. The program is usually located relative to this directory. Avoid hard-coded directory paths."] } if {![regexp @driver $cmd]} { return [list warning "The command should contain the argument @driver, which represents the driver input file generated by Rappture."] } } } }