jasst3@cisunx.UUCP (Jeffrey A. Sullivan) (03/28/88)
I can't seem to get GetIndStr (IM I-468) to work. I am using LSC with the
following calling code:
tex = Get1Resource('STR#',1);
HLock(tex);
i = GetNumSTRs(1);
for(x=1;x<i+1;x++) {
jsGetIndString(thestr, tex, x);
DisplayInt(x);
DisplayChar(0x20);
if(thestr) {
DisplayString(thestr);
} else {
DisplayLong((long)thestr);
}
DisplayLn();
}
where GetNumSTRs is a macro I wrote to see how many STRs are in my STR#. It
works correctly, and the loop is executed the number of times as there are
STRs in the STR#, but each time, thestr is 0L. Is there a bug in GetIndString
in LSC? If not, can someone show me a code frag that does work?
I looked in ToolBoxUtil.h, but this routine is not listed, so I assume that
it returns an intergral argument (there was a list of "fns not returning
integral results"), but in IM, it is a procedure, which should be a void,
right? An in a Mac C prototypes file I DL'd it said:
pascal void GetIndString (StringPtr, int strListID, int index);
All help thankfully accepted.
--
..........................................................................
Jeffrey Sullivan | University of Pittsburgh
jas@cadre.dsl.pittsburgh.edu | Intelligent Systems Studies Program
jasper@PittVMS.BITNET, jasst3@cisunx.UUCP | Graduate Student