[Seaside] Subclasses

Benoit St-Jean bstjean at yahoo.com
Sat Jul 4 02:34:50 UTC 2009


And to add to Randall's reply, you usually (well, if not 99.999999999999% of the time!) put the accessors at the same level as where the instance variable was declared...  Can't remember seeing an example when the inst var was declared in a class and the accessors declared in the subclass !

 -----------------
Benoit St-Jean
Yahoo! Messenger: bstjean
Blog: lamneth.wordpress.com
A standpoint is an intellectual horizon of radius zero.
(Albert Einstein)




________________________________
From: Robert Sirois <watchlala at hotmail.com>
To: seaside at lists.squeakfoundation.org
Sent: Friday, July 3, 2009 10:21:36 PM
Subject: [Seaside] Subclasses

 Here's a completely noob Smalltalk question:

Let's say you have a superclass ie.:

WAComponent subclass: #aSuperClass
    instanceVariableNames: 'iVar'.

and a subclass of it:

aSuperClass subclass: #aSubClass
    instanceVariableNames: ''.

Basic super/subclass situation with one iVar... so my question is, when you instantiate an instance of the subclass, it also has iVar (not static), right? Or am I totally confused? Also, if I wanted to create accessors for it, would I put those on the parent or child class?

Thanks,
RS

________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. Check it out.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090703/9702c207/attachment.htm


More information about the seaside mailing list