Bug #3912
closedRExpression actor has a single line text entry field
0%
Description
XP Pro x64 SP2, Java 1.6.0_11, Kepler 1.x dev Rev. 17126 from svn
The RExpression actor source entry is only a single line. It does not convert pasted newlines into in the XML.
Current the actor's XML has this bit:
<property name="expression" class="ptolemy.kernel.util.StringAttribute" value="a <- c(1,2,3,5)
plot(a)">
<display name="R function or script"/>
</property>
<property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
<property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
</property>
<property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
</property>
<property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
</property>
</property>
Replacing that bit of XML with the following, based on older RExpression actors, seems to work:
<property name="expression" class="ptolemy.kernel.util.StringAttribute" value="a <- c(1,2,3,5)
plot(a)">
<display name="R function or script"/>
<property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
<property name="height" class="ptolemy.data.expr.Parameter" value="20">
</property>
<property name="width" class="ptolemy.data.expr.Parameter" value="80">
</property>
</property>
</property>
Updated by ben leinfelder over 15 years ago
Restored the TestStyle object for the "expression" box. It had been commented out because it looked like it was not being used...but it was.