#printOn: is used by Pharo tools to display objects. For example, a
famix class is printed as "a FAMIXClass #'Smalltalk::CRCError'"
Glamour uses description to render items in browsers. It makes sense
to have a short description from the moose point of view (instead of
the developper tools point of view as with printOn:). A description of
a famix class could be 'Smalltalk::CRCError (Class)'
mooseName returns a description shorter than with #description. It is
often used as dictionary keys and unique identifier. For the famix
class CRCError we have #'Smalltalk::CRCError'
We could maybe replace #description for #mooseLongName. This will be
more explicit and make implementer/serder easily browsable since
#description is implemented in Monticello, Fame, Exception
This is a good action task to do in my opinion. Shall I add an entry
in the Moose code google? Moreover, I do not see any Moose unit test
that test it (but I did a quick check).
Cheers,
Alexandre
On 5 Nov 2009, at 10:01, Simon Denier wrote:
This morning, I tried to understand (I thought I
understood before)
the things about printing Moose entities, either in the finder or in
an inspector, or whatever.
Only thing I can say is it's a mess with a lot of yo-yo in the
hierarchy.
So there is
MooseEntity>>description
MooseEntity>>mooseName
MooseEntity>>printOn:
also mooseNameOn: etc.
MooseGroup tends to use description.
mooseName is likely a unique identifier, however it is also used to
print an entity sometimes (in the moose finder)
#printOn: is not rationally overridden everywhere...
Maybe someone wants to take a look and proposes a solution, at least
some conventions/documentation.
Which selector is used in which context.
Which method should I override in a new entity.
--
Simon
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.