[comp.sys.mac.hypercard] tracing XCMD's and XFCN's

annie@cs.swarthmore.edu (Annie Fetter) (01/05/89)

Question:  Is there any way to trace/list the XCMD's and XFCN's used in a
stack?

I picked up someone else's HyperCard stuff when I took over her job, and am
using and modifying many stacks that she wrote. Some of these I am distributing.
I need to be able to find out what she used. Any suggestions?

   -"Hey, that's not in the script!"



-- 
       Annie Fetter           |      annie@cs.swarthmore.edu    |
VGP-Department of Mathematics |      fetter@swarthmr.bitnet     |
    Swarthmore College        |  ...!rutgers!bpa!swatsun!annie  |
   Swarthmore, PA 19081       |         (215) 328-8225          | 

baum@Apple.COM (Allen J. Baum) (01/05/89)

[]
>In article <2283@ilium.cs.swarthmore.edu> annie@swatsun.UUCP () writes:
>Question:  Is there any way to trace/list the XCMD's and XFCN's used in a
>stack?

Here's what you want: an XFCN by Steve Maller of Apple:
Resources is an External Function which returns a list of named
resources of a specified type. You can optionally limit the search to
a particular file. Resources that do not have names are ignored (as are some
others that hypercard can't deal with anyway).

--
		  baum@apple.com		(408)974-3385
{decwrl,hplabs}!amdahl!apple!baum

obrien@hcx.rockefeller.edu (Tom O'Brien) (01/06/89)

In article <23338@apple.Apple.COM> baum@apple.UUCP (Allen Baum) writes:
>>In article <2283@ilium.cs.swarthmore.edu> annie@swatsun.UUCP () writes:
>>Question:  Is there any way to trace/list the XCMD's and XFCN's used in a
>>stack?
>Here's what you want: an XFCN by Steve Maller of Apple:
>Resources is an External Function which returns a list of named resources...

I think she wants to do the reverse of that: i.e., to find out which
XCMDs/XFCNs are CALLED FROM the scripts in a particular stack, so that she can
make sure they're all present in the stack before she distributes it.  The
person who wrote it might have called XCMDs that lived in the home stack,
which works fine until somebody tries to use it with a different home stack.

I can't think of any automatic way of doing this search, except for maybe
writing a more intelligent version of SearchScripts (from Apple's Home
stack--it looks for occurrances of a string in all scripts of a given stack)
that looks for anything that's not a HC reserved word, variable name, button,
script, or field name, or the name of a handler or function, and presents it
to the user for checking.  Sounds tedious, but possible.  The problem is that
since Hypertalk is interpreted, you don't find out whether the function you
want is there until you try to call it.

Tom O'Brien						Rockefeller University
obrien@rockvax.rockefeller.edu				    Computing Services