rmc@beta.UUCP (R. Martin Chavez) (11/06/87)
I'm working against some deadlines here (who isn't), so I'll be very grateful for timely responses. (1) I have a rather large MacApp program that I'd like to use as an XFCN with Hypercard. Even with some consolidation at link time, I have around ten segments. I couldn't possibly cram EVERYTHING (especially all the MacApp stuff) into one segment. a. When I try to link with "-rt XFCN=O", I get the following error: ### Link: Error Linker error: uninitialized jump table offset = -1 Does this have something to do with multiple segments? I can't find anything in the APDA docs that outlaws multiple segments, but I know that DAs can only have one segment, so maybe the same restriction applies. (I also had a nasty problem with unresolved references to %_CLASSINFO in %_INIT2. I fixed it by assuming a 128K Rom and re-writing %_INIT2 to load the proper table without reference to %_CLASSINFO.) b. Are XFCN's also prohibited from having global variable references? If so, then MacApp seems to be out of the question. (2) If it's impossible to use MacApp with the XCMD feature of Hypercard (to tell the truth, I never expected such a wild & wonderful thing!), I have two options. The first: rewrite my code in raw MPW. NO WAY: I won't go back, even under torture. The second: I could use the Multifinder. I've already decided to get that second meg for my Mac II, so $$$ isn't the issue. But I'd REALLY like a way for one application (mine) to tell another (Hypercard) to activate itself. That's all I ask; the rest (e.g., communication) can be hacked. Is there a trap with which one application can reactivate the application from which it was sublaunched? Many thanks, R. Martin Chavez Knowledge Systems Laboratory Stanford University
hyperbug@apple.UUCP (Keith Rollin) (11/09/87)
In article <11956@beta.UUCP> rmc@beta.UUCP (R. Martin Chavez) writes: >I'm working against some deadlines here (who isn't), so I'll >be very grateful for timely responses. > >(1) I have a rather large MacApp program that I'd like to use >as an XFCN with Hypercard. Even with some consolidation at >link time, I have around ten segments. I couldn't possibly >cram EVERYTHING (especially all the MacApp stuff) into one segment. > > a. When I try to link with "-rt XFCN=O", I get the > following error: > > ### Link: Error Linker error: uninitialized jump table offset = -1 > > Does this have something to do with multiple segments? > I can't find anything in the APDA docs that outlaws multiple > segments, but I know that DAs can only have one segment, > so maybe the same restriction applies. > > (I also had a nasty problem with unresolved references to > %_CLASSINFO in %_INIT2. I fixed it by assuming a 128K Rom > and re-writing %_INIT2 to load the proper table without > reference to %_CLASSINFO.) > > b. Are XFCN's also prohibited from having global variable > references? If so, then MacApp seems to be out of the > question. > Unless you are going to do your own segment handling, you are limited to just one 32K segment for your XCMD. When HyperCard needs to execute an XCMD, it simply loads it into memory, locks it down, and jsr's to the first byte. There is no such thing as a jump table or global variables (that is, the ones referenced off of A5 -- HyperCard is using those!) >(2) If it's impossible to use MacApp with the XCMD feature of >Hypercard (to tell the truth, I never expected such a wild & wonderful >thing!), I have two options. The first: rewrite my code in raw >MPW. NO WAY: I won't go back, even under torture. > >The second: I could use the Multifinder. I've already decided >to get that second meg for my Mac II, so $$$ isn't the issue. >But I'd REALLY like a way for one application (mine) to tell >another (Hypercard) to activate itself. That's all I ask; the >rest (e.g., communication) can be hacked. Is there a trap >with which one application can reactivate the application from which >it was sublaunched? > I am not familiar with one. Although there are SUSPEND and RESUME events available under MF, they are not queued, and are informational only. (Hmmm...I wonder what would happen if you try to sublaunch to an application that is already open???) If you don't get an answer here, try posting to comp.sys.mac also. There may be some heavy duty developers there who can help. -- Apple's HyperCard Grievance Center "Give us your bugs, your comments, your gentle criticisms..." UUCP: {pyramid!sun,voder,nsc,ucbvax!mtxinu,dual,decwrl,amdahl}!apple!hyperbug