Hi guillermo.... I somehow fixed that by putting the origin in the method properties themselves. this seems to be rather simple and so far worked :D => check slice http://code.google.com/p/pharo/issues/detail?id=5696 which solves quite some issue on that front => maybe you can address the two left issue with this slice? On 2012-04-28, at 01:02, Guillermo Polito wrote:
For example, the trait TPureBehavior has the method #traitComposition, which is an explicit requirement, and I can do I have that:
(TPureBehavior>>#traitComposition) origin. --> TPureBehavior
which is nice. Now lets suppose I create:
Object subclass: #AAA uses: TPureBehavior instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Guille'
without creating the required traitComposition method
(AAA>>#traitComposition) origin. --> AAA ?????????? shouldn't the origin be TPureBehavior?
The question is: Which is the intended behavior for the #origin of a method? Because that's causing an issue in RPackage :).
I've traced this, and it comes that if I have a trait method marked as explicitRequiriment, the following method answers just false
CompiledMethod>>isProvided: marker marker ifNil: [^ true]. ^ (self isRequired: marker) not and: [(self isDisabled: marker) not]
and then a magic ifNone: [ self ] return the receiver on the behavior, and that's why in both examples the method's behavior is returned instead of the origin. Then we probably should have two methods - #isProvided to see if an implementation is provided - #isDefined if a definition for the method exists but those names do not make me happy.
Guille