[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about createEnd.
From: |
Paul E. Johnson |
Subject: |
Question about createEnd. |
Date: |
Tue, 05 Jan 1999 15:13:26 -0600 |
I have been puzzling over a matter of style in the swarm tutorial and
wonder what y'all think.
The question is this. In createEnd methods, when there is nothing in
particular to do, one finds this:
return [super createEnd];
along with a comment that this is included to show the user that
createEnd statements can be customized.
If I were writing the tutorial, I would do this instead, because it
seems more
clear:
[super createEnd];
[return self];
Does this have the same effect? I think yes. The other way is difficult
for me to get my mind around. The return from [super createEnd] is the
self of the superclass, and this returns that. What does that mean?
Furthermore, if there were some customization in the user's createEnd
command, then it could be put in here:
[super createEnd];
{customized createEnd statements}
[return self];
If the [super createEnd] causes the superclass to initialize a variable
that is then called in
the customized statements in the subclass, I don't see any other way to
do it.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (913) 864-9086
Lawrence, Kansas 66045 FAX: (913) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Question about createEnd.,
Paul E. Johnson <=