The Trunk: Traits-cwp.293.mcz

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

The Trunk: Traits-cwp.293.mcz

commits-2
Colin Putney uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-cwp.293.mcz

==================== Summary ====================

Name: Traits-cwp.293
Author: cwp
Time: 29 April 2013, 11:07:42.535 am
UUID: f3c6cade-2e61-41c9-904d-9c77f00030a8
Ancestors: Traits-cwp.292

When registering a Trait, catch and resume AttemptToWriteReadOnlyGlobal, since there may already be a class binding.

=============== Diff against Traits-cwp.292 ===============

Item was changed:
  ----- Method: Trait>>setName:andRegisterInCategory:environment: (in category 'initialize') -----
  setName: aSymbol andRegisterInCategory: categorySymbol environment: aSystemDictionary
  (self isValidTraitName: aSymbol) ifFalse: [self error:'Invalid trait name'].
 
  (self environment == aSystemDictionary
  and: [self name = aSymbol
  and: [self category = categorySymbol]]) ifTrue: [^self].
 
  ((aSystemDictionary includesKey: aSymbol) and: [(aSystemDictionary at: aSymbol) ~~ self])
  ifTrue: [self error: 'The name ''' , aSymbol , ''' is already used'].
 
  (self environment notNil and: [self name notNil and: [self name ~= aSymbol]]) ifTrue: [
  self environment renameClass: self as: aSymbol].
 
  self name: aSymbol.
  self environment: aSystemDictionary.
+ [self environment at: self name put: self]
+ on: AttemptToWriteReadOnlyGlobal
+ do: [:n | n resume: true].
- self environment at: self name put: self.
  self environment organization classify: self name under: categorySymbol.
  ^ true!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Traits-cwp.293.mcz

Colin Putney-3



On Mon, Apr 29, 2013 at 11:08 AM, <[hidden email]> wrote:
Colin Putney uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-cwp.293.mcz

==================== Summary ====================

Name: Traits-cwp.293
Author: cwp
Time: 29 April 2013, 11:07:42.535 am
UUID: f3c6cade-2e61-41c9-904d-9c77f00030a8
Ancestors: Traits-cwp.292

When registering a Trait, catch and resume AttemptToWriteReadOnlyGlobal, since there may already be a class binding.

=============== Diff against Traits-cwp.292 ===============

This ought to fix the traits tests. 


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Traits-cwp.293.mcz

Frank Shearar-3
On 29 April 2013 19:15, Colin Putney <[hidden email]> wrote:

>
>
>
> On Mon, Apr 29, 2013 at 11:08 AM, <[hidden email]> wrote:
>>
>> Colin Putney uploaded a new version of Traits to project The Trunk:
>> http://source.squeak.org/trunk/Traits-cwp.293.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Traits-cwp.293
>> Author: cwp
>> Time: 29 April 2013, 11:07:42.535 am
>> UUID: f3c6cade-2e61-41c9-904d-9c77f00030a8
>> Ancestors: Traits-cwp.292
>>
>> When registering a Trait, catch and resume AttemptToWriteReadOnlyGlobal,
>> since there may already be a class binding.
>>
>> =============== Diff against Traits-cwp.292 ===============
>
>
> This ought to fix the traits tests.

The latest build ought to finish in the next 10 minutes. I'll report
back as soon as it does.

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Traits-cwp.293.mcz

Frank Shearar-3
On 29 April 2013 19:16, Frank Shearar <[hidden email]> wrote:

> On 29 April 2013 19:15, Colin Putney <[hidden email]> wrote:
>>
>>
>>
>> On Mon, Apr 29, 2013 at 11:08 AM, <[hidden email]> wrote:
>>>
>>> Colin Putney uploaded a new version of Traits to project The Trunk:
>>> http://source.squeak.org/trunk/Traits-cwp.293.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Traits-cwp.293
>>> Author: cwp
>>> Time: 29 April 2013, 11:07:42.535 am
>>> UUID: f3c6cade-2e61-41c9-904d-9c77f00030a8
>>> Ancestors: Traits-cwp.292
>>>
>>> When registering a Trait, catch and resume AttemptToWriteReadOnlyGlobal,
>>> since there may already be a class binding.
>>>
>>> =============== Diff against Traits-cwp.292 ===============
>>
>>
>> This ought to fix the traits tests.
>
> The latest build ought to finish in the next 10 minutes. I'll report
> back as soon as it does.

Yep, all Trait tests pass once more. Thanks, Colin!

Now if only I could find some documentation on how to use the things...

> frank