[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 at freudenbergs.de
Wed Oct 6 12:58:28 EDT 2010
On 06.10.2010, at 08:12, K. K. Subramaniam wrote:
> On Wednesday 06 Oct 2010 6:05:16 pm Bert Freudenberg wrote:
>> Am 06.10.2010 um 03:53 schrieb "K. K. Subramaniam" <kksubbu.ml at gmail.com>:
>>> 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.
> But it will become hidden when a Foo slot gets added by a vocabulary.
No. It will still work - the Foo slot will be in class Player, the user's script in a subclass, so the user's script will get run.
> So get*
> or *: patterns are verboten in script names along with a bunch of reserved
> names. These restrictions should be documented (or the entire protocol logic
It should be documented, agreed. But I see no reason to actually disallow using get* as a script name.
> We can hack this by prepending an underscore or space character to all user
> script names before storing them in the methodInterface and then stripping
> them before display then in scriptor or tiles. I don't know what gremlins lie
> in hiding down this path. Scott, help!
>> 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".
> I didn't see this behavior. getFooVar will show up as fooVar in Etoys viewer
> but as getFooVar in the scriptor.
Ah, you are right, I misremembered. I still think it should be fixed. This is similar (though likely unrelated) to player names getting translated in command tiles (SQ-640).
- Bert -
More information about the etoys-dev