[Pharo5] Improvements for Anonymous classes

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

[Pharo5] Improvements for Anonymous classes

Marcus Denker-4
Hi,

Besides cleaning for the bootstrap, another thing we did yesterday was improving handling of
Anonymous classes.

1) you can now browse methods of anonymous classes with nautilus *if* they inherit from Object (the main case)
 
        myClass := Object newAnonymousSubclass. myClass compile: 'test ^5'. myClass browse

2) #classInstaller for anonymous classes now returns an AnonymousClassInstaller

3) class builder name checking was fixed to not raise an error for the “names” used for Anonymous classes

==> you can use #addSlot: on anonymous classes.


To improve:

- browser should show some kind of class definition so one can see the superclass
- it would be nice to be able to browse "Behavior new”, but in most cases people use
  anon subclasses of existing classes, so not that important.

        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo5] Improvements for Anonymous classes

Uko2
Hi, where can I read more about anonymous classes. They look like amazing stuff to be used in tests.

Uko


> On 21 Aug 2015, at 08:38, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> Besides cleaning for the bootstrap, another thing we did yesterday was improving handling of
> Anonymous classes.
>
> 1) you can now browse methods of anonymous classes with nautilus *if* they inherit from Object (the main case)
>
> myClass := Object newAnonymousSubclass. myClass compile: 'test ^5'. myClass browse
>
> 2) #classInstaller for anonymous classes now returns an AnonymousClassInstaller
>
> 3) class builder name checking was fixed to not raise an error for the “names” used for Anonymous classes
>
> ==> you can use #addSlot: on anonymous classes.
>
>
> To improve:
>
> - browser should show some kind of class definition so one can see the superclass
> - it would be nice to be able to browse "Behavior new”, but in most cases people use
>  anon subclasses of existing classes, so not that important.
>
> Marcus


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo5] Improvements for Anonymous classes

hernanmd
In reply to this post by Marcus Denker-4


2015-08-21 2:38 GMT-03:00 Marcus Denker <[hidden email]>:
Hi,

Besides cleaning for the bootstrap, another thing we did yesterday was improving handling of
Anonymous classes.

1) you can now browse methods of anonymous classes with nautilus *if* they inherit from Object (the main case)

        myClass := Object newAnonymousSubclass. myClass compile: 'test ^5'. myClass browse

2) #classInstaller for anonymous classes now returns an AnonymousClassInstaller

3) class builder name checking was fixed to not raise an error for the “names” used for Anonymous classes

==> you can use #addSlot: on anonymous classes.



Yes!!!
Thank you for bringing this :)

Hernán

 
To improve:

- browser should show some kind of class definition so one can see the superclass
- it would be nice to be able to browse "Behavior new”, but in most cases people use
  anon subclasses of existing classes, so not that important.

        Marcus

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo5] Improvements for Anonymous classes

hernanmd
In reply to this post by Uko2

2015-08-21 3:34 GMT-03:00 Yuriy Tymchuk <[hidden email]>:
Hi, where can I read more about anonymous classes. They look like amazing stuff to be used in tests.

Uko


> On 21 Aug 2015, at 08:38, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> Besides cleaning for the bootstrap, another thing we did yesterday was improving handling of
> Anonymous classes.
>
> 1) you can now browse methods of anonymous classes with nautilus *if* they inherit from Object (the main case)
>
>       myClass := Object newAnonymousSubclass. myClass compile: 'test ^5'. myClass browse
>
> 2) #classInstaller for anonymous classes now returns an AnonymousClassInstaller
>
> 3) class builder name checking was fixed to not raise an error for the “names” used for Anonymous classes
>
> ==> you can use #addSlot: on anonymous classes.
>
>
> To improve:
>
> - browser should show some kind of class definition so one can see the superclass
> - it would be nice to be able to browse "Behavior new”, but in most cases people use
>  anon subclasses of existing classes, so not that important.
>
>       Marcus



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo5] Improvements for Anonymous classes

stepharo
In reply to this post by Uko2
in my 99 JOOP paper :)


Le 21/8/15 08:34, Yuriy Tymchuk a écrit :

> Hi, where can I read more about anonymous classes. They look like amazing stuff to be used in tests.
>
> Uko
>
>
>> On 21 Aug 2015, at 08:38, Marcus Denker <[hidden email]> wrote:
>>
>> Hi,
>>
>> Besides cleaning for the bootstrap, another thing we did yesterday was improving handling of
>> Anonymous classes.
>>
>> 1) you can now browse methods of anonymous classes with nautilus *if* they inherit from Object (the main case)
>>
>> myClass := Object newAnonymousSubclass. myClass compile: 'test ^5'. myClass browse
>>
>> 2) #classInstaller for anonymous classes now returns an AnonymousClassInstaller
>>
>> 3) class builder name checking was fixed to not raise an error for the “names” used for Anonymous classes
>>
>> ==> you can use #addSlot: on anonymous classes.
>>
>>
>> To improve:
>>
>> - browser should show some kind of class definition so one can see the superclass
>> - it would be nice to be able to browse "Behavior new”, but in most cases people use
>>   anon subclasses of existing classes, so not that important.
>>
>> Marcus
>
>