getters, setters, attr?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

getters, setters, attr?

David Pollak
Howdy,

I'm coming to Smalltalk from Ruby (from Java.)

Ruby has a nice construct:
attr :attribute_name[,true]

The construct generates a getter (and an optional setter if the true  
flag is included) for the named attribute (instance variable.)

Is there a similar shortcut to generating getters and setters in  
Smalltalk/Squeak?  I'm not interested in turning on #autoAccessors as  
I want control over the getters and setters.

Thanks in advance.

David


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners