Administrator
|
The #precedence method, used to identify the type of selector a Symbol is, incorrectly handles selectors beginning with an underscore.
-- A symbol is a binary selector if and only if every character meets the test defined in #abrIsSelectorCharacter (which suffers from being a misleading name). A symbol is a unary selector if and only if every character meets the test [_a-zA-z][_a-zA-z0-9]*. A symbol is a keyword selector if and only if every character meets the test [_a-zA-z][_a-zA-z0-9:]* and the last character is a colon. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Richard -
-- You are correct about the underscore. You will notice that the receiver of this method is assumed to be a valid Smalltalk selector, so it is sufficient to test only the first and last characters to determine unary, binary, keyword, or invalid. Case 57740 created. John On Friday, April 17, 2015 at 1:37:31 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Fri, Apr 17, 2015 at 1:20 PM, John O'Keefe <[hidden email]> wrote:
Thanks, John. It would be nice if there were a correspondingly simple method (or methods) to determine whether a given Symbol was actually a valid selector. Especially so since these existing methods are in CLDT and don't prescribe how they must be used.
And I guess I should elaborate this last one with the condition "and there are no sequences of multiple colons".
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |