Definatley an option, and I've tried it with much success.  I just
wanted to see if I could make this truly type agnostic, with no testing
of xtra/script/etc... needed.

Looks like I'm not able to though.

~matt desimone
[EMAIL PROTECTED]
www.syrupnyc.com


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:lingo-l-
> [EMAIL PROTECTED]] On Behalf Of Sean Wilson
> Sent: Monday, February 25, 2002 4:44 PM
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> do command execution in list assignment?
> 
> > I don't always know that it is going to be a script.  There are
times
> > when
> > I want to use this to instantiate a stack of xtras, in which case I
> > would need:
> >
> > newStackObject = new(xtra stackScrip/XtraName)
> >
> > I tried to address this by using typeofstack, which would be either
> > "xtra" or "script", and objectofstack, which would be the name of
what I
> > am declaring.
> 
> Can you "case" your typeofstack variable:
> 
> on addnewstackobject me
>   if (stack.count < maxsizeofstack) then
>     case(typeofstack) of
>       "script":
>         stack.append((script objectofstack).new())
>       "xtra":
>         stack.append((xtra objectofstack).new())
>     end case
>     return stack.count
>   else
>     recycled = findrecycledstackobject()
>     if (not(voidP(recycled))) then
>       return recycled
>     end if
>   end if
>   return void
> end addnewstackobject
> 
> (NB: I also altered your VOID test)
> 
> HTH,
> -Sean.
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email
> [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]).
Lingo-L
> is for learning and helping with programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to