Methods protocols support

8 views
Skip to first unread message

Alexandr Batalshikov

unread,
Oct 27, 2009, 5:20:50 AM10/27/09
to clamato-...@googlegroups.com
I suggest protocols support for Clamato in form of "- (protocolName) methodName ...".
Example:

<Counter>
+ (system) superclass
Example.

- (initialization) initialize
@counter := 0.

- (gui) renderOn: html
html h3 with: @counter.
html button
with: '+';
onClick: [@counter := @counter + 1. self reload].
html button
with: '-';
onClick: [@counter := @counter - 1. self reload].


My realization you may find in my repository:

For now, class browser not support displaying protocols,
but it is possible get it in Workspace like: 

Counter methods first protocol. 
    "initialization"

If method defined without protocol specification, 
sending "protocol" return string '-- not classified --'.

Reply all
Reply to author
Forward
0 new messages