MMPR004@ECNCDC.BITNET (Scott Hutinger) (10/02/89)
Has anyone used the new StartUpTools call? I haven't tried this yet because page 51-4 shows the StartStop record with a toolArray, which has all the tools and versions to be loaded. But, the Define.h, and the assembler equ only has the structure up to numTools(which has the number of tools to load), and doesn't have a pointer or handle to an array of ToolSpec(toolarray) records which define which tool, and versions to start up. I notice that a resource in types.r is defined with the toolarray, but the headers.h do not have any pointers/handles of any type(at all) to the ToolSpec. I just wonder how one is suppose to tell StartUpTools where your array of ToolSpecs are at. I doubt if the call is going to go searching for your array of ToolSpecs somewhere in your code. Has anyone used this call yet? ( I am not trying to hound Dave Lyons either..) I guess you could always set up a resource for the tools, but am not sure how you are to read them in, as ToolStartUp automatically starts up the Resource Manager. Sort of a Catch-22 from my limited knowledge. Maybe on load, the system looks for a resource of type rToolStartup, and automatically starts up your tools. But then, where would the references be that are needed to call ShutDownTools, or required dPageHandle be located? I seem to be missing the link between the StartStop record and the list of tools which need to be loaded. Maybe some link is not needed? Any help for this perplexing problem would be welcome... scott hutinger mmpr004@ecncdc.bitnet
MMPR004@ECNCDC.BITNET (Scott Hutinger) (10/02/89)
I just noticed that page 51-4 has dots on the toolarray line(graphic), this must mean that you just stuff the toolarray right after the StartStopRecord since StartStop is a record, and not a handle. Then the address you pass off will actually have the toolarray after the str~ruct startstoprecord. I guess that was an easy way to implement it. scott hutinger mmpr004@ecncdc.bitnet
dlyons@Apple.COM (David Lyons) (10/04/89)
In article <8910011557.aa00662@SMOKE.BRL.MIL> MMPR004@ECNCDC.BITNET (Scott Hutinger) writes: >Has anyone used the new StartUpTools call? Yes. (I love easy questions. :-) (I believe you discovered in another message where you put the toolset numbers and versions: they go right there in the StartStopRecord, starting at offset $C.) >I guess you could always set up a resource for the tools, but am not sure >how you are to read them in, as [StartUpTools] automatically starts up the >Resource Manager. Sort of a Catch-22 from my limited knowledge. Maybe >on load, the system looks for a resource of type rToolStartup, and automatically >starts up your tools. But then, where would the references be that are >needed to call ShutDownTools, or required dPageHandle be located? There is no Catch-22 here: StartUpTools starts up the Resource Manager before it loads your tools anyway. When you pass refIsResource and a resource ID to StartUpTools, it returns to you a handle that you eventually pass to ShutDownTools (see page 51-20, last sentence). [Page numbers refer to the APDA draft of Toolbox Reference, Volume 3.] -- --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.
dlyons@Apple.COM (David Lyons) (10/04/89)
In article <8910011850.aa02045@SMOKE.BRL.MIL> MMPR004@ECNCDC.BITNET (Scott Hutinger) writes: >I just noticed that page 51-4 has dots on the toolarray line(graphic), this >must mean that you just stuff the toolarray right after the StartStopRecord >since StartStop is a record, and not a handle. Then the address you pass >off will actually have the toolarray after the struct startstoprecord. You don't have to pass a pointer: you can pass a pointer, a handle, or a resource ID. No matter how you refer to it, the StartStop record is still a record. >I guess that was an easy way to implement it. Did you want something more complicated? -- --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.