[comp.sys.mac.hypercard] How to write XCMDs/XFCNs with Turbo Pascal

djnowak@iseesun.UUCP (RSG Mac Tech Exch) (05/20/88)

I have both MPW and Turbo Pascal.  For short jobs, I prefer to use Turbo.
I bought the Hypercard programming package from APDA for MPW.  As I
understand, an XCMD/XFCN is some code stored in a resource of the same
name.  How can I use Turbo Pascal and the Hypercard toolkit from APDA
to generate XCMDs/XFCNs.  Short code sections would be appreciated.

Dave Nowak
djnowak@iseesun.DPL.SCG.HAC.COM

dan@Apple.COM (Dan Allen) (05/23/88)

The XCMD sources as shipped from APDA are for MPW Pascal and C.  Turbo
Pascal is reasonably close to MPW Pascal and using the standard MPW
files should be OK.  The main thing will be to set the resource type of
this XCMD that you are building in Turbo, and then ResEditing it into
HyperCard.

If you have MPW, I would recommend doing it all in MPW because you can
automate the build of non-code resources much easier than you can in
Turbo.  If you get stuck, let me know.

Dan Allen
Software Explorer
Apple Computer

Newman.pasa@Xerox.COM (05/24/88)

Turbo Pascal requires a unit and some glue code to create XCMDs nd XFCNs, but it
also requires a special header (a resource that you plug into your Turbo Pascal
application that lets you create XCMDs and XFCNs ... Turbo comes with one header
that allows you to create DAs).  I got mine (along with some documentation and
examples) from the Borland forum on CompuServe.  Once on CIS, do GO BORPROGA,
and look in data library 5 for a file called XCMD.SIT (Or something very close
to that).