regression in browsing senders

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

regression in browsing senders

Nicolas Cellier
Hi all,
I wanted to browse selector of preference:categoryList:etc... without typing such long selector.
So I browsed HandMorph class>>#sendMouseWheelToKeyboardFocus
then selected the text in annotation < ...text to select... >
then typed cmd+N
then got a dialog telling: there are no Users of 'preference:'

The problem seems located in findSelector, this line:

     sel := sel copyWithRegex: '#[^\s\.$]*' matchesReplacedWith: '#aSymbol'.

does replace '#(Morphic keyboard mouse)' with 'aSymbol keyboard mouse)'

I understand the intention: we want to filter out occurrences of key selector symbols like #foo:bar:
I'd like to correct the regex, but I don't even understand it...
character #, followed by any number of characters in given set []...
what set exactly? I understand any character except \s a space?, \. a period (does . inside [] would mean any character?) and $
But we have #[ 23 16rB9 ] and #(foo bar) so we should at least exclude [ and ( too...

Now I typed many more than the selector that I did not want to type, I lost ;)


Reply | Threaded
Open this post in threaded view
|

Re: regression in browsing senders

Nicolas Cellier
Finally, fix in inbox

Le ven. 27 déc. 2019 à 22:23, Nicolas Cellier <[hidden email]> a écrit :
Hi all,
I wanted to browse selector of preference:categoryList:etc... without typing such long selector.
So I browsed HandMorph class>>#sendMouseWheelToKeyboardFocus
then selected the text in annotation < ...text to select... >
then typed cmd+N
then got a dialog telling: there are no Users of 'preference:'

The problem seems located in findSelector, this line:

     sel := sel copyWithRegex: '#[^\s\.$]*' matchesReplacedWith: '#aSymbol'.

does replace '#(Morphic keyboard mouse)' with 'aSymbol keyboard mouse)'

I understand the intention: we want to filter out occurrences of key selector symbols like #foo:bar:
I'd like to correct the regex, but I don't even understand it...
character #, followed by any number of characters in given set []...
what set exactly? I understand any character except \s a space?, \. a period (does . inside [] would mean any character?) and $
But we have #[ 23 16rB9 ] and #(foo bar) so we should at least exclude [ and ( too...

Now I typed many more than the selector that I did not want to type, I lost ;)