text.slate namespace and traits question

Timmy Douglas timmy+slate at cc.gatech.edu
Mon May 29 21:19:41 PDT 2006


I have some questions. It's about this code in text.slate:


prototypes ensureNamespace: #text &delegate: True.

text define: #BufferPointer &parents: {Comparable}.
text define: #TextBuffer &parents: {Cloneable} &slots: {#lines}.

TextBuffer traits define: #Pointer &parents: {BufferPointer}
 &slots: {#line. #position}.


Why is the namespace lowercase? I thought the convention was
uppercase for namespaces.. but 'prototypes' is lower case also. I
don't see anything in the manual.


Also, I don't think I understand why #Pointer is defined in the traits
object. Why not in the text namespace like everything else?  I guess
this would give theme similar traits hierarchies, but it's hard for me
to imagine how to use this. It'd be nice if I could get an example...

thanks



More information about the Slate mailing list