Skip to content

Commit 0852515

Browse files
committed
Polish the documentation in Using the interface section
1 parent faa4422 commit 0852515

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

R/examples.R

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
interfaceExample <- function(jaspResults, dataset, options) {
22
# Just show the options as they are understood the R backend
3-
jaspResults[["explanation"]] <- createJaspHtml(title = "Outputs as html",
4-
text = "Here we show the options as they are understood by the R backend.")
3+
jaspResults[["explanation"]] <- createJaspHtml(title = "User inputs, returned as html",
4+
text = sprintf("Here we show, for pedagogical purposes, the user inputs as they are understood by the R backend."))
55

66
jaspResults[["logicals"]] <- createJaspHtml(
77
title = "Logical controls",
88
text = sprintf("The tick mark is set to: %s
99
The radio buttons are set to: %s",
10-
as.character(options$my_tick_mark),
11-
as.character(options$radio_buttons))
10+
as.character(options$my_tick_mark), # These variables are defined in .inst/qml/Interface.qml
11+
as.character(options$radio_buttons)) # Notice we have to be careful with the data type
1212
)
1313

1414
jaspResults[["others"]] <- createJaspHtml(
@@ -30,7 +30,17 @@ interfaceExample <- function(jaspResults, dataset, options) {
3030
as.character(options$my_double),
3131
as.character(options$my_percent),
3232
as.character(options$my_ci),
33-
options$my_text)
33+
options$my_text) # No data-type conversion needed for text
34+
)
35+
36+
jaspResults[["developers"]] <- createJaspHtml(
37+
title = "Note for developers",
38+
text = sprintf("Potential developers will find it useful to inspect the following files:
39+
<ul>
40+
<li><a href='https://github.com/jasp-stats/jaspModuleTemplate/blob/master/inst/qml/Interface.qml'>./inst/qml/Interface.qml</a>: builds the menu on the left panel</li>
41+
<li><a href='https://github.com/jasp-stats/jaspModuleTemplate/blob/master/R/examples.R'>./R/examples.R</a>: builds the output screen you are looking at</li>
42+
<li><a href='https://github.com/jasp-stats/jaspModuleTemplate/blob/master/inst/Description.qml'>./inst/Description.qml</a>: adds access to the current submodule to the module icon on the ribbon above</li>
43+
</ul>")
3444
)
3545

3646
return()

inst/Description.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ Description
1717

1818
GroupTitle
1919
{
20-
title: qsTr("Interfaces")
20+
title: qsTr("Basic interactivity")
2121
}
2222

2323
Analysis
2424
{
25-
title: qsTr("Interface example") // Title for window
26-
menu: qsTr("Interface example") // Title for ribbon
27-
func: "interfaceExample" // Function to be called
28-
qml: "Interface.qml" // Design input window
29-
requiresData: false // Allow to run even without data
25+
title: qsTr("Using the interface") // Title for window
26+
menu: qsTr("Using the interface") // Title for ribbon
27+
func: "interfaceExample" // Function to be called
28+
qml: "Interface.qml" // Design input window
29+
requiresData: false // Allow to run even without data
3030
}
3131

3232
GroupTitle

0 commit comments

Comments
 (0)