a small question in Glamour

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

a small question in Glamour

Usman Bhatti
Hello all,

I construct a small browser in Glamour:

| finder |
finder := GLMFinder new.
finder show: [:a | 
a tree
title: 'Tree';
filterOn: [:text :each | text first = each]].
finder openOn: ($a to: $z).
Now, I can enter a text and it allows me to filter the elements of the input list according to the input text. 
My question: Once I enter the query and my list get filtered, is there any way that I can return to my complete, unfiltered list? Hitting the return on empty search field does not execute the filter block. Is there a proper way to achieve the task of "un-filtering" or should I create some hack to allow the user to see the list of unfiltered elements?

tx,
Usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: a small question in Glamour

Tudor Girba-2
Hi,

You specify how you want to interpret the filtering in the filterOn: block. So, it's up to you to interpret the empty string the way you want.

Cheers,
Doru


On 25 Jun 2012, at 22:14, Usman Bhatti wrote:

> Hello all,
>
> I construct a small browser in Glamour:
>
> | finder |
> finder := GLMFinder new.
> finder show: [:a |
> a tree
> title: 'Tree';
> filterOn: [:text :each | text first = each]].
> finder openOn: ($a to: $z).
>
> Now, I can enter a text and it allows me to filter the elements of the input list according to the input text.
> My question: Once I enter the query and my list get filtered, is there any way that I can return to my complete, unfiltered list? Hitting the return on empty search field does not execute the filter block. Is there a proper way to achieve the task of "un-filtering" or should I create some hack to allow the user to see the list of unfiltered elements?
>
> tx,
> Usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know her."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: a small question in Glamour

Usman Bhatti


On Mon, Jun 25, 2012 at 10:44 PM, Tudor Girba <[hidden email]> wrote:
Hi,

You specify how you want to interpret the filtering in the filterOn: block. So, it's up to you to interpret the empty string the way you want.

As far as I understand, empty string (hitting enter without typing anything in the text field) does not trigger the filterOn: block. Do you have the same behavior?
 

Cheers,
Doru


On 25 Jun 2012, at 22:14, Usman Bhatti wrote:

> Hello all,
>
> I construct a small browser in Glamour:
>
> | finder |
>       finder := GLMFinder new.
>       finder show: [:a |
>               a tree
>                       title: 'Tree';
>                       filterOn: [:text :each | text first = each]].
>       finder openOn: ($a to: $z).
>
> Now, I can enter a text and it allows me to filter the elements of the input list according to the input text.
> My question: Once I enter the query and my list get filtered, is there any way that I can return to my complete, unfiltered list? Hitting the return on empty search field does not execute the filter block. Is there a proper way to achieve the task of "un-filtering" or should I create some hack to allow the user to see the list of unfiltered elements?
>
> tx,
> Usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know her."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev