Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre
Hmm,
Something is funny here. I have to take a closer look.
Cheers, Doru
On Sep 4, 2008, at 10:27 AM, Alexandre Bergel wrote:
Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"It's not what we do that matters most, it's how we do it."
I guess the bug is due to the new contract of #getFrom: and #setOn:values: that treats all properties as if multivalued. Before those methods called the bare selectors, that is, worked diff for single- and multivalued properties.
cheers, AA
On 4 Sep 2008, at 10:59 , Tudor Girba wrote:
Hmm,
Something is funny here. I have to take a closer look.
Cheers, Doru
On Sep 4, 2008, at 10:27 AM, Alexandre Bergel wrote:
Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"It's not what we do that matters most, it's how we do it."
I guess the bug is due to the new contract of #getFrom: and #setOn:values: that treats all properties as if multivalued. Before those methods called the bare selectors, that is, worked diff for single- and multivalued properties.
How can: (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class return a collection of FAMIXMethods ?
Is there a new way to get values from a property?
Adrian, can you have a look at it please?
Cheers, Alexandre
cheers, AA
On 4 Sep 2008, at 10:59 , Tudor Girba wrote:
Hmm,
Something is funny here. I have to take a closer look.
Cheers, Doru
On Sep 4, 2008, at 10:27 AM, Alexandre Bergel wrote:
Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"It's not what we do that matters most, it's how we do it."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I can take a look.
Do you have a test case that reproduces the error? If yes, which packages do I have to checkout and which test to run? Or even better, just upload me an image somewhere with an open debugger.
PS ... you can use #attributeNamed:
(class mooseDescription attributeNamed: #methods) getFrom: class
cheers, AA
I guess the bug is due to the new contract of #getFrom: and #setOn:values: that treats all properties as if multivalued. Before those methods called the bare selectors, that is, worked diff for single- and multivalued properties.
How can: (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class return a collection of FAMIXMethods ?
Is there a new way to get values from a property?
Adrian, can you have a look at it please?
Cheers, Alexandre
cheers, AA
On 4 Sep 2008, at 10:59 , Tudor Girba wrote:
Hmm,
Something is funny here. I have to take a closer look.
Cheers, Doru
On Sep 4, 2008, at 10:27 AM, Alexandre Bergel wrote:
Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev at iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"It's not what we do that matters most, it's how we do it."
Moose-dev mailing list Moose-dev at iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
An image is available on http://www.bergel.eu/MooseSqueak.zip
Just evaluate the following in a workspace: | class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription attributeNamed: #methods) getFrom: class
Cheers, Alexandre
On 4 Sep 2008, at 15:40, Adrian Kuhn wrote:
I can take a look.
Do you have a test case that reproduces the error? If yes, which packages do I have to checkout and which test to run? Or even better, just upload me an image somewhere with an open debugger.
PS ... you can use #attributeNamed:
(class mooseDescription attributeNamed: #methods) getFrom: class
cheers, AA
I guess the bug is due to the new contract of #getFrom: and #setOn:values: that treats all properties as if multivalued. Before those methods called the bare selectors, that is, worked diff for single- and multivalued properties.
How can: (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class return a collection of FAMIXMethods ?
Is there a new way to get values from a property?
Adrian, can you have a look at it please?
Cheers, Alexandre
cheers, AA
On 4 Sep 2008, at 10:59 , Tudor Girba wrote:
Hmm,
Something is funny here. I have to take a closer look.
Cheers, Doru
On Sep 4, 2008, at 10:27 AM, Alexandre Bergel wrote:
Hi,
| class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription allAttributes detect: [:p | p name == #methods]) getFrom: class
The following code returns: an Array(an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod))
Shouldn't it be instead?: an OrderedCollection(a FAMIXMethod #aMethod a FAMIXMethod #anotherMethod)
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev at iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"It's not what we do that matters most, it's how we do it."
Moose-dev mailing list Moose-dev at iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi Alex,
there is a typo in the pragmas of FAMIXClass >> #methods, replace <mulivalued> with <multivalued> and then it works.
NB as it seems, Squeak does compile methods with unknown pragmas where as WV throws an error if one uses an unknown pragma (which typically happens because of a typo).
cheers, AA
On 4 Sep 2008, at 15:15 , Alexandre Bergel wrote:
An image is available on http://www.bergel.eu/MooseSqueak.zip
Just evaluate the following in a workspace: | class | class := FAMIXClass new. class name: 'AClass'. class addToMethods: (FAMIXMethod new name: 'aMethod'; yourself). class addToMethods: (FAMIXMethod new name: 'anotherMethod'; yourself). (class mooseDescription attributeNamed: #methods) getFrom: class
Cheers, Alexandre
On 4 Sep 2008, at 15:40, Adrian Kuhn wrote:
I can take a look.
Do you have a test case that reproduces the error? If yes, which packages do I have to checkout and which test to run? Or even
better,
just upload me an image somewhere with an open debugger.
PS ... you can use #attributeNamed:
(class mooseDescription attributeNamed: #methods) getFrom: class
cheers, AA
NB as it seems, Squeak does compile methods with unknown pragmas where as WV throws an error if one uses an unknown pragma (which typically happens because of a typo).
Yes, Squeak does not require pragmas to be declared. The compiler however throws a notification if you use an unknown selector and offers you to change it, similar to what it does when you use an unknown message send within normal code. In my opinion this is much more Smalltalk like than requiring a static declaration of pragmas.
Lukas