newspeaklanguage / newspeak

Newspeak is a live object-capability language in the Smalltalk tradition
https://newspeaklanguage.org/
Other
136 stars 11 forks source link

Long strings mess up messages menu #69

Closed gbracha closed 2 years ago

gbracha commented 3 years ago

Strings show up in the messages menu of methods (and factories). If the strings are very long, the menu formatting goes out of control.

mzimmerm commented 3 years ago

Just one concrete example to duplicate: ObjectPresenter>>#helpText, then click on "find references" button.

Actual result: popup too wide to see anything useful. Tricky to get out of.

p3anoman commented 2 years ago

I am able to workaround the problem by modifying MethodMirror>>selectors and limiting the resulting list of literals to those whose size < an arbitrarily small number. 64 works good.

gbracha commented 2 years ago

Good to know. That is the wrong place to put in that filtering though. The mirrors shoudl give you the true results, and not be concerned with UI limitations. But the filtering can be moved to the actual menu code.

gbracha commented 2 years ago

So I made the change in the right place and it works pretty well. Arguably one should parse the symbols to see if they are legal selectors and filter on that basis instead; that could be done in the mirror. But this works for now. Once I push out the fix I'll close this issue, and replace it with a more minor one (showing strings rather than just selectors).

gbracha commented 2 years ago

So I made the change in the right place and it works pretty well. Arguably one should parse the symbols to see if they are legal selectors and filter on that basis instead; that could be done in the mirror. But this works for now. Once I push out the fix I'll close this issue, and replace it with a more minor one (showing strings rather than just selectors).