First Environment bug report!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

First Environment bug report!

Frank Shearar-3
Try evaluate "Timestamp now" and you'll see an MNU because Environment
doesNotUnderstand: #keysDo:.

It's not a general problem because "Number readFrom: '1'" works as expected.

Oh, that's because I should evaluate TimeStamp, not Timestamp. So this
is something triggered by an UndeclaredVariable, where the Parser's
trying to correct a misspelling. The process hits Class >>
#possibleVariablesFor:continuedFrom: and borks because "self
environment" is insufficiently Dictionary-like.

The fix is easy enough: add #keysDo: and #associationsDo: to
Environment. I'm just writing a test first demonstrating the fix
before I commit anything.

frank

Reply | Threaded
Open this post in threaded view
|

Re: First Environment bug report!

Colin Putney-3
On Fri, Jul 27, 2012 at 5:28 AM, Frank Shearar <[hidden email]> wrote:
> The fix is easy enough: add #keysDo: and #associationsDo: to
> Environment. I'm just writing a test first demonstrating the fix
> before I commit anything.

Great, thanks. I've moved your fix into the trunk so people don't
stumble over the bug in the meantime.

The general strategy I'll pursue for this sort of thing is to create a
new protocol for dealing with Environments, at a higher level of
abstraction than the Dictionary protocol. Come to think of it, we
should deprecate all the dictionary methods on Environment right off
the bat. That'll provide compatibility while we complete the
transition, but make it clear how Environments should be used.

Colin

Reply | Threaded
Open this post in threaded view
|

Re: First Environment bug report!

Frank Shearar-3
On 27 July 2012 18:18, Colin Putney <[hidden email]> wrote:

> On Fri, Jul 27, 2012 at 5:28 AM, Frank Shearar <[hidden email]> wrote:
>> The fix is easy enough: add #keysDo: and #associationsDo: to
>> Environment. I'm just writing a test first demonstrating the fix
>> before I commit anything.
>
> Great, thanks. I've moved your fix into the trunk so people don't
> stumble over the bug in the meantime.
>
> The general strategy I'll pursue for this sort of thing is to create a
> new protocol for dealing with Environments, at a higher level of
> abstraction than the Dictionary protocol. Come to think of it, we
> should deprecate all the dictionary methods on Environment right off
> the bat. That'll provide compatibility while we complete the
> transition, but make it clear how Environments should be used.

That sounds like an excellent plan.

frank

> Colin
>