HDTenEightyP/NetNews huggingface dataset:
From: ericsc@microsoft.com (Eric Schlegel)
Subject: Re: string comparisons
Date: 30 Jul 92 15:58:06 GMT
Organization: Microsoft Corporation

In article <Bs56G5.1Jy@taligent.com> keith@taligent.com (Keith Rollin) writes:
>Here are some notes I have on the functions (I can never keep them straight!):
>
>    Name            Takes   Case    Diac    Returns         Trap used
>    --------------  ------- -----   -----   ------------    ----------
>    RelString:      Str255  spec    spec    -1, 0, 1        _RelString
>    EqualString:    Str255  spec    spec    Boolean         _CmpString
>
>    IUCompString:   Str255  TRUE    TRUE    -1, 0, 1        _Pack6,#10
>    IUMagString:    Ptr/len TRUE    TRUE    -1, 0, 1        _Pack6,#10
>
>    IUEqualString:  Str255  FALSE   FALSE   Inv. Boolean    _Pack6,#12
>    IUMagIDString:  Ptr/len FALSE   FALSE   Inv. Boolean    _Pack6,#12
>
>The Case and Diac columns refer to whether or not the functions are
>sensitive to case or diacriticals. "spec" means that you can specify
>whether they are or not.

There's also a little-known trap _IUMagWString which does the following:
     IUMagWString:   Ptr/len FALSE   FALSE   -1, 0, 1        _Pack6,#18

That is, it does the same as IUMagIDString, except that it tells you whether
one string is less than, greater than, or equal to the other string, instead
of just telling you whether they differ.

This trap is currently undocumented, but when I talked to DTS about it earlier
this year DTS said they'd try to get it documented in New Inside Macintosh.

-eric
-----
My opinion, not Microsoft's.
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Date: 25 Jul 92 00:07:07 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <1992Jul24.163358.15624@midway.uchicago.edu>,
jcav@quads.uchicago.edu (JohnC) wrote:
> 
> In article <de19-240792042122@mac43-pg2.umd.edu> de19@umail.umd.edu (Dana S Emery) writes:
> >In article <1992Jul23.110356.14261@rhrk.uni-kl.de>, 
> >kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) 
> >writes in response to article <a69376dd@fairgate.uucp>, 
> >paul@fairgate.uucp (Paul Robichaux) who wrote:

> > > > Let me "Add File" at a specific point in the project.
> > > >
> > > Hmmm. How often do you add a file to your project? Since this function
> > > isn't used very often, I don't think your suggestion is a "must".
> >
> >The point is not how often it is used, but how painfull it is to do when
> >one has a large project to add to.
> 
> I think a better solution would be to allow selection of multiple objects in
> the Project window.  That way, you could Add multiple files, then drag them
> as a group to the preferred location ....
>  Actually, I can't figure out why multiple-selection
> wasn't present from the beginning.
> 

Quite right.  Also makes multiple removals tolerable.  The present scheme
of select a file, remove it not only takes forever, but also threatens to
cause disk fragmentation.

 --

Dana S Emery <de19@umail.umd.edu>
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: how to put indelible serial# in resource fork of app?
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<14kh9qINNds5@agate.berkeley.edu> <peter-230792103333@134.7.50.3>
	<1992Jul23.145152.2441@pixel.kodak.com>
Date: Thu, 23 Jul 1992 22:28:29 GMT

.kodak.com> Ken Wieschhoff <kenw@ssd.kodak.com> writes:

   A good way to keep users from running software from servers is to disable
   the capability completely.  When an application is started, doing a
   GetVol(  volumeName, &fVRefNum); when the app launches retrieves the
   volume reference.  Use the following routine to determine if a vol ref is
   a network volume.

Do you think users with System 7 file sharing would
ever consider buying your program ?

PLAY BY THE RULES !

-- 
         Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden

### You have the Easy Access virus. This virus may cause strange sounds.
### You have the 24-bit virus. This virus eats system memory like CRAZY.
Newsgroups: comp.sys.mac.programmer
From: t.g.finstad@fys.uio.no (Terje Finstad)
Subject: Re: where to get Tech Notes?
Followup-To: comp.sys.mac.programmer
Organization: Dept. Physics
Date: Thu, 30 Jul 1992 19:21:32 GMT

In article <jazz-290792150142@kip2-15.apple.com>, jazz@apple.com (David W
Brubeck) wrote:
> 
> In article <16830B2C6.UC525655@mizzou1.missouri.edu>,
> UC525655@mizzou1.missouri.edu (Mark Eaton) wrote:
> > 
> > Sorry, I know this must've been asked a hundred times, but where can I
> > FTP the Apple Developer Tech Notes?
> >  
 
> To get Macintosh Tech Notes and all other kinds of cool development info:
> anonymous ftp to ftp.apple.com (130.43.2.3)
> login: anonymous
> password: your e-mail address
> path: /dts/mac/tn

Does any know where/if europeans can obtain the Tech Notes from?

terje
Newsgroups: comp.sys.mac.programmer
From: Steve Kohlmeyer
Subject: Re: Beginning Dialog Questions
Organization: University of Minnesota
Date: Fri, 31 Jul 1992 17:44:36 GMT

In article <1992Jul30.184047.21368@sagpd1> bberqu@sagpd1 () writes:
>
>Hi,
>
>I'm trying to learn how to use dialogs/controls and all I'm simply trying
>to do right now is display a dialog box along with the some static text
>from a resource file.  So I call GetNewDialog and the window pops up with
>no text (the text is not disabled), I was under the impression that the
>static text would be displayed after calling GetNewDialog (no luck).  
>
Sometimes you need to call DrawDialog() before everything will show up.
I don't remember exactly what circumstances require this call, however,
I think you must call it if you don't use ModalDialog().

Steve Kohlmeyer
U of Minnesota
steve@mind.psych.umn.edu



Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: q: mask/mask region for color object animation
Organization: Kalamazoo College
Distribution: na
Date: Thu, 23 Jul 1992 16:38:47 GMT

andre@flash.cs.pitt.edu (Andre "A Mac Plumber" Srinivasan) writes:
>
>i am trying to drag a picture around the screen...
>
>at first i was just drawing the pict to the offscreen gworld, but
>since the object is not a perfect rectangle (it's an arrow), parts of
>the background get erased by the pict rectangle. ...
>i'll create a pixmap of the pict, copy the pixmap to a bitmap and
>create a maskrgn with BitMapToRegion which i'll use in conjuction with
>copybits.

Incidentally, I think it'll be a lot faster if you use CopyMask and
leave the maskRgn NULL, as you did later.

>i checked the
>bitmap by copying it to my on screen port and found that i indeed had
>an outline rather than a solid black arrow.
>
>i tried creating a searchproc that changed non white into black, but
>this didn't work.  ...  i have to believe (until told otherwise)
>that copybits does not call the search proc if the destination is a
>bitmap.

This makes sense.  I don't know why it _would_, since GDevices and the
concept of a color environment (of which the search proc is a part) only
work in Color QuickDraw.

>so how do i create either a mask to use with copymask or a mask region
>to use with copybits so when i copybits my pixmap to my gworld, only
>the non white pixels get copied and i end up with a color object?

I'd suggest two possibilities:

(1) Create a 1-bit-deep PixMap, with the appropriate two-color color
table, and copy to it instead of a BitMap.  Use your search proc if you
have to.  Then, you can either convert it to a BitMap yourself, call
BitMapToRegion on it (it works on 1-bit-deep PixMaps), or use
CopyDeepMask.

(B) Forget about using CopyBits to make the mask;  just scan through
the PixMap yourself and write ones and zeros to the BitMap manually.

I suggest the latter;  search procs are another level of complication,
and unless you convert the PixMap to a BitMap and use CopyMask, you'll
have to require 32-Bit Quickdraw.  Might as well write the bits
yourself...
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I'm having a lot of trouble seeing how a request that you "shut up" can be
 interpreted as "looking to other people for validation."      - Tim Pierce
From: orpheus@reed.edu (P. Hawthorne)
Newsgroups: comp.sys.mac.programmer
Subject: App Gets Suspend Events But Not Resume Events?!?
Date: 31 Jul 92 16:47:55 GMT
Article-I.D.: reed.1992Jul31.164755.14653
Organization: Reed College, Portland OR

Subject line tells the story. A compiled application run from the Finder
gets no app4 events other than cursor moved events by switching to the
foreground. Nada. Zilch. Naught. None. Why not?

The SIZE resource is okay. When the accept-suspend-and-resume-events bit
is set, I get only suspend events.  When it is clear, I get neither.
Neither the Multifinder-aware bit nor the get-front-clicks bit matter.

What's the catch here?

Theus (orpheus@reed.edu)
From: lai@Apple.COM (Ed Lai)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Date: 29 Jul 92 16:10:25 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <1992Jul29.022001.12901@bilby.cs.uwa.edu.au> quinn@cs.uwa.edu.au (Quinn) writes:
>
>
>Tool and SourceServer compatibility.  OK so Apple haven't released them
>yet but I'll bet that when they do only Think C will support them.
>

How about the reverse so that Think Pascal would act like ToolServer.
I want to be able to edit using another editor and send the source to
Think Pascal to compile and link it.


/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai                                               */
/* Apple Computer, MS37-UP                                     */
/* 20525 Mariani Ave,                                          */
/* Cupertino, CA 95014                                         */
/* (408)974-6272                                               */
zW@h9cOi
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Moving to the foreground after receiving an 'odoc' from the Finder
Date: 23 Jul 92 17:36:45 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Jul21.161251.7693@midway.uchicago.edu>, jcav@quads.uchicago.edu (JohnC) writes:
> If you accept high-level events, you also _must_ accept OS events
> (suspend/resume, etc).

I have a counterexample to this claim: Adobe Premiere 1.0. Here are the
settings of some of its "SIZE" resource bits:

	accept suspend events: no
	does activate on FG switch: no
	32-bit compatible: yes
	high-level event aware: yes

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
Does "future-proof" strike you as a phrase that can be taken two ways?
Newsgroups: comp.sys.mac.programmer
From: nagle@netcom.com (John Nagle)
Subject: Re: Does mac exec code on disk when mounting it?
Date: Tue, 28 Jul 92 06:14:57 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

muller_d@elgc.epfl.ch (Daniel Mueller) writes:
>On startup, if you hold the keys OPTION+COMMAND+SHIFT+BACKSPACE depressed
>the
>internal SCSI drive, normally ID=0, is not mounted. This solution is
>easier
>than to pop the case on your machine. This tips works on all Mac with ADB
>keyboard.

      Of course, in most modern PC BIOS ROMS, pressing ENTER during startup
puts you into a menu-driven system setup program in ROM, allowing one to
deal with such problems in a user-friendly manner.  A message appears
during startup indicating this fact.  

      Apple is way behind here.

						John Nagle
Newsgroups: comp.sys.mac.programmer
From: robert@metropolis.com (Robert Munyer)
Subject: Re: Does mac exec code on disk when mounting it?
Organization: Metropolis Software, Inc.
Date: Wed, 22 Jul 1992 07:09:32 GMT


In article <1992Jul20.223225.25800@random.ccs.northeastern.edu>
mharm@ccs.northeastern.edu (Michael Harm) writes:

> [...] on a mac, is there any code in the mount partition of a disk that is
> executed when the disk is mounted?  I'm concerned that mounting the hard disk
> may introduce something into the ram.  Or, is the act of mounting a drive
> simply reading numbers (number of cyls, sectors) from some area of the disk?
>
> It is *absolutly critical* that the copy be *clean*, and while disinfectant
> programs are being used, I don't trust them to find 100% of all viruses.

The basis of operation for the WDEF virus was that it was possible to put some
code into the Desktop file that would be executed by the Finder whenever that
disk was mounted.

This is probably no longer true in System 7, but it is a precedent.  If the
situation is so sensitive that you don't even trust Disinfectant, then I think
that you definitely shouldn't let the hard disk mount.

______________________________________________________________________
Robert Munyer            |   "I may be synthetic, but I'm not stupid."
robert@metropolis.com    |      -- Bishop, _Aliens_
From: dowdy@apple.com (Tom Dowdy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: 2 simple questions about locked blocks
Date: 17 Jul 92 14:47:51 GMT
Followup-To: comp.sys.mac.programmer
Distribution: usa
Organization: Apple Computer, Inc.

In article <1992Jul10.205409.11486@newssun.med.miami.edu>,
vvann@umbio.med.miami.edu (Vince Vann) wrote:
> The memory manager does NOT keep track of how many times you lock or
> unlock a handle.  When you call HLock, the handle is locked immediately!
> When you call HUnlock, the handle is unlocked immediately!!!  
> 
> However, this does not mean than in your source code you should HLock 
> a block 10 times, and then HUnlock it once (or vice versa).  
> 
> I suggest you always balance your calls to HLock/HUnlock.  It is good 
> practice, it makes sense, and it will save you a lot of debugging headaches!

Well, if you go into a routine with the handle locked and you unlock it,
the routine that called you might be *very* surprised to see the handle
that it locked suddenly become unlocked.

When I'm writing large applications and I want to maintain "data hiding"
within various parts of the application, I never call HUnlock, instead 
I do the following:
 HGetState(h, &flags);
 HLock(h);
 < fun stuff here >
 HSetState(h, flags);

This works great, although it is a bit more expensive than your simple
lock/unlock pairs.  However, because there are *so* few times when
locking a handle is really needed (DarkSide calls HLock 4 times, and
they are all on resources) - the overhead of this code is fairly minor.

When writing smaller and more localized applications (DarkSide comes to
mind
again), I usually just Lock/Unlock because I "know" what I'm doing.

 Tom Dowdy                 Internet:  dowdy@apple.COM
 Apple Computer MS:81KS    UUCP:      {sun,voder,amdahl,decwrl}!apple!dowdy
 20525 Mariani Ave         AppleLink: DOWDY1
 Cupertino, CA 95014       
 "The 'Ooh-Ah' Bird is so called because it lays square eggs."
From: gonzalm@prism.cs.orst.edu (Mario Gonzales)
Newsgroups: comp.sys.mac.programmer
Subject: PROGRAMMING PROB: How do you find the system folder?
Date: 22 Jul 92 18:39:46 GMT
Article-I.D.: CS.1992Jul22.183946.20587
Organization: Oregon State University, Computer Science Dept


Hi all,

I have looked in vain to find the function that will return the loaction of
the system folder.  I can find the boot disk but the system folder is
not allways called the "system folder" on the startup disk.

Also what is the easiest way to traverse the entire directory structure
of a disk?

If possible could you provide code samples?

Any help is most appreciated!

Thanks,

Mario Gonzales


----------------------------------------------------------------------
|    Macintosh Network Support        |===========================|  |
|    Student Computing Labs           | gonzalm@prism.cs.orst.edu |  |
|    University Computing Services    | gonzalem@ucs.orst.edu     |  |
|    Oregon State University          |===========================|  |
----------------------------------------------------------------------
From: francois@welchgate.welch.jhu.edu (Francois Schiettecatte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: faceless background app's.
Date: 21 Jul 92 20:38:10 GMT
Organization: Johns Hopkins Univ. Welch Medical Library

Your last statement is correct, a faceless app has no user interface
whatsoever, there are no windows, menus, dialogs, etc, nor are you allowed
to even initialise those managers in a faceless app. A faceless app will
not appear on the finder list, but the memory it occupies will be added to
the system memory figure.

In article <1992Jul21.164546.7151@aoa.aoa.utc.com> davidt@aoa.aoa.utc.com (David Trefrey) writes:
>
>
>
>
>	One of those little things that annoys me:
>
>	People have been refering to certian types of background applications
>	as 'faceless'.  What does 'faceless' mean??  I've done some 
>	background only stuff and it still appears in the finder's list.
>	Does this mean it isn't faceless?  Or does faceless mean the program
>	cannot produce a window? 
>
>						thanks.
>							davidt@aoa.utc.com
>
>-- 
>
>	David Trefry
>	davidt@aoa.utc.com
Newsgroups: comp.sys.mac.programmer
From: Randy DeRuiter <dedrad@arco.com>
Subject: DRVR, init advice sought..
Organization: ARCO Alaska, Inc.
X-Useragent: Nuntius v1.1
Date: Mon, 27 Jul 1992 15:56:19 GMT

I'm in the midst of writing an init based utility which adds a menu to
the menubar - all applications, not just the finder.  Right now I see two
potential paths I can take to accomplish this :  
1)  Patching Drawmenubar to add what I want, then possibly patching
GetNextEvent to do the mouse tracking for my added menu.  or 
2)  Loading a DRVR which attaches a menu for me.  
I'm having reasonable success with path 1), but I don't like it because
it's not too friendly a method in the already crowded menubar. I have an
old code example of path 2), but it doesn't appear to work well in System
7 - desk accessories refuse to launch with the resident driver in place. 
My main question is:  is path 2) a viable method with system 7?  Sorry
for the vague question, but I can provide more specific code to anyone
who has knowledge in this area.  Reply direct if this is not worth a long
thread on the network.  
Thanks.
dedrad@arco.com
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: newline mode
Organization: Kalamazoo College
Date: Wed, 22 Jul 1992 13:21:17 GMT

system@asuvax.eas.asu.edu (Marc Lesure) writes:
>Inside Mac Vols II and IV briefly mention a newline mode on file reads,
>but doesn't expand on it.  Could someone tell me how to use this?

Is this in the FAQ?  If not, it probably should be.

It's not your fault, Marc;  the information you want is hidden in the
Note on IV-121.  Why is it not in the Index?  Nobody knows.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I just got Think C and I like it so much that I had to tell the world.
 I used to be an MPW bigot, but no more.   - John Norstad, 10 July 1992
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: HOW IS QUICKBASIC FOR THE MAC?
Date: 22 Jul 92 18:50:56 GMT
Distribution: usa
Organization: SRI International, Menlo Park, California

In article <15353@ucdavis.ucdavis.edu> ez008347@fred.ucdavis.edu writes:

>1) How is QuickBasic for the Mac? Please only answer this one if you know what

It basically dead right now. Though microsoft has releaseda version of it 
that works with system seven finally. 




Matt
-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
Newsgroups: comp.sys.mac.programmer
Subject: tcl question
Summary: how do I know if a document has been closed?
Keywords: oop, tcl, object oriented, documents
Date: 30 Jul 92 22:26:01 GMT
Followup-To: joshr@kronos.arc.nasa.gov
Distribution: comp.sys.mac.programmer
Organization: NASA/ARC Information Sciences Division

Hey netters, 

I have a somewhat tcl specific question here which I'll bet money is
not a FAQ.  On second thought, maybe it is, but here goes.

I'm writing an application that shows a table of contents.  The app can be 
launched with appleevents from hypercard.  What I'm trying to do is the 
following:  if the user launches the app with a ceratain table of contents (toc)
and then goes back to hypercard and launches it again, the application
will open the file twice.  What I want is that when the user
launches it the second time, the application would realize that
that file is already being looked at (has a current CDocument associtaed
with it) and not open it again.


My first guess was to check CDocument's field itsSupervisor, like this

itsSupervisor->itsDependents->NthItem(i)->GetClassName(aStr255)

then when I knew what CDocuments were dependent on the application, I could
check each's window's name to figure out what file they were associated with.

The probelm is, itsDependents turns out to nbe a protected member, so I
can't access it directly through CDocument.

Here are some ways of doing this I thought up, and their pitfalls.
Your input is welcome.

The most elegant way would be to simply keep track of which files were opened
and closed in a CList assosiated with CTOCDoc, my descendent of CDocument.
The only problem with this is that there is no explicit call to CDocument (?)
when the document is closed (no -- wait -- DUH -- it's called Dispose(!)).

So I guess what I'll do is assume that the doc. is open between the time it
is created and disposed of.

Is there a better way to do this?  Is there a standard way?

What I'm gonna do is this - when I open the document with OpenFile(),
i'll keep track of the fact that it was opened in CTOCApp.  Then 
when I close it, i'll mark that it was closed.  Whenever CTOCApp recieves a
OpenDocument messaeg, it will first check that the file is not currently open.

Does this sound OK?  What do you think is the best way to list the files I 
have open -- SFReply, filename, magic cookie ... ?

BTW, how many people are actually programming with the TCL anyway?

joshr@kronos.arc.nasa.gov




-- 
----------------------------------
#include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
joshr@kronos.arc.nasa.gov
"'I see', said the blind carpenter, as he picked up his hammer and saw".
Newsgroups: comp.sys.mac.programmer