[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tads3] Listing Contents of Surfaces



Mike Roberts wrote:

> Maybe so - does anyone else have an opinion about adding this?
> he "hider" classes in tads 2 certainly seemed to get a fair amount of use,
> and this has at least passing similarity to those.

And Steve Breslin replied:

> Yes. Probably the scoping mechanism & isKnownBy() should be used for
> implementing under-hiders. (They should be out of scope until they're
> known.) The Tads 2 way of implementing this is sort of hacky, and I
> think because of that creates problems for new coders from time to time.

I'm not sure an UnderSurface need necessarily be an under-hider (though this
would obviously be one use for it) - it depends on the circumstances. On
entering a room you might have to look under the bed to see what's there
whereas what's under the table may be immediately apparent. The model I'm
currently playing with uses an UnderSurface for the latter case and a
subclass of UnderSurface which I have (perhaps perversely) called
UnderSurfaceRevealer for the former (on the basis that it reveals what's
under it in response to a Look Under command). Whatever names one ends up
giving them and whatever the mechanics of the final implementation it's
probably worth considering catering for both cases if one's going to cater
for either.

-- Eric