[Pharo-project] BrowserEnvironment is broken?
Hi Folks, In the latest pharo-web image (pharo1.0-10440-BETAweb09.09.1), the BrowserEnvironment is acting strangely: (BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]; label: 'super sends'; open. This lists a whole bunch of methods that do *not* send super, including Boolean>>#&. If I check: (Boolean>>#&) sendsToSuper --> false So what is wrong? This worked ok back at the beginning of July ... - on
Remove your first cascade, and it works. I'm not sure how it worked back in July, but now selectMethods: doesn't modify the current environment, it return a new Environment on the methods. So your code is telling the Browser with the class as env to set its label and open, not the Browser with the methods as env. ((BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]) label: 'super sends'; open. works like you expect. Cheers, Henry Oscar Nierstrasz skrev:
Hi Folks,
In the latest pharo-web image (pharo1.0-10440-BETAweb09.09.1), the BrowserEnvironment is acting strangely:
(BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]; label: 'super sends'; open.
This lists a whole bunch of methods that do *not* send super, including Boolean>>#&.
If I check:
(Boolean>>#&) sendsToSuper --> false
So what is wrong? This worked ok back at the beginning of July ...
- on
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Boy, is my face red now! Thanks!!! This was driving me crazy. - on On Sep 11, 2009, at 15:51, Henrik Johansen wrote:
Remove your first cascade, and it works. I'm not sure how it worked back in July, but now selectMethods: doesn't modify the current environment, it return a new Environment on the methods. So your code is telling the Browser with the class as env to set its label and open, not the Browser with the methods as env.
((BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]) label: 'super sends'; open. works like you expect.
Cheers, Henry
Oscar Nierstrasz skrev:
Hi Folks,
In the latest pharo-web image (pharo1.0-10440-BETAweb09.09.1), the BrowserEnvironment is acting strangely:
(BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]; label: 'super sends'; open.
This lists a whole bunch of methods that do *not* send super, including Boolean>>#&.
If I check:
(Boolean>>#&) sendsToSuper --> false
So what is wrong? This worked ok back at the beginning of July ...
- on
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
If I would be red each time I do a mistake.... Stef On Sep 11, 2009, at 8:16 PM, Oscar Nierstrasz wrote:
Boy, is my face red now!
Thanks!!! This was driving me crazy.
- on
On Sep 11, 2009, at 15:51, Henrik Johansen wrote:
Remove your first cascade, and it works. I'm not sure how it worked back in July, but now selectMethods: doesn't modify the current environment, it return a new Environment on the methods. So your code is telling the Browser with the class as env to set its label and open, not the Browser with the methods as env.
((BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]) label: 'super sends'; open. works like you expect.
Cheers, Henry
Oscar Nierstrasz skrev:
Hi Folks,
In the latest pharo-web image (pharo1.0-10440-BETAweb09.09.1), the BrowserEnvironment is acting strangely:
(BrowserEnvironment new forClasses: (Boolean withAllSubclasses)) selectMethods: [:method | method sendsToSuper ]; label: 'super sends'; open.
This lists a whole bunch of methods that do *not* send super, including Boolean>>#&.
If I check:
(Boolean>>#&) sendsToSuper --> false
So what is wrong? This worked ok back at the beginning of July ...
- on
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Henrik Johansen -
Oscar Nierstrasz -
Stéphane Ducasse