The Trunk: Monticello-bf.604.mcz

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

The Trunk: Monticello-bf.604.mcz

commits-2
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.604.mcz

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

Name: Monticello-bf.604
Author: bf
Time: 24 November 2014, 6:30:56.448 pm
UUID: b1f76c5b-7165-4dcb-bc69-07a1c7978fd7
Ancestors: Monticello-mtf.603

Deal with non-class globals.

=============== Diff against Monticello-mtf.603 ===============

Item was changed:
  ----- Method: MCMethodDefinition>>actualClass (in category 'accessing') -----
  actualClass
+ ^Smalltalk at: className ifPresent: [:class |
+ class isBehavior ifTrue: [classIsMeta ifTrue: [class classSide] ifFalse: [class]]]!
- ^Smalltalk at: className
- ifPresent: [:class | classIsMeta ifTrue: [class classSide] ifFalse: [class]]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.604.mcz

Chris Muller-3
When would a MethodDefinitions #actualClass not be a Class?

On Mon, Nov 24, 2014 at 11:31 AM,  <[hidden email]> wrote:

> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-bf.604.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-bf.604
> Author: bf
> Time: 24 November 2014, 6:30:56.448 pm
> UUID: b1f76c5b-7165-4dcb-bc69-07a1c7978fd7
> Ancestors: Monticello-mtf.603
>
> Deal with non-class globals.
>
> =============== Diff against Monticello-mtf.603 ===============
>
> Item was changed:
>   ----- Method: MCMethodDefinition>>actualClass (in category 'accessing') -----
>   actualClass
> +       ^Smalltalk at: className ifPresent: [:class |
> +               class isBehavior ifTrue: [classIsMeta ifTrue: [class classSide] ifFalse: [class]]]!
> -       ^Smalltalk at: className
> -               ifPresent: [:class | classIsMeta ifTrue: [class classSide] ifFalse: [class]]!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.604.mcz

Levente Uzonyi-2
On Mon, 24 Nov 2014, Chris Muller wrote:

> When would a MethodDefinitions #actualClass not be a Class?

When you are viewing a (not loaded) package which has a class with the
same name as a global in your image. E.g. Transcript, or Smalltalk.

Levente


cbc
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.604.mcz

cbc
In reply to this post by Chris Muller-3
Maybe when it is a trait?
Just a wild guess.
-cbc

Sent from my iPhone

> On Nov 24, 2014, at 12:05 PM, Chris Muller <[hidden email]> wrote:
>
> When would a MethodDefinitions #actualClass not be a Class?
>
>> On Mon, Nov 24, 2014 at 11:31 AM,  <[hidden email]> wrote:
>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-bf.604.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-bf.604
>> Author: bf
>> Time: 24 November 2014, 6:30:56.448 pm
>> UUID: b1f76c5b-7165-4dcb-bc69-07a1c7978fd7
>> Ancestors: Monticello-mtf.603
>>
>> Deal with non-class globals.
>>
>> =============== Diff against Monticello-mtf.603 ===============
>>
>> Item was changed:
>>  ----- Method: MCMethodDefinition>>actualClass (in category 'accessing') -----
>>  actualClass
>> +       ^Smalltalk at: className ifPresent: [:class |
>> +               class isBehavior ifTrue: [classIsMeta ifTrue: [class classSide] ifFalse: [class]]]!
>> -       ^Smalltalk at: className
>> -               ifPresent: [:class | classIsMeta ifTrue: [class classSide] ifFalse: [class]]!
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.604.mcz

Bert Freudenberg
In reply to this post by Levente Uzonyi-2
On 24.11.2014, at 21:12, Levente Uzonyi <[hidden email]> wrote:
>
> On Mon, 24 Nov 2014, Chris Muller wrote:
>
>> When would a MethodDefinitions #actualClass not be a Class?
>
> When you are viewing a (not loaded) package which has a class with the same name as a global in your image. E.g. Transcript, or Smalltalk.
>
> Levente

Yes. I had a package that had a class used as singleton before. Then I replaced that with a global instance.

This is why SystemDict>>classNamed: checks for isBehavior. Maybe we should actually use that. Or something that lets you pass a flag to get the metaclass.

- Bert -




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.604.mcz

Chris Muller-3
On Mon, Nov 24, 2014 at 3:08 PM, Bert Freudenberg <[hidden email]> wrote:

> On 24.11.2014, at 21:12, Levente Uzonyi <[hidden email]> wrote:
>>
>> On Mon, 24 Nov 2014, Chris Muller wrote:
>>
>>> When would a MethodDefinitions #actualClass not be a Class?
>>
>> When you are viewing a (not loaded) package which has a class with the same name as a global in your image. E.g. Transcript, or Smalltalk.
>>
>> Levente
>
> Yes. I had a package that had a class used as singleton before. Then I replaced that with a global instance.

Okay.  Writing version comments is the chance to consider future
readers and explain the "why" something was changed, since Monticello
can tell them the "what"..  Thanks.

> This is why SystemDict>>classNamed: checks for isBehavior. Maybe we should actually use that. Or something that lets you pass a flag to get the metaclass.

Yeah, I never use the Dictionary API on Smalltalk anymore.  In fact I
thought hte intent was to gradually deprecate that ever since
SmalltalkImage was factored out a few years ago.

>
> - Bert -
>
>
>
>