home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-31 | 80.0 KB | 2,102 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Mon, 11 Dec 95 Volume 3 : Issue 127
-
- Today's Topics:
-
- Audio CD related toolbox routines?
- Changing default directory of StandardGetFile
- Creating AppleEvents
- Curious question about process mgr-A4
- Determining if a volume is local or not
- Developer VISE Code Resources?
- Experience with Zinc-Galaxy-Neuron Data?
- Floating menus sink my dialogs
- GetAppFiles - link error?
- How to get a folder's volume information!
- Random number seed dreaming.
- SAT 2.3.5 is out!
- Where to store the sprite-graphics?
- [Q] Color-Picker Popup Menu?
- [Q] How to hit-test a PICT?
- multi-player keyboard control
-
-
-
- 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
- newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
- csmp.games. It is designed for people who read news 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.
-
- -------------------------------------------------------
-
- >From Greg Maddigan <gregm@atlas.otago.ac.nz>
- Subject: Audio CD related toolbox routines?
- Date: 22 Nov 1995 02:53:15 GMT
- Organization: University of Otago, Dunedin, NZ
-
- What toolbox routines do the apps like Audio CD Player use to obtain the
- lengths of each track of an audio CD?
- Are there any snippets of sample code anywhere?
-
-
- +++++++++++++++++++++++++++
-
- >From quesnel@music.mcgill.ca (René Quesnel)
- Date: Wed, 22 Nov 1995 17:09:04 -0500
- Organization: Faculty of Music, McGill University
-
- In article <48u3ar$65o@celebrian.otago.ac.nz>, Greg Maddigan
- <gregm@atlas.otago.ac.nz> wrote:
-
- > What toolbox routines do the apps like Audio CD Player use to obtain the
- > lengths of each track of an audio CD?
- > Are there any snippets of sample code anywhere?
-
- You need:
- 1. The technical note about the CD-ROM driver calls at
- http://www.info.apple.com/dev/technotes/Devices/dv_22.html
-
- 2. Code sample at:
- http://dev.info.apple.com/source/code/Snippets/Devices/Audio_CD__/ReadMe.html
-
- You might also want the information about the CD remote database format at:
- http://www.info.apple.com/dev/technotes/Devices/dv_25.html
-
- - ----------------------------------------------------------------------------
- Rene Quesnel | voice: (514)398-4548, x0523
- Music Technology and Sound Recording Areas | fax: (514)398-8061
- Faculty of Music, McGill University | e-mail: quesnel@music.mcgill.ca
- 555 Sherbrooke St.W. Montreal (QC), Canada |
- H3A 1E3 |
- - ----------------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- >From phixus@deltanet.com (Chris De Salvo)
- Date: Mon, 27 Nov 1995 03:05:20 -0800
- Organization: MacPlay
-
- In article <48u3ar$65o@celebrian.otago.ac.nz>, Greg Maddigan
- <gregm@atlas.otago.ac.nz> wrote:
-
- >What toolbox routines do the apps like Audio CD Player use to obtain the
- >lengths of each track of an audio CD?
- >Are there any snippets of sample code anywhere?
-
- You have to use the Device Manager calls and go through the CD-ROM
- driver. The driver calls are documented in the Mac tech notes for
- devices. It is Tech Note DV 22.
-
- L8R
- Chris
-
- --
- phixus@deltanet.com | Macintosh: Changing the world,
- Chris De Salvo | one person at a time!
- Professional Mac Geek | -----------------------------
- for MacPlay, Inc. | (I wish they'd hurry up!)
-
- http://www.deltanet.com/users/phixus
-
- ---------------------------
-
- >From jstiles@cello.gina.calstate.edu (John Stiles)
- Subject: Changing default directory of StandardGetFile
- Date: Fri, 24 Nov 1995 07:07:46 GMT
- Organization: cello.gina.calstate.edu
-
- Hi! I am writing a program which opens an encoded file, then decodes the
- contents into a new folder. The user then must pick a file from inside the
- new folder. I would like to be able to set StandardGetFile to open in this
- new folder, rather than forcing the user to open the new folder manually
- every time. I think I have seen other programs do this--but how?
-
- Thanks for any help you can give...
- *Stiles
-
- +++++++++++++++++++++++++++
-
- >From Dave Overton <doverton@iglou.com>
- Date: Sat, 25 Nov 1995 14:34:44 GMT
- Organization: DataStream Imaging Systems, Inc.
-
- CurDirStore
- SFSaveDisk
-
- are two low memory globals where the Standard File Package
- stores its current DirID and vRefNum. You should be able to
- pop these before calling SFGetFile.
- Dave Overton
-
- +++++++++++++++++++++++++++
-
- >From rdwells@mmm.com (Richard Wells )
- Date: 27 Nov 1995 19:15:18 GMT
- Organization: 3M Company
-
- jstiles@cello.gina.calstate.edu (John Stiles) wrote:
- > Hi! I am writing a program which opens an encoded file, then decodes the
- >contents into a new folder. The user then must pick a file from inside the
- >new folder. I would like to be able to set StandardGetFile to open in this
- >new folder, rather than forcing the user to open the new folder manually
- >every time. I think I have seen other programs do this--but how?
-
- Dave Overton <doverton@iglou.com> responded:
- >CurDirStore
- >SFSaveDisk
- >are two low memory globals where the Standard File Package
- >stores its current DirID and vRefNum. You should be able to
- >pop these before calling SFGetFile.
-
- To do this reliably under System 7.5, you must use a standard file
- hook function and modify the StandardFileReply record's sfFile
- field to refer to the volume and folder you want in response to
- the sfHookFirstCall message. This is necessary under 7.5 because
- users can use the General Preferences control panel to modify the
- behavior of the standard file package.
-
- _Inside Macintosh: Files_ has an example of doing this.
-
- Any time I do this, I also save the current CurDirStore and
- SFSaveDisk in the sfHookFirstCall message and restore them
- during the sfHookLastCall message.
-
- One more thing: don't forget to return sfHookChangeSelection
- from the sfHookFirstCall message if you change the reply
- record's sfFile field.
-
- Yet one more thing: When you modify sfFile.parID and sfFile.vRefNum,
- also set sfFile.name to an empty string. If you leave random
- garbage in there, you can crash the system.
-
-
-
- ---------------------------
-
- >From kellys@cs.stanford.edu (Kelly Schwarzhoff)
- Subject: Creating AppleEvents
- Date: Fri, 24 Nov 1995 23:28:39 -0800
- Organization: Stanford University
-
- I'm trying for the first time to send Apple Events, and can't seem to get
- them to work (if it matters, I'm using Codewarrior 7). I have the
- following code:
-
- OSErr err1;
- OSErr err2;
- OSErr err3;
- OSErr err4;
- FInfo fileinfo;
- AEDesc dest;
- AppleEvent OpenAppEvent;
- AppleEvent Reply;
-
-
- err1 = ::HGetFInfo(mPreviewer.vRefNum, mPreviewer.parID,
- mPreviewer.name, &fileinfo);
- err2 = ::AECreateDesc(typeApplSignature, &fileinfo.fdCreator,
- sizeof(fileinfo.fdCreator), &dest);
- err3 = ::AECreateAppleEvent(kCoreEventClass, kAEOpenApplication, &dest,
- kAutoGenerateReturnID,
- kAnyTransactionID, &OpenAppEvent);
- err4 = ::AESend(&OpenAppEvent, &Reply, kAENoReply, kAENormalPriority,
- kAEDefaultTimeout, NULL, NULL);
-
-
- mPreviewer is an FSSpec which holds the application's information.
-
- The problem is that err4 returns -609, which means I'm passing an invalid
- Signature. However, I've checked it (and ran it with multiple different
- programs/signatures), and the signature appears to be correct. All of the
- other err's return 0. Suggestions? Is there a better way to do this? Is
- this the correct way? I've never sent an apple event (and receiving them
- in Codewarrior is so trivial you really never deal with the toolbox), so
- I'm not sure what the correct approach is.
-
- --
- Kelly Schwarzhoff kellys@cs.stanford.edu
- MIME Mail is welcome
-
- +++++++++++++++++++++++++++
-
- >From brians@pbcomputing.com (Brian Stern)
- Date: Sat, 25 Nov 1995 17:15:12 -0600
- Organization: The University of Texas at Austin, Austin, Texas
-
- Kelly,
-
- You can't send an appleevent to a file; you have to send it to a running
- process. Contrary to what you were thinking you can't start an
- application by sending an oapp event. There is never any reason to send
- an oapp event. They're sent by the process manager when an app is
- started.
-
- Your code looks basically fine. Try sending a quit event to a running
- process and try using a psn to generate the address desc.
-
- Good luck,
-
- ____________________________________________________________________
- Brian Stern {8-{)} BeBox Hairy Guy Stern@metrowerks.com BrianS@pbcomputing.com
- INIT Writing FAQ etc. at <ftp://ftp.pbcomputing.com//Guests/BrianS/>
-
- +++++++++++++++++++++++++++
-
- >From tulip@tiac.net (Ed Anson)
- Date: Sat, 25 Nov 1995 20:55:15 -0500
- Organization: Tulip Software
-
- In article <brians-2511951715120001@slip-16-7.ots.utexas.edu>,
- brians@pbcomputing.com (Brian Stern) wrote:
-
- > You can't send an appleevent to a file; you have to send it to a running
- > process. Contrary to what you were thinking you can't start an
- > application by sending an oapp event. There is never any reason to send
- > an oapp event. They're sent by the process manager when an app is
- > started.
-
- That is basically correct. However, it is the Finder that sends oapp when
- you open an application. If you use the Process Manager to start an app,
- you are obligated to send the oapp. Some applications behave rather
- strangely if they don't receive that event after launch.
-
- Incidentally, you can also use AppleScript to launch an application
- without sending oapp. The Launch command does this. OTOH, simply
- mentioning the application in a Tell command launches the app (if
- necessary) and automatically sends oapp.
-
- - --------------------
- Ed Anson
- Tulip Software
- Andover, MA 01810 Check out my WWW page:
- U.S.A. <http://www.tiac.net/users/tulip/home.html>
-
- +++++++++++++++++++++++++++
-
- >From jwbaxter@olympus.net (John W. Baxter)
- Date: Sun, 26 Nov 1995 00:27:35 -0800
- Organization: Townsend Communications
-
- In article <brians-2511951715120001@slip-16-7.ots.utexas.edu>,
- brians@pbcomputing.com (Brian Stern) wrote:
-
- > There is never any reason to send
- > an oapp event. They're sent by the process manager when an app is
- > started.
-
- Actually, there is *one* reason I can think of: to validate the behavior
- of one's app when a subsequent 'oapp' comes in. Apple seems to be
- changing its mind on this...it may be, sometime in the future, that Finder
- will trigger a new 'oapp' if a running app is double-clicked. [User
- testing is showing that simply bringing a left-over, windowless app to the
- front may not be the best thing for the system to do.] So the "right"
- behavior may become to do the same thing whenever an 'oapp' shows up that
- the app does if 'oapp' preceeds 'odoc' or 'pdoc'. Or it may not.
-
- Then there was an early version of FileMaker, which *attempted* to remove
- its 'aevt'/'oapp' handler once one of the three events had arrived. But
- it made the call incorrectly, and the handler remained. ["Who knows what
- evil lurks in the hearts of applications? AETracker knows..."]
-
- --John
-
- --
- "This item is not available because it cannot be removed."
- John W. Baxter Port Ludlow, WA jwbaxter@olympus.net
-
- +++++++++++++++++++++++++++
-
- >From brians@pbcomputing.com (Brian Stern)
- Date: Sun, 26 Nov 1995 14:36:14 -0600
- Organization: The University of Texas at Austin, Austin, Texas
-
- In article <tulip-2511952055150001@tulip.tiac.net>, tulip@tiac.net (Ed
- Anson) wrote:
-
- <In article <brians-2511951715120001@slip-16-7.ots.utexas.edu>,
- <brians@pbcomputing.com (Brian Stern) wrote:
- <
- <> You can't send an appleevent to a file; you have to send it to a running
- <> process. Contrary to what you were thinking you can't start an
- <> application by sending an oapp event. There is never any reason to send
- <> an oapp event. They're sent by the process manager when an app is
- <> started.
- <
- <That is basically correct. However, it is the Finder that sends oapp when
- <you open an application. If you use the Process Manager to start an app,
- <you are obligated to send the oapp. Some applications behave rather
- <strangely if they don't receive that event after launch.
-
- This is not correct. I quote from IM VI p 29-14:
-
- "If you set this field to NIL [the launchAppParameters field], the
- LaunchApplication function automatically creates and sends an Open
- Application event to the launched application."
-
- You can launch an app using the process manager call LaunchApplication.
- If you do so you can specify an odoc event or any other high level event
- to be the first event sent to the application. If you don't specify any
- event then the process manager sends an oapp for you. There is never any
- reason for normal applications to explicitely send an oapp event.
-
- ____________________________________________________________________
- Brian Stern {8-{)} BeBox Hairy Guy Stern@metrowerks.com BrianS@pbcomputing.com
- INIT Writing FAQ etc. at <ftp://ftp.pbcomputing.com//Guests/BrianS/>
-
- ---------------------------
-
- >From bhaglind@mv.mv.com (Intellilink Corp.)
- Subject: Curious question about process mgr-A4
- Date: Tue, 14 Nov 1995 16:19:38 GMT
- Organization: MV Communications, Inc.
-
- Just wondered if anyone in netland has successfully inserted either a filter
- proc or an AEEventHandler from a Code Resource ( which uses A4 ) instead
- of from an application. If you have, what gotcha's have you encountered.
-
- I finally did manage to work with Ole on the Macintosh, in a limited and
- strange and wonderful way. Had I any choice in the matter, I would NOT
- have chosen to deal with Ole at all. Ah well.
-
- Thanks for any info on AEHandlers living in code resources.
-
- B. Haglind
-
-
-
-
- +++++++++++++++++++++++++++
-
- >From skevill@tartarus.uwa.edu.au (Scott Kevill)
- Date: Thu, 16 Nov 1995 15:05:30 +0800
- Organization: The University of Western Australia
-
- In article <DI1K0q.L8F@mv.mv.com>, bhaglind@mv.mv.com (Intellilink Corp.) wrote:
-
- : Just wondered if anyone in netland has successfully inserted either a filter
- : proc or an AEEventHandler from a Code Resource ( which uses A4 ) instead
- : of from an application. If you have, what gotcha's have you encountered.
- :
- : I finally did manage to work with Ole on the Macintosh, in a limited and
- : strange and wonderful way. Had I any choice in the matter, I would NOT
- : have chosen to deal with Ole at all. Ah well.
- :
- : Thanks for any info on AEHandlers living in code resources.
- :
- : B. Haglind
-
- I believe it is not possible to have a code resource receive AppleEvents
- since they can only be addressed to an application (or background only
- application). It may be possible for a code resource to install
- AEEventHandlers and receive AppleEvents meant for an application, but I
- have not tried this. However sending AppleEvents from a code resource is
- fine and fairly straight-forward. What kind of AppleEvents are you wanting
- to receive in a code resource?
-
- Scott Kevill.
- skevill@tartarus.uwa.edu.au
-
- +++++++++++++++++++++++++++
-
- >From S.W.Lay@damtp.cam.ac.uk (Steve Lay)
- Date: Wed, 22 Nov 1995 09:41:32 +0000
- Organization: DAMTP, Cambridge University
-
- I once installed an AppleEvent handler from an XCMD running with HyperCard
- and it worked fine - as long as the parent application doesn't do anything
- stupid, is HLE aware and uses the AEProcessAppleEvent call you should be
- alright.
-
- However, you should check out the rules which the parent application
- applies to your code to ensure that the event handler you install doesn't
- move. Eg, HyperCard may well move the code for an XCMD around in the heap
- without telling you - for this reason I achieved it by loading a separate
- code resource, detaching it, locking it and then installing it. I think I
- converted the handle to hex and put it in an HC global or something so
- that I could clean it up when I quit.
-
- --
- Steve Lay
- S.W.Lay@damtp.cam.ac.uk
- http://www.amtp.cam.ac.uk/icrd/
-
- ---------------------------
-
- >From brads79436@aol.com (BradS79436)
- Subject: Determining if a volume is local or not
- Date: 22 Nov 1995 19:56:37 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- How does one determine if a volume is local or remote (networked,
- AppleShare, etc.) ? PBHGetVInfo() gives me access to a bunch of
- information, but that's not among it. Do I have to come in from the
- AppleShare side ?
-
- Thanks for any help
-
- Brad Smith
- BookWorm
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 23 Nov 1995 06:05:44 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- Brad Smith (brads79436@aol.com) wrote:
- >How does one determine if a volume is local or remote
- >(networked, AppleShare, etc.) ? PBHGetVInfo() gives me access
- >to a bunch of information, but that's not among it. Do I have
- >to come in from the AppleShare side ?
-
- You want to use PBHGetVolParms and check the vMServerAdr field of the
- GetVolParmsInfoBuffer that's returned. If its zero, the volume is local.
- Using the high-level calls and macros for checking GetVolParmsInfoBuffer
- fields in the MoreFiles sample code makes this rather easy as shown here:
-
- Boolean IsNetworkVolume(StringPtr volName, short vRefNum)
- {
- GetVolParmsInfoBuffer volParmsInfo;
- long infoSize;
-
- infoSize = sizeof(GetVolParmsInfoBuffer);
- if ( HGetVolParms(volName, vRefNum, &volParmsInfo, &infoSize) == noErr )
- {
- /* If volume supports GetVolParms, see if it is a network volume */
- return ( isNetworkVolume(volParmsInfo) );
- }
- else
- {
- /* Volume doesn't support GetVolParms, so it isn't a network volume */
- return ( false );
- }
- }
-
- HGetVolParms is a MoreFiles function and isNetworkVolume is a MoreFile
- macro.
-
- - Jim Luther
-
- ---------------------------
-
- >From cvanveen@bnr.ca (Christine van Veen)
- Subject: Developer VISE Code Resources?
- Date: Sun, 26 Nov 1995 16:19:01 -0400
- Organization: Bell-Northern Research/Northern Telecom
-
- I have good knowledge of C programming in the PC and Unix environment. I
- have been attempting to learn to write code resources in C for use with
- Developer VISE - with very little success. Can anyone explain to me what
- is necessary to write a code resource for Developer VISE?
-
- Currently, I am working on writing a code resource to "age" a file. This
- means that, before a file is installed, the code resource will:
-
- * search for the file to be installed, in case it already exists
- * if the file exists, rename the file to some unique name
- e.g. "TheFile" might become "TheFile.11.32"
- if the file is renamed at 11:32 a.m.
-
- If anyone has experience with this, I would really appreciate hearing any
- suggestions.
-
- - Christine van Veen
-
- **********************************************
- Christine van Veen cvanveen@bnr.ca
- Mac/Unix Systems Integration
- Bell Northern Research
- Phone: 763-7844 Fax: 763-3283
- **********************************************
-
- +++++++++++++++++++++++++++
-
- >From David.Walton.10@nd.edu (David Walton)
- Date: Mon, 27 Nov 1995 18:46:47 -0500
- Organization: University of Notre Dame
-
- In article <cvanveen-2611951619010001@47.199.32.68>, cvanveen@bnr.ca
- (Christine van Veen) wrote:
-
- >I have good knowledge of C programming in the PC and Unix environment. I
- >have been attempting to learn to write code resources in C for use with
- >Developer VISE - with very little success. Can anyone explain to me what
- >is necessary to write a code resource for Developer VISE?
- >
- >Currently, I am working on writing a code resource to "age" a file. This
- >means that, before a file is installed, the code resource will:
- >
- >* search for the file to be installed, in case it already exists
- >* if the file exists, rename the file to some unique name
- > e.g. "TheFile" might become "TheFile.11.32"
- > if the file is renamed at 11:32 a.m.
- >
- >If anyone has experience with this, I would really appreciate hearing any
- >suggestions.
-
- Here's a very brief external that I use to check for the existence of
- OpenTransport in an installer I wrote. It's pretty straightforward: just
- link with the right libraries, get the right parameters, and you're home
- free. I have written something that vaguely resembles what you're
- specifically looking for, so if you'd like to discuss more details, e-mail
- me.
-
- (Also, please excuse the ugliness of the code.)
-
- David Walton
-
-
-
- #ifndef __EXTERNCODEDEFINES__
- #include <ExternCodeDefines.h>
- #endif
- #include <Gestalt.h>
- #ifndef gestaltOpenTransportAttr
- #define gestaltOpenTransportAttr 'otan'
- #endif
-
- #define kTestHasOT 1
- #define kTestHasMacTCP 2
-
- pascal void main (ExternParmBlock *PB);
-
-
-
- /* ====================================================================
-
- main
-
- ==================================================================== */
-
- pascal void main (ExternParmBlock *PB)
- {
- long gestaltValue;
- Boolean hasOT = false;
- OSErr error;
-
- error = Gestalt(gestaltOpenTransportAttr, &gestaltValue);
- if (!error && gestaltValue != 0)
- hasOT = true;
- switch (PB->refCon)
- {
- case kTestHasOT:
- PB->installFork = (hasOT ? PB->installFork : kDontInstallFile);
- break;
- case kTestHasMacTCP:
- PB->installFork = (hasOT ? kDontInstallFile : PB->installFork);
- break;
- default: /* This should never be called */
- PB->installFork = kDontInstallFile;
- break;
- }
- }
-
- --
- David Walton | Macintosh Consultant & Graduate Student
- Mailto:David.Walton.10@nd.edu | Office of Information Technologies
- http://www.nd.edu/~dwalton1/ | Dept. History & Philosophy of Science
- Voice: 219-631-8024 | University of Notre Dame
-
- "Beware the advice of successful people; they do not seek company."
-
- ---------------------------
-
- >From baileyc@beetle.com (Christopher R. Bailey)
- Subject: Experience with Zinc-Galaxy-Neuron Data?
- Date: Tue, 14 Nov 1995 09:45:02 -0800
- Organization: Beetle's Sprawl
-
- I am conducting an investigation into cross platform frameworks for my
- company. We have an existing product that is cross platform (Mac &
- Windows) using our own cross platform framework. We'd like to move to a
- commercial product to attain more GUI features, not have to worry about
- maintaining the framework ourselves, possibly pick up international
- support and database connectivity, etc.
-
- I started with a list including Galaxy, Neuron Data, XVT, Zinc, StarView,
- ParcPlace VisualWorks, zApp, C++/Views, Utah, MFC, ODF, and Prograph. We
- require that Mac, PowerMac, Windows 95, Windows NT (Intel and preferably
- Alpha), and possibly Windows 3.1 be supported, and that the product be a
- C++ product, preferably supporting a MVC paradigm. Our initial
- investigation included two non-C++ products as they seemed to have enough
- compelling arguments to look at them.
-
- As of now, we've narrowed the field down to Neuron Data's Open Interface
- Elements (and possibly C/S Elements), Visix's Galaxy, and Zinc's Zinc
- Application Framework. With Neuron Data, we will base our evaluation on
- the next release (March/April '96) as it's claimed to be a much better C++
- product. We are also interested in Visix's upcoming Galaxy Global
- (version for creating international/Unicode/multi-byte apps), as well as
- Zinc's international offering. At this time price is not a major factor
- in the decision. Also we probably won't be making a decision for several
- months, which allows us to look at the upcoming releases from some of
- these companies.
-
- What I'd like to find out is who has chosen one of these products, and for
- what reasons. More importantly, I'd like to find people who've chosen
- Zinc/Galaxy/Open Interface when comparing these three (and/or others).
-
- Any information you feel like providing would be much appreciated. Please
- email me as well (Chris_Bailey@hysoft.com). Specifically I'd be
- interested in your opinions of the companies, the tech support, the
- features of the product, use of the GUI design tool, experience using I18N
- features/abilities (which I guess mainly pertains to Zinc at this point),
- documentation, training, etc. Thanks in advance!
-
- _____________ Christopher R. Bailey _____________
- baileyc@beetle.com
- http://www.quake.net/~baileyc
- Macintosh, for those who can see through Windows.
- Ride fast, take chances!
-
- +++++++++++++++++++++++++++
-
- >From sean@corf.demon.co.uk (Sean A Corfield)
- Date: Wed, 15 Nov 1995 12:11:57 +0000
- Organization: OCS
-
- In article <baileyc-1411950945020001@beetle.com>,
- baileyc@beetle.com (Christopher R. Bailey) wrote:
-
- |> What I'd like to find out is who has chosen one of these products, and
- for
- |> what reasons. More importantly, I'd like to find people who've chosen
- |> Zinc/Galaxy/Open Interface when comparing these three (and/or others).
-
- I worked for a company that went through a similar evaluation process and
- picked Zinc. Neuron Data was simply too expensive -- it had a run-time
- licence at the time. Galaxy was too all-encompassing for what we needed
- (just a GUI, no O/S service layer). Zinc has some peculiar C++ idioms and a
- steep learning curve (not as steep as Galaxy, I'd say). However, there were
- many, many problems with the Motif version of Zinc and I just heard that my
- old company has junked the project (and reverted to custom-building their
- Motif and Windows interfaces). Zinc admitted that their Motif port was very
- buggy and claimed that the forthcoming v5.x will be enough of a rewrite to
- solve this.
-
- I have since heard of similar problems with Zinc in a Windows environment
- (my old company never got as far as completing the Windows port to discover
- whether this is true or not).
-
- Sean A. Corfield
- Technical Director
- Object Consultancy Services
-
-
-
-
- +++++++++++++++++++++++++++
-
- >From gorasche@iicm.tu-graz.ac.at (Gerbert Orasche)
- Date: 17 Nov 1995 21:53:47 GMT
- Organization: IICM
-
- In article <baileyc-1411950945020001@beetle.com>, baileyc@beetle.com
- says...
- >
- >I am conducting an investigation into cross platform frameworks for my
- >company. We have an existing product that is cross platform (Mac &
- >Windows) using our own cross platform framework. We'd like to move to a
- >commercial product to attain more GUI features, not have to worry about
- >maintaining the framework ourselves, possibly pick up international
- >support and database connectivity, etc.
- I am cross-developing for Windows 3.x,95,NT,Mac, and PowerMac using
- Microsofts tools. I am now porting an VRML viewer to Mac, with the cross
- development toolkit for Macintosh. It works quite fine (full MFC support),
- but I do not now very much about performance yet.
-
- cu
- --
- Gerbert Orasche at Graz University Of Technology
- IICM (Institute for Information Processing and Computer Supported New
- Media)
- Inter-Net gorasche@iicm.tu-graz.ac.at
- orasche@flinux.tu-graz.ac.at
- Tel-Net ++43-316-873-5607
- http://hyperg.iicm.tu-graz.ac.at/TU-5060.Pers.gorasche
-
-
- +++++++++++++++++++++++++++
-
- >From bvk@chelsea.ios.com (Brett Kuehner)
- Date: Sat, 18 Nov 1995 04:24:55 GMT
- Organization: Internet Online Services
-
- On Tue, 14 Nov 1995 09:45:02 -0800, baileyc@beetle.com (Christopher R.
- Bailey) wrote:
-
- >I am conducting an investigation into cross platform frameworks for my
- >company.
-
- I did very much the same thing, around a year and a half ago. I looked
- at Zinc, Visix Galaxy, Neuron Data, zApp, and a half-dozen others
- (most of the ones on your list). The main contenders I saw were Galaxy
- and Neuron Data, mostly because they seemed to be well-designed, and
- not just a pile of C++ classes. They both also had some kind of
- scripting support. However, they were both very expensive (thousands
- of dollars per developer seat).
-
- I liked Galaxy quite a bit, and a demo that I saw of their interface
- builder leads me to believe their builder is (was a year ago, anyway)
- far superior to Neuron Data, supporting a nice visual layout mechanism
- of springs and struts, among other things. For their other stuff,
- Galaxy and Neuron Data both seemed to have their good and bad points.
- Neither had mature C++ support at the time, although this seems to
- have improved for both.
-
- My final decision was to get Neuron Data. This was based mainly on two
- factors:
- 1) Neuron Data was cheaper than Galaxy (by a thousand or two per seat,
- at least)
-
- 2) Most importantly, Neuron Data offered an evaluation copy that made
- it easy to see it it was suitable for my project. They were very easy
- to deal with (my salesperson, Jenny Leipziger, was very helpful. I
- recommend her if you want any questions answered), and they gave me
- eval copies for both Sun Sparc and PC/Windows without any hassle.
-
- Visix, on the other hand, would not give me a demo no matter how hard
- I tried. The best I could do was to get a set of manuals (C manuals,
- at that. They said the C++ manuals weren't ready yet). To check out
- the Galaxy features, Visix recommended taking a week-long course at
- their site in Virginia. This is hardly practical, not even considering
- the expense of travel and lodging, since trying to get away from work
- for a week just for an evaluation is kind of extreme (and impossible).
-
- Anyhow, Neuron Data worked out pretty well for the project that I was
- leading (real-time financial information display on 486/66 PC's
- running Windows 3.11). Tech support was pretty responsive, although
- they took a while to respond to some of the bugs. Graphics performance
- was good, once we figured out the way to optimize drawing.
- The event model ND uses is good, and made it easy to have an event
- architecture that would have been difficult to do in plain windows. It
- also did not seem to interfere with using Windows API calls intermixed
- in the code, so you can get at DDE and other functions which are (or
- were) not supported directly by ND.
- Neuron Data did not support some of the compilers that I wanted to use
- uner Windows, so check to see that support for your preferred compiler
- is available.
- The app also seemed to port to the Sparc OK, although I didn't see the
- completion of that effort.
-
- Overall, I was happy with the decision to use Neuron Data, although
- for certain types of projects I might choose something else. For
- example, I'm now doing Windows and NT development that does not have
- to be portable, and Borland's Delphi is a great environment for this.
-
-
- I left the company where I was using ND, so I'm not sure what the
- current state is. However, I have a friend at another company who was
- using Neuron Data, and abandoned it, as he needed support for a
- Windows 95 look-and-feel, and ND wasn't planning to provide one in the
- near-term. If this is important to you, I recommend quizzing them
- about delivery schedules (and taking them with a grain of salt, as
- they were late on the C++ support)
-
- Well, if you made it through all that, I also have a brief comment on
- Zinc and zApp. I thought they were both poorly structured (in C++
- class hierarchy terms), and that their interface builders were also
- terrible. They have probably improved some by now, though.
-
- If you have any questions, let me know.
-
- Brett
-
-
- --
- Brett Kuehner
- bvk@chelsea.ios.com
-
-
- +++++++++++++++++++++++++++
-
- >From adt@netcom.com (Anthony D. Tribelli)
- Date: Mon, 20 Nov 1995 18:25:59 GMT
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
-
- Gerbert Orasche (gorasche@iicm.tu-graz.ac.at) wrote:
- : I am cross-developing for Windows 3.x,95,NT,Mac, and PowerMac using
- : Microsofts tools...
- : ... It works quite fine (full MFC support),
- : but I do not now very much about performance yet.
-
- I recently used MSVC++ for Mac 2.0 (I haven't received 4.0 yet) to create
- a simple 3D molecular visualization program. As you say, MFC was
- supported very well. The rendering performance of my program was poor
- compared to our native Mac applications (built with Metrowerks
- CodeWarrior). By using conditional compilation I was able to get my
- program to run 2.5 TIMES FASTER. It now runs at a speed equivalent to our
- native Mac applications.
-
- The changes were relatively trivial. I replaced two Windows GDI calls with
- Apple QuickDraw calls: Ellipse and Polygon => PaintOval and PaintPoly. I
- also removed some unneccessary Windows GDI calls from Mac builds:
- CreatePen, CreateBrush, SelectObject.
-
- Tony
-
- --
- - ----------------
- Tony Tribelli
- adtribelli@acm.org
-
- +++++++++++++++++++++++++++
-
- >From jdowning@ccmail.gsfc.nasa.gov (John Downing)
- Date: Mon, 27 Nov 1995 09:34:09
- Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
-
- In article <adtDICtvB.D8G@netcom.com> adt@netcom.com (Anthony D. Tribelli) writes:
- >From: adt@netcom.com (Anthony D. Tribelli)
- >Subject: Re: Experience with Zinc/Galaxy/Neuron Data?
- >Date: Mon, 20 Nov 1995 18:25:59 GMT
-
- >Gerbert Orasche (gorasche@iicm.tu-graz.ac.at) wrote:
- >: I am cross-developing for Windows 3.x,95,NT,Mac, and PowerMac using
- >: Microsofts tools...
- >: ... It works quite fine (full MFC support),
- >: but I do not now very much about performance yet.
-
- >I recently used MSVC++ for Mac 2.0 (I haven't received 4.0 yet) to create
- >a simple 3D molecular visualization program. As you say, MFC was
- >supported very well. The rendering performance of my program was poor
- >compared to our native Mac applications (built with Metrowerks
- >CodeWarrior). By using conditional compilation I was able to get my
- >program to run 2.5 TIMES FASTER. It now runs at a speed equivalent to our
- >native Mac applications.
-
- >The changes were relatively trivial. I replaced two Windows GDI calls with
- >Apple QuickDraw calls: Ellipse and Polygon => PaintOval and PaintPoly. I
- >also removed some unneccessary Windows GDI calls from Mac builds:
- >CreatePen, CreateBrush, SelectObject.
-
- Doesn't this sort of defeat the purpose?
-
- ---------------------------
-
- >From quinlan@news.sfu.ca (Brian Quinlan)
- Subject: Floating menus sink my dialogs
- Date: 22 Nov 1995 20:09:35 GMT
- Organization: Simon Fraser University
-
- I just finished writting some code to handling floating windows. It works
- my using the low-level window manager routines. My problem is that
- the dialog manager seems to check to see if it is the front window during
- DialogSelect and IsDialogEvent. It occured to me that I could use two
- strategies to overcome this problem. First I could patch FrontWindow( ) and
- hope that that's what those routines use. Second I could fudge the window
- list just before calling those routines to make the dialog appear to be
- the front window. What should I do? Is there a third and more elegant
- technique?
-
- --
-
- Brian Quinlan
- quinlan@sfu.ca
-
- +++++++++++++++++++++++++++
-
- >From dejal@iconz.co.nz (David Sinclair)
- Date: 23 Nov 1995 20:16:10 GMT
- Organization: iconz, Auckland, New Zealand
-
- Brian Quinlan (quinlan@news.sfu.ca) wrote:
- : I just finished writting some code to handling floating windows. It works
- : my using the low-level window manager routines. My problem is that
- : the dialog manager seems to check to see if it is the front window during
- : DialogSelect and IsDialogEvent. It occured to me that I could use two
- : strategies to overcome this problem. First I could patch FrontWindow( ) and
- : hope that that's what those routines use. Second I could fudge the window
- : list just before calling those routines to make the dialog appear to be
- : the front window. What should I do? Is there a third and more elegant
- : technique?
-
- I was struggling with this very same issue just earlier this week,
- including discussing it with the author of the Infinity Windoid and others.
-
- My solution was to use the GhostWindow low-mem global: it prevents
- FrontWindow from returning a floating window as frontmost. It works, but
- the problem is that it only allows you to have one floating window.
- That's fine for me, but if you need more, I'd suggest fiddling with the
- window list (or rather, replace the WindowList low-mem global with the
- window you want to consider frontmost, then restore the old value
- afterwards. I haven't tried using this method, but it should work.
-
- Personally, I consider manipulating documented low-mem globals to be
- better than patching routines -- less likely to cause compatibility
- problems.
-
- Good luck! (And if you do find some better technique, please let me know.)
-
- David Sinclair
- Dejal Userware
-
- --
-
- |\ ._ . _ . Dejal Userware | dejal@pobox.com (preferred)
- | | |_ | |_| | PO Box 33-1011 | dejal@iconz.co.nz, dejal@amug.org
- |/ |_ \_| | | |_ Takapuna | dejal@netgate.co.nz (avail shortly)
- - --------------- Auckland 1309 | 100033.2435@compuserve.com
- U S E R W A R E New Zealand | ftp://ftp.amug.org/pub/contrib/dejal/
- - --------------- | http://pobox.com/~dejal/
-
- Author of SndConverter Pro, SndPlayer, QuickEncrypt, TextMerge, TextSplitter
- and other Shareware and Freeware products for the Macintosh.
-
- +++++++++++++++++++++++++++
-
- >From cameron_esfahani@powertalk.apple.com (Cameron Esfahani)
- Date: Thu, 23 Nov 1995 18:51:23 -0800
- Organization: Apple Computer, Inc.
-
- If I could make a suggestion. Why don't you consider using Dean Yu's
- Floating Window code. It doesn't patch anything or mess with any
- lowmems. It was introduced in Develop 15 in an article with sample code.
- The latest developer CD would have the latest and greatest version of the
- code. Most people that I know who do floating windows use this code.
-
- Cameron Esfahani
-
- +++++++++++++++++++++++++++
-
- >From dejal@iconz.co.nz (David Sinclair)
- Date: 24 Nov 1995 06:22:49 GMT
- Organization: iconz, Auckland, New Zealand
-
- Cameron Esfahani (cameron_esfahani@powertalk.apple.com) wrote:
- : If I could make a suggestion. Why don't you consider using Dean Yu's
- : Floating Window code. It doesn't patch anything or mess with any
- : lowmems. It was introduced in Develop 15 in an article with sample code.
- : The latest developer CD would have the latest and greatest version of the
- : code. Most people that I know who do floating windows use this code.
-
- Simple -- because it doesn't support modeless dialogs in the way I (and
- presumably the original poster) need. The program I'm working on (5Mb of
- source code!) uses modeless dialogs all over the place as normal windows
- (since it needs lots of entry fields, well suited to the Dialog Manager).
- The way the Develop 15 code works is to treat modeless dialogs as modal,
- and bring them up in front of the floating window(s), which is no good
- for me.
-
- The problem is that IsDialogEvent and DialogSelect both call FrontWindow
- internally, which breaks the Develop 15 code if a modeless dialog is to
- be treated as a normal window. Only by using ghostWindow or fiddling
- with the window list can that be avoided, unfortunately.
-
- Regards,
-
- David Sinclair
- Dejal Userware
-
- --
-
- |\ ._ . _ . Dejal Userware | dejal@pobox.com (preferred)
- | | |_ | |_| | PO Box 33-1011 | dejal@iconz.co.nz, dejal@amug.org
- |/ |_ \_| | | |_ Takapuna | dejal@netgate.co.nz (avail shortly)
- - --------------- Auckland 1309 | 100033.2435@compuserve.com
- U S E R W A R E New Zealand | ftp://ftp.amug.org/pub/contrib/dejal/
- - --------------- | http://pobox.com/~dejal/
-
- Author of SndConverter Pro, SndPlayer, QuickEncrypt, TextMerge, TextSplitter
- and other Shareware and Freeware products for the Macintosh.
-
-
- +++++++++++++++++++++++++++
-
- >From mouser@zercom.net (Martin-Gilles Lavoie)
- Date: Sat, 25 Nov 1995 10:17:13 -0500
- Organization: ZERCOM Technologies Inc.
-
- In article <49001v$29b@morgoth.sfu.ca>, quinlan@news.sfu.ca (Brian
- Quinlan) wrote:
-
- > I just finished writting some code to handling floating windows. It works
- > my using the low-level window manager routines. My problem is that
- > the dialog manager seems to check to see if it is the front window during
- > DialogSelect and IsDialogEvent. It occured to me that I could use two
- > strategies to overcome this problem. First I could patch FrontWindow( ) and
- > hope that that's what those routines use. Second I could fudge the window
- > list just before calling those routines to make the dialog appear to be
-
-
- > the front window. What should I do? Is there a third and more elegant
- > technique?
-
- Yes: rewrite the dialog manager.
-
- No kidding, it's essentially what I did. I was using the WindowsExtension.h/.c
- library as found and documented in Develop (and also available womewhere
- in ftp.apple.com, I think), but found that it didn't support dialog-based
- floaters, and that the Dialog Manager didn't support floaters. I reworked
- the WindowsExtensions lib to use a different "windowKind" variable
- ("myWindowKind", to be more exact and original..), and for that lib to use
- DialogRecords instead of WindowRecords (plain windows take a little more
- mem, but the tradeoff is acceptable). Then, I wrote "DialogSelect" and
- "IsDialogEvent" equivalents to replace the dialog manager. This is
- simple, and I beleive I have posted the code a while ago. (I then whent
- on to rewrite DrawDialog to support unlimited font/size/face/justification
- and a bunch other cool thing, like drag-and-drop, colored background in
- stat text, cursor management, etc).
-
- HEY APPLE! IF YOU WANT A NATIVE DIALOG MANAGER, I MOSTLY HAVE IT!!!!
-
- Just teasing.
-
- MGL
-
- Martin-Gilles Lavoie
- - -------------------------------------------------------------------
- No!...try not. Do, or do not. There is no try.
- --Yoda on error handling.
-
- Wars does not make one great.
- --Yoda on "Great Warrior"
-
- +++++++++++++++++++++++++++
-
- >From pottier@drakkar.ens.fr (Francois Pottier)
- Date: 26 Nov 1995 20:13:09 GMT
- Organization: Ecole Normale Superieure, Paris
-
- In article <mouser-2511951017130001@204.191.6.123>,
- Martin-Gilles Lavoie <mouser@zercom.net> wrote:
-
- >HEY APPLE! IF YOU WANT A NATIVE DIALOG MANAGER, I MOSTLY HAVE IT!!!!
-
- They don't - it's going away with Copland.
-
- Seriously though, you're right, bypassing the Dialog Manager is the
- right way. That's the way PowerPlant does floating windows, for
- instance. It never uses a single dialog.
-
-
-
- --
- Francois
- pottier@dmi.ens.fr
- http://www.eleves.ens.fr:8080/home/pottier/
-
- +++++++++++++++++++++++++++
-
- >From reed@medicine.wustl.edu (Thomas Reed)
- Date: Mon, 27 Nov 1995 11:14:29 -0600
- Organization: Washington University
-
- In article <49001v$29b@morgoth.sfu.ca>, quinlan@news.sfu.ca (Brian
- Quinlan) wrote:
-
- >I just finished writting some code to handling floating windows. It works
- >my using the low-level window manager routines. My problem is that
- >the dialog manager seems to check to see if it is the front window during
- >DialogSelect and IsDialogEvent.
-
- I've heard many people say they've had this problem -- I don't know what
- the cause is, but my floating windows work perfectly and don't have this
- problem. Get hold of a copy of Matt Slot's appe Windows code. That's
- what my floaters are based on, and it's very easy to reuse.
-
- -Thomas
-
- =====================================================
- Thomas Reed Washington University
- reed@visar.wustl.edu Medical School
- reed@medicine.wustl.edu Saint Louis, MO
- http://medinfo.wustl.edu/~reed
- - ---------------------------------------------------
- Clothes make the man. Naked people have little or no
- influence on society. -- Mark Twain
- =====================================================
-
- Opinions posted are not the opinions of Wash. U.
-
- ---------------------------
-
- >From julian@cs.auckland.ac.nz (Julian Harris)
- Subject: GetAppFiles - link error?
- Date: Thu, 23 Nov 1995 23:51:36 +0100
- Organization: Computer Science, The University of Auckland
-
- Hi all.
-
- I'm compiling this rather old source that has references to _GetAppFiles_
- and _CountAppFiles_.
-
- I want this program to work under System 6 _and_ PowerMac so does anyone
- know where these traps have disappeared to?
-
- TIA.
-
- --
- . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Microsoft is not the answer. > Julian Harris, Programmer >
- Microsoft is the question. > Comp. Sci. Dept. x8915 >
- > The University of Auckland >
- NO is the answer. > julian@cs.auckland.ac.nz >
-
- +++++++++++++++++++++++++++
-
- >From plau@twirl.io.org (Peter S. Lau)
- Date: 23 Nov 1995 15:34:06 GMT
- Organization: Internex Online, Toronto, Ontario, Canada (416 363 3783)
-
- In article <julian-2311952351360001@julian.cs.auckland.ac.nz> julian@cs.auckland.ac.nz (Julian Harris) writes:
-
- >I'm compiling this rather old source that has references to _GetAppFiles_
- >and _CountAppFiles_.
- >
- >I want this program to work under System 6 _and_ PowerMac so does anyone
- >know where these traps have disappeared to?
-
- A quick solution is to open SegLoad.h and copy those funtion
- declarations into your file where GetAppFiles() resides... if you look
- at SegLoad.h, it's excluded when compiling ppc...
-
- Not sure what will happen in the future...
-
- pete
-
-
- +++++++++++++++++++++++++++
-
- >From jwbaxter@olympus.net (John W. Baxter)
- Date: Thu, 23 Nov 1995 13:13:48 -0800
- Organization: Townsend Communications
-
- In article <julian-2311952351360001@julian.cs.auckland.ac.nz>,
- julian@cs.auckland.ac.nz (Julian Harris) wrote:
-
- > Hi all.
- >
- > I'm compiling this rather old source that has references to _GetAppFiles_
- > and _CountAppFiles_.
- >
- > I want this program to work under System 6 _and_ PowerMac so does anyone
- > know where these traps have disappeared to?
-
- It's time to redo the app to support the "required events". Copy the
- source out of Inside Mac: IAC. Or any modern sample app.
-
- --John
-
- --
- "This item is not available because it cannot be removed."
- John W. Baxter Port Ludlow, WA jwbaxter@olympus.net
-
- +++++++++++++++++++++++++++
-
- >From pottier@goelette.ens.fr (Francois Pottier)
- Date: 24 Nov 1995 14:08:34 GMT
- Organization: Ecole Normale Superieure, Paris
-
- In article <julian-2311952351360001@julian.cs.auckland.ac.nz>,
-
- >I want this program to work under System 6 _and_ PowerMac so does anyone
- >know where these traps have disappeared to?
-
- To the bit bucket. These calls *do not exist* on Power Macs.
-
- --
- Francois
- pottier@dmi.ens.fr
- http://www.eleves.ens.fr:8080/home/pottier/
-
- +++++++++++++++++++++++++++
-
- >From phixus@deltanet.com (Chris De Salvo)
- Date: Mon, 27 Nov 1995 03:00:40 -0800
- Organization: MacPlay
-
- In article <julian-2311952351360001@julian.cs.auckland.ac.nz>,
- julian@cs.auckland.ac.nz (Julian Harris) wrote:
-
- >I'm compiling this rather old source that has references to _GetAppFiles_
- >and _CountAppFiles_.
- >
- >I want this program to work under System 6 _and_ PowerMac so does anyone
- >know where these traps have disappeared to?
-
- That mechanism does not exist under the PowerPC version of the system
- software. You'll need to install AppleEvent handlers for the 'odoc' (open
- document) event.
-
- Do you really NEED to support System 6? Not many copiesof that still in use.
-
- L8R
- Chris
-
- --
- phixus@deltanet.com | Macintosh: Changing the world,
- Chris De Salvo | one person at a time!
- Professional Mac Geek | -----------------------------
- for MacPlay, Inc. | (I wish they'd hurry up!)
-
- http://www.deltanet.com/users/phixus
-
- ---------------------------
-
- >From Anders.Wahlin@hum.gu.se (Anders Wahlin)
- Subject: How to get a folder's volume information!
- Date: Tue, 21 Nov 1995 14:32:06 GMT
- Organization: Hum Fak:s Dataservice
-
- In my program I let the user select a folder (using CustomGetFolder). Then
- the program will get the FSSpec of that folder and then it will store it
- in an 'alis'-resource. Now, if that folder is located on an AppleShare
- volume, the user has to enter his/hers user name and password to have
- access to it the next time.
-
- I know how most of this is done except for:
-
- * How can I determine a volume's zoneName and serverName from a folder's FSSpec
- * How do I know that the selected folder (FSSpec) is located on an
- AppleShare volume.
-
- I'd really appreciate all kind of help!
-
- Many thanks
-
- --
- Anders Wahlin
- Anders.Wahlin@hum.gu.se
-
- +++++++++++++++++++++++++++
-
- >From mclow@mailhost2.csusm.edu (Marshall Clow)
- Date: Thu, 23 Nov 1995 00:55:49 -0800
- Organization: Aladdin Systems
-
- In article <Anders.Wahlin-2111951632060001@bigmac.hum.gu.se>,
- Anders.Wahlin@hum.gu.se (Anders Wahlin) wrote:
-
- >In my program I let the user select a folder (using CustomGetFolder). Then
- >the program will get the FSSpec of that folder and then it will store it
- >in an 'alis'-resource. Now, if that folder is located on an AppleShare
- >volume, the user has to enter his/hers user name and password to have
- >access to it the next time.
- >
- >I know how most of this is done except for:
- >
- >* How can I determine a volume's zoneName and serverName from a folder's FSSpec
- >
- Call PBHGetVolMountInfo.
-
- >* How do I know that the selected folder (FSSpec) is located on an
- >AppleShare volume.
- >
- Telling if a drive is local or remote is easy; call PBHGetVolParms and
- check to see if buffer.vMServerAdr != 0.
-
- BTW, use the vRefNum in the FSSpec to refer to the correct volume.
-
- --
- Marshall Clow
- Aladdin Systems
-
- "They that can give up essential liberty to obtain a little temporary
- safety deserve neither liberty nor safety." -- Benjamin Franklin
- _Historical Review of Pennsylvania_, 1759
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 23 Nov 1995 06:05:09 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- Anders Wahlin wrote:
- >In my program I let the user select a folder (using
- >CustomGetFolder). Then the program will get the FSSpec of that
- >folder and then it will store it in an 'alis'-resource. Now, if
- >that folder is located on an AppleShare volume, the user has to
- >enter his/hers user name and password to have access to it the
- >next time.
- >
- >I know how most of this is done except for:
- >
- >* How can I determine a volume's zoneName and serverName from a
- >folder's FSSpec * How do I know that the selected folder
- >(FSSpec) is located on an AppleShare volume.
- >
- >I'd really appreciate all kind of help!
-
- You seem to be a little confused...
-
- Let's say you get an FSSpec to a folder from your CustomGetFolder routine.
- If you want to store that location for later use, you should create an
- alias to the folder by passing the FSSpec to NewAlias. NewAlias will
- create an AliasHandle that contains the alias record. The alias record
- contains everything needed to find that folder later. You can then add the
- AliasHandle to a resource file as an 'alis' resource.
-
- Later, when you need to find the folder, get the 'alis' resource and pass
- that resource handle to ResolveAlias. ResolveAlias (if successful) will
- return an FSSpec to the folder and it needed, will take care of any user
- interface needed to mount the volume the folder is on.
-
- Going back to your question:
- >* How can I determine a volume's zoneName and serverName from a
- >folder's FSSpec * How do I know that the selected folder
- >(FSSpec) is located on an AppleShare volume.
-
- You can get that information the same way the Alias Manager gets it - call
- PBGetVolMountInfoSize and PBGetVolMountInfo. If PBGetVolMountInfoSize and
- PBGetVolMountInfo return paramErr (-50), it means that the volume doesn't
- support those calls. If they return noErr (0), it might be an AppleShare
- volume. You can check the media field of the VolMountInfo record returned
- by PBGetVolMountInfo to get the type of volume - 'afpm' is what you'll get
- for AppleShare volumes.
-
- - Jim Luther
-
- ---------------------------
-
- >From jmaling@ozemail.com.au (John Maling)
- Subject: Random number seed dreaming.
- Date: 12 Nov 1995 19:48:55 GMT
- Organization: Zip Nada and Zero
-
- OK, this must be a weird one, it came to me in a dream. I know that the
- random number generator is pseudo-random, that if you initilise it with
- the same number you get the same result sequence. So, could this be used
- to play back an identical sequence of pseudo-random events inside a game
- reguardless of the individual Mac the game runs on? Or does the random
- number generator on each Mac produce different values even if the seed is
- the same?
-
- I need to create a record of complex game events to be sent to certain
- players, events which are themselves independant of player input. So if
- the ramdom seed produced the same result on every Mac then I would only
- need to pass the seed, and use it to reproduce the event sequence, rather
- than send the entire event sequence.
-
- From: jmaling@ozemail.com.au
-
- +++++++++++++++++++++++++++
-
- >From jmunkki@beta.hut.fi (Juri Munkki)
- Date: 13 Nov 1995 03:28:25 GMT
- Organization: Helsinki University of Technology
-
- In article <jmaling-1311950652250001@slwol1p24.ozemail.com.au> jmaling@ozemail.com.au (John Maling) writes:
- >OK, this must be a weird one, it came to me in a dream. I know that the
- >random number generator is pseudo-random, that if you initilise it with
- >the same number you get the same result sequence. So, could this be used
- >to play back an identical sequence of pseudo-random events inside a game
- >reguardless of the individual Mac the game runs on? Or does the random
- >number generator on each Mac produce different values even if the seed is
- >the same?
-
- I think all Macs use the same algorithm for Random, but you shouldn't
- trust in this. If you need a repeatable set of pseudorandom numbers,
- you should use your own version of Random.
-
- Books on computer algorithms usually have a chapter on pseudorandom
- number generation.
-
- >I need to create a record of complex game events to be sent to certain
- >players, events which are themselves independant of player input. So if
- >the ramdom seed produced the same result on every Mac then I would only
- >need to pass the seed, and use it to reproduce the event sequence, rather
- >than send the entire event sequence.
-
- Arashi uses two random generators: one is used for visual effects and
- stuff that doesn't affect the game engine. The other one is used for
- internal stuff. It plays back saved games when it is idle. The saved
- games consist of the random seed and only a few bits of information per
- frame: movement and shoot+zap flags. This means that it takes only 20
- bytes/second (or 72 KB/hour) to save games.
-
- Marathon saves films this way, but I don't know how much randomness they
- have in the game. In many cases random numbers are not necessary in games,
- because player actions are different enough every time, so they could
- actually probably write the whole game without using a single random number...
-
- --
- Juri Munkki jmunkki@iki.fi There ain't no such thing as a shareware lunch.
- http://www.iki.fi/~jmunkki Windsurfing: Faster than the wind.
-
- +++++++++++++++++++++++++++
-
- >From dwareing@adelaide.on.net (David Wareing)
- Date: Tue, 21 Nov 1995 14:18:31 +1100
- Organization: Weyland Yutani
-
- In article <jmaling-1311950652250001@slwol1p24.ozemail.com.au>,
- jmaling@ozemail.com.au (John Maling) wrote:
-
- >OK, this must be a weird one, it came to me in a dream. I know that the
- >random number generator is pseudo-random, that if you initilise it with
- >the same number you get the same result sequence. So, could this be used
- >to play back an identical sequence of pseudo-random events inside a game
- >reguardless of the individual Mac the game runs on? Or does the random
- >number generator on each Mac produce different values even if the seed is
- >the same?
-
- I'd think that it would produce the same value on any Mac, but I guess it
- would depend upon whether _Random has changed between System releases
- and whether or not the PPC version is different from the 68K code.
-
- As Juri Munkki pointed out recently, it'd be safer to write your own
- Random function and use that for all seeding. Do a search through the
- csmp digests for dozens of articles on rolling your own Random function.
-
- --
- David Wareing dwareing@adelaide.on.net
- Belair, South Australia http://www.AmbrosiaSW.com/~dwareing/
- Macintosh Games & Multimedia Programming
-
-
- +++++++++++++++++++++++++++
-
- >From pottier@goelette.ens.fr (Francois Pottier)
- Date: 24 Nov 1995 13:31:47 GMT
- Organization: Ecole Normale Superieure, Paris
-
- In article <dwareing-2111951418310001@ppp132.adelaide.on.net.au>,
- David Wareing <dwareing@adelaide.on.net> wrote:
-
- >I'd think that it would produce the same value on any Mac, but I guess it
- >would depend upon whether _Random has changed between System releases
- >and whether or not the PPC version is different from the 68K code.
-
- This has been discussed before, and someone from Apple said that they
- were tempted to change the algorithm when rewriting Random() for
- PowerPC, but they didn't because some applications relied on it. So I
- guess it would be safe to assume it will never change. Look in the
- digests for this thread.
-
-
- --
- Francois
- pottier@dmi.ens.fr
- http://www.eleves.ens.fr:8080/home/pottier/
-
- ---------------------------
-
- >From gordon@micron.net (Gordon Henriksen)
- Subject: SAT 2.3.5 is out!
- Date: 22 Nov 1995 03:14:23 GMT
- Organization: Micron Internet Services
-
- Doesn't the subject say it all?
-
- ftp://mirrors.aol.com/pub/info-mac/rec/sprite-anim-kit-235.hqx
-
- TTFN,
- Gordon Henriksen
- gordon@micron.net
- _________________________________
- Q: Where do you want to go today?
- A: Anywhere but Chicago!
- __________________________________________________________________
- Microsoft Network is prohibited from redistributing this work in
- any form, in whole or in part. Copyright, Gordon Henriksen, 1995.
- License to distribute this post is available to Microsoft for $150.
- Posting without permission constitutes an agreement to these terms.
- Please send notices of violation to gordon@micron.net and
- Postmaster@microsoft.com
-
- +++++++++++++++++++++++++++
-
- >From ingemar@lysator.liu.se (Ingemar Ragnemalm)
- Date: 24 Nov 1995 17:01:09 GMT
- Organization: (none)
-
- gordon@micron.net (Gordon Henriksen) writes:
-
- >Doesn't the subject say it all?
-
- >ftp://mirrors.aol.com/pub/info-mac/rec/sprite-anim-kit-235.hqx
-
- Thanks! :-) It is strange - my announcements seem not to have shown up yet.
-
- There is a little more to say, like that this is the first version that I
- have successfully used with the PPC version of SC++ (though I would recommend
- some other compiler to anyone with less than 20-30 megs of RAM). Also, it
- comes in two parts nowadays. The demo programs are in a separate archive.
-
- There is a bug fix coming up too, as mentioned in another thread.
- It is already available at Lysator (ftp.lysator.liu.se) and should show
- up at Info-Mac and Umich very soon.
-
- --
- - -
- Ingemar Ragnemalm, PhD
- Image processing, Mac shareware games
- E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
-
- ---------------------------
-
- >From 1goertz@informatik.uni-hamburg.de (Thorsten Goertz)
- Subject: Where to store the sprite-graphics?
- Date: 20 Nov 1995 15:32:45 GMT
- Organization: University of Hamburg -- Germany
-
- I'm currently writing a program that has to display some
- large picts in 256 colors and animates some smaller picts
- as sprites on the screen.
- The picts are stored in the resource-fork. Reading and
- copying them to an offscreen-GWorld is very slow!
- What is the preffered way for storing and reading the
- graphics without waiting 10-15 seconds (at least on
- my LC475) before the animation starts?
-
- +++++++++++++++++++++++++++
-
- >From chrisman@ucdmath.ucdavis.edu (Mark Chrisman)
- Date: Mon, 20 Nov 1995 17:03:30 -0800
- Organization: Inreach's InterNetNews Site
-
- In article <48q72t$mcn@rzsun02.rrz.uni-hamburg.de>,
- 1goertz@informatik.uni-hamburg.de (Thorsten Goertz) wrote:
-
- |I'm currently writing a program that has to display some
- |large picts in 256 colors and animates some smaller picts
- |as sprites on the screen.
- |The picts are stored in the resource-fork. Reading and
- |copying them to an offscreen-GWorld is very slow!
- |What is the preffered way for storing and reading the
- |graphics without waiting 10-15 seconds (at least on
- |my LC475) before the animation starts?
-
- One thing to remember (and this goes for all programs, not just games) is
- that it doesn't have to *be* fast. It just has to *seem* fast. There are
- several ways to increase the apparent speed of your startup (even if you
- can't figure out how to increase the actual speed).
-
- 1. Display some nice graphics. Look at Arashi. The opening graphics are
- so cool that the user doesn't mind watching. While the graphics are being
- displayed---as long as they're not too processor intensive---you can do
- your initialization (load sprites & sounds, etc.).
-
- 2. Display a progress bar. This does a lot to alleviate user
- frustration. The user knows that the time isn't being wasted, that some
- necessary startup stuff is being done, and has some idea how long it's
- going to take. (Can you imaging waiting for Maelstrom to start, if it
- didn't have a progress bar?)
-
- 3. Use menu bars and dialog boxes. Many games start up as normal
- Macintosh applications. The user has to select "New Game" from the menu
- or from a dialog box to start the game. Don't waste this time! You can
- be loading graphics while waiting for menu or mouse events. (If the user
- selects "New Game" before you're done loading---well, at least you got
- *some* of it done.)
-
- 4. Use between-level screens. ("Prepare for level 1".) While the user
- is preparing for level 1, you can also be preparing! This is also a good
- time to generate a bunch of random numbers in advance, or make other
- necessary calculations.
-
- --
- Mark Chrisman
- chrisman@ucdmath.ucdavis.edu
-
- +++++++++++++++++++++++++++
-
- >From first.ascent@mindlink.bc.ca (Alex Curylo)
- Date: 21 Nov 1995 02:53:01 GMT
- Organization: First Ascent
-
- In article <48q72t$mcn@rzsun02.rrz.uni-hamburg.de>
- 1goertz@informatik.uni-hamburg.de (Thorsten Goertz) writes:
-
- > The picts are stored in the resource-fork. Reading and
- > copying them to an offscreen-GWorld is very slow!
-
- I hear you, brother. This adventure game I'm doing has the neighborhood
- of 300 animation frames in some rooms. PICTs and GWorlds start to
- become inconvenient in that neighborhood :)
-
- > What is the preffered way for storing and reading the
- > graphics without waiting 10-15 seconds (at least on
- > my LC475) before the animation starts?
-
- Encoding all the sprites for a room into a big data file as per the
- scheme outlined in _Tricks of the Mac Game Programming Gurus_ is
- working well enough for me. You read all the data in one big lump, a
- nice bonus if you happen to be playing off CD-ROM, and you just find
- the offset of each sprite instead of going through that setting up the
- GWorld stuff. Very convenient. Easier on the Memory Manager too ;)
-
- Now, if someone would just post some optimized flipping and scaling
- code for that encoder...
-
-
- Alex Curylo first.ascent@mindlink.bc.ca (604)451-5323, fax -1359
- *** First Ascent: Mac programming, UP paragliders, indie CDs ***
-
- +++++++++++++++++++++++++++
-
- >From jmunkki@beta.hut.fi (Juri Munkki)
- Date: 22 Nov 1995 04:37:10 GMT
- Organization: Helsinki University of Technology
-
- In article <chrisman-2011951703300001@ppp036.inreach.com> chrisman@ucdmath.ucdavis.edu (Mark Chrisman) writes:
- >1. Display some nice graphics. Look at Arashi. The opening graphics are
- >so cool that the user doesn't mind watching. While the graphics are being
- >displayed---as long as they're not too processor intensive---you can do
- >your initialization (load sprites & sounds, etc.).
-
- You must be talking about another game... Arashi doesn't really load much
- more than the sounds and it doesn't display anything while it's doing that.
- By the time the idle animations are running, everything has already been
- loaded. Maybe you were thinking of Apeiron or Maelstrom.
-
- --
- Juri Munkki jmunkki@iki.fi In cyberspace everyone can hear you scream.
- http://www.iki.fi/~jmunkki Windsurfing: Faster than the wind.
-
- +++++++++++++++++++++++++++
-
- >From ingemar@lysator.liu.se (Ingemar Ragnemalm)
- Date: 24 Nov 1995 16:54:44 GMT
- Organization: (none)
-
- 1goertz@informatik.uni-hamburg.de (Thorsten Goertz) writes:
-
- >I'm currently writing a program that has to display some
- >large picts in 256 colors and animates some smaller picts
- >as sprites on the screen.
- >The picts are stored in the resource-fork. Reading and
- >copying them to an offscreen-GWorld is very slow!
- >What is the preffered way for storing and reading the
- >graphics without waiting 10-15 seconds (at least on
- >my LC475) before the animation starts?
-
- Drawing pictures isn't very fast. If you only run in 256 colors and with
- a specific color table, you can store the graphics as the pixel maps.
-
- --
- - -
- Ingemar Ragnemalm, PhD
- Image processing, Mac shareware games
- E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
-
- +++++++++++++++++++++++++++
-
- >From keeneybo@aol.com (KeeneyBo)
- Date: 26 Nov 1995 20:32:42 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- 1goertz@informatik.uni-hamburg.de (Thorsten Goertz) writes:
-
- >I'm currently writing a program that has to display some
- >large picts in 256 colors and animates some smaller picts
- >as sprites on the screen.
- >The picts are stored in the resource-fork. Reading and
- >copying them to an offscreen-GWorld is very slow!
- >What is the preffered way for storing and reading the
- >graphics without waiting 10-15 seconds (at least on
- >my LC475) before the animation starts?
-
- Most games read pics and sprites into memory when the game is first
- started up while the user is settling down to play the game. In the many
- games I've played over the years this method is common and not too
- annoying. Who cares if I have to wait 30 seconds for the game to
- initialize? As long as you don't continually dispose and reload the pics
- I don't think you'll have a problem.
-
- KeeneyBo@aol.com
-
- ---------------------------
-
- >From mtrent@msn.fullfeed.com (Michael Trent)
- Subject: [Q] Color-Picker Popup Menu?
- Date: Fri, 17 Nov 1995 00:02:31 -0500
- Organization: FullFeed Madison (newsmaster@msn.fullfeed.com)
-
- Here's a question I've been stewing over for some time:
-
- I want to make a popup menu similar to the color pickers one finds in any
- program w/ graphic capabilities. You know what I mean: Go to ResEdit (for
- example), Edit a cicn, click on the color rectangles on the left side of
- the edit window, and presto! a cool color menu appears from which you can
- pick what color you want to plot.
-
- Ok. I understand the MDEF. Not a problem. Actually, it was kind of fun!
-
- The first problem is: I don't want a text title for my popup menu. I want
- a framed rectangle containing the color selected from the menu. The second
- problem is, I don't know how to do that.
-
- I suppose I could fake it: just draw a rectangle and fill it with the
- desired color. But then how would I get the menu to appear? Should the
- popup be sitting near-by with a title width of 0? So many people implement
- this thing, there has to be a "right way" to do it. Even so, I haven't
- found any code examples to help me out.
-
- I'd appreciate a hand in figuring this out. Thanks in advance!
-
- M Trent
-
- --
- >>SIG UNDER CONSTRUCTION<<
-
- +++++++++++++++++++++++++++
-
- >From rajadhyaksha.2@osu.edu (Ram Rajadhyaksha)
- Date: Fri, 17 Nov 1995 12:39:12 -0500
- Organization: The Ohio State University
-
- In article <mtrent-1711950002310001@azathoth.msn.fullfeed.com>,
- mtrent@msn.fullfeed.com (Michael Trent) wrote:
-
- > I suppose I could fake it: just draw a rectangle and fill it with the
- > desired color. But then how would I get the menu to appear? Should the
- > popup be sitting near-by with a title width of 0? So many people implement
- > this thing, there has to be a "right way" to do it. Even so, I haven't
- > found any code examples to help me out.
-
- Um, I haven't written an MDEF yet so I have limited knowledge about this
- but, couldn't you just call PopUpMenuSelect? Draw the color box yourself
- and call that trap when you have a mousedown in the area. It's the "old"
- way of doing a pop-up menu and I think it's described in IM V.
-
- I also think Apple distributes a sample source of this...
-
- -Ram
-
- +++++++++++++++++++++++++++
-
- >From passenger@cybercom.net (Somebody Else)
- Date: 18 Nov 1995 00:23:24 GMT
- Organization: CYBERCOM Internet Services (617) 396-0491
-
- In article <mtrent-1711950002310001@azathoth.msn.fullfeed.com>,
- mtrent@msn.fullfeed.com (Michael Trent) wrote:
-
- > Here's a question I've been stewing over for some time:
- >
- > I want to make a popup menu similar to the color pickers one finds in any
- > program w/ graphic capabilities. You know what I mean: Go to ResEdit (for
- > example), Edit a cicn, click on the color rectangles on the left side of
- > the edit window, and presto! a cool color menu appears from which you can
- > pick what color you want to plot.
- >
- > Ok. I understand the MDEF. Not a problem. Actually, it was kind of fun!
- >
- > The first problem is: I don't want a text title for my popup menu. I want
- > a framed rectangle containing the color selected from the menu. The second
- > problem is, I don't know how to do that.
- >
- > I suppose I could fake it: just draw a rectangle and fill it with the
- > desired color. But then how would I get the menu to appear? Should the
- > popup be sitting near-by with a title width of 0? So many people implement
- > this thing, there has to be a "right way" to do it. Even so, I haven't
- > found any code examples to help me out.
-
- I think what you want is to create a "fake" static menu item (the current
- menu selection) , and then have your menu popup, right? I think at the
- moment you're using a popup menu cdef, and you have the attributes set
- so that you have the attached label, right? Instead you should forgo the
- popup menu control, and do it the "old" way, before the cdef was released.
-
- This is actually a common thing, except for the custom mdef. What you do is use
- PopupMenuSelect(). There's no control or cdef involved.
-
- For the static menu, you draw whatever you want the regular way,
- the current color in a box, and a little downward-pointing triangle, or
- whatever.
- Then when you get a click in the menu's rect, you call PopupMenuSelect()
- with your menu , and it operates just like the popup control would. The trap
- will tell you what item the user selected (if any), and then it goes away. You
- then take the new color, and redraw the static menu that way.
- --
- Uh…okay.
-
- +++++++++++++++++++++++++++
-
- >From jordanz@altura.com (Jordan Zimmerman)
- Date: Fri, 17 Nov 1995 18:46:13 -0900
- Organization: Altura Software, Inc.
-
- In article <rajadhyaksha.2-1711951239120001@slip2-52.acs.ohio-state.edu>,
- rajadhyaksha.2@osu.edu (Ram Rajadhyaksha) wrote:
-
- > In article <mtrent-1711950002310001@azathoth.msn.fullfeed.com>,
- > mtrent@msn.fullfeed.com (Michael Trent) wrote:
- >
- > > I suppose I could fake it: just draw a rectangle and fill it with the
- > > desired color. But then how would I get the menu to appear? Should the
- > > popup be sitting near-by with a title width of 0? So many people implement
- > > this thing, there has to be a "right way" to do it. Even so, I haven't
- > > found any code examples to help me out.
- >
- > Um, I haven't written an MDEF yet so I have limited knowledge about this
- > but, couldn't you just call PopUpMenuSelect? Draw the color box yourself
- > and call that trap when you have a mousedown in the area. It's the "old"
- > way of doing a pop-up menu and I think it's described in IM V.
- >
- > I also think Apple distributes a sample source of this...
- >
- > -Ram
-
- I've written a color picker MDEF. It's on AOL, alt.mac.sources, etc.
-
- --
- Jordan Zimmerman, Altura Software
- home page: http://www.altura.com/jordanz
- Spock's Beard: http://www.altura.com/spocks_beard
-
- +++++++++++++++++++++++++++
-
- >From kenlong@netcom.com (Ken Long)
- Date: Sat, 18 Nov 1995 08:29:56 GMT
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
-
- Michael Trent (mtrent@msn.fullfeed.com) wrote:
-
- : I want to make a popup menu similar to the color pickers one finds in any
- : program w/ graphic capabilities. You know what I mean: Go to ResEdit (for
- : example), Edit a cicn, click on the color rectangles on the left side of
- : the edit window, and presto! a cool color menu appears from which you can
- : pick what color you want to plot.
-
- You've asked about this before, haven't you?
-
- I have worked on a duplicate of that ResEdit doo-dadd, but I keep getting
- side tracked, so it's not done.
-
- : The first problem is: I don't want a text title for my popup menu. I want
- : a framed rectangle containing the color selected from the menu. The second
- : problem is, I don't know how to do that.
-
- There was some old code that made a pie chart, called "PopPieSelect" or
- some such (B/W) that could help with that. My floppy drive is down, so
- maybe someone else that has it could send it to you.
-
- : I suppose I could fake it: just draw a rectangle and fill it with the
- : desired color. But then how would I get the menu to appear? Should the
- : popup be sitting near-by with a title width of 0? So many people implement
- : this thing, there has to be a "right way" to do it. Even so, I haven't
- : found any code examples to help me out.
-
- You need to get up close and personal with the Tear-Off stuff (straight C
- source, buried in the Think Class Lib folder), because that's what the
- thing in ResEdit is.
-
- It must work off PtInRect, which then draws the palette off that. But
- then the tear-off stuff takes over if your mouse strays too far while
- StillDown.
-
- The DTS.Draw source has a tear-off picture menu (so does Pictoid).
-
- Maybe the rectangle that triggers the palette in ResEdit is a Rgn,
- because the background one is partially obscured by the forecround one?
-
- At any rate, whether you use an MDEF or not, the PtInXxxx is what it is
- oriented to initially.
-
- That palette is drawn too quick to be a grid of colors, yet there is no
- 'PICT' resource in ResEdit (that I've seen) representing it. But a
- 'PICT' would work.
-
- If you tear it off, you drag a dotted ghost until you let up. Then the
- palette becomes a floater and in the same place.
-
- There must be some pictire or rectangle popup source around, which would
- operate similarly, to start off with.
-
- A fixed floater, as in Color It, would be easier, since you wouln't have
- to pop it up.
-
- If the source Jordan Zimmerman mentioned is one I have, it is excellent,
- and may give great insight as to how to duplicate the ResEdit thing.
-
- Personally, I think Apple should release the source for ResEdit. What
- harm could it do? The program is free - why not the source?
-
- -Ken-
-
- +++++++++++++++++++++++++++
-
- >From Dave Overton <doverton@iglou.com>
- Date: Sat, 18 Nov 1995 14:12:31 GMT
- Organization: DataStream Imaging Systems, Inc.
-
- Michael,
- I'd say the easy way to do it is to use old style PopUps- not the control
- system 7 kind.
- That way, you can draw your own popup title.
- Dave Overton
-
- +++++++++++++++++++++++++++
-
- >From D.A.G.Gillies@bradford.ac.uk (Dave the Rave)
- Date: Wed, 22 Nov 1995 16:36:26 GMT
- Organization: Unseen University, Ankh-Morpork
-
- In article <DI8ssv.GML@iglou.com> Dave Overton <doverton@iglou.com> writes:
- >Michael,
- >I'd say the easy way to do it is to use old style PopUps- not the control
- >system 7 kind.
- >That way, you can draw your own popup title.
- >Dave Overton
-
- That's right. The easiest way to do this (the only way as far as I can tell)
- in ordinary Toolbox mode is to write your own MDEF, create a menu with
- this MDEF ID, and pass the menu to PopupMenuSelect.
-
- There is a set of classes in the Think Class Library that handles floating
- windows and tearoffs, and another for handling arbitrary pop-up menus.
- Check it out.
-
- ______________________________________________________
- @-|~ (Scientist formerly known as David A. G. Gillies)
- (email: daggilli@bradford.ac.uk)
- You are in a maze of kinky little fetishes, all alike
- (c) 1995 Wittgenstein's Amazing Underwater Supermarket
- _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
-
-
- ---------------------------
-
- >From grayowl1@aol.com (GrayOwl1)
- Subject: [Q] How to hit-test a PICT?
- Date: 27 Nov 1995 18:51:03 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- Does anyone know how to check whether a given point is "inside" a PICT
- (the PICT having been obtained from a PICT resource)? By inside, I mean
- not just inside the picFrame, but inside the outline of whatever the
- picture contains.
-
- I know how to do this with a bitmap--get the mask of the bitmap and test
- whether the pixel corresponding to the point is 1--but I can't figure out
- how to do this with a PICT, without drawing the PICT into an offscreen
- bitmap, converting it to a bitmap, etc.
-
- Any ideas? Please e-mail to GrayOwl1@aol.com as well as this newsgroup.
- Thanks in advance,
-
- Regards,
-
- Vinay Prabhakar
- Gray Owl Software
- - ---------------------------------------------------
- "remember my name, I'll be famous someday"- anonymous
- - ---------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- >From starlabs@aol.com (StarLabs)
- Date: 27 Nov 1995 22:37:35 -0500
- Organization: America Online, Inc. (1-800-827-6364)
-
- >>
- Does anyone know how to check whether a given point is "inside" a PICT
- (the PICT having been obtained from a PICT resource)? By inside, I mean
- not just inside the picFrame, but inside the outline of whatever the
- picture contains.
- >>
-
- One method I use is to create a region mask of the pict and save it as
- a resource. When running your application, you could then load it when
- needed, move it to the appropriate location, and use PtInRgn.
-
- There's the extra effort in creating the region mask beforehand and
- saving it as a resource - but I think this is better than drawing the
- PICT offscreen and checking the corresponding pixel. It's just a matter
- of technique preference in the end. A while back I wrote a utility
- just to do what I mentioned: convert a PICT (preferably B&W) to a
- region and save it as a resource. Email me if you're interested...
-
-
- --Hiep
-
- ---------------------------
-
- >From jianhe@parker.EECS.Berkeley.EDU (JIAN HE)
- Subject: multi-player keyboard control
- Date: 25 Nov 1995 20:21:10 GMT
- Organization: University of California, Berkeley
-
-
- I want to know to write a multi-player keyboard control game. Right now I
- have a maze game for one player. I try to add another player to the game but
- there is a problem getting the keyboard events. I am using keyDown
- + autoKeyMask for movement. When one player is holding down a key, the other
- one can't move his character. How can I solve that problem?
-
- Jian
-
- +++++++++++++++++++++++++++
-
- >From thebug@berlin.snafu.de (TheBug)
- Date: Mon, 27 Nov 1995 18:54:48 +0100
- Organization: privat
-
- In article <497trm$ori@agate.berkeley.edu>,
- jianhe@parker.EECS.Berkeley.EDU (JIAN HE) wrote:
-
- > I want to know to write a multi-player keyboard control game. Right now I
- > have a maze game for one player. I try to add another player to the game but
- > there is a problem getting the keyboard events. I am using keyDown
- > + autoKeyMask for movement. When one player is holding down a key, the other
- > one can't move his character. How can I solve that problem?
-
-
- The problem you are encountering is that the keyboard does not support
- all-key-rollover. That means it can not decode the key matrix if too many
- keys are pressed. You should be able to get two typing keys properly plus
- all of the modifier keys, everything above that will be erratic. This is
- part one of the problem.
- Since you are using keyDown+autoKeyMask you don't get the key up events.
- So I suppose you are expecting to get repeat events for both keys. The
- keyboard driver is only generating repeat events for the key LAST pressed.
- I would suggest you use keyDown+keyUp and do the repeat internally with a
- timer task.
-
- If you should decide to go to GetKeys instead, then please keep in mind
- that there might be more then just the single keyboard generating key
- events. If the user has a joystick connected the joystick will also
- generate key events. And GetKeys reports only keys of the device that was
- the last to send changes.
-
- --
- *******************************************************************
- Guido Körber - Programmer and hardware hacker
- thebug@berlin.snafu.de Specialised in mistreating the ADB
- fax: x49-30-773 81 36 Ask me about:
- Flightstick Pro, Jetstick
- MacEnjoy, MacEnjoy Style
-
- Opinions expressed herein are mine unless expressly stated
- otherwise. Similarities with living or undead persons are
- coincidence and not intended - really! ;-)
- Best use before: (see date printed on backside of message)
- *******************************************************************
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-