Hi Folks, For a development tool and Unicode grok exercise, I am recreating the functionality of: https://jrgraphix.net/r/Unicode/ For the Latin unicode characters, I would like to create a table 10 <td> things wide in a table row. There has got to be an elegant way rather than the kludge I am imagining... Here is my current code that has one TD for each row.
If I could "chunk" that (16r000020 asCharacter to: 16r00007F asCharacter) or the Interval (16r000020 to: 16r00007F) into subsets of 10, it would be easy to code this. thanks in advance. |
Hi Tim,
On Thu, 28 Jan 2021, gettimothy via Squeak-dev wrote: > Hi Folks, > > > For a development tool and Unicode grok exercise, I am recreating the functionality of: https://jrgraphix.net/r/Unicode/ > > > For the Latin unicode characters, I would like to create a table 10 <td> things wide in a table row. > > There has got to be an elegant way rather than the kludge I am imagining... > > Here is my current code that has one TD for each row. > render000020to00007F: html > html table > with:[ > html tableHead with: [html strong: ' Basic Latin']. > html tableBody with:[ > (16r000020 asCharacter to: 16r00007F asCharacter) > do:[:each| > html tableRow with:[ > html tableHeading: (each asInteger). > html tableData: each]]]] #groupsOf:atATimeDo:, but it's not, so I'd try something like this: | start end step | start := 16r000020. end := 16r00007F. step := 10. start to: end by: step do: [ :groupStart | | group | group := groupStart to: (groupStart + step - 1 min: end). html tableRow: [ group do: [ :each | html tableHead: each ] ]; tableRow: [ group do: [ :each | html tableData: each asCharacter ] ] ] Levente > > > If I could "chunk" that (16r000020 asCharacter to: 16r00007F asCharacter) or the Interval (16r000020 to: 16r00007F) into subsets of 10, it would be easy to code this. > > > > thanks in advance. > > > |
Levente Thank you! I will tussle with that tomorrow. As an aside, fior he purposes of seaside I learned that xml only supports a subset of available Unicode. https://en.m.wikipedia.org/wiki/Valid_characters_in_XML This may simplify my PEG filters. The larger and intriguing issue of getting every printable unicode character to display in squeak is now on my want to do list! . A fun experiment will be seeing if out putting "delete the e" to the Transcript followed by the delete character (127?) results in "delete the " (: cheers! t ---- On Thu, 28 Jan 2021 16:17:15 -0500 [hidden email] wrote ----
|
Free forum by Nabble | Edit this page |