Hook when Method is add to a class

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

Hook when Method is add to a class

Mathieu Suen-2
Hi,

By reading the comp.c file it seems that there is no way to catch when a method is add to a
class.
Also class pragma is call before all the method is add to the class.
Is there a way to hook when all methods are installed in the class?

Thanks

        Mth





_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Hook when Method is add to a class

MrGwen
Hi,

I've send a patch to the ml or use the st compiler

Cheers,
Gwen

On Sat, Apr 30, 2011 at 12:13 PM, Mathieu Suen <[hidden email]> wrote:

> Hi,
>
> By reading the comp.c file it seems that there is no way to catch when a method is add to a
> class.
> Also class pragma is call before all the method is add to the class.
> Is there a way to hook when all methods are installed in the class?
>
> Thanks
>
>        Mth
>
>
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
>

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Hook when Method is add to a class

Paolo Bonzini-2
In reply to this post by Mathieu Suen-2
On 04/30/2011 12:13 PM, Mathieu Suen wrote:
> Also class pragma is call before all the method is add to the class.

Class pragmas are called where they are placed in the source.  A class
pragma just before the closing bracket will be called after the methods
have been added to the class.

Note however that in general class pragmas should be restricted to
simple, idempotent changes (this is a kind of "non-written rule"... now
it's written).  For more complex initialization, use an eval block.

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk