Posted by
Schwab,Wilhelm K on
Mar 24, 2005; 12:24am
URL: https://forum.world.st/Filtered-Message-Browser-suggestions-tp3373405p3373549.html
Chris,
>>I don't recall seeing your reply on UF's new server.
>
>
> "UF" ?
University of Florida.
>>>I've also been pondering making the list into a tree so as to allow
>>>nested boolean combinations of filters. I'm not yet convinced that the
>>>resulting UI wouldn't be excessively fiddly, though.
>>
>>It might be simpler to mix logic operations with the filters.
>
>
> Could you elaborate on that ? I'd been thinking of having 'And' and 'Or' nodes
> that would have children and so form a tree, but I don't (yet) see a way to mix
> logic operations into a non-heirarchical list.
One answer might be to specify filters that exist only to be used as
components of other filters; it might be as simple as giving the
component filters a non-nil #name or something. A new filter type would
then do logical combinations. However, I suspect that the result might
be less interactive than you want.
>>Regardless of how much power you add and how you present it, there
>>probably should be a way to save filters.
>
>
> I'm afraid that isn't going to happen. I agree that it would be nice to have a
> tool that allowed you to compose and explore complicated (perhaps SQL-like)
> conditions, and such a tool should certainly be able to save and restore
> queries. But I think that tool would have to be (mostly) text-based (the only
> really effective way of handling complexity, IMO), whereas the FMB is intended
> to be much more a light-weight, "fluid", thing (more like the method filters
> built into a CHB).
A couple of small tweaks would make it scriptable:
FilteringMethodBrowser show
basicAddSelectorReferencesFilter:#this;
basicAddSelectorDefinitionsFilter:#that;
basicAddSelectorDefinitionsFilter:#etc:;
setAnyMode;
setStateOfAllFilters:#enableFilter;
yourself.
What do you think?
If I were feeling _really_ pushy, I might point out that the tool could
script things as they are added, perhaps in another tab, or simply into
a string stream that could be dumped into a new
SmalltalkWorkspaceDocument or simply placed on the clipboard on demand.
Have a good one,
Bill
----------------
!FilteringMethodBrowser methodsFor!
basicAddSelectorReferencesFilter:aString
"command -- prompt to add a 'references to symbol' filter"
#wks.
filterPresenter model add:aString asSymbol.
! !
!FilteringMethodBrowser categoriesFor:
#basicAddSelectorReferencesFilter:!commands!public! !
!FilteringMethodBrowser methodsFor!
basicAddSelectorDefinitionsFilter:aString
"command -- prompt to add a 'definitions of selector' filter"
| string |
#wks.
string := (String writeStream)
nextPutAll: '[:it | it selector == ';
print:aString asSymbol;
nextPutAll: ']';
contents.
self halt.
self addCompiledExpression: string.
! !
!FilteringMethodBrowser categoriesFor:
#basicAddSelectorDefinitionsFilter:!commands!public! !
!FilteringMethodBrowser methodsFor!
setStateOfAllFilters:aSymbol
"private -- set the state of the selected filters to aSymbol"
| sel |
#wks.
sel := filterPresenter list.
(sel allSatisfy: [:each | (self stateOf: each) = aSymbol]) ifTrue: [^
self].
sel do: [:each | filterStates at: each put: aSymbol].
filterPresenter view invalidate.
self onFiltersChanged.
! !
!FilteringMethodBrowser categoriesFor:
#setStateOfAllFilters:!commands!public! !
--
Wilhelm K. Schwab, Ph.D.
[hidden email]