Hi,
Can someone point me to the right/official way to programmatically add classes and methods in Pharo 2.0 ? I can find some methods on Class and I guess the Compiler can be used as well, but it is all pretty confusing. I want the proper notifications and other mechanisms to be triggered. Thx, Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
Administrator
|
I may be misunderstanding you, but the new class template in Nautilus is the method, and I always use #compile:classified: for methods. HTH, Sean
Cheers,
Sean |
+1 :)
If you want more sugar around, you can have a look in AbstractTool, the super class of NautilusUI providing methods for that (with UI etc)
Ben On Feb 17, 2013, at 2:14 PM, "Sean P. DeNigris" <[hidden email]> wrote: Sven Van Caekenberghe-2 wroteCan someone point me to the right/official way to programmatically add |
In reply to this post by Sean P. DeNigris
Sun, Sean, Ben,
Thanks for the answers, I think I know the direction now, time to start experimenting. Sven On 17 Feb 2013, at 14:14, "Sean P. DeNigris" <[hidden email]> wrote: > Sven Van Caekenberghe-2 wrote >> Can someone point me to the right/official way to programmatically add >> classes and methods in Pharo 2.0 ? > > I may be misunderstanding you, but the new class template in Nautilus is the > method, and I always use #compile:classified: for methods. > > HTH, > Sean > > > -- > View this message in context: http://forum.world.st/Programmatically-generating-classes-and-methods-tp4670253p4670357.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
In reply to this post by Sven Van Caekenberghe-2
Indeed one of these days we should clarify the entry points.
In smalltalk the "everything is written in Smalltalk" leads often to an absence of nice layered design and we need a nice MOP. Stef On Feb 16, 2013, at 12:41 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Hi, > > Can someone point me to the right/official way to programmatically add classes and methods in Pharo 2.0 ? > > I can find some methods on Class and I guess the Compiler can be used as well, but it is all pretty confusing. I want the proper notifications and other mechanisms to be triggered. > > Thx, > > Sven > > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > |
In reply to this post by Sven Van Caekenberghe-2
On Sun, Feb 17, 2013 at 12:38 PM, Sven Van Caekenberghe <[hidden email]> wrote: Sun, Sean, Ben, Hi Sven. If I were you, I would take a look to FuelMetalevel tests. There we create classes, traits, methods, etc programmatically and for tests. It is quite hard to do things silently...and you may let lots of stuff in middle state even after having run the tests. So I recommend to take a look to our tests. To do that:
1) get the package FuelMetalevel and FuelMetalevelTests from 'http://ss3.gemstone.com/ss/Fuel' 2) Check methods of class FLClassSerializationTest, FLSerializationTest protocol 'class-factory' and finally, ClassFactoryForTestCase (be sure to be in Pharo 2.0)
Best, Sven Mariano http://marianopeck.wordpress.com |
On 17 Feb 2013, at 18:48, Mariano Martinez Peck <[hidden email]> wrote: > On Sun, Feb 17, 2013 at 12:38 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Sun, Sean, Ben, > > Thanks for the answers, I think I know the direction now, time to start experimenting. > > > Hi Sven. > > If I were you, I would take a look to FuelMetalevel tests. There we create classes, traits, methods, etc programmatically and for tests. It is quite hard to do things silently...and you may let lots of stuff in middle state even after having run the tests. So I recommend to take a look to our tests. To do that: > > 1) get the package FuelMetalevel and FuelMetalevelTests from 'http://ss3.gemstone.com/ss/Fuel' > > 2) Check methods of class FLClassSerializationTest, FLSerializationTest protocol 'class-factory' and finally, ClassFactoryForTestCase (be sure to be in Pharo 2.0) Hey Mariano, great pointer - Thanks. The Fuel codebase is really impressive ! Sven > Best, > > Sven > > On 17 Feb 2013, at 14:14, "Sean P. DeNigris" <[hidden email]> wrote: > > > Sven Van Caekenberghe-2 wrote > >> Can someone point me to the right/official way to programmatically add > >> classes and methods in Pharo 2.0 ? > > > > I may be misunderstanding you, but the new class template in Nautilus is the > > method, and I always use #compile:classified: for methods. > > > > HTH, > > Sean > > > > > > -- > > View this message in context: http://forum.world.st/Programmatically-generating-classes-and-methods-tp4670253p4670357.html > > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > -- > Mariano > http://marianopeck.wordpress.com |
+1 Doru On Sun, Feb 17, 2013 at 7:30 PM, Sven Van Caekenberghe <[hidden email]> wrote:
"Every thing has its own flow"
|
Free forum by Nabble | Edit this page |