Open khinsen opened 1 month ago
What is the source code of the view? Normally the title of the view should be set to a string.
The title of the view is a string, but not the title of the column, which is a BrRopedText
. I have lots of such views, and they have been working fine for a long time.
Here's the source of the specific view I was opening, but it probably doesn't make sense out of context:
gtItemsFor: aView
<gtView>
| view |
view := aView columnedList
title: 'Items';
priority: 1;
items: [
(1 to: sequence numberOfRows) collect: [ :row |
{ row. sequence atRow: row } ] ].
indexVariable
ifNil: [
view
column: 'Index'
text: [ :item |
item first asRopedText foreground: Color gray ]
width: 50 ]
ifNotNil: [
view
column: indexVariable
text: [ :item |
(item first * stepSize) asRopedText foreground: Color gray ]
width: 50 ].
variables withIndexDo: [ :var :i |
view
column: var asLeibnizSyntax
text: [ :item | item second at: i ] ].
^ view
Aha. Missed that it was the title of the column. I think we assume in most places that the column title is also a string. We can add that asString
call there, but it might be also safer to set column title to a string when creating the view. I see that change was made around a year ago.
In v1.0.1139, I get the following assertion failure when rendering a columnedList view:
The fix is inserting
asString
aftereachColumn title
.