looking for classbuilder API

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

looking for classbuilder API

stepharong
HI

I need to migrate

pvtNewSubclass

        | newClass |
        newClass := Behavior new.
        newClass superclass: self.
        newClass setFormat: (ClassBuilder new computeFormat: #normal instSize: 0  
forSuper: self ccIndex: 0).
        ^newClass

and I'm looking at how to express (ClassBuilder new computeFormat: #normal  
instSize: 0 forSuper: self ccIndex: 0).  in Pharo 60.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: looking for classbuilder API

Nicolai Hess-3-2
maybe :

newClass setFormat: self classLayout format.


2017-01-15 9:40 GMT+01:00 stepharong <[hidden email]>:
HI

I need to migrate

pvtNewSubclass

        | newClass |
        newClass := Behavior new.
        newClass superclass: self.
        newClass setFormat: (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).
        ^newClass

and I'm looking at how to express (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).  in Pharo 60.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: looking for classbuilder API

Stephane Ducasse-3
tx I will try. 

On Sun, Jan 15, 2017 at 10:38 AM, Nicolai Hess <[hidden email]> wrote:
maybe :

newClass setFormat: self classLayout format.


2017-01-15 9:40 GMT+01:00 stepharong <[hidden email]>:
HI

I need to migrate

pvtNewSubclass

        | newClass |
        newClass := Behavior new.
        newClass superclass: self.
        newClass setFormat: (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).
        ^newClass

and I'm looking at how to express (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).  in Pharo 60.

Stef



Reply | Threaded
Open this post in threaded view
|

Re: looking for classbuilder API

Marcus Denker-4
In reply to this post by stepharong
There is #newAnonymousSubclass for creating a subclass from the current class.

It seems that this is what this code is trying to do.

        Marcus

> On 15 Jan 2017, at 09:40, stepharong <[hidden email]> wrote:
>
> HI
>
> I need to migrate
>
> pvtNewSubclass
>
> | newClass |
> newClass := Behavior new.
> newClass superclass: self.
> newClass setFormat: (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).
> ^newClass
>
> and I'm looking at how to express (ClassBuilder new computeFormat: #normal instSize: 0 forSuper: self ccIndex: 0).  in Pharo 60.
>
> Stef
>


Reply | Threaded
Open this post in threaded view
|

Re: looking for classbuilder API

stepharong
thanks
marcus this is good that we hide such ugly API ccIndex:

Stef

On Thu, 19 Jan 2017 09:34:42 +0100, denker <[hidden email]> wrote:

> There is #newAnonymousSubclass for creating a subclass from the current  
> class.
>
> It seems that this is what this code is trying to do.
>
> Marcus
>
>> On 15 Jan 2017, at 09:40, stepharong <[hidden email]> wrote:
>>
>> HI
>>
>> I need to migrate
>>
>> pvtNewSubclass
>>
>> | newClass |
>> newClass := Behavior new.
>> newClass superclass: self.
>> newClass setFormat: (ClassBuilder new computeFormat: #normal instSize:  
>> 0 forSuper: self ccIndex: 0).
>> ^newClass
>>
>> and I'm looking at how to express (ClassBuilder new computeFormat:  
>> #normal instSize: 0 forSuper: self ccIndex: 0).  in Pharo 60.
>>
>> Stef
>>
>
>


--
Using Opera's mail client: http://www.opera.com/mail/