Behavior>>formalHeaderPartsFor:
Scott Wallace
scott at squeakland.org
Sun Aug 19 20:14:04 UTC 2001
Hi, Benoit,
The method in question parses the "header" of the source code of any
method (i.e. from the first character of the source code through the
last character of the last formal argument) for markup tags, etc.,
that may be embedded as comments interleaved among the keywords and
formal arguments. We have at various times explored using such
comments-in-headers for providing optional type hints (both for
argument types and method result-types,) default-argument-value
declarations, end-user help messages, etc., though there is nothing
in the standard image that currently does that kind of thing (afaik).
It *is* legal, although rare, for a comment to precede the selector
declaration in the source code for a method.
A check was added to the source-code-fetching code not too long ago,
which warns the user if the first character in the source code for a
method is found not to be alphabetic. And that's what you're running
into when you try to view this method.
The source code for #formalHeaderPartsFor: indeed *does* start with a
nonalphabetic character, and it does so intentionally: it starts with
a double-quote, specifically so that the method can serve as a full
test-case for itself.
It's quite possibly the only method remaining in the system that has
a comment preceding the selector declaration in its source code, and
perhaps the only surviving intentional case of source code not
beginning with a letter.
As such, in its current form it not only serves perfectly as the
canonical test-case for its own functioning, it also serves as a
test-case for the source-code-fetching warning.
Thus, everything is working exactly as it should.
*Except that* the situation was obviously not self-explanatory to the
Squeak community, and there was even, I believe, a "fix" submitted
for this non-bug!
To improve matters, in an update just published I've added a line of
comment to #formalHeaderPartsFor:, reassuring the user that he can
disregard the you-might-have-bad-source warning that may appear when
viewing this one method, and also mentioned the possibility in the
text of the bad-source warning.
-- Scott
At 1:51 AM -0700 8/19/01, Benoit St-Jean wrote:
>I've come across a weird thing/bug/problem tonight!
>
>Every time I select the following method through a
>system browser I get an error message saying that I
>have a problem with my sources file. The method is
>Behavior>>formalHeaderPartsFor:
>
>You'll find attached a snapshot of the error message.
>Can anyone reproduce this or I really have a problem
>with my source files?
>
>BTW, I'm on Win 2000 with Squeak3.1alpha of 20
>February 2001 update 4261.
>
>Thanks
>
>
>=====
>Benoit St-Jean
>bstjean at yahoo.com
>http://cactus.swiki.net
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>Content-Type: image/jpeg; name="problem.jpg"
>Content-Description: problem.jpg
>Content-Disposition: inline; filename="problem.jpg"
>
>Attachment converted: Mfalme:problem.jpg (JPEG/ogle) (00063C6C)
More information about the Squeak-dev
mailing list
|