V050FN5R%UBVMS.BITNET@CORNELLC.ccs.cornell.edu (11/15/88)
When my XCMD to catalog a hard disk starts, the first thing is does is this: cInfo := CInfoPBPtr(NewPtr(SizeOf(HParamBlockRec))); vInfo := HParmBlkPtr(NewPtr(SizeOf(HParamBlockRec))); wInfo := WDPBPtr(NewPtr(SizeOf(HParamBlockRec))); then it proceeds with the cataloging. Often however, it does not get past this stage unless I first go to the paint tools. Sometimes, it just works without my having to go the paint tools. Another problem occurs when my XCMD tries to send the filenames to a card field in HC. During the cataloging i assign the filenames to an array element of fileName[x]. Then after the cataloging I am executing the following repeat loop to send the data to HC: procedure tellHC; var b : integer; begin for b := 1 to 200 do begin theMessage := concat('put ', fileName[b], ' after card field 1'); SendCardMessage(theMessage); end; end; It seems that it tries to work, but I get a too much recursion error and cannot understand the arguments to command put error from Hypercard. Also when my filename array is too large (say 500), i get a ID=28 error. I imagine that the first problem has something to do with the memory, since I dont understand it too well. But the second problem doesnt seem to make much sense. Any help will be appreciated.
dan@Apple.COM (Dan Allen) (11/16/88)
It seems that your XCMDs have several major bugs in them. Too much recursion messages rarely come from properly written scripts. Usually an OpenCard handler sends another OpenCard message or something like that. As for the array of 500 fileNames, you didn't mention your array size by 500*256 character names is 128KB of RAM, which just isn't available on a MacPlus running in 1 MB. Moving into the paint tools seems to be an indication of another memory related bug. Are you checking all NewPtr calls to see if they return a nil value? Dan Allen Apple Computer