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
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"We are all great at making mistakes."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev