[vwnc] Proper way to add a method to a class outside of namespace?

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

[vwnc] Proper way to add a method to a class outside of namespace?

David Finlayson-4
I am trying to get my head around packages and namespaces (Squeak is
my only Smalltalk).

What is the proper way to add a method to classes outside of my
personal packages? For example, I want to add the message:

Double >> arcTan: denominator (like C's atan2 function)

from Squeak to VW. How do I add that and make sure it is properly
managed with my own package? In Squeak, I could make a protocol with
the same name as my package and this new method would be managed in
Monticello along with the package classes itself. It wasn't clear to
me in the Managing Smalltalk Source Code Chapter of the Application
Manual how to do this without making a mess of the image.

Thanks,

David
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Proper way to add a method to a class outside of namespace?

Mark Pirogovsky-3
One of the option is to create the method anywhere, and them <Move><to
package> via pop up  menu.

Another option is to set the Default Package so anything you do ends up
there.



David Finlayson wrote:

> I am trying to get my head around packages and namespaces (Squeak is
> my only Smalltalk).
>
> What is the proper way to add a method to classes outside of my
> personal packages? For example, I want to add the message:
>
> Double >> arcTan: denominator (like C's atan2 function)
>
> from Squeak to VW. How do I add that and make sure it is properly
> managed with my own package? In Squeak, I could make a protocol with
> the same name as my package and this new method would be managed in
> Monticello along with the package classes itself. It wasn't clear to
> me in the Managing Smalltalk Source Code Chapter of the Application
> Manual how to do this without making a mess of the image.
>
> Thanks,
>
> David
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
>  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Proper way to add a method to a class outside of namespace?

Antony Blakey-2
In reply to this post by David Finlayson-4
Click on the class, "Extend in Package ...", select your package as  
the target.

On 20/03/2009, at 10:34 AM, David Finlayson wrote:

> I am trying to get my head around packages and namespaces (Squeak is
> my only Smalltalk).
>
> What is the proper way to add a method to classes outside of my
> personal packages? For example, I want to add the message:
>
> Double >> arcTan: denominator (like C's atan2 function)
>
> from Squeak to VW. How do I add that and make sure it is properly
> managed with my own package? In Squeak, I could make a protocol with
> the same name as my package and this new method would be managed in
> Monticello along with the package classes itself. It wasn't clear to
> me in the Managing Smalltalk Source Code Chapter of the Application
> Manual how to do this without making a mess of the image.
>
> Thanks,
>
> David
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

The greatest challenge to any thinker is stating the problem in a way  
that will allow a solution
   -- Bertrand Russell

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc