From: Dave Bakhash
Subject: initializing instances question...
Date: 
Message-ID: <m3g0u1nj9e.fsf@lost-in-space.ne.mediaone.net>
hi,

I have a class one of whose slots I want to be initialized to a
certain value only after the rest of the slots are initialized.  

I've always just used an :after method around initialize-instance.
Just wanted to make sure that that was the best way.

thanks,
dave

From: Barry Margolin
Subject: Re: initializing instances question...
Date: 
Message-ID: <SeAx4.80$Ag3.1656@burlma1-snr2>
In article <··············@lost-in-space.ne.mediaone.net>,
Dave Bakhash  <·····@alum.mit.edu> wrote:
>I have a class one of whose slots I want to be initialized to a
>certain value only after the rest of the slots are initialized.  
>
>I've always just used an :after method around initialize-instance.
>Just wanted to make sure that that was the best way.

Pretty much.  You might actually want to do it in shared-initialize rather
than initialize-instance, so that it will also take place during things
like change-class, class redefinition, etc.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Pierre R. Mai
Subject: Re: initializing instances question...
Date: 
Message-ID: <873dq12ifu.fsf@orion.dent.isdn.cs.tu-berlin.de>
Barry Margolin <······@bbnplanet.com> writes:

> In article <··············@lost-in-space.ne.mediaone.net>,
> Dave Bakhash  <·····@alum.mit.edu> wrote:
> >I have a class one of whose slots I want to be initialized to a
> >certain value only after the rest of the slots are initialized.  
> >
> >I've always just used an :after method around initialize-instance.
> >Just wanted to make sure that that was the best way.
> 
> Pretty much.  You might actually want to do it in shared-initialize rather
> than initialize-instance, so that it will also take place during things
> like change-class, class redefinition, etc.

And calls to reinitialize-instance, which it would be a shame to
break...

Regs, Pierre.

-- 
Pierre Mai <····@acm.org>         PGP and GPG keys at your nearest Keyserver
  "One smaller motivation which, in part, stems from altruism is Microsoft-
   bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]
From: Barry Margolin
Subject: Re: initializing instances question...
Date: 
Message-ID: <%1Bx4.89$Ag3.1695@burlma1-snr2>
In article <··············@orion.dent.isdn.cs.tu-berlin.de>,
Pierre R. Mai <····@acm.org> wrote:
>Barry Margolin <······@bbnplanet.com> writes:
>
>> In article <··············@lost-in-space.ne.mediaone.net>,
>> Dave Bakhash  <·····@alum.mit.edu> wrote:
>> >I have a class one of whose slots I want to be initialized to a
>> >certain value only after the rest of the slots are initialized.  
>> >
>> >I've always just used an :after method around initialize-instance.
>> >Just wanted to make sure that that was the best way.
>> 
>> Pretty much.  You might actually want to do it in shared-initialize rather
>> than initialize-instance, so that it will also take place during things
>> like change-class, class redefinition, etc.
>
>And calls to reinitialize-instance, which it would be a shame to
>break...

That's what "etc." referred to.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Pierre R. Mai
Subject: Re: initializing instances question...
Date: 
Message-ID: <877lfc1dv7.fsf@orion.dent.isdn.cs.tu-berlin.de>
Barry Margolin <······@bbnplanet.com> writes:

> >And calls to reinitialize-instance, which it would be a shame to
> >break...
> 
> That's what "etc." referred to.

Yes, I thought as much.  Just wanted to explicitly point out
reinitialize-instance, which has uses in many situations where
change-class and class redefinition aren't an issue.

Regs, Pierre.

-- 
Pierre Mai <····@acm.org>         PGP and GPG keys at your nearest Keyserver
  "One smaller motivation which, in part, stems from altruism is Microsoft-
   bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]