Ah, right. Guess I confused that with Tweak's uniclasses which are
anonymous. It's the same concept still. - Bert - On Sep 19, 2007, at 23:07 , Travis Kay wrote: > UniClasses and Players are named+number subclasses that get put > into the UserObjects category. Avis' Singletons package works > differently. > > Travis > David Mitchell wrote: >> Apparently terminology. >> >> Also, it appears that Avi's Singleton's package isn't available >> anymore (the link on Squeak Map points to the beta4.com site that has >> been taken over by one of those search engines that sit on domain >> names. >> >> I went to go look in more detail. >> >> I knew eToys did prototype or instance based programming, but never >> new how. I also didn't know there was a concept called UniClasses. >> I'm >> fairly well read on Squeak (been on the list since 96-97), reviewed >> Guzdial's blue book, read his white book, Steph's robot book, and I'm >> working through SBE. >> >> I've recently been hearing a lot about singleton methods from >> Ruby, so >> that's why I chimed in. >> >> Thanks for the redirect. Will start learning more about UniClasses! >> On 9/19/07, Bert Freudenberg <[hidden email]> wrote: >> >>> In Squeak this is usually called "uniclasses" (for Unique Class) >>> as a >>> way to add methods to instances. It's in the base system - send >>> #assureUniClass to the instance. >>> >>> What's the difference of this to #becomeSingleton? >>> >>> - Bert - >>> >>> On Sep 19, 2007, at 3:50 , David Mitchell wrote: >>> >>> >>>> Nope. Not about the GoF Singleton pattern at all. >>>> >>>> More like Ruby singleton methods. Which is about an instance or >>>> instances that have methods that aren't defined in the class for >>>> all >>>> objects. >>>> >>>> http://map.squeak.org/accountbyid/04ec7571-cb7e-47ea- >>>> b1fc-218f7ec45adc/package/9d63f342-30e3-4db2-8695-3d65ccf28100 >>>> >>>> "This package adds the #becomeSingleton method to Object, which >>>> will >>>> transform the receiver into an instance of a new, anonymous >>>> subclass >>>> of its original class. This lets you add or redefine methods on an >>>> object-by-object basis." >>>> >>>> On 9/18/07, Brad Fuller <[hidden email]> wrote: >>>> >>>>> On Tue September 18 2007, Chris Muller wrote: >>>>> >>>>>> Avi's "Singletons" package might be what you're looking for.. >>>>>> >>>>> Hmm... Is that anything like the Singleton pattern of having only >>>>> one instance >>>>> of a class? That's not what I'm looking for. I want many >>>>> instances. >>>>> >>>>> >>>>>> On 9/18/07, Brad Fuller <[hidden email]> wrote: >>>>>> >>>>>>> Is there a way to override an instance method w/o subclassing? >>>>>>> For instance, class Morph has a method that returns true, but I >>>>>>> want the >>>>>>> that >>>>>>> method to return false when instancing some types of Morphs and >>>>>>> others >>>>>>> not. (there is no setter/getter for this method.) Is there a way >>>>>>> to do >>>>>>> that w/o adding a setter/getter to Morph or subclassing the >>>>>>> different >>>>>>> Morphs? >>>>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>> >>> >> >> > > <Singletons-avi.1.mcz> > |
In reply to this post by David Mitchell-10
Il giorno mer, 19/09/2007 alle 15.54 -0500, David Mitchell ha scritto:
> Apparently terminology. > > Also, it appears that Avi's Singleton's package isn't available > anymore (the link on Squeak Map points to the beta4.com site that has > been taken over by one of those search engines that sit on domain > names. I installed it today with the Squeak Map Package Loader. So it probably means the Squeak Map cache still has the package. Ciao, Giovanni |
I've also just updated SqueakMap to point to a new SqueakSource
project. SqueakSource has read/write enabled, in case any one does something further with this code. On 9/19/07, Giovanni Corriga <[hidden email]> wrote: > Il giorno mer, 19/09/2007 alle 15.54 -0500, David Mitchell ha scritto: > > Apparently terminology. > > > > Also, it appears that Avi's Singleton's package isn't available > > anymore (the link on Squeak Map points to the beta4.com site that has > > been taken over by one of those search engines that sit on domain > > names. > > I installed it today with the Squeak Map Package Loader. So it probably > means the Squeak Map cache still has the package. > > Ciao, > > Giovanni > > > |
Free forum by Nabble | Edit this page |