Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!news.arc.nasa.gov!claris!UUCP!peirce From: peirce@outpost.UUCP (Michael Peirce) Newsgroups: comp.sys.mac.programmer Subject: Publish & Subscribe Message-ID: <0B01FFFB.ijva0b@outpost.UUCP> Date: 19 Jun 91 17:27:55 GMT Reply-To: peirce@outpost.UUCP (Michael Peirce) Organization: Peirce Software Lines: 53 X-Mailer: uAccess - Mac Release: 1.1.b3 I've been adding Publish & Subscibe capabilities to a program I am working on. For the most part all is working well. My problem is that when I write out a published edition, I don't produce the automatic update I'd expect. The data is out there - if I do a "Get Edition Now" from the subscribers they get the new edition data. When I publish an edition from another program, the expected read AppleEvent shows up, but not when I update an edition. Is there a "trick" to getting this behavior to work? Might there be some flag I need to set or additional call to make? Here's my write edition routine. It's pretty much lifted from the Edition Manager example from the System 7 CD-ROM. void DoWriteEdition(FileRecHndl frHndl) { OSErr stat; EditionRefNum eRefNum; Handle h; stat = OpenNewEdition((*frHndl)->doc.OutSection, docCreator, &(**frHndl).fileState.fss, &eRefNum); if (stat != noErr) { DebugStr("\p OpenNewEdition"); return; } h = (Handle) (*frHndl)->doc.resultPictH; HLock(h); stat = WriteEdition(eRefNum, 'PICT', *h, GetHandleSize(h); HUnlock(h); if (stat != noErr) DebugStr("\p WriteEdition error"); if (stat == noErr) { stat = CloseEdition(eRefNum, true); } else { stat = CloseEdition(eRefNum, false); } } Any ideas would be appreciated. Thanks. -- Michael Peirce -- outpost!peirce@claris.com -- Peirce Software -- Suite 301, 719 Hibiscus Place -- Macintosh Programming -- San Jose, California 95117 -- & Consulting -- (408) 244-6554, AppleLink: PEIRCE