Display script output in a TextMorph

Bug #1451201 reported by hilaire
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dr. Geo
Fix Released
Wishlist
Unassigned

Bug Description

Right now script output is in a StringMorph.

Do it in a text morph so it is possible to have script output spread in several lines of text.

Edit as

DrGScriptCostume>>instantiateMorph
 morph := DrGTextMorph new autoFit: true.
 morph contents: '';
  font: DrGDefault canvasFont;
  backgroundColor: Color white.
 mathItem value isText
  ifTrue: [ morph contents: mathItem value]
  ifFalse: [morph contents: self roundedValueString]

Style need to be extend as for TextCostume

Revision history for this message
hilaire (hilaire-fernandes) wrote :

For style editL

DrGScriptCostume>>styleClass
 ^DrGTextCostumeStyle

**BUT** better to make DrGScriptCostume a subclass of DrGTextCostume

Revision history for this message
hilaire (hilaire-fernandes) wrote :

But it is enough for (no need to change herarchy):

DrSCriptCostume>>backgroundColor: aColor
 morph backgroundColor: aColor

check for XML load, missing attribute will brake sketch load:

DrGTextCostumeStyle>>writeAttributesTo: aNode
 super writeAttributesTo: aNode.
 aNode attributeAt: #background put: self baseBackgroundColor name asString capitalized.

Changed in drgeo:
status: Confirmed → In Progress
Changed in drgeo:
milestone: wip → 15.07
Changed in drgeo:
status: In Progress → Fix Committed
Changed in drgeo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.