[Cuis-dev] Find with Scope

Juan Vuletich juan at cuis.st
Mon Dec 30 06:51:26 PST 2024


The modifier keys have been most likely broken for some time in seach. 
It is easy to verify that in 7.2 or 7.0. This needs some review. But as 
Jon says, I think it is best to have a reasonable dialog with checkboxes 
for this. Maybe I can get to this during this week.

Thanks!

On 12/30/2024 10:58 AM, Jon Raiford via Cuis-dev wrote:
>
> Hi Hilaire,
>
> I tried to just add the scope part. I really don’t use the modifier 
> keys. That logic was all brought over from the original code. Maybe we 
> need to grab their state before displaying the scope prompt? Btw, I’d 
> ultimately like to see this be an integrated dialog that has the 
> search text and the scope in one place. It could also then show 
> checkboxes in place of the modifier keys to make it more intuitive / 
> intuitable.
>
> Jon
>
> *From: *Cuis-dev <cuis-dev-bounces at lists.cuis.st> on behalf of Hilaire 
> Fernandes via Cuis-dev <cuis-dev at lists.cuis.st>
> *Date: *Sunday, December 29, 2024 at 5:32 AM
> *To: *cuis-dev at lists.cuis.st <cuis-dev at lists.cuis.st>
> *Cc: *Hilaire Fernandes <hfern at free.fr>
> *Subject: *Re: [Cuis-dev] Find with Scope
>
> This is useful, thanks. Some features, need to be documented thought 
> (where?) when I read this method below. I did not find how to use the 
> Shift or Ctrl alternatives. Pressing on of those prevent the search to 
> start.
>
> browseMethodsWithSourceString: aString
> scopeClass: scopeClass
> includeSubclasses: includeSubclasses
> includeSuperclasses: includeSuperclasses
>      "Smalltalk browseMethodsWithSourceString: 'SourceString' "
>      "Launch a browser on all methods whose source code contains aString as a substring."
>   
>      | caseSensitive suffix selectString |
>      Sensor controlKeyPressed ifTrue: [
>          selectString := ((aString findTokens: '*') sorted: [ :a :b | a size>  b size ]) first.
>          ^ self
>              browseMessageList: (self allMethodsSourceStringMatching: '*', aString, '*')
>              name: 'Methods matched by ' , aString printString , ' (no ctrl for exact match)'
>              autoHighlight: selectString
>              allOccurrences: true
>          ].
>     *  suffix := (caseSensitive := Sensor shiftPressed)*
> *         ifTrue: [' (case-sensitive. Use ctrl for $* pattern match.)']*
> *         ifFalse: [' (shift for case-sensitive. ctrl for $* pattern match.)'].*
>      ^ self
>          browseMessageList: (self allMethodsWithSourceString: aString matchCase: caseSensitive scopeClass: scopeClass includeSubclasses: includeSubclasses includeSuperclasses: includeSuperclasses)
>          name: 'Methods containing ' , aString printString , suffix
>          autoHighlight: aString
>          allOccurrences: true.
>
> Le 25/11/2024 à 19:47, Juan Vuletich via Cuis-dev a écrit :
>
>
>     I recently replaced the 'Method Source with it' menu option in
>     Smalltalk Editors with the new 'Find with Scope' option by Jon
>     Raiford. I'm sure it is more convenient and useful. Please try it
>     and share your thoughts.
>
>     I have also been doing other tweaks to improve usability, for
>     instance 'browse package' on all four lists in the Browser, and
>     minor tweaks here and there. Feedback is most welcome as usual.
>
> -- 
> http://mamot.fr/@drgeo


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241230/b5f761de/attachment-0001.htm>


More information about the Cuis-dev mailing list