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
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.
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]
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.
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]