https://projects.ecoinformatics.org/ecoinfo/https://projects.ecoinformatics.org/ecoinfo/ecoinfo/favicon.ico?14691340362008-03-27T22:26:23ZEcoinformatics RedmineKepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109222008-03-27T22:26:23Zben leinfelderleinfelder@nceas.ucsb.edu
<ul></ul><p>By using the ptolemy.actor.gui.TextEditor when "Open Actor" is invoked on the RExpression we can support having multiple editor (and display) windows open simultaneously so that copying and pasting among them easier.</p>
<p>This change can go into the Kepler code base (RExpression class) without any modifications to the underlying ptolemy sources.</p>
<p>Note: We'll hopefully get the go-ahead to add "undo" functionality to this TextEditor, too. But this would depend on approval from the ptII folks.</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109232008-03-27T23:54:35Zben leinfelderleinfelder@nceas.ucsb.edu
<ul></ul><p>Until a change is included in ptII code (specifically ptolemy.actor.gui.TextEditorTableau), only one RExpresison text editor will be shown at a time (you can still look at other actors and execute the workflow with this single editor open, however).</p>
<p>The change mentioned makes sure the frame (or is it a Tableau?) title is set to the R actor's name so that multiple text editors are opened for each different script. Currently they all use the same frame titled "Unnamed"</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109242008-03-30T03:46:01ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>The change to TextEditorTableau is marked below<br /> if (frame == null) {<br /> frame = new TextEditor(title, container.getDocument());<br /> }</p>
<pre><code>frame.text.setColumns(80);<br /> frame.text.setRows(40);<br />--> setTitle(frame.getTitle());<br /> setFrame(frame);<br /> frame.setTableau(this);</code></pre>
<p>The problem is that if I make this change, then under Ptolemy the titlebar<br />does not get updated with the filename. Here's how to reproduce this:<br />1. Make the above change to TextEditorTableau and recompile Ptolemy<br />2. File | New | Text Editor<br />3. Type some text<br />4. File | Save As<br />5. Save the file as data.txt<br />The title bar does not get updated with the title.</p>
<p>If I revert the change, and repeat, then the titlebar gets updated.<br />At least it did for my test</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109252008-03-31T18:14:43Zben leinfelderleinfelder@nceas.ucsb.edu
<ul></ul><p>It's less than ideal to have a bunch of open text editor windows all named "Unnamed".<br />But I think we can handle it for the time being.</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109262008-03-31T20:16:37ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>Ok, I put the setTitle inside the if block, so this might now work.<br />What we have is:</p>
<pre><code>if (frame == null) {<br /> frame = new TextEditor(title, container.getDocument());<br /> // Set the title for the Kepler R actor<br /> // <a class="external" href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187</a><br /> setTitle(frame.getTitle());<br /> }</code></pre>
<pre><code>frame.text.setColumns(80);<br /> frame.text.setRows(40);<br /> setFrame(frame);<br /> frame.setTableau(this);</code></pre>
<p>This might have solved the "many windows named Unnamed" proble</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109272008-03-31T20:36:43Zben leinfelderleinfelder@nceas.ucsb.edu
<ul></ul><p>I think you have it inverted. the frame <em>won't</em> be null in our Kepler case for the R actor. The code block should be:</p>
<p>if (frame == null) {<br /> frame = new TextEditor(title, container.getDocument());<br /> }<br /> else {<br /> // Set the title for the Kepler R actor<br /> // <a class="external" href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187</a><br /> setTitle(frame.getTitle());<br /> }</p>
<p>is that reasonable?</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109282008-04-09T17:53:21Zben leinfelderleinfelder@nceas.ucsb.edu
<ul></ul><p>This will not be included in the branch of ptolemy (rel70b2) we are using to build kepler 1.0<br />Retargeting for after 1.0.<br />I think Kepler 1.0 can live without the frame title text being set</p> Kepler - Bug #3187: RExpression actor does not share focushttps://projects.ecoinformatics.org/ecoinfo/issues/3187?journal_id=109292013-03-27T21:22:34ZRedmine Admin
<ul></ul><p>Original Bugzilla ID was 3187</p>