Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!kazim From: kazim@Apple.COM (Alex Kazim) Newsgroups: comp.sys.mac.programmer Subject: Re: CommToolbox: What the heck is going on? Summary: Late Nite, eh? Keywords: CommToolbox Message-ID: <34751@apple.Apple.COM> Date: 15 Sep 89 08:37:23 GMT References: <10135@bsu-cs.bsu.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 64 In article <10135@bsu-cs.bsu.edu> mithomas@bsu-cs.bsu.edu (Michael Thomas Niehaus) writes: > >1. What is a WindowP? And where is it declared? Ignore that mess. You got source to our primary test app, which means there's a whole lot of junk in there that's meant to give the toolbox a hard time. Try this one out: FUNCTION TermSendProc(thePtr: Ptr;theSize: LONGINT;refCon: LONGINT; flags: INTEGER): LONGINT; VAR theErr : CMErr; BEGIN TermSendProc := 0; theErr := CMWrite(gConn,thePtr,theSize,cmData,FALSE,NIL,0,flags); IF theErr = noErr THEN TermSendProc := theSize ELSE ; { some error handling here, maybe } END; gConn is a global, or you could use the refCon being passed in (it's the terminal record's refcon) to access it. flags does end-of-message stuff for connection tools. It should be documented a little better in the next manual release > >Here are some general comments: > >1. I have never before needed to pass a pointer to a handle (for example, > in TMChoose). The tool can change... >2. In Think's C, before I would get lots of "Illegal Pointer/Integer > Combination" errors. Now, with the prototypes, I get loads of these > "Call of XXX does not match prototype" or something similar, which is > not very helpful (since I then have to locate the prototype). I'll pass it along... >3. Why do some buttons have to be clicked? Is there no default on the > return key? (For example, after a connection has been made by the > Modem tool.) Bug. Alpha-software.... >4. A direct connection tool would be helpful. You should have gotten a connection tool called "Serial" along with the "Modem" tool. > >That should about cover the questions of the last 5 hours. Thanks for any >help you can give. > >-Michael > ======================================================================== Alex Kazim, Apple Computer Phone Repair Man ========================================================================