annotationDescription asMorph is buggy

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

annotationDescription asMorph is buggy

Stéphane Ducasse
mooseFinderMetanoolIn: composite
        <moosePresentationOrder: 10>
        composite magritte
                title: 'Meta editor';
                titleIcon: MooseIcons mooseEditor;
                display: [:anObject | anObject mooseInterestingEntity ];
                act: [:m |
                        | result annotationDescription |
                        annotationDescription := MTLAnnotationDescription new.
                        result := annotationDescription asMorph addButtons addWindow callInWorld.

In Moose 4.7 the previous line open an empty window with save and cancel
in 4.6 it opens a name and list of type.

I checked and annotationDescription instance variables are exactly the same in both version.

Now this is really complex to understand, since I do not know what changed in magritte in addition.
Any idea?

Stef




                                self halt.
                        (result notNil) ifTrue: [
                                m entity mooseInterestingEntity mooseDescription attributes add: annotationDescription.
                                m update ] ]
                icon: GLMUIThemeExtraIcons glamorousAdd entitled: 'Add annotation';
                description: [ :anObject |
                        | description |
                        description := MAContainer new.
                        description label: anObject mooseDescription name.
                        anObject mooseDescription allAttributes do: [ :attribute |
                                (attribute isKindOf: MTLAnnotationDescription) ifTrue: [
                                        description add: attribute asMagritteDescription ] ].
                        description
                        "anObject mooseDescription asMagritteDescription"
                        ]
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: annotationDescription asMorph is buggy

Stéphane Ducasse
4.6

Object>>asMorph
        ^ self description asMorphOn: self

Object>>basicDescription
        "Return the description of the receiver. Never override this method, instead modify #description."

        ^ self class description

Object class>>description
        ^ MADescriptionBuilder for: self
       
4.7
Object>>asMorph
        ^ self magritteDescription asMorphOn: self


Object>>magritteDescription
        ^ self basicMagritteDescription


basicMagritteDescription
        ^ MAPragmaBuilder for: self


then I got lost in the arcane of Magrrite :(


Doru do not know where the type where coming from?

What is the bridge between annotation and magritte?







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

Screen Shot 2012-04-09 at 11.30.44 AM.pdf (30K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: annotationDescription asMorph is buggy

Stéphane Ducasse
4.6

build: anObject
        | selectors container description |
        self halt.
        selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].

        selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
sounds good.


        container := self build: anObject for: self containerSelector in: selectors.
        ^ (selectors select: [ :each | each isDescriptionDefinition ])
                inject: (cache at: anObject put: container)
                into: [ :result :each |
                        self containerSelector = each ifFalse: [
                                description := self build: anObject for: each in: selectors.
                                description isDescription
                                        ifTrue: [ result add: description ] ].
                        result ]


4.7

buildDescriptions: anObject
        | descriptionExtensions descriptionSelectors |
       
        descriptionSelectors := self uniqueDescriptionSelectors: anObject.

        descriptionSelectors  -> Set()  :(

        descriptionExtensions := self descriptionExtensions: anObject.

        ^ (descriptionSelectors
                collect:  [ :each |
                        | description |
                        description := anObject perform: each.
                       
                        description notNil ifTrue: [
                                descriptionExtensions at: each ifPresent: [ :extensions |
                                        extensions do: [ :extensionSelector |
                                                description := anObject perform: extensionSelector with: description ] ] ].
                        description ])
                select: #notNil.



So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(

Pragma
                allNamed: MAPragmaBuilder magritteDescriptionPragma
                from: FM3Element to: Object.

does not return the methods with the annotations.

I'm getting there.

Stef


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

Re: annotationDescription asMorph is buggy

Tudor Girba-2
Hi Stef,

Indeed, the change is due to Magritte 3 now using instance side annotations. The Metanool code still works for the regular annotations (so, if you have an annotation it will show in the form), but when asking for the annotations of the annotations, it seems that something is broken. But, I do not know what :(.

Cheers,
Doru


On 9 Apr 2012, at 11:51, Stéphane Ducasse wrote:

> 4.6
>
> build: anObject
> | selectors container description |
> self halt.
> selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
>
> selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
> sounds good.
>
>
> container := self build: anObject for: self containerSelector in: selectors.
> ^ (selectors select: [ :each | each isDescriptionDefinition ])
> inject: (cache at: anObject put: container)
> into: [ :result :each |
> self containerSelector = each ifFalse: [
> description := self build: anObject for: each in: selectors.
> description isDescription
> ifTrue: [ result add: description ] ].
> result ]
>
>
> 4.7
>
> buildDescriptions: anObject
> | descriptionExtensions descriptionSelectors |
>
> descriptionSelectors := self uniqueDescriptionSelectors: anObject.
>
> descriptionSelectors  -> Set()  :(
>
> descriptionExtensions := self descriptionExtensions: anObject.
>
> ^ (descriptionSelectors
> collect:  [ :each |
> | description |
> description := anObject perform: each.
>
> description notNil ifTrue: [
> descriptionExtensions at: each ifPresent: [ :extensions |
> extensions do: [ :extensionSelector |
> description := anObject perform: extensionSelector with: description ] ] ].
> description ])
> select: #notNil.
>
>
>
> So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(
>
> Pragma
> allNamed: MAPragmaBuilder magritteDescriptionPragma
> from: FM3Element to: Object.
>
> does not return the methods with the annotations.
>
> I'm getting there.
>
> Stef
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"We are all great at making mistakes."








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

Magritte confusion

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
I'm totally confused by magritte…
So I can fix Moose somehow but I do not know how to manage it.


I defined

FM3Element class>>magritteDescriptionName
        <magritteDescription>
       
        ^ MAStringDescription new
                accessor: #name;
                default: 'noname';
                label: 'Name';
                priority: 100;
                beRequired;
                yourself

FM3PropertyDescription class>>magritteDescriptionType
        <magritteDescription>
        ^ MASingleOptionDescription new
                accessor: #type;
                label: 'Type';
                priority: 300;
                default: FM3 boolean;
                beRequired;
                options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
" reference: MAClassDescription new;"
                yourself


and now

        Pragma
                allNamed: MAPragmaBuilder magritteDescriptionPragma
                from: FM3Element to: Object.
        -> #()

        because the description are defined on class side.
        I could define the descriptions on the instance side but to me it does not make sense.

        Pragma
                allNamed: MAPragmaBuilder magritteDescriptionPragma
                from: FM3Element class to: Object class.

        -> an Array(<magritteDescription>) ;)
and

        Pragma
                allNamed: MAPragmaBuilder magritteDescriptionPragma
                from: FM3PropertyDescription class  to: Object class.  an Array(<magritteDescription> <magritteDescription>)
       

Now the definition of uniqueDescriptionSelectors: or the build: method of MAPragmaBuilder
look bogus to me. Either it should take a class as argument or move the class level.

Is anObject a class?

may be the correct definition is

Object>>basicMagritteDescription
        ^ MAPragmaBuilder for: self class

instead of

basicMagritteDescription
        ^ MAPragmaBuilder for: self


Then options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;

Apparently there is no MADynamicObject anymore…..

So can use the old version of magritte for moose because this is boring to run after bugs like that






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

Re: annotationDescription asMorph is buggy

Stéphane Ducasse
In reply to this post by Tudor Girba-2

On Apr 9, 2012, at 12:16 PM, Tudor Girba wrote:

> Hi Stef,
>
> Indeed, the change is due to Magritte 3 now using instance side annotations.

instance side annotations!!! After people cry that we change in Pharo but we do not do such radical changes.
So should we migrate the methods on the instance side?

Check my next mail.

I do not see why Magritte is cannot be backward compatible. shit. May be we should not use Magritte 3.


Stef

> The Metanool code still works for the regular annotations (so, if you have an annotation it will show in the form), but when asking for the annotations of the annotations, it seems that something is broken. But, I do not know what :(.

I found it.

define on instance side

magritteDescriptionType
        <magritteDescription>
        ^ MASingleOptionDescription new
                accessor: #type;
                label: 'Type';
                priority: 300;
                default: FM3 boolean;
                beRequired;
                options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
" reference: MAClassDescription new;"
                yourself

Now there is no magritteDynamicObject anymore ;(

Shit shit shit.



Stef





>
> Cheers,
> Doru
>
>
> On 9 Apr 2012, at 11:51, Stéphane Ducasse wrote:
>
>> 4.6
>>
>> build: anObject
>> | selectors container description |
>> self halt.
>> selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
>>
>> selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
>> sounds good.
>>
>>
>> container := self build: anObject for: self containerSelector in: selectors.
>> ^ (selectors select: [ :each | each isDescriptionDefinition ])
>> inject: (cache at: anObject put: container)
>> into: [ :result :each |
>> self containerSelector = each ifFalse: [
>> description := self build: anObject for: each in: selectors.
>> description isDescription
>> ifTrue: [ result add: description ] ].
>> result ]
>>
>>
>> 4.7
>>
>> buildDescriptions: anObject
>> | descriptionExtensions descriptionSelectors |
>>
>> descriptionSelectors := self uniqueDescriptionSelectors: anObject.
>>
>> descriptionSelectors  -> Set()  :(
>>
>> descriptionExtensions := self descriptionExtensions: anObject.
>>
>> ^ (descriptionSelectors
>> collect:  [ :each |
>> | description |
>> description := anObject perform: each.
>>
>> description notNil ifTrue: [
>> descriptionExtensions at: each ifPresent: [ :extensions |
>> extensions do: [ :extensionSelector |
>> description := anObject perform: extensionSelector with: description ] ] ].
>> description ])
>> select: #notNil.
>>
>>
>>
>> So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(
>>
>> Pragma
>> allNamed: MAPragmaBuilder magritteDescriptionPragma
>> from: FM3Element to: Object.
>>
>> does not return the methods with the annotations.
>>
>> I'm getting there.
>>
>> Stef
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Magritte confusion

Lukas Renggli
In reply to this post by Stéphane Ducasse
Have a look at the release announcement, this should answer all your questions:

    http://forum.world.st/Magritte-3-td4401357.html

Lukas

On 9 April 2012 12:22, Stéphane Ducasse <[hidden email]> wrote:

> I'm totally confused by magritte…
> So I can fix Moose somehow but I do not know how to manage it.
>
>
> I defined
>
> FM3Element class>>magritteDescriptionName
>        <magritteDescription>
>
>        ^ MAStringDescription new
>                accessor: #name;
>                default: 'noname';
>                label: 'Name';
>                priority: 100;
>                beRequired;
>                yourself
>
> FM3PropertyDescription class>>magritteDescriptionType
>        <magritteDescription>
>        ^ MASingleOptionDescription new
>                accessor: #type;
>                label: 'Type';
>                priority: 300;
>                default: FM3 boolean;
>                beRequired;
>                options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
> "               reference: MAClassDescription new;"
>                yourself
>
>
> and now
>
>        Pragma
>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>                from: FM3Element to: Object.
>        -> #()
>
>        because the description are defined on class side.
>        I could define the descriptions on the instance side but to me it does not make sense.
>
>        Pragma
>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>                from: FM3Element class to: Object class.
>
>        -> an Array(<magritteDescription>) ;)
> and
>
>        Pragma
>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>                from: FM3PropertyDescription class  to: Object class.  an Array(<magritteDescription> <magritteDescription>)
>
>
> Now the definition of uniqueDescriptionSelectors: or the build: method of MAPragmaBuilder
> look bogus to me. Either it should take a class as argument or move the class level.
>
> Is anObject a class?
>
> may be the correct definition is
>
> Object>>basicMagritteDescription
>        ^ MAPragmaBuilder for: self class
>
> instead of
>
> basicMagritteDescription
>        ^ MAPragmaBuilder for: self
>
>
> Then    options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
>
> Apparently there is no MADynamicObject anymore…..
>
> So can use the old version of magritte for moose because this is boring to run after bugs like that
>
>
>
>
>
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
Lukas Renggli
www.lukas-renggli.ch

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

Re: Magritte confusion

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
Is there a real place where I can see the changes in magritte3.0?
I wonder why we use something that does not even have a web site and a little log of changes.
I found http://forum.world.st/Magritte-3-td4401357.html and it looks sad to me… when I see the time I spend documenting frameworks.


Stef

On Apr 9, 2012, at 12:22 PM, Stéphane Ducasse wrote:

> I'm totally confused by magritte…
> So I can fix Moose somehow but I do not know how to manage it.
>
>
> I defined
>
> FM3Element class>>magritteDescriptionName
> <magritteDescription>
>
> ^ MAStringDescription new
> accessor: #name;
> default: 'noname';
> label: 'Name';
> priority: 100;
> beRequired;
> yourself
>
> FM3PropertyDescription class>>magritteDescriptionType
> <magritteDescription>
> ^ MASingleOptionDescription new
> accessor: #type;
> label: 'Type';
> priority: 300;
> default: FM3 boolean;
> beRequired;
> options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
> " reference: MAClassDescription new;"
> yourself
>
>
> and now
>
> Pragma
> allNamed: MAPragmaBuilder magritteDescriptionPragma
> from: FM3Element to: Object.
> -> #()
>
> because the description are defined on class side.
> I could define the descriptions on the instance side but to me it does not make sense.
>
> Pragma
> allNamed: MAPragmaBuilder magritteDescriptionPragma
> from: FM3Element class to: Object class.
>
> -> an Array(<magritteDescription>) ;)
> and
>
> Pragma
> allNamed: MAPragmaBuilder magritteDescriptionPragma
> from: FM3PropertyDescription class  to: Object class.  an Array(<magritteDescription> <magritteDescription>)
>
>
> Now the definition of uniqueDescriptionSelectors: or the build: method of MAPragmaBuilder
> look bogus to me. Either it should take a class as argument or move the class level.
>
> Is anObject a class?
>
> may be the correct definition is
>
> Object>>basicMagritteDescription
> ^ MAPragmaBuilder for: self class
>
> instead of
>
> basicMagritteDescription
> ^ MAPragmaBuilder for: self
>
>
> Then options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
>
> Apparently there is no MADynamicObject anymore…..
>
> So can use the old version of magritte for moose because this is boring to run after bugs like that
>
>
>
>
>
>
> Stef
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Magritte confusion

Stéphane Ducasse
In reply to this post by Lukas Renggli
Thanks lukas I just found it.
I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
Before we got your master now nothing…

Stef

On Apr 9, 2012, at 12:26 PM, Lukas Renggli wrote:

> Have a look at the release announcement, this should answer all your questions:
>
>    http://forum.world.st/Magritte-3-td4401357.html
>
> Lukas
>
> On 9 April 2012 12:22, Stéphane Ducasse <[hidden email]> wrote:
>> I'm totally confused by magritte…
>> So I can fix Moose somehow but I do not know how to manage it.
>>
>>
>> I defined
>>
>> FM3Element class>>magritteDescriptionName
>>        <magritteDescription>
>>
>>        ^ MAStringDescription new
>>                accessor: #name;
>>                default: 'noname';
>>                label: 'Name';
>>                priority: 100;
>>                beRequired;
>>                yourself
>>
>> FM3PropertyDescription class>>magritteDescriptionType
>>        <magritteDescription>
>>        ^ MASingleOptionDescription new
>>                accessor: #type;
>>                label: 'Type';
>>                priority: 300;
>>                default: FM3 boolean;
>>                beRequired;
>>                options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
>> "               reference: MAClassDescription new;"
>>                yourself
>>
>>
>> and now
>>
>>        Pragma
>>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>>                from: FM3Element to: Object.
>>        -> #()
>>
>>        because the description are defined on class side.
>>        I could define the descriptions on the instance side but to me it does not make sense.
>>
>>        Pragma
>>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>>                from: FM3Element class to: Object class.
>>
>>        -> an Array(<magritteDescription>) ;)
>> and
>>
>>        Pragma
>>                allNamed: MAPragmaBuilder magritteDescriptionPragma
>>                from: FM3PropertyDescription class  to: Object class.  an Array(<magritteDescription> <magritteDescription>)
>>
>>
>> Now the definition of uniqueDescriptionSelectors: or the build: method of MAPragmaBuilder
>> look bogus to me. Either it should take a class as argument or move the class level.
>>
>> Is anObject a class?
>>
>> may be the correct definition is
>>
>> Object>>basicMagritteDescription
>>        ^ MAPragmaBuilder for: self class
>>
>> instead of
>>
>> basicMagritteDescription
>>        ^ MAPragmaBuilder for: self
>>
>>
>> Then    options: [ {FM3 number .  FM3 string . FM3 boolean} ] magritteDynamicObject;
>>
>> Apparently there is no MADynamicObject anymore…..
>>
>> So can use the old version of magritte for moose because this is boring to run after bugs like that
>>
>>
>>
>>
>>
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: annotationDescription asMorph is buggy

Lukas Renggli
In reply to this post by Stéphane Ducasse
On 9 April 2012 12:25, Stéphane Ducasse <[hidden email]> wrote:
>
> On Apr 9, 2012, at 12:16 PM, Tudor Girba wrote:
>
>> Hi Stef,
>>
>> Indeed, the change is due to Magritte 3 now using instance side annotations.
>
> instance side annotations!!! After people cry that we change in Pharo but we do not do such radical changes.

Of course not, everything always continues to work.

> So should we migrate the methods on the instance side?
>
> Check my next mail.
>
> I do not see why Magritte is cannot be backward compatible. shit. May be we should not use Magritte 3.

Fun isn't it. Generally a major version number means it breaks
backward compatibility.

Again have a look at the announcement: Nick even prepared automatic
refactoring to move descriptions from Magritte 1 & 2 to 3. I wished
Pharo only had a plan how to move things from one version to the other
... :-/

> Now there is no magritteDynamicObject anymore ;(

It is not necessary any longer. You can on-the-fly create the objects
because the descriptions is not cached anymore.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

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

Re: Magritte confusion

Nick
In reply to this post by Stéphane Ducasse
Thanks lukas I just found it.
I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
Before we got your master now nothing…

there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles

Nick

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

Re: Magritte confusion

Lukas Renggli
On 9 April 2012 12:37, Nick Ager <[hidden email]> wrote:
>> Thanks lukas I just found it.
>> I'm immensely sad… because having a cool system like magritte not even be
>> described decently somewhere is sad.
>> Before we got your master now nothing…
>
>
> there is the screen-cast, a presentation, sample document and refactoring
> tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do
> with more documents? - sure - but I don't have any free cycles

Don't worry, I think the documentation of moving from Magritte 2 to 3
is pretty good.

Otherwise one can always stay with Magritte 2.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

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

Re: annotationDescription asMorph is buggy

Stéphane Ducasse
In reply to this post by Tudor Girba-2
so what do we do?
I lost two hours and now I imagine that it may work if I redo it from scratch.

Now I have no idea of the implication for moose.
Luckily messana is dead so our magritte use is limited.

Stef

On Apr 9, 2012, at 12:16 PM, Tudor Girba wrote:

> Hi Stef,
>
> Indeed, the change is due to Magritte 3 now using instance side annotations. The Metanool code still works for the regular annotations (so, if you have an annotation it will show in the form), but when asking for the annotations of the annotations, it seems that something is broken. But, I do not know what :(.
>
> Cheers,
> Doru
>
>
> On 9 Apr 2012, at 11:51, Stéphane Ducasse wrote:
>
>> 4.6
>>
>> build: anObject
>> | selectors container description |
>> self halt.
>> selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
>>
>> selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
>> sounds good.
>>
>>
>> container := self build: anObject for: self containerSelector in: selectors.
>> ^ (selectors select: [ :each | each isDescriptionDefinition ])
>> inject: (cache at: anObject put: container)
>> into: [ :result :each |
>> self containerSelector = each ifFalse: [
>> description := self build: anObject for: each in: selectors.
>> description isDescription
>> ifTrue: [ result add: description ] ].
>> result ]
>>
>>
>> 4.7
>>
>> buildDescriptions: anObject
>> | descriptionExtensions descriptionSelectors |
>>
>> descriptionSelectors := self uniqueDescriptionSelectors: anObject.
>>
>> descriptionSelectors  -> Set()  :(
>>
>> descriptionExtensions := self descriptionExtensions: anObject.
>>
>> ^ (descriptionSelectors
>> collect:  [ :each |
>> | description |
>> description := anObject perform: each.
>>
>> description notNil ifTrue: [
>> descriptionExtensions at: each ifPresent: [ :extensions |
>> extensions do: [ :extensionSelector |
>> description := anObject perform: extensionSelector with: description ] ] ].
>> description ])
>> select: #notNil.
>>
>>
>>
>> So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(
>>
>> Pragma
>> allNamed: MAPragmaBuilder magritteDescriptionPragma
>> from: FM3Element to: Object.
>>
>> does not return the methods with the annotations.
>>
>> I'm getting there.
>>
>> Stef
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Magritte confusion

Stéphane Ducasse
In reply to this post by Nick

On Apr 9, 2012, at 12:37 PM, Nick Ager wrote:

> Thanks lukas I just found it.
> I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
> Before we got your master now nothing…
>
> there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles

I imagine.
Now you have one advantage you know what you did (I do not know) and you are native english speaker (I'm not).

Stef

>
> Nick
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Magritte confusion

Nick
Hi Stef,

On 9 April 2012 11:44, Stéphane Ducasse <[hidden email]> wrote:

On Apr 9, 2012, at 12:37 PM, Nick Ager wrote:

> Thanks lukas I just found it.
> I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
> Before we got your master now nothing…
>
> there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles

I imagine.
Now you have one advantage you know what you did (I do not know) and you are native english speaker (I'm not).

 Let me know if there is something in the screen-cast [1], presentation [2], sample code [3] that isn't clear and I'll do my best to clarify. At the moment I can't help you any more than this.

Nick


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

Re: Magritte confusion

Nick
another sample that might help - http://twitterbootstrap.seasidehosting.st/

On 9 April 2012 11:54, Nick Ager <[hidden email]> wrote:
Hi Stef,

On 9 April 2012 11:44, Stéphane Ducasse <[hidden email]> wrote:

On Apr 9, 2012, at 12:37 PM, Nick Ager wrote:

> Thanks lukas I just found it.
> I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
> Before we got your master now nothing…
>
> there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles

I imagine.
Now you have one advantage you know what you did (I do not know) and you are native english speaker (I'm not).

 Let me know if there is something in the screen-cast [1], presentation [2], sample code [3] that isn't clear and I'll do my best to clarify. At the moment I can't help you any more than this.

Nick



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

Re: Magritte confusion

Nick
Magritte 3 has be used a lot of the Seaside bindings - but less so with Morphic - so there could easily be some issues to resolve in Morphic.

On 9 April 2012 11:57, Nick Ager <[hidden email]> wrote:
another sample that might help - http://twitterbootstrap.seasidehosting.st/


On 9 April 2012 11:54, Nick Ager <[hidden email]> wrote:
Hi Stef,

On 9 April 2012 11:44, Stéphane Ducasse <[hidden email]> wrote:

On Apr 9, 2012, at 12:37 PM, Nick Ager wrote:

> Thanks lukas I just found it.
> I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
> Before we got your master now nothing…
>
> there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles

I imagine.
Now you have one advantage you know what you did (I do not know) and you are native english speaker (I'm not).

 Let me know if there is something in the screen-cast [1], presentation [2], sample code [3] that isn't clear and I'll do my best to clarify. At the moment I can't help you any more than this.

Nick




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

Re: annotationDescription asMorph is buggy

Tudor Girba-2
In reply to this post by Stéphane Ducasse
Hi,

The only Moose clients of Magritte are Glamour and Metanool.

I switched to Magritte 3 because I want to support the effort. It was a great work that Nick did (I remember talking about this with Lukas at least 3 years ago - and we thought the impact would be too great :)), and the only thing that got impacted was the dialog of adding a new Metanool annotation. Glamour is not impacted at all given that it only expects Magritte objects (hence not depending on creation).

I did not have enough time to look into it, but I believe you found the problem quite nicely. It's basically one method :). I will spend some a bit of time in the following days to wrap it up.

All in all, just like we are pushing to always use the latest Pharo to benefit from the energy of the community, in the same way we will always try push to use the latest of the other dependencies if we can benefit from the energy spent there.

Cheers,
Doru


On 9 Apr 2012, at 12:42, Stéphane Ducasse wrote:

> so what do we do?
> I lost two hours and now I imagine that it may work if I redo it from scratch.
>
> Now I have no idea of the implication for moose.
> Luckily messana is dead so our magritte use is limited.
>
> Stef
>
> On Apr 9, 2012, at 12:16 PM, Tudor Girba wrote:
>
>> Hi Stef,
>>
>> Indeed, the change is due to Magritte 3 now using instance side annotations. The Metanool code still works for the regular annotations (so, if you have an annotation it will show in the form), but when asking for the annotations of the annotations, it seems that something is broken. But, I do not know what :(.
>>
>> Cheers,
>> Doru
>>
>>
>> On 9 Apr 2012, at 11:51, Stéphane Ducasse wrote:
>>
>>> 4.6
>>>
>>> build: anObject
>>> | selectors container description |
>>> self halt.
>>> selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
>>>
>>> selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
>>> sounds good.
>>>
>>>
>>> container := self build: anObject for: self containerSelector in: selectors.
>>> ^ (selectors select: [ :each | each isDescriptionDefinition ])
>>> inject: (cache at: anObject put: container)
>>> into: [ :result :each |
>>> self containerSelector = each ifFalse: [
>>> description := self build: anObject for: each in: selectors.
>>> description isDescription
>>> ifTrue: [ result add: description ] ].
>>> result ]
>>>
>>>
>>> 4.7
>>>
>>> buildDescriptions: anObject
>>> | descriptionExtensions descriptionSelectors |
>>>
>>> descriptionSelectors := self uniqueDescriptionSelectors: anObject.
>>>
>>> descriptionSelectors  -> Set()  :(
>>>
>>> descriptionExtensions := self descriptionExtensions: anObject.
>>>
>>> ^ (descriptionSelectors
>>> collect:  [ :each |
>>> | description |
>>> description := anObject perform: each.
>>>
>>> description notNil ifTrue: [
>>> descriptionExtensions at: each ifPresent: [ :extensions |
>>> extensions do: [ :extensionSelector |
>>> description := anObject perform: extensionSelector with: description ] ] ].
>>> description ])
>>> select: #notNil.
>>>
>>>
>>>
>>> So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(
>>>
>>> Pragma
>>> allNamed: MAPragmaBuilder magritteDescriptionPragma
>>> from: FM3Element to: Object.
>>>
>>> does not return the methods with the annotations.
>>>
>>> I'm getting there.
>>>
>>> Stef
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "We are all great at making mistakes."
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





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

Re: annotationDescription asMorph is buggy

Tudor Girba-2
It's fixed now. I moved the annotations to the instance side and it works just fine.

Cheers,
Doru


On 9 Apr 2012, at 17:14, Tudor Girba wrote:

> Hi,
>
> The only Moose clients of Magritte are Glamour and Metanool.
>
> I switched to Magritte 3 because I want to support the effort. It was a great work that Nick did (I remember talking about this with Lukas at least 3 years ago - and we thought the impact would be too great :)), and the only thing that got impacted was the dialog of adding a new Metanool annotation. Glamour is not impacted at all given that it only expects Magritte objects (hence not depending on creation).
>
> I did not have enough time to look into it, but I believe you found the problem quite nicely. It's basically one method :). I will spend some a bit of time in the following days to wrap it up.
>
> All in all, just like we are pushing to always use the latest Pharo to benefit from the energy of the community, in the same way we will always try push to use the latest of the other dependencies if we can benefit from the energy spent there.
>
> Cheers,
> Doru
>
>
> On 9 Apr 2012, at 12:42, Stéphane Ducasse wrote:
>
>> so what do we do?
>> I lost two hours and now I imagine that it may work if I redo it from scratch.
>>
>> Now I have no idea of the implication for moose.
>> Luckily messana is dead so our magritte use is limited.
>>
>> Stef
>>
>> On Apr 9, 2012, at 12:16 PM, Tudor Girba wrote:
>>
>>> Hi Stef,
>>>
>>> Indeed, the change is due to Magritte 3 now using instance side annotations. The Metanool code still works for the regular annotations (so, if you have an annotation it will show in the form), but when asking for the annotations of the annotations, it seems that something is broken. But, I do not know what :(.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 9 Apr 2012, at 11:51, Stéphane Ducasse wrote:
>>>
>>>> 4.6
>>>>
>>>> build: anObject
>>>> | selectors container description |
>>>> self halt.
>>>> selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
>>>>
>>>> selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
>>>> sounds good.
>>>>
>>>>
>>>> container := self build: anObject for: self containerSelector in: selectors.
>>>> ^ (selectors select: [ :each | each isDescriptionDefinition ])
>>>> inject: (cache at: anObject put: container)
>>>> into: [ :result :each |
>>>> self containerSelector = each ifFalse: [
>>>> description := self build: anObject for: each in: selectors.
>>>> description isDescription
>>>> ifTrue: [ result add: description ] ].
>>>> result ]
>>>>
>>>>
>>>> 4.7
>>>>
>>>> buildDescriptions: anObject
>>>> | descriptionExtensions descriptionSelectors |
>>>>
>>>> descriptionSelectors := self uniqueDescriptionSelectors: anObject.
>>>>
>>>> descriptionSelectors  -> Set()  :(
>>>>
>>>> descriptionExtensions := self descriptionExtensions: anObject.
>>>>
>>>> ^ (descriptionSelectors
>>>> collect:  [ :each |
>>>> | description |
>>>> description := anObject perform: each.
>>>>
>>>> description notNil ifTrue: [
>>>> descriptionExtensions at: each ifPresent: [ :extensions |
>>>> extensions do: [ :extensionSelector |
>>>> description := anObject perform: extensionSelector with: description ] ] ].
>>>> description ])
>>>> select: #notNil.
>>>>
>>>>
>>>>
>>>> So apparently in magritte now we should use <magritteDescription> so I'm writing a little test and changed FM3Element and FM3Property but it does not work :(
>>>>
>>>> Pragma
>>>> allNamed: MAPragmaBuilder magritteDescriptionPragma
>>>> from: FM3Element to: Object.
>>>>
>>>> does not return the methods with the annotations.
>>>>
>>>> I'm getting there.
>>>>
>>>> Stef
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "We are all great at making mistakes."
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> --
> www.tudorgirba.com
>
> "Problem solving should be focused on describing
> the problem in a way that makes the solution obvious."
>
>
>
>

--
www.tudorgirba.com

Innovation comes in least expected form.
That is, if it is expected, it already happened.


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

Re: Magritte confusion

Stéphane Ducasse
In reply to this post by Nick

On Apr 9, 2012, at 12:54 PM, Nick Ager wrote:

> Hi Stef,
>
> On 9 April 2012 11:44, Stéphane Ducasse <[hidden email]> wrote:
>
> On Apr 9, 2012, at 12:37 PM, Nick Ager wrote:
>
> > Thanks lukas I just found it.
> > I'm immensely sad… because having a cool system like magritte not even be described decently somewhere is sad.
> > Before we got your master now nothing…
> >
> > there is the screen-cast, a presentation, sample document and refactoring tools to help translate from Magritte 2 to Magritte 3. Could Magritte 3 do with more documents? - sure - but I don't have any free cycles
>
> I imagine.
> Now you have one advantage you know what you did (I do not know) and you are native english speaker (I'm not).
>
>  Let me know if there is something in the screen-cast [1], presentation [2], sample code [3] that isn't clear and I'll do my best to clarify. At the moment I can't help you any more than this.

I will check (I was confused by the video because I had problem to see the code and to understand if the first example was pier30)
        - update moose
        - put on my todo to update the seaside chapter
        - may be we should extract this chapter and write a magritte chapter for Pharo by example 2
        but this was not on my schedule.


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