You spotted a Metacallo bug. Thanks for the report.
The problem is (I think) that in OBCmdMetacello >> isActive ^ ((target isKindOf: OBClassNode) and: [ requestor isSelected: target ]) and: [ self selectedClass isMetacelloConfig ] selectClass can be a Trait, not necessary Behavior. If you see, Metacello implemented Class >>isMetacelloConfig ^false But nothing in Trait. So...you can just add it also in Traits or... Maybe moving that method to Behavior helps? I am not sure how Traits is implemented. Can you check? The problem is that Gemstone doesn't have Traits...thus problably why the bug exists :) Cheers Mariano On Tue, Aug 3, 2010 at 6:16 PM, Jochen Riekhof <[hidden email]> wrote: Hi... |
On Tue, Aug 3, 2010 at 7:29 PM, Stéphane Ducasse <[hidden email]> wrote: we could add that to trait is this helps. Not necessary. It will just have the *ob-metacello category so that with Monticello it is packaged inside the Mteacello packages. just the same as Class >> isMetacelloConfig (I guess)
|
Mariano,
My actual fix was to add the method to Object ... does that fix not work? Dale Mariano Martinez Peck wrote: > > > On Tue, Aug 3, 2010 at 7:29 PM, Stéphane Ducasse > <[hidden email] <mailto:[hidden email]>> wrote: > > we could add that to trait is this helps. > > > Not necessary. It will just have the *ob-metacello category so that with > Monticello it is packaged inside the Mteacello packages. > just the same as Class >> isMetacelloConfig > > (I guess) > > > > On Aug 3, 2010, at 7:25 PM, Mariano Martinez Peck wrote: > > > You spotted a Metacallo bug. Thanks for the report. > > > > The problem is (I think) that in > > > > OBCmdMetacello >> isActive > > ^ ((target isKindOf: OBClassNode) > > and: [ requestor isSelected: target ]) > > and: [ self selectedClass isMetacelloConfig ] > > > > > > selectClass can be a Trait, not necessary Behavior. > > > > If you see, Metacello implemented > > > > Class >>isMetacelloConfig > > > > ^false > > > > But nothing in Trait. So...you can just add it also in Traits or... > > > > Maybe moving that method to Behavior helps? I am not sure how > Traits is implemented. Can you check? > > > > The problem is that Gemstone doesn't have Traits...thus problably > why the bug exists :) > > > > Cheers > > > > Mariano > > > > > > > > On Tue, Aug 3, 2010 at 6:16 PM, Jochen Riekhof <[hidden email] > <mailto:[hidden email]>> wrote: > > Hi... > > > > just noticed that I get a walkback after creating a Trait and > then opening the Context-Menu on the browser's classes list pane. > It complains > > MessageNotUnderstood: Trait>>isMetacelloConfig > > > > Adding the missing method to Trait solves the issue. Probably it > is just missing from {ob-metacello} package? > > > > Ciao > > > > ...Jochen > > > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > <mailto:[hidden email]> > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > <mailto:[hidden email]> > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > <mailto:[hidden email]> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > |
On Tue, Aug 3, 2010 at 9:34 PM, Dale Henrichs <[hidden email]> wrote: Mariano, Yes, sure. The problem is that a lot of people don't like to put those things in Object. But it is ok. I wonder in putting it in Behavior is not enought. Do you know? (I don't know Traits internals) Cheers Mariano Dale |
probably on pure behavior this is the superclass between Behavior and trait since we coud not change behavior
On Aug 3, 2010, at 10:59 PM, Mariano Martinez Peck wrote: > > > On Tue, Aug 3, 2010 at 9:34 PM, Dale Henrichs <[hidden email]> wrote: > Mariano, > > My actual fix was to add the method to Object ... does that fix not work? > > > Yes, sure. The problem is that a lot of people don't like to put those things in Object. But it is ok. I wonder in putting it in Behavior is not enought. Do you know? (I don't know Traits internals) > > Cheers > > Mariano > > > Dale > > Mariano Martinez Peck wrote: > > > On Tue, Aug 3, 2010 at 7:29 PM, Stéphane Ducasse <[hidden email] <mailto:[hidden email]>> wrote: > > we could add that to trait is this helps. > > > Not necessary. It will just have the *ob-metacello category so that with Monticello it is packaged inside the Mteacello packages. > just the same as Class >> isMetacelloConfig > > (I guess) > > > On Aug 3, 2010, at 7:25 PM, Mariano Martinez Peck wrote: > > > You spotted a Metacallo bug. Thanks for the report. > > > > The problem is (I think) that in > > > > OBCmdMetacello >> isActive > > ^ ((target isKindOf: OBClassNode) > > and: [ requestor isSelected: target ]) > > and: [ self selectedClass isMetacelloConfig ] > > > > > > selectClass can be a Trait, not necessary Behavior. > > > > If you see, Metacello implemented > > > > Class >>isMetacelloConfig > > > > ^false > > > > But nothing in Trait. So...you can just add it also in Traits or... > > > > Maybe moving that method to Behavior helps? I am not sure how > Traits is implemented. Can you check? > > > > The problem is that Gemstone doesn't have Traits...thus problably > why the bug exists :) > > > > Cheers > > > > Mariano > > > > > > > > On Tue, Aug 3, 2010 at 6:16 PM, Jochen Riekhof <[hidden email] > <mailto:[hidden email]>> wrote: > > Hi... > > > > just noticed that I get a walkback after creating a Trait and > then opening the Context-Menu on the browser's classes list pane. > It complains > > MessageNotUnderstood: Trait>>isMetacelloConfig > > > > Adding the missing method to Trait solves the issue. Probably it > is just missing from {ob-metacello} package? > > > > Ciao > > > > ...Jochen > > > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > <mailto:[hidden email]> > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > <mailto:[hidden email]> > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > <mailto:[hidden email]> > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > |
In reply to this post by Mariano Martinez Peck
Mariano Martinez Peck wrote:
> > > On Tue, Aug 3, 2010 at 9:34 PM, Dale Henrichs <[hidden email] > <mailto:[hidden email]>> wrote: > > Mariano, > > My actual fix was to add the method to Object ... does that fix not > work? > > > Yes, sure. The problem is that a lot of people don't like to put those > things in Object. But it is ok. I wonder in putting it in Behavior is > not enought. Do you know? (I don't know Traits internals) > > Cheers > > Mariano I looked and Traits is a subclass of object and I assume that the problem is that the message gets sent to an instance of Trait instead of the class .... isMetacelloConfig is the only #is* method in Metacello, otherwise we have no idea if the class is a config or not for the GUI ... I welcome other ideas:) ... I suppose I could put a MNU handler in the call ... that's probably a better solution .... I reopened Issue 92 and will fix in 1.0-beta.27.4 .... Dale |
>
> I looked and Traits is a subclass of object and I assume that the problem is that the message gets sent to an instance of Trait instead of the class .... isMetacelloConfig is the only #is* method in Metacello, otherwise we have no idea if the class is a config or not for the GUI ... I welcome other ideas:) ... My mistake it would be in the traits sahred by traits and classes > > I suppose I could put a MNU handler in the call ... that's probably a better solution .... I reopened Issue 92 and will fix in 1.0-beta.27.4 .... > > Dale |
In reply to this post by Mariano Martinez Peck
I plan to handle the issue by having a MNU handler for isMetacelloConfig
use ... until then patching Trait will work... Dale Stéphane Ducasse wrote: > sounds good compromise indeed. > > Stef > > On Aug 3, 2010, at 7:31 PM, Mariano Martinez Peck wrote: > >> >> On Tue, Aug 3, 2010 at 7:29 PM, Stéphane Ducasse <[hidden email]> wrote: >> we could add that to trait is this helps. >> >> >> Not necessary. It will just have the *ob-metacello category so that with Monticello it is packaged inside the Mteacello packages. >> just the same as Class >> isMetacelloConfig >> >> (I guess) >> >> >> On Aug 3, 2010, at 7:25 PM, Mariano Martinez Peck wrote: >> >>> You spotted a Metacallo bug. Thanks for the report. >>> >>> The problem is (I think) that in >>> >>> OBCmdMetacello >> isActive >>> ^ ((target isKindOf: OBClassNode) >>> and: [ requestor isSelected: target ]) >>> and: [ self selectedClass isMetacelloConfig ] >>> >>> >>> selectClass can be a Trait, not necessary Behavior. >>> >>> If you see, Metacello implemented >>> >>> Class >>isMetacelloConfig >>> >>> ^false >>> >>> But nothing in Trait. So...you can just add it also in Traits or... >>> >>> Maybe moving that method to Behavior helps? I am not sure how Traits is implemented. Can you check? >>> >>> The problem is that Gemstone doesn't have Traits...thus problably why the bug exists :) >>> >>> Cheers >>> >>> Mariano >>> >>> >>> >>> On Tue, Aug 3, 2010 at 6:16 PM, Jochen Riekhof <[hidden email]> wrote: >>> Hi... >>> >>> just noticed that I get a walkback after creating a Trait and then opening the Context-Menu on the browser's classes list pane. It complains >>> MessageNotUnderstood: Trait>>isMetacelloConfig >>> >>> Adding the missing method to Trait solves the issue. Probably it is just missing from {ob-metacello} package? >>> >>> Ciao >>> >>> ...Jochen >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Dale Henrichs
Jochen,
Trait isn't present in all of the smalltalks that metacello runs on, so I'm looking for a simple way to resolve the problem without doing something trait-specific ... I think I'll go with an Error handler instead ... only the classes that actually implement the method are interesting .... hmmm maybe a pragma would be even better ... Dale Jochen Riekhof wrote: > Hi Dale... > > being really new to all this, I might state the obvious, but my impression currently is that > > The purpose of isMetacelloConfig was to produce a class-side default method returning false if ob-metacello package is installed and override it when necessary in subclasses (class side) > The (false in Pharo) assumption was that Class is the proper base to cover all cases. Pharo has Traits which are not Classes, and on encountering these the assumption failed. > Putting isMetacelloConfig default method also to Trait sounds to me better than putting it to Object, as the intention was to have it just on the class/trait side of things. > > I do not know if it actually works, but maybe isMetacelloConfig default method should be defined in a Trait itself and used by Class and Trait? > > Ciao > > ...Jochen > > Am 03.08.2010 um 21:34 schrieb Dale Henrichs: > >> Mariano, >> >> My actual fix was to add the method to Object ... does that fix not work? >> >> Dale >> >> Mariano Martinez Peck wrote: >>> On Tue, Aug 3, 2010 at 7:29 PM, Stéphane Ducasse <[hidden email] <mailto:[hidden email]>> wrote: >>> we could add that to trait is this helps. >>> Not necessary. It will just have the *ob-metacello category so that with Monticello it is packaged inside the Mteacello packages. >>> just the same as Class >> isMetacelloConfig >>> (I guess) >>> On Aug 3, 2010, at 7:25 PM, Mariano Martinez Peck wrote: >>> > You spotted a Metacallo bug. Thanks for the report. >>> > >>> > The problem is (I think) that in >>> > >>> > OBCmdMetacello >> isActive >>> > ^ ((target isKindOf: OBClassNode) >>> > and: [ requestor isSelected: target ]) >>> > and: [ self selectedClass isMetacelloConfig ] >>> > >>> > >>> > selectClass can be a Trait, not necessary Behavior. >>> > >>> > If you see, Metacello implemented >>> > >>> > Class >>isMetacelloConfig >>> > >>> > ^false >>> > >>> > But nothing in Trait. So...you can just add it also in Traits or... >>> > >>> > Maybe moving that method to Behavior helps? I am not sure how >>> Traits is implemented. Can you check? >>> > >>> > The problem is that Gemstone doesn't have Traits...thus problably >>> why the bug exists :) >>> > >>> > Cheers >>> > >>> > Mariano >>> > >>> > >>> > >>> > On Tue, Aug 3, 2010 at 6:16 PM, Jochen Riekhof <[hidden email] >>> <mailto:[hidden email]>> wrote: >>> > Hi... >>> > >>> > just noticed that I get a walkback after creating a Trait and >>> then opening the Context-Menu on the browser's classes list pane. >>> It complains >>> > MessageNotUnderstood: Trait>>isMetacelloConfig >>> > >>> > Adding the missing method to Trait solves the issue. Probably it >>> is just missing from {ob-metacello} package? >>> > >>> > Ciao >>> > >>> > ...Jochen >>> > >>> > >>> > _______________________________________________ >>> > Pharo-project mailing list >>> > [hidden email] >>> <mailto:[hidden email]> >>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> > >>> > _______________________________________________ >>> > Pharo-project mailing list >>> > [hidden email] >>> <mailto:[hidden email]> >>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> <mailto:[hidden email]> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |