[comp.sys.mac.programmer] XFCN number of args

sandell@ils.nwu.edu (Greg Sandell) (08/14/90)

I am writing an XFCN in Think C for a SuperCard application.
When I first wrote it I used no arguments, but as I got the
code to work right I added arguments one at a time.  I got
several generations of the program to run just fine for the
first 4 arguments, but when I added the fifth argument, the
program stopped working right.  

The fifth argument seems to be reaching the XFCN just fine,
because I print out its value in the message box using
SendCardMessage().  Following that, the program is supposed
to draw some lines into a window using several LineTo() calls.
When the fifth argument is present the lines never appear, but
when it's not present the lines do appear.  Except for the
call to SendCardMessage(), the fifth argument is not used anywhere
in the program. Actually, even when I take out the SendCardMessage()
call, I get the same results. I have tested this several times. 
No fifth arg, it works fine; add the fifth arg, it stops working.

I thought XCMDs and XFCNs were supposed to handle up to 16 args
or so.  What's up, anybody know?

Thanks in advance,
 Greg Sandell
****************************************************************
* Greg Sandell (sandell@ils.nwu.edu)              Evanston, IL *
* Institute for the Learning Sciences, Northwestern University *
****************************************************************