home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!mumbo.apple.com!gallant.apple.com!wintermute.apple.com!user
- From: ksand@apple.com (Kent Sandvik)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: CFront error "cannot make a ..."
- Message-ID: <ksand-290892201634@wintermute.apple.com>
- Date: 30 Aug 92 03:25:24 GMT
- References: <71806@apple.Apple.COM>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: Apple
- Lines: 61
-
- In article <71806@apple.Apple.COM>, jwo@Apple.COM (Jamie Osborne) wrote:
- > I am using MacApp 3.0.1 w/ MPW 3.2 and C++ 3.2. I am trying to do a relatively simple thing- use the PPCBrowser call.
- >
- > Here's what I do:
- >
- > OSErr CAEProcessor::PPCBrowseConnect()
- > {
- > PortInfoRec thePortInfo;
- > TargetID theTarget;
- >
- > AEAddressDesc theAddress;
- > Str255 theAddressee;
- >
- > if ((PPCBrowser ((ConstStr255Param) nil,(ConstStr255Param) nil,FALSE,
- > &theTarget.location,&thePortInfo,
- > (PPCFilterProcPtr) nil,(ConstStr32Param) nil)) != noErr)
- > return false;
- >
- Funny, I just answered this on AppleLink, most likely you are looking
- at the CIncludes PPCBrowser function prototypes, when you should look
- at the MacApp specified C interfaces (that have C++ call by references
- instead of pointers).
-
- Here's a snippet that compiles/works (from AEGestalt, on Developer CDs):
-
- / Do a PPC Browser lookup of existing nodes that talk the same protocol,
- // i.e. an open application with the same signature
- #pragma segment ADoCommand
- pascal void TLookupCommand::DoIt()
- {
- FailInfo fi;
- TargetID theTargetID;
- PortInfoRec thePortInfo;
- AEAddressDesc targetAddress;
- CStr255 thePrompt = "Find node you want to examine";
- CStr255 theType = "AEGestalt Nodes";
- CStr255 windowTitle;
-
- if (fi.Try())
- {
- FailOSErr(PPCBrowser(thePrompt, theType, FALSE, theTargetID.location,
- thePortInfo, MyPPCBrowserFilter, "")); // !!!note, not address, instead VAR
- fi.Success();
- }
- else
- {
- fDocument->fOKNode = FALSE;
- if (fi.error == userCanceledErr)
- return;
- else
- fi.ReSignal();
- }
-
- ...
-
- Cheers,
- Kent Sandvik
- ... Saturday evening, time to go home from the office...
-
- ---
- Warning, Bimbo eruptions most likely to happen in California this weekend.
-