Newsgroups: rec.arts.int-fiction
Subject: Re: [TADS] debugging help
From: argus@see.the.sig (T Raymond)
References: <Xns9136E54C910B8TjR12537@209.25.157.130> <wdrx7.114$78.18443@inet16.us.oracle.com>
Message-ID: <Xns91385033D3B7TjR12537@209.25.157.130>
User-Agent: Xnews/4.05.11
NNTP-Posting-Host: 208.51.229.172
Date: 11 Oct 2001 23:06:29 -0500
X-Trace: corp.newsgroups.com 1002859589 208.51.229.172 (11 Oct 2001 23:06:29 -0500)
Lines: 61
X-Comments: This message was posted through Newsfeeds.com
X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support,  spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to <abuse@newsfeeds.com>
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Organization: Newsfeeds.com http://www.newsfeeds.com 80,000+ UNCENSORED Newsgroups.
Path: news.duke.edu!newsgate.duke.edu!zombie.ncsc.mil!alnews.ncsc.mil!feed.news.qwest.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!corp.newsgroups.com
Xref: news.duke.edu rec.arts.int-fiction:93462

Mike Roberts was overheard typing about:

> T Raymond <argus@see.the.sig> wrote:
>> What I am trying to do is have a prompt so I can type in the
>> actor name, with a second prompt for the property name.
>> Depending on current state of the property (true/nil), switch
>> the state.
>>

[snipped]
> 'isActive' into the property ID &isActive.  Alas, tads 2 does not
> provide the program with a compiler symbol table that it can
> manipulate at run-time, so there is no direct way to perform this
> conversion.  About the best I could suggest is a switch with the
> various object and property names you might want to manipulate:

I couldn't recall. Oh well, I might just have to do something like
that which is below.

>   switch(act)
>   {
>   case 'floyd':  act = floyd; break;
>   case 'bob': act = bob; break;
>   default: "Unknown actor!"; exit;
>   }
>   switch(prop)
>   {
>   case isActive: prop = &isActive; break;
>   case isopen: prop = &isopen; break;
>   default: "Unknown property!"; exit;
>   }
>
> Alternatively, you could use the tads debugger rather than
> building one in-game, since the debugger lets you examine and set
> properties and variables, among all the other things it does.

Yes I could do this, but for what I'm working in it's a bit screen
intensive switching back and forth so much. The debugger has helped
me track down some atrocious code in other areas though!

> Or, you could use tads 3, which has a reflection mechanism that
> lets you look up compiler symbols by name (along with lots of
> other cool stuff).

Maybe when there's a library, I spend a few years figuring out how to
understand it, and I feel comfortable enough with it to try and code
in it. *L* At this rate, I figure I'll be ready for T3 about the time
you are releasing T3.37 or so.

Thanks to all for the responses.

Tom
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Tom Raymond                        af956 AT osfnDOTorg
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
