Aw: [Newbies] remove allInstances?

2016-09-23 Thread Rudolf Rednose
Caution: lowskilled hobbyist   anyway:   Hi Joseph, Smalltalk garbageCollect does that automatically for you BUT it removes only objects that are not in connection with other objects.   So you have to cut loose all connections from other objects to your Book instances.   Maybe you have

Re: [Newbies] remove allInstances?

2016-09-23 Thread David Corking
Joseph: I agree with Rudolf. See also http://forum.world.st/Deleting-an-instance-td3328590.html Have fun! David ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners

[Newbies] remove allInstances?

2016-09-23 Thread Louis LaBrunda
Hi Joseph, Try: Books allInstances do: [:b | b become: nil]. Lou On Fri, 23 Sep 2016 00:40:33 -0500, Joseph Alotta wrote: >Greetings, > >The main program I am working on now is called Books. > >If I evaluate > >Books allInstances => anOrderedCollection( aBook aBook

[Newbies] Re: remove allInstances?

2016-09-23 Thread Joseph Alotta
maybe they were garbage collected before the crash or on startup. > On Sep 23, 2016, at 9:23 AM, Ron Teitelbaum [via Smalltalk] > wrote: > > Woop woop, alarm alarm, error error. > > > > Sorry my alarm just went off. If Squeak quit after a

[Newbies] Re: remove allInstances?

2016-09-23 Thread Joseph Alotta
Nice. That causes Squeak 5.0 to unexpectedly quit. But when I start again, there are no instances of Books. Sincerely, Joseph > On Sep 23, 2016, at 7:59 AM, Louis LaBrunda [via Smalltalk] > wrote: > > Books allInstances do: [:b | b become: nil].

RE: [Newbies] Re: remove allInstances?

2016-09-23 Thread Ron Teitelbaum
Woop woop, alarm alarm, error error. Sorry my alarm just went off. If Squeak quit after a become and you are seeing differences after not saving things, something is wrong. Be afraid, be very afraid. All the best, Ron Teitelbaum From:

[Newbies] remove allInstances?

2016-09-23 Thread Louis LaBrunda
Hi, Tobias is right. I'm use to the VA Smalltalk one way #become: and forgot about Squeaks two way #become:, sorry about that. Lou On Fri, 23 Sep 2016 19:47:31 +0200, Tobias Pape wrote: >Hi, > >On 23.09.2016, at 15:03, Louis LaBrunda wrote: >

Re: [Newbies] remove allInstances?

2016-09-23 Thread Tobias Pape
Hi, On 23.09.2016, at 15:03, Louis LaBrunda wrote: > Hi Joseph, > > Try: > > Books allInstances do: [:b | b become: nil]. I would advise against that. Become is a sledgehammer and you're about to crush ants with it. What happens with 'a become: b' ? All