[etoys-dev] [etoys-notify] [JIRA] Created: (SQ-840) scriptnames that begin with "get" followed by an uppercase letter do not display properly in the viewer

Bert Freudenberg bert at freudenbergs.de
Wed Oct 6 08:35:16 EDT 2010


Am 06.10.2010 um 03:53 schrieb "K. K. Subramaniam" <kksubbu.ml at gmail.com>:

> On Tuesday 05 Oct 2010 11:44:08 am Bert Freudenberg wrote:
>> Well, I think user script names should appear exactly as typed. Just like
>> object names (which sometimes erroneously get translated).
> script names belong to the same space as getter, setter methods in the 
> standard vocabularies.
> 
> You can't have two morphs named the same. The new morph will have a number 
> appended to it to resolve the conflict. The same resolution is also employed 
> for scripts. If you try to name a script as getX, it will get changed to 
> getX1.

But you can have very well have a script named getFoo since no such selector exists. 

>> Either we allow scripts to be named like this or not. But since currently
>> we do, they should work as expected.
> I went back as far as 3.8 and found that we never allow scripts to be named 
> this way. If we try naming a script as getHeading, it will get renamed to 
> getHeading1 to avoid conflicts with the built-in method. There are also a list 
> of proscribed names like self, costume, super etc. See
> 
> Player>>acceptableScript....
> 
> In any case, we can't fix this in 4.1.1 timeframe. It will require a redesign.

I think we are not talking about the same problem. The problem described in the ticket is that if I name a script "getFoo" it is displayed as "get foo", which is incorrect. It should be displayed as "getFoo", exactly as typed by the user.  

This is completely independent of not being able to name a script "getX". Yes that will be renamed to "getX1", which is fine. But it then should be displayed as "getX1" and not "get x1".   

- Bert -


More information about the etoys-dev mailing list