[BUG][FIX] Behavior>>formalHeaderPartsFor:
Ned Konz
ned at bike-nomad.com
Sun Aug 19 14:07:28 UTC 2001
On Sunday 19 August 2001 01:51 am, you 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?
The problem is that the method header in question reads:
"popeye" formalHeaderPartsFor: "olive oil" aSelector
if you edit the method and remove the comments, it won't complain any more.
That is, this is the fixed version:
formalHeaderPartsFor: aSelector
"Return a collection giving the parts in the formal declaration for
aSelector. This parse is in support of schemes in which adjutant properties
of a method can be declared via special comments secreted in the formal
header"
" The result will have
3 elements for a simple, argumentless selector.
5 elements for a single-argument selector
9 elements for a two-argument selector
13 elements for a three-argument, selector
etc...
The syntactic elements are:
1 comment preceding initial selector fragment
2 first selector fragment
3 comment following first selector fragment
---------------------- (ends here for, e.g., #copy)
4 first formal argument
5 comment following first formal argument
---------------------- (ends here for, e.g., #copyFrom:)
6 second keyword
7 comment following second keyword
8 second formal argument
9 comment follwing second formal argument
---------------------- (ends here for, e.g., #copyFrom:to:)
Any nil element signifies an absent comment."
^ Scanner new scanMessageParts: (self methodHeaderFor: aSelector)
"
Behavior class formalHeaderPartsFor: #formalHeaderPartsFor:
"
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|