From: pottier@clipper.ens.fr (Francois Pottier) Subject: C.S.M.P. Digest, Issue 3.007 Date: Thu, 31 Mar 94 16:00:41 MET DST C.S.M.P. Digest Volume 3 : Issue 7 Today's Topics: Drag Manager - where??? Mac SerialPort programming Release of OpenTransport access to getinfo comments The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier (pottier@clipper.ens.fr). The digest is a collection of article threads from the internet newsgroup comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi- regularly and want an archive of the discussions. If you don't know what a newsgroup is, you probably don't have access to it. Ask your systems administrator(s) for details. If you don't have access to news, you may still be able to post messages to the group by using a mail server like anon.penet.fi (mail help@anon.penet.fi for more information). Each issue of the digest contains one or more sets of articles (called threads), with each set corresponding to a 'discussion' of a particular subject. The articles are not edited; all articles included in this digest are in their original posted form (as received by our news server at nef.ens.fr). Article threads are not added to the digest until the last article added to the thread is at least two weeks old (this is to ensure that the thread is dead before adding it to the digest). Article threads that consist of only one message are generally not included in the digest. The digest is officially distributed by two means, by email and ftp. If you want to receive the digest by mail, send email to listserv@ens.fr with no subject and one of the following commands as body: help Sends you a summary of commands subscribe csmp-digest Your Name Adds you to the mailing list signoff csmp-digest Removes you from the list Once you have subscribed, you will automatically receive each new issue as it is created. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest. Questions related to the ftp site should be directed to scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP digest are available there. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src. ------------------------------------------------------- >From cr@cs.strath.ac.uk (Chris Reid) Subject: Drag Manager - where??? Date: Thu, 17 Mar 1994 14:32:19 +0000 Organization: University of Strathclyde Hi everybody, Does anybody know where to find more info on the new Drag Manager? Thanks, Chris +-----------------------------------------------------------------+ |Chris Reid e-mail: cr@cs.strath.ac.uk | |Dept. Computer Science, Strathclyde University, Glasgow, Scotland| +-----------------------------------------------------------------+ +++++++++++++++++++++++++++ >From rsherman@mthvax.cs.miami.edu (Roby Sherman) Date: 18 Mar 1994 10:24:04 -0500 Organization: The Tao of Programming In cr@cs.strath.ac.uk (Chris Reid) writes: >Hi everybody, >Does anybody know where to find more info on the new Drag Manager? >Thanks, >Chris APDA sells the Drag Manager Toolkit for $75. It is fairly complete, although I think the manual could have been written a little better. --Roby -- rsherman@mthvax.cs.miami.edu Roby Sherman +++++++++++++++++++++++++++ >From Steve Bryan Date: Fri, 18 Mar 1994 17:38:34 GMT Organization: Sexton Software In article Chris Reid, cr@cs.strath.ac.uk writes: >Does anybody know where to find more info on the new Drag Manager? One location is develop magazine Issue 16. But to do any programming with it you need to order the developers' kit from APDA. It comes to about $80. If you are patient there are string rumors that it will be included with System 7.5 (whatever that is) which would imply that the interfaces might become more generally available. An 800 number for APDA is (800) 282-2732. Steve Bryan InterNet: sbryan@maroon.tc.umn.edu Sexton Software CompuServe: 76545,527 Minneapolis, MN Fax: (612) 929-1799 +++++++++++++++++++++++++++ >From kurisuto@chopin.udel.edu (Sean J. Crist) Date: 18 Mar 1994 15:52:47 -0500 Organization: University of Delaware In article <2mch2kINN89h@mthvax.cs.miami.edu>, Roby Sherman wrote: >In cr@cs.strath.ac.uk (Chris Reid) writes: >>Does anybody know where to find more info on the new Drag Manager? >APDA sells the Drag Manager Toolkit for $75. It is fairly complete, >although I think the manual could have been written a little better. Oh, great. I might just make enough shareware fees to pay for that. \/ __ __ _\_ --Kurisuto (kurisuto@chopin.udel.edu) --- | | \ / _| ,| ,| ----- For a free copy of the Bill of Rights, finger _| ,| ,| [_] this account. | | | [_] +++++++++++++++++++++++++++ >From qsi@cnh.wlink.nl (Peter Kocourek) Date: Sat, 19 Mar 1994 19:44:46 +0100 Organization: (none) Sean J. Crist wrote in a message on 18 Mar 94 SJC> In article <2mch2kINN89h@mthvax.cs.miami.edu>, Roby Sherman SJC> wrote: SJC>> In cr@cs.strath.ac.uk (Chris SJC>> Reid) writes: SJC>>>Does anybody know where to find more info on the new Drag Manager? SJC> SJC>>APDA sells the Drag Manager Toolkit for $75. It is fairly complete, SJC>>although I think the manual could have been written a little better. SJC> SJC> Oh, great. I might just make enough shareware fees to pay for SJC> that. I find this one of the more curious aspects of Apple's licensing policy in their Great System Jigsaw. For instance, things like the Thread Manager and Speech Manager are available for ftp complete with docs for the API, yet something that is IMHO far more useful, the Drag Manager, costs $75. A lot more applications could benefit fairly easily from Drag Manager support, whereas I see far fewer immediate benefits from the Thread Manager, for instance. I know the old arguments that developing new system software capability costs money, but Apple seems to be inconsistent on this point, with many System enhancements being free, whereas you have to pay for others. I can see no reason why you should be able to get the Thread Manager gratis, yet pay for the Drag Manager. Hopefully System 7.5 will improve matters somewhat (making the Drag Manager more widely available to users). Then include the Drag Manager API docs on the develop CD, and I'll be happy. Just my two cents' worth. YHS:QSI! +++++++++++++++++++++++++++ >From Mark.R.Valence@dartmouth.edu (kurash@dartmouth.edu) Date: 21 Mar 1994 21:50:20 GMT Organization: Dartmouth College, Hanover, NH In article <2mch2kINN89h@mthvax.cs.miami.edu> rsherman@mthvax.cs.miami.edu (Roby Sherman) writes: > APDA sells the Drag Manager Toolkit for $75. It is fairly complete, > although I think the manual could have been written a little better. If you have the latest Developer CD March 94), the documentation is on that. The header files can be constructed from the DocViewer format. Then, all you need is the Drag Manager extension, which can be had on the Mac on RISC SDK CD among other places. The Mac on RISC CD also has drag.h, so you can get the "official" interface. Neither CD has the sample code, which can be useful. Of course, if you do not have these CDs, it is cheaper to get the Drag Manager Toolkit. There is another option "strictly for testing and development purposes", and in no way meant as a Drag Manager substitution (if you are interested in this, send e-mail): I have written a "false" Drag manager, which implements all of the functionality of the real Drag manager except for the inter-app communication. This is handy when you want to use drag and drop in your app, but your app might run under Sys6 or under Sys7 w/o the Drag Manager installed. The false Drag manager behaviour is as close to the real thing as possible, but I don't claim that it works exactly the same. If the real Drag manager is installed, it is used instead of the false one. I wrote it from the ground up, before I had the Drag Manager extension (just the docs), so the behaviour may deviate from the real thing (it also means that I did not violate any copyrights). This is a static link library, about 8K of (non-optimized) 68K code. Oh, one thing that is different: I use gray dithering for the hilite region, even when color is available. I have not been able to figure out how to do this and produce the exact same results as the D.M. The problem is that the D.M. does not use the hilite color (the docs say that the color of this region is "based on the hilite color"), but instead seem to use one of the window colors from the Auxiliary window handle. Gray dither is good enough for me (for now), so I probably won't change it. No docs, no sample code, no inter-app dropping, you really should buy the Drag Manager Toolkit. Mark. - -------------------------------------------------------------------- "On the Internet, nobody knows you're a dog." Ice Peak Form Mice Elf -- cartoon in New Yorker +++++++++++++++++++++++++++ >From gdl@isis.maths (Greg Landweber) Date: 22 Mar 1994 16:52:04 GMT Organization: (none) In article <764158794.AA01355@cnh.wlink.nl> qsi@cnh.wlink.nl (Peter Kocourek) writes: Hopefully System 7.5 will improve matters somewhat (making the Drag Manager more widely available to users). Then include the Drag Manager API docs on the develop CD, and I'll be happy. I don't know about the develop CD, but the Drag Manager docs are included on the Developer CD series (it first appeared on Northern Hexposure in November). You don't get the extension or header files, though, for which you need to buy the $75 SDK from Apple. +++++++++++++++++++++++++++ >From j.gardner@garvan.unsw.edu.au (James Gardner) Date: Tue, 22 Mar 1994 07:16:23 GMT Organization: Garvan Institute of Medical Research In article <2ml4qs$840@dartvax.dartmouth.edu>, Mark.R.Valence@dartmouth.edu (kurash@dartmouth.edu) wrote: > In article <2mch2kINN89h@mthvax.cs.miami.edu> > rsherman@mthvax.cs.miami.edu (Roby Sherman) writes: > > APDA sells the Drag Manager Toolkit for $75. It is fairly complete, > > although I think the manual could have been written a little better. > > If you have the latest Developer CD March 94), the documentation is on > that. The header files can be constructed from the DocViewer format. > Then, all you need is the Drag Manager extension, which can be had on > the Mac on RISC SDK CD among other places. The Mac on RISC CD also > has drag.h, so you can get the "official" interface. > > Neither CD has the sample code, which can be useful. Of course, if you > do not have these CDs, it is cheaper to get the Drag Manager Toolkit. > > There is another option "strictly for testing and development > purposes", and in no way meant as a Drag Manager substitution (if you > are interested in this, send e-mail): > > I have written a "false" Drag manager, which implements all of the > functionality of the real Drag manager except for the inter-app > communication. This is handy when you want to use drag and drop in > your app, but your app might run under Sys6 or under Sys7 w/o the Drag > Manager installed. The false Drag manager behaviour is as close to > the real thing as possible, but I don't claim that it works exactly > the same. If the real Drag manager is installed, it is used instead of > the false one. I wrote it from the ground up, before I had the Drag > Manager extension (just the docs), so the behaviour may deviate from > the real thing (it also means that I did not violate any copyrights). > This is a static link library, about 8K of (non-optimized) 68K code. > > Oh, one thing that is different: I use gray dithering for the hilite > region, even when color is available. I have not been able to figure > out how to do this and produce the exact same results as the D.M. The > problem is that the D.M. does not use the hilite color (the docs say > that the color of this region is "based on the hilite color"), but > instead seem to use one of the window colors from the Auxiliary window > handle. Gray dither is good enough for me (for now), so I probably > won't change it. > > No docs, no sample code, no inter-app dropping, you really should > buy the Drag Manager Toolkit. Yes probably. But does your 'false' manager disable context switching during a drag? If not, please, please, please post it to the net. I just can't stand not being able to debug my DM code in THINK Debugger. -- James Gardner Garvan Institute of Medical Research Sydney, Australia >From Chris.Reid%f1.n3641.z1@psybbs.durham.nc.us (Chris Reid) Subject: Drag Manager - where??? Date: 17 Mar 94 19:32:19 GMT Organization: (none) Organization: University of Strathclyde Hi everybody, Does anybody know where to find more info on the new Drag Manager? Thanks, Chris +-----------------------------------------------------------------+ IChris Reid e-mail: cr@cs.strath.ac.uk I IDept. Computer Science, Strathclyde University, Glasgow, ScotlandI +-----------------------------------------------------------------+ --------------------------- >From LANKTON.MARK%f1.n3641.z1@psybbs.durham.nc.us (LANKTON MARK) Subject: Mac SerialPort programming Date: 17 Mar 94 20:28:47 GMT Organization: (none) Organization: University of Colorado, Boulder Several people have asked recently about entry-level code to open, read, write and close the serial ports. Here are a few simple examples of how to use the Serial Driver system calls. I have yanked these lines out of two of my old applications; if there are laughable inconsistencies in the variable names please just laugh. This should get people headed in the right direction. shortgModemPortOutNum; shortgModemPortInNum; SerShkgModemPortHShakeRec; char*gMyInputBuffer; #define kMyAppropriateSize4096 /*use whatever size you need */ void InitModemPort() { OSErrresultCode; /*Wake up the serial driver and init the modem port. */ resultCode = OpenDriver("\p.AOut",&gModemPortOutNum); resultCode = OpenDriver("\p.AIn",&gModemPortInNum); /* error check */ /*Get space for a bigger-than-default input buffer. */ gMyInputBuffer = NewPtr(kMyAppropriateSize); /*Tell the serial driver about the new input buffer. */ if(gMyInputBuffer) resultCode = SerSetBuf(gModemPortInNum,(Ptr)gMyInputBuffer, (short)kMyAppropriateSize); } /*Constants for these arguments are defined in serial.h. */ void ResetModemPort(short theBaudRate, short theStopBits, short theParity, short theDataBits) { shorttheConfig; OSErrresultCode; /*Configure input and output parameters. */ theConfig = theBaudRate + theStopBits + theParity + theDataBits; resultCode = SerReset(gModemPortOutNum,theConfig); resultCode = SerReset(gModemPortInNum,theConfig); /*This was specific to a particular application, but it's an example. */ gModemPortHShakeRec.fXOn = useXOn; gModemPortHShakeRec.fCTS = useCTS; gModemPortHShakeRec.xOn = myXOnVal; gModemPortHShakeRec.xOff = myXOffVal; gModemPortHShakeRec.errs = hwOverrunErr; gModemPortHShakeRec.evts = 0; gModemPortHShakeRec.fInX = useXOn; gModemPortHShakeRec.fDTR = FALSE; resultCode = SerHShake(gModemPortInNum,&gModemPortHShakeRec); resultCode = SerHShake(gModemPortOutNum,&gModemPortHShakeRec); KillIO(gModemPortInNum );/* throws away any old data */ KillIO(gModemPortOutNum ); } /*If you want to clean up after yourself before quitting the application...*/ void CleanUpWorld() { /*This restores the default input buffer, if it matters. */ resultCode = SerSetBuf(gModemPortInNum,(Ptr)gMyInputBuffer,(short)0); CloseDriver(gModemPortInNum); CloseDriver(gModemPortOutNum); } /* OK, you are up and running. Has any incoming data arrived??? */ resultCode = SerGetBuf(gModemPortInNum,&count); /* if count > 0, you have data in the buffer, so read it into some local storage. */ resultCode = FSRead(gModemPortInNum,&count,myLocalBuffer); /* To write data from myLocalBuffer out through the port...*/ count = numBytesToWrite; resultCode = FSWrite(gModemPortOutNum,&count,myLocalBuffer); Good luck!!! Mark Lankton (lankton@spot.colorado.edu) Laboratory for Atmospheric and Space Physics University of Colorado --------------------------- >From Frank Price Subject: Release of OpenTransport Date: Thu, 17 Mar 1994 05:59:57 GMT Organization: Netcom It seems very unclear what someone should do if one wants to write a MacTCP based application these days. APDA no longer carries the docs. The seeding ftp site has d8 docs for OpenTransport and the MacTCP docs. The OpenTransport stuff basically says to use it if you plan to develop TCP/IP stuff. But it isn't even available to be used!! Sending email to the site director has been fruitless, and based on the docs it doesn't sound like it is in a state which could be used anyway. Is OpenTransport going to be released soon? Will it work with all versions of System 7 (6??)? These are clearly issues paramount to developers wanting to use this. -Frank _______________________________________________________________________ | Frank Price | wprice@jarthur.claremont.edu | |_______________|______________________________________________________| +++++++++++++++++++++++++++ >From resnick@cogsci.uiuc.edu (Pete Resnick) Date: Thu, 17 Mar 1994 01:48:07 -0600 Organization: University of Illinois at Urbana-Champaign In article , Frank Price wrote: >It seems very unclear what someone should do if one wants to write a >MacTCP based application these days. APDA no longer carries the docs. >The seeding ftp site has d8 docs for OpenTransport and the MacTCP docs. The docs for good old MacTCP 2.0.x are out there on: ftp://seeding.apple.com//ess/public/mactcp/MacTCP_Dev_Kit as is the rest of the developer's kit. >The OpenTransport stuff basically says to use it if you plan to develop >TCP/IP stuff. But it isn't even available to be used!! You should look at the OpenTransport stuff with an eye to the future, but even the new OT stuff will have backwards compatible support for the old programming interfaces, so if you are starting a project that will be released in the next couple of months, I would stick to the old interfaces. If it's going to be a year before you get it out the door anyway, you might try to be the first kid on the block to have a MacTCP 3.0 product out. >Sending email to >the site director has been fruitless, and based on the docs it doesn't >sound like it is in a state which could be used anyway. > >Is OpenTransport going to be released soon? Will it work with all >versions of System 7 (6??)? These are clearly issues paramount to >developers wanting to use this. Write to Garry if you are seriously interested in trying out OT programming. There is stuff that you can get started with. pr -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet: resnick@cogsci.uiuc.edu --------------------------- >From Tim.S.%f1.n3641.z1@psybbs.durham.nc.us (Tim S.) Subject: access to getinfo comments Date: 11 Mar 94 21:49:39 GMT Organization: (none) Organization: System Updates In article Brian Foley, bfoley@obelisk.berkeley.edu writes: >Is there a way to access the coments made in the finder's "Get Info" >window? I haven't been able to find anything in IM (though I probably >just missed it) > >I just want to use it as a temp. storage for info about the file (i.e. I >know >that you loose the comments when you rebuild the desktop - but I still >have no clue why the Apple people would want that to happen) Pick up a copy of "Programming for System 7" (by Gary Little and me, published by Addison-Wesley). Look near the end of Chapter 9 (page 324 if you want to get picky). Listing 9-8 shows the source in C for a routine that will read a comment for you (it uses Std File to let you pick the file whose comment you want to see). If you order the disk for the book ($20 from Gary), then there's additional sources on the disk that give you a nice clean routine that's more useful than what's shown in Listing 9-8 (i.e.: the Std File stuff has been taken out, you tell the routine what file's comment you want, etc). Also, the disk includes sources for modifying your app's Std File dialogs to include a field for browsing comments (during Open dialogs) and creating comments (during Save dialogs). There are a couple of bugs in the System Software that you have to get around to make this happen, so it's worth the twenty bucks for the disk just to avoid having to figure out those bugs yourself... :-) Tim S. My opinions are my own. They're my feet and I'll put them in my mouth if I want to. Do not expose to open flame. Some Assembly required. Remove before flight. Under penalty of law, do not remove this tag. Caution, contains silica gel, do not eat. Do not read while operating a motor vehicle or heavy equipment. In case of eye contact, flush with water. This supersedes all previous notices. --------------------------- End of C.S.M.P. Digest **********************